guhongwei il y a 2 ans
Parent
commit
1d9be14836

+ 2 - 1
pagesSchool/coaAdmin/course/list.js

@@ -133,7 +133,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 3 - 2
pagesSchool/coaAdmin/course/tpStudent.js

@@ -48,7 +48,7 @@ Page({
      */
     onLoad: function (options) {
         const that = this;
-        that.setData({ lesson_id: options.id || '63563bbd8018a39220eca774' });
+        that.setData({ lesson_id: options.lesson_id || '' });
     },
     /**
      * 生命周期函数--监听页面初次渲染完成
@@ -109,7 +109,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 2 - 1
pagesSchool/coaAdmin/school/list.js

@@ -106,7 +106,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 10 - 0
pagesSchool/common/lessonstudent.js

@@ -1,4 +1,5 @@
 const app = getApp();
+import { is_pay } from '../../utils/dict';
 Page({
     /**
      * 页面的初始数据
@@ -13,6 +14,7 @@ Page({
         skip: 0,
         limit: 6,
         page: 0,
+        is_payList: is_pay,
     },
     // 跳转菜单
     back(e) {
@@ -68,6 +70,9 @@ Page({
                 const arr = await app.$get(`/lessonStudent`, { ...info, ...that.data.search });
                 if (arr.errcode == '0') {
                     let list = [...that.data.list, ...arr.data];
+                    for (const val of list) {
+                        val.zhis_pay = that.searchPay(val.is_pay)
+                    }
                     that.setData({ list });
                     that.setData({ total: arr.total })
                 }
@@ -78,6 +83,11 @@ Page({
             }
         })
     },
+    searchPay(e) {
+        const that = this;
+        let data = that.data.is_payList.find((i => i.value == e))
+        if (data) return data.label
+    },
     // 分页
     toPage: function () {
         const that = this;

+ 5 - 1
pagesSchool/common/lessonstudent.wxml

@@ -21,10 +21,14 @@
                                     <text>是否签到:</text>
                                     <text>{{item.is_sign=='0'?'未签到':'已签到'}}</text>
                                 </view>
+                                <view class="other_1">
+                                    <text>状态:</text>
+                                    <text>{{item.zhis_pay}}</text>
+                                </view>
                             </view>
                         </view>
                         <view class="btn">
-                            <button type="primary" size="mini" bindtap="toSign" data-item="{{item}}" wx:if="{{item.is_sign=='0'}}">签到</button>
+                            <button type="primary" size="mini" bindtap="toSign" data-item="{{item}}" wx:if="{{item.is_sign=='0'&&is_pay=='1'}}">签到</button>
                         </view>
                     </view>
                 </view>

+ 4 - 1
pagesSchool/schAdmin/coach/list.js

@@ -99,8 +99,10 @@ Page({
     // 关闭弹框
     toClose: function () {
         const that = this;
+        that.clearPage();
         that.setData({ form: {} })
         that.setData({ dialog: { title: '账号绑定', show: false, type: '1' } })
+        that.search()
     },
     /**
      * 生命周期函数--监听页面加载
@@ -177,7 +179,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 4 - 2
pagesSchool/schAdmin/course/coachlist.js

@@ -116,6 +116,7 @@ Page({
     // 关闭弹框
     toClose: function () {
         const that = this;
+        that.clearPage();
         that.setData({ form: {} })
         that.setData({ dialog: { title: '添加教练', show: false, type: '1' } })
         that.search()
@@ -126,7 +127,7 @@ Page({
      */
     onLoad: function (options) {
         const that = this;
-        that.setData({ id: options.id || '63563bbd8018a39220eca774' })
+        that.setData({ id: options.id || '' })
     },
     /**
      * 生命周期函数--监听页面初次渲染完成
@@ -207,7 +208,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 2 - 1
pagesSchool/schAdmin/course/list.js

@@ -176,7 +176,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 4 - 1
pagesSchool/schAdmin/student/list.js

@@ -100,8 +100,10 @@ Page({
     // 关闭弹框
     toClose: function () {
         const that = this;
+        that.clearPage();
         that.setData({ form: {} })
         that.setData({ dialog: { title: '账号绑定', show: false, type: '1' } })
+        that.search()
     },
     /**
      * 生命周期函数--监听页面加载
@@ -179,7 +181,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

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

@@ -167,7 +167,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 3 - 2
pagesSchool/stuAdmin/money/list.js

@@ -50,7 +50,6 @@ Page({
             wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
             return false
         } else {
-            params.money = parseFloat(params.money);
             that.createMoney(params)
         }
     },
@@ -83,6 +82,7 @@ Page({
     // 关闭弹框
     toClose: function () {
         const that = this;
+        that.clearPage();
         that.setData({ form: {} })
         that.setData({ dialog: { title: '充值', show: false, type: '1' } })
         that.search()
@@ -155,7 +155,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 2 - 1
pagesSchool/stuAdmin/school/list.js

@@ -106,7 +106,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 2 - 1
pagesSchool/superAdmin/dict/list.js

@@ -126,7 +126,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 4 - 1
pagesSchool/superAdmin/school/list.js

@@ -98,8 +98,10 @@ Page({
     // 关闭弹框
     toClose: function () {
         const that = this;
+        that.clearPage();
         that.setData({ form: {} })
         that.setData({ dialog: { title: '账号绑定', show: false, type: '1' } })
+        that.search()
     },
     /**
      * 生命周期函数--监听页面加载
@@ -161,7 +163,8 @@ Page({
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 19 - 21
pagesSchool/superAdmin/user/list.js

@@ -65,25 +65,7 @@ Page({
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
-
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: async function () {
-        const that = this;
-        // 查询其他信息
-        await that.searchOther();
-        // 监听用户是否登录
-        await that.watchLogin();
+    onLoad: async function (options) {
     },
     watchLogin: async function () {
         const that = this;
@@ -136,20 +118,36 @@ Page({
             that.setData({ typeList: list })
         }
     },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
 
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: async function () {
+        const that = this;
+        // 查询其他信息
+        await that.searchOther();
+        // 监听用户是否登录
+        await that.watchLogin();
+    },
 
     /**
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
     onUnload: function () {
-
     },
 
     /**

+ 1 - 1
utils/dict.js

@@ -221,7 +221,7 @@ export const is_pay = [
     { value: '0', label: '未支付' },
     { value: '1', label: '已支付' },
     { value: '-1', label: '支付失败' },
-    { value: '-3', label: '已退' },
+    { value: '-3', label: '已退' },
 ]
 export const is_use = [
     { label: '启用', value: '0' },