Przeglądaj źródła

Merge branch 'master' of http://git.cc-lotus.info/ball-court/ball-applet

YY 2 lat temu
rodzic
commit
1e6d0aec38

+ 1 - 1
pages/coaAdmin/course/add.wxml

@@ -14,7 +14,7 @@
                         <input type="text" name="school_id" value="{{form.school_id}}" placeholder="请输入学校id" />
                     </view>
                 </view>
-                <view class="content">
+                <view class="content" style="display: none;">
                     <view class="label">课程类型:</view>
                     <view class="value">
                         <input type="text" name="type" value="{{form.type}}" placeholder="请输入课程类型" />

+ 1 - 1
pages/coaAdmin/course/list.js

@@ -40,10 +40,10 @@ Page({
             arr = await app.$post(`/lessonCoach/${arr.data[0]._id}`, { is_sign: '1' });
             if (arr.errcode == '0') {
                 wx.showToast({ title: `签到成功`, icon: 'error', duration: 2000 })
+                that.setData({ skip: 0, page: 0, list: [] });
                 that.watchLogin();
             } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
         }
-        console.log(arr);
     },
     // 分页
     toPage: function () {

+ 3 - 3
pages/stuAdmin/course/sign.js

@@ -58,8 +58,8 @@ Page({
         const form = that.data.form;
         const user = that.data.user;
         var money = '';
-        if (form.type == '0') money = form.real_money;
-        else if (form.type == '1') money = form.money;
+        if (form.type == '0') money = form.money;
+        else if (form.type == '1') money = form.real_money;
         wx.showModal({
             title: '提示',
             content: '您是否确定报名?',
@@ -82,7 +82,7 @@ Page({
                                         let lessonStudent = await app.$post(`/lessonStudent`, params);
                                         if (lessonStudent.errcode == '0') {
                                             wx.showToast({ title: `报名申请完成`, icon: 'success', duration: 2000 });
-                                            const pay = await app.$post(`/payOrder/${arr.data.data._id}`, { from_id: lessonStudent.data._id });
+                                            const pay = await app.$post(`/payOrder/${arr.data.data._id}`, { from_id: lessonStudent.data._id, status: '1' });
                                             if (pay.errcode == '0') that.watchLogin();
                                         }
                                         else wx.showToast({ title: `${lessonStudent.errmsg}`, icon: 'error', duration: 2000 })