Commit 24600b08 authored by lvtz's avatar lvtz

add 消课

parent 8e80cdda
......@@ -22,7 +22,8 @@
"index",
"studentdetail",
"editstudent",
"rewardstudent"
"rewardstudent",
"courseeliminate"
]
},
{
......
import {
formIdCreate
} from '../../../service/common.js';
import {
memberIntegral
} from '../../../service/business/circlemember.js';
import {
studentDetailGet,
classStudentCourseDetail
} from '../../../service/business/studentmgt';
import {
courseEliminate,
} from '../../../service/business/coursemgt'
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
localImageRoot: '../../../images/',
imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion,
submitting: false,
courseDetail: {},
params: {
expend: 0,
remark: '',
course_mode: 1,//1-课时,2-天数
course_type: 1,//1-付费课时 2-赠送课时
},
courseid: 0,
sendMsg: 1,//发送通知消息
is_notice: 1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const{ studentId,sid,type,student_course_id,courseid} = options;
this.setData({
studentId,
sid,
student_course_id,
courseid
})
console.log(this.data.params)
classStudentCourseDetail({
id: this.data.courseid
}).then((res) => {
const { code, data } = res;
if (code != 200) { // 失败的处理
} else {
this.setData({
courseDetail: {
surplus: data.surplus,//总剩余,
surplus_buy: data.surplus_buy,//付费剩余,
surplus_give: data.surplus_give, //赠送总剩余,
buy: data.buy,
expend_buy: data.expend_buy,
expend_give: data.expend_give
},
'params.course_mode': data.course_mode
})
}
})
},
onShow: function () {
},
formIdCreate(e) {
const { formId } = e.detail;
formIdCreate({
formId
})
},
chooseCourseType(e){
const {type} = e.currentTarget.dataset;
if(type==this.data.params.course_type){
return
}
this.setData({
'params.course_type': Number(type)
})
},
noticeswitch(e){
if (Number(this.data.sendMsg) == 0) {
this.setData({
sendMsg: 1,
is_notice: 1
})
} else if (Number(this.data.sendMsg) == 1) {
this.setData({
sendMsg: 0,
is_notice: 2
})
}
},
checkData(value) {
let str = value.replace(/[^\d\.]/g, '');
const pointIndex = str.search(/\./);
if (pointIndex !== -1) {
str = str.substr(0, pointIndex + 1).replace(/\./, '.5');
}
return str;
},
numberInput(e){
let course_type = this.data.params.course_type;
let course_mode = this.data.params.course_mode;
let value = this.checkData(e.detail.value);
this.setData({
'params.expend': Number(value)
})
let text = course_mode==1?'课时':'天数';
if(course_mode==1){
if(course_type==1){
if(Number(value)>Number(this.data.courseDetail.surplus_buy)){
wx.showModal({
title: '提示',
content: `消除${text}不能大于剩余付费${text}`,
showCancel: false,
confirmColor: '#35BAFD'
})
}
return
}else if(course_type==2){
if(Number(value)>Number(this.data.courseDetail.surplus_give)){
wx.showModal({
title: '提示',
content: `消除${text}不能大于剩余赠送${text}`,
showCancel: false,
confirmColor: '#35BAFD'
})
}
return
}
}else if(course_mode==2){
if(Number(value)>Number(this.data.courseDetail.surplus)){
wx.showModal({
title: '提示',
content: `消除${text}不能大于剩余${text}`,
showCancel: false,
confirmColor: '#35BAFD'
})
}
return
}
},
remarkInput (e) {
const {value} = e.detail;
this.setData({
'params.remark': value
})
},
pointsInput (e) {
const {value} = e.detail;
this.setData({
number: Number(value)!=0? Number(value): ''
})
},
// 消课
doSubmit (){
const {expend, remark, course_type} = this.data.params;
let text = course_type==1?'课时数':'天数'
if (this.data.submitting) {
return
}
if (expend<=0) {
wx.showModal({
title: '提示',
content: `消耗${text}不能为空`,
showCancel: false,
confirmColor: '#35BAFD'
})
return;
}
// if (this.data.remark.length == 0) {
// wx.showModal({
// title: '提示',
// content: '留言内容不能为空',
// showCancel: false,
// confirmColor: '#35BAFD'
// })
// return;
// }
if (this.data.submit) { // 防止数据重复提交
return
}
wx.showLoading({
title: '保存中...'
})
this.setData({
submitting: true
})
courseEliminate(Object.assign(this.data.params,{
student_course_id: this.data.courseid,
is_notice: this.data.is_notice
})).then((res) => {
const { code, data } = res;
this.setData({
submitting: false
})
if (code != 200) { // 失败的处理
} else {
let pages = getCurrentPages();
let currPage = null; //当前页面
let prevPage = null; //上一个页面
if (pages.length >= 2) {
currPage = pages[pages.length - 1]; //当前页面
prevPage = pages[pages.length - 2]; //上一个页面
}
prevPage.setData({
needRefresh: true
})
wx.navigateBack({
delta: 1,
})
}
}).catch(() => {
wx.hideLoading();
this.setData({
submitting: false
})
})
},
changType(e){
this.setData({
isAdd:e.currentTarget.dataset.flag
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "消课",
"usingComponents": {
"expiredTip": "../../components/expiredTip",
"w-switch": "/dist/w-switch/index"
}
}
\ No newline at end of file
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="container">
<view class="section" wx:if="{{params.course_mode==1}}">
<view class="form-box">
<view class="form-item">
<view class="form-label">消耗的课时类型</view>
<view class="form-content">
<view class="radio-item" bindtap="chooseCourseType" data-type="1">
<image class="icon-checkbox" src="{{imageRoot}}2b/common/radioactive2.png?{{imageVersion}}" wx:if="{{params.course_type==1}}"></image>
<image class="icon-checkbox" src="{{imageRoot}}2b/common/radiono.png?{{imageVersion}}" wx:if="{{params.course_type!=1}}"></image>
<view class="radio-title">付费{{params.course_mode==1?'课时':'天数'}}</view>
</view>
<view class="radio-item" bindtap="chooseCourseType" data-type="2">
<image class="icon-checkbox" src="{{imageRoot}}2b/common/radioactive2.png?{{imageVersion}}" wx:if="{{params.course_type==2}}"></image>
<image class="icon-checkbox" src="{{imageRoot}}2b/common/radiono.png?{{imageVersion}}" wx:if="{{params.course_type!=2}}"></image>
<view class="radio-title">赠送{{params.course_mode==1?'课时':'天数'}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="section section-calc">
<view class="boxall">当前剩余{{courseDetail.surplus}}{{params.course_mode==1?'课时':'天'}}</view>
<view class="form-box">
<view class="form-item">
<view class="form-label">本次消耗{{params.course_mode==1?'课时数':'天数'}}</view>
<view class="form-content">
<input type="digit" class="form-input" maxlength="4" value="{{params.expend}}" placeholder="请输入" bindblur="numberInput"/>
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
</view>
<view class="calc-boxall">
<view class="line-box">
<view class="line-item">消课后总剩余{{params.course_mode==1?'课时':'天数'}}{{courseDetail.surplus-params.expend}}</view>
</view>
<view class="line-box" wx:if="{{params.course_mode==1}}">
<view class="line-item">付费剩余{{params.course_mode==1?'课时':'天数'}}:{{params.course_type==1?courseDetail.surplus_buy-params.expend: courseDetail.surplus_buy}}</view>
<view class="line-item">赠送剩余{{params.course_mode==1?'课时':'天数'}}:{{params.course_type==2?courseDetail.surplus_give-params.expend: courseDetail.surplus_give}}</view>
</view>
</view>
</view>
<view class="section">
<view class="form-box">
<view class="form-item">
<view class="form-label">备注</view>
<view class="form-content">
<input type="text" class="form-input" value="{{params.remark}}" placeholder="请输入" bindinput="remarkInput"/>
<image class="arrowsmall" src="{{imageRoot}}2b/organizationalmgt/right.png?{{imageVersion}}"></image>
</view>
</view>
</view>
</view>
<view class="section">
<view class="section-title">消息提醒</view>
<view class="form-box">
<view class="form-item">
<view class="form-label" style="font-weight: normal;">此次消课信息通知家长</view>
<view class="form-content">
<w-switch slot="content" value="{{ sendMsg }}" color="#65B8F4" size="small" bind:onChange="noticeswitch" />
</view>
</view>
</view>
</view>
<view class="form-fixbtn" bindtap="doSubmit">
<form report-submit="true" bindsubmit="formIdCreate" class="createidform">
<button form-type="submit" class="createidbutton"></button>
</form>
保存
</view>
</view>
<expiredTip/>
\ No newline at end of file
@import '../../../style/commonform.wxss';
page{
background: #F7F7F9;
}
.container{
}
.form-box .form-item .form-content{
flex: none;
}
.form-box .form-item .form-label{
font-size: 28rpx;
color: #000;
font-weight: bold;
}
.form-box .form-item::after{
display: none;
}
.section{
background: #fff;
margin-bottom: 20rpx;
}
.section .section-title{
font-size: 28rpx;
color: #000;
font-weight: bold;
padding: 40rpx 23rpx 19rpx;
line-height: 1;
}
.section-calc>view{
padding-left: 30rpx;
position: relative;
}
.section-calc .boxall{
font-size: 26rpx;
color: #000;
position: relative;
padding: 0 56rpx;
height: 106rpx;
display: flex;
align-items: center;
}
.section-calc .boxall::before{
content: '';
width: 12rpx;
height: 12rpx;
background:#35BAFD;
border-radius: 6rpx;
position: absolute;
top: 50%;
left: 24rpx;
transform: translateY(-50%);
}
.section-calc .calc-boxall{
padding: 16rpx 56rpx;
}
.section-calc .calc-boxall .line-box{
display: flex;
align-items: center;
padding: 16rpx 0;
}
.section-calc .calc-boxall .line-box .line-item{
font-size: 24rpx;
color: #8C8C8C;
padding: 0 30rpx;
position: relative;
line-height: 1;
}
.section-calc .form-box{
border-top: 1px solid rgba(0,0,0,.05);
border-bottom: 1px solid rgba(0,0,0,.05);
}
.section-calc .calc-boxall .line-box .line-item:nth-child(1){
padding-left: 0;
}
.section-calc .calc-boxall .line-box .line-item::after{
content: '';
width: 1px;
height: 20rpx;
background: rgba(0,0,0,.1);
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}
.section-calc .calc-boxall .line-box .line-item:last-of-type::after{
display: none;
}
.form-box .form-item:last-of-type::after{
content: '';
width: 100%;
height: 1px;
background: rgba(0,0,0,.05);
position: absolute;
bottom: 0;
right: 0;
transform: scaleY(.5);
}
\ No newline at end of file
......@@ -35,8 +35,6 @@ Page({
imageVersion: app.globalData.imageVersion,
localImageRoot: '../../../images/',
bigTabs: [{
name: '详情信息'
}, {
name: '报读课程'
}, {
name: '上课记录'
......@@ -124,9 +122,10 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
// if(this.data.needRefresh){
// this.data.needRefresh = false
// }
if(this.data.needRefresh){
this.studentclassesGet()
}
},
/**
......@@ -136,6 +135,7 @@ Page({
this.innerAudioContext.pause();
this.resetAudiosPlayStatus()
clearInterval(this.data.voiceInterval);
this.data.needRefresh = false
},
/**
......@@ -188,7 +188,7 @@ Page({
if (_actBigTabsIndex === index) {
return
}
if(index == 3){
if(index == 2){
this.setData({
page: 1,
emptyClockPage: false,
......@@ -198,7 +198,7 @@ Page({
this.clockListGet('init');
})
}
if (index != 3) {
if (index != 2) {
this.setData({
circleSelecting: false
})
......@@ -250,11 +250,6 @@ Page({
})
},
makePhoneCall() {
wx.makePhoneCall({
phoneNumber: this.data.studentInfo.mobile
})
},
// 报读课程
studentclassesGet() {
studentclassesGet({
......@@ -922,4 +917,23 @@ Page({
})
},
// 选择点评类型的代码
callPhone(e){
const {mobile} = e.currentTarget.dataset;
wx.makePhoneCall({
phoneNumber: mobile
})
},
toCourseeliminate(e){
const {item} = e.currentTarget.dataset;
wx.navigateTo({
url: `/business/pages/studentcenter/courseeliminate?studentId=${this.data.studentId}&courseid=${item.id}`
})
},
bindBuyCourse(e){
const {item} = e.currentTarget.dataset;
wx.navigateTo({
url: `business/pages/studentcenter/buycourse?sid=${this.data.sid}&studentId=${this.data.studentId}&id=${item.id}`
})
}
})
\ No newline at end of file
......@@ -6,7 +6,13 @@
<view class="left">
<image class="avatar" src="{{filter.imagify(studentInfo.avatar, 'image/resize,w_160/format,jpg')}}" wx:if="{{studentInfo.avatar}}"/>
<image class="avatar" src="{{imageRoot}}common/empty/avatar_user.png?{{imageVersion}}" wx:else></image>
<view class="name">{{studentInfo.name}}</view>
<view class="opt-box">
<view class="name">{{studentInfo.name}}</view>
<view class="btn-box">
<view class="btn" bindtap="bindBuyCourse" data-item="0">购课</view>
<view class="btn" bindtap="callPhone" data-mobile="{{studentInfo.mobile}}">电话</view>
</view>
</view>
</view>
<view class="right" bindtap="goeditstudent">
<view class="text">编辑资料</view>
......@@ -45,67 +51,63 @@
</view>
<view class="bigtab-box-mock" wx:if="{{curBigTab}}"></view>
<view class="content-box">
<view class="base-info" wx:if="{{actBigTabsIndex==0}}">
<view class="item">
<view class="course-info" wx:if="{{actBigTabsIndex==0}}">
<view class="points-box">
<view class="left">
<image class="icon-point" src="{{imageRoot}}2b/circleindex/icon_studentreward.png?{{imageVersion}}"></image>
<text class="name">学员积分</text>
<text class="num">{{studentInfo.honors.integral?studentInfo.honors.integral:0}}</text>
</view>
<view class="btn" bindtap="gorewardstudent">
<text class="">积分变动</text>
<image class="gray-right" src="{{imageRoot}}2b/studentdetail/gray-right.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
</view>
</view>
<view class="item">
<view class="left">
<text class="name">联系电话</text>
<text class="num">{{studentInfo.mobile}}</text>
</view>
<view class="btn" bindtap="makePhoneCall">
<image class="phone" src="{{imageRoot}}2b/studentdetail/phone.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view class="right" bindtap="gorewardstudent">
<text class="text">增减积分</text>
<image class="icon-arr" src="{{imageRoot}}2b/studentdetail/gray-right.png?{{imageVersion}}"></image>
</view>
</view>
</view>
<view class="course-info" wx:if="{{actBigTabsIndex==1}}">
</view>
<view class="course-tab-box">
<view class="tab-item {{coursetabsIndex==0?'act-tab':''}}" data-index="{{0}}" bindtap="courseTabChange">在读课程</view>
<view class="tab-item {{coursetabsIndex==1?'act-tab':''}}" data-index="{{1}}" bindtap="courseTabChange">历史报读</view>
</view>
<view class="line-20"></view>
<view class="course-list" wx:if="{{courselist.length>0}}">
<view class="course-item" wx:for="{{courselist}}" wx:for-item="courseItem" wx:key="{{index}}">
<view class="title-box">
<view class="title">{{courseItem.course.title}}</view>
<!-- <view class="time">
<image class="icon" src="{{imageRoot}}2b/studentdetail/time.png?{{imageVersion}}" mode="aspectFit|aspectFill|widthFix" lazy-load="false" binderror="" bindload=""></image>
<view class="" style="padding-right: 22rpx">2019.06.29-2020.06.28</view>
<view class="">(365天)</view>
</view> -->
<view class="opt-box">
<view class="btn" bindtap="bindBuyCourse" data-item="{{courseItem}}">续费</view>
<view class="btn" bindtap="toCourseeliminate" data-item="{{courseItem}}">消课</view>
</view>
</view>
<view class="count-box">
<view class="count-box" wx:if="{{courseItem.course_mode==1}}">
<view class="item">
<view class="name">购买课时:</view>
<view class="num">{{courseItem.buy}}</view>
<view class="name">购买付费课时:</view>
<view class="num">{{filter.sum(courseItem.surplus_buy , courseItem.expend_buy)}}</view>
</view>
<view class="item">
<view class="name">消课课时:</view>
<view class="num">{{courseItem.expend}}</view>
<view class="name">购买赠送课时:</view>
<view class="num">{{filter.sum(courseItem.surplus_give, courseItem.expend_give)}}</view>
</view>
<!-- <view class="item">
<view class="name">剩余天数:</view>
<view class="num">???</view>
</view> -->
<view class="item">
<view class="name">剩余课时:</view>
<view class="num">{{courseItem.total-courseItem.expend}}</view>
<view class="name">剩余付费课时:</view>
<view class="num">{{courseItem.surplus_buy}}</view>
</view>
<view class="item">
<view class="name">赠送课时:</view>
<view class="num">{{courseItem.give}}</view>
<view class="name">剩余赠送课时:</view>
<view class="num">{{courseItem.surplus_give}}</view>
</view>
</view>
<view class="count-box" wx:if="{{courseItem.course_mode==2}}">
<view class="item">
<view class="name">购买天数:</view>
<view class="num">{{courseItem.buy}}</view>
</view>
<view class="item">
<view class="name">赠送天数:</view>
<view class="num">{{courseItem.give}}</view>
</view>
<view class="item">
<view class="name">剩余天数:</view>
<view class="num">{{filter.sum(courseItem.buy,courseItem.give)}}</view>
</view>
</view>
<view class="class-box">
<view class="class-item" wx:for="{{courseItem.classes}}" wx:key="{{index}}">
<view class="blue-line"></view>
......@@ -125,7 +127,7 @@
</view>
<view class="has-nomore" wx:if="{{courselist.length>0}}">没有更多了</view>
</view>
<view class="record-info" wx:if="{{actBigTabsIndex==2}}">
<view class="record-info" wx:if="{{actBigTabsIndex==1}}">
<view class="record-tab-box">
<view class="tab-item" bindtap="recordTabsChange" data-index="{{0}}">
<view class="icon {{recordTabIndex==0?'act-icon':''}}"></view>
......@@ -186,7 +188,7 @@
<view class="has-nomore" wx:if="{{actStudentcalls&&actStudentcalls.length>0}}">没有更多了</view>
</view>
</view>
<view class="growthrecord-info" wx:if="{{actBigTabsIndex==3}}">
<view class="growthrecord-info" wx:if="{{actBigTabsIndex==2}}">
<view class="class-tab" wx:if="{{studentClass.length==0}}" style="padding: 0 24rpx;">
<view class="title">
<view class="text">全部班级</view>
......
......@@ -22,14 +22,31 @@
border: 1px solid #fff;
border-radius: 50%;
}
.container .header-box .student-info .left .name{
font-size:30rpx;
font-family:PingFang-SC-Bold;
font-weight:bold;
color:rgba(255,255,255,1);
line-height: 1;
.container .header-box .student-info .left .opt-box{
padding-left: 30rpx;
}
.container .header-box .student-info .left .opt-box .name{
font-size: 30rpx;
font-weight: bold;
color: #fff;
line-height: 1;
}
.container .header-box .student-info .left .opt-box .btn-box{
display: flex;
padding-top: 22rpx;
}
.container .header-box .student-info .left .opt-box .btn-box .btn{
width: 100rpx;
height: 45rpx;
background:#fff;
border-radius: 23rpx;
font-size: 26rpx;
color: #434343;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
}
.container .header-box .student-info .right{
display: flex;
align-items: center;
......@@ -141,52 +158,47 @@
.content-box{
}
.content-box .base-info{
}
.content-box .base-info .item{
.content-box .points-box{
border-bottom: 20rpx solid #F3F4F6;
height: 120rpx;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid rgba(0,0,0,.05);
padding: 0 24rpx;
}
.content-box .points-box .left{
display: flex;
align-items: center;
}
.content-box .points-box .left .icon-point{
width: 33rpx;
height: 33rpx;
}
.content-box .base-info .item .left .name{
.content-box .points-box .left .name{
font-size:26rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(0,0,0,.5);
color:rgba(0,0,0,.7);
line-height:1;
padding: 0 40rpx 0 24rpx;
padding: 0 40rpx 0 20rpx;
}
.content-box .base-info .item .left .num{
.content-box .points-box .left .num{
font-size:30rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(0,0,0,1);
line-height:1;
}
.content-box .base-info .item .right text{
font-size:26rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(142,142,142,1);
.content-box .points-box .right .text{
font-size: 26rpx;
color:#8E8E8E;
line-height:1;
}
.content-box .base-info .item .btn .text{
color: #8E8E8E;
}
.content-box .base-info .item .btn .gray-right{
.content-box .points-box .right .icon-arr{
width: 12rpx;
height: 21rpx;
margin-right: 24rpx;
margin-left: 21rpx;
}
.content-box .base-info .item .btn .phone{
width: 60rpx;
height: 60rpx;
margin-right: 14rpx;
}
.course-info{
}
......@@ -222,6 +234,9 @@
.course-info .course-item {}
.course-info .course-item .title-box{
padding: 30rpx 24rpx 11rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.course-info .course-item .title-box .title{
font-size:30rpx;
......@@ -230,22 +245,25 @@
color:rgba(84,84,84,1);
line-height:1;
}
.course-info .course-item .title-box .time{
padding-top: 26rpx;
.course-info .course-item .title-box .opt-box{
display: flex;
align-items: center;
font-size:26rpx;
color:rgba(137,138,136,1);
line-height:1;
}
.course-info .course-item .title-box .time .icon{
width: 26rpx;
height: 26rpx;
margin-right: 12rpx;
}
.course-info .course-item .title-box .time view{
font-size:26rpx;
.course-info .course-item .title-box .opt-box .btn{
margin-left: 29rpx;
width: 89rpx;
height: 45rpx;
background:#fff;
border: 1px solid #D3D3D3;
border-radius: 8rpx;
font-size: 26rpx;
color: #434343;
display: flex;
align-items: center;
justify-content: center;
}
.course-info .course-item .count-box{
padding: 21rpx 24rpx;
display: flex;
......
......@@ -287,6 +287,7 @@ const apis = {
studentclasseslist: `${api}member/erp/classes`,//学员班级列表
courseTempleteApi: `${api}member/erp/course_template`,
erpstudentRenewal: `${api}member/erp/course/make`,//erp学员购买续课
classStudentCourseDetail: `${api}member/erp/student/courses`,//学员课程详情
},
// 课务
classservice:{
......@@ -506,6 +507,7 @@ const apis = {
},
courseMgt: {
courseApi: `${api}member/erp/courses`,//编辑 添加 列表 详情 删除
courseEliminate: `${api}member/erp/course/eliminate`,//消课
},
loginregistermsg: { //改版登录注册获取验证码
......
export default {
imageRoot: 'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/',
host: 'https://qxapi.qingxiao.online/daka',
host2: 'https://wx.m.shangjiadao.cn',
// host: 'https://qxapi.qingxiao.online/daka',
// host2: 'https://wx.m.shangjiadao.cn',
storageVersion: '5.0',
imageVersion: '20191104',
// host: 'https://clock.wp53.cn',
// host2: 'https://test.wp53.cn',
host: 'https://clock.wp53.cn',
host2: 'https://test.wp53.cn',
appId: 'wxc1246ea029394785',
miniProgram: {
clock: 'wxdeee20e52a1fd7ee'
......
......@@ -546,6 +546,14 @@ function reviewClassImgShow(data, stid){
function Mathceil(data){
return Math.ceil(data)
}
// 不定项求和
function sum(){
var result=null;
for(var i=0; i<arguments.length;i++){
result+=arguments[i]*1;
}
return result.toFixed(1);
}
module.exports = {
formatDate: formatDate,
timeCompare: timeCompare,
......@@ -591,5 +599,6 @@ module.exports = {
formatWebsiteBarrage: formatWebsiteBarrage,
mediaPng:mediaPng,
Mathceil:Mathceil,
toFix: toFix
toFix: toFix,
sum: sum
}
\ No newline at end of file
......@@ -50,9 +50,20 @@ function courseDelete (data) {
errorresolve: 1,
})
}
// 消课
function courseEliminate (data) {
return wxRequest({
role: '2b',
url: apis.business.courseMgt.courseEliminate,
data,
method: 'POST',
errorresolve: 1,
})
}
export {
courseEdit,
courseList,
courseDetail,
courseDelete
courseDelete,
courseEliminate
}
\ No newline at end of file
......@@ -127,6 +127,14 @@ function classStudentsAdd(data) {
errorresolve: 1,
})
}
function classStudentCourseDetail(data) {
return wxRequest({
role: '2b',
url: apis.business.studentmgt.classStudentCourseDetail+'/'+data.id,
method: 'GET',
errorresolve: 1,
})
}
export {
studentDetailGet,
studentDetailPut,
......@@ -139,5 +147,6 @@ export {
studentclasseslistGet,
courseTemplete,
erpstudentAdd,
studentRenewal
studentRenewal,
classStudentCourseDetail
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment