浏览代码

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

guhongwei 2 年之前
父节点
当前提交
30d49a83a7

+ 2 - 1
pagesSchool/stuAdmin/course/sign.js

@@ -97,7 +97,8 @@ Page({
                                     let lessonStudent = await app.$post(`/lessonStudent`, params);
                                     if (lessonStudent.errcode == '0') {
                                         wx.showToast({ title: `报名申请完成 从余额扣除`, icon: 'none', duration: 2000 });
-                                        that.watchLogin();
+                                        const pay = await app.$post(`/bill/${arr.details.id}`, { from_id: lessonStudent.data._id });
+                                        if (pay.errcode == '0') that.watchLogin();
                                     }
                                     else wx.showToast({ title: `${lessonStudent.errmsg}`, icon: 'error', duration: 2000 })
                                 }

+ 1 - 1
pagesSchool/stuAdmin/money/add.wxml

@@ -23,7 +23,7 @@
                 <view class="contentmoney">
                     <view class="label">充值金额:</view>
                     <view class="value">
-                        <text>¥</text><input type="number" name="paymoney" value="{{form.paymoney}}" placeholder="请输入充值金额" />
+                        <text>¥</text><input type="digit" name="paymoney" value="{{form.paymoney}}" placeholder="请输入充值金额" />
                     </view>
                 </view>
                 <view class="btn">

+ 1 - 14
pagesSchool/stuAdmin/stat/study.js

@@ -26,17 +26,6 @@ Page({
                 })
                 // 模拟请求
                 var times = setTimeout(async function () {
-                    const student = await app.$get(`/lessonStudent`, { student_id: res.data.info.id, is_pay: '1' })
-                    if (student.errcode == '0') {
-                        for (const val of student.data) {
-                            const lesson = await app.$get(`/lesson/${val.lesson_id}`)
-                            val.lessonname = lesson.data.title
-                        }
-                        var schooldata = student.data.map((item) => { return item.lessonname; });
-                    }
-                    // 数据
-                    that.data.schooldata = schooldata;
-                    that.data.xdata = ['1月份', '2月份', '3月份', '4月份', '5月份', '6月份', '7月份', '8月份', '9月份', '10月份', '11月份', '12月份'];
                     that.data.data1 = [230, 150, 178, 70, 178, 340, 133, 118, 136, 165, 130, 178];
                     that.data.data2 = [112, 150, 151, 135, 170, 130, 200, 112, 150, 151, 135, 170];
                     clearTimeout(times);
@@ -52,11 +41,9 @@ Page({
         let that = this;
         // 由于请求数据有延迟所以写一个时间函数,当数据存在的时候再执行绘制
         var times = setInterval(function () {
-            var xdata = that.data.xdata;
-            var schooldata = that.data.schooldata;
             var data1 = that.data.data1;
             var data2 = that.data.data2;
-            if (xdata && data1 && data2 && schooldata) {
+            if (data1 && data2) {
                 clearInterval(times)
                 const chart = echarts.init(canvas, null, {
                     width: width,

+ 4 - 1
pagesSchool/stuAdmin/stat/study.wxss

@@ -1,8 +1,11 @@
+@import "/app.wxss";
+
 .main {
   background-color: var(--mainColor);
   height: var(--twoHeight);
 }
+
 .main ec-canvas {
   width: 100%;
   height: 100%;
-}
+}