YY %!s(int64=2) %!d(string=hai) anos
pai
achega
38f2fdfeb7
Modificáronse 81 ficheiros con 5620 adicións e 393 borrados
  1. 112 12
      pages/schAdmin/coach/add.js
  2. 5 1
      pages/schAdmin/coach/add.json
  3. 53 0
      pages/schAdmin/coach/add.less
  4. 73 2
      pages/schAdmin/coach/add.wxml
  5. 44 1
      pages/schAdmin/coach/add.wxss
  6. 135 13
      pages/schAdmin/coach/list.js
  7. 5 1
      pages/schAdmin/coach/list.json
  8. 179 0
      pages/schAdmin/coach/list.less
  9. 48 2
      pages/schAdmin/coach/list.wxml
  10. 143 1
      pages/schAdmin/coach/list.wxss
  11. 49 28
      pages/schAdmin/coachexam/list.js
  12. 5 2
      pages/schAdmin/coachexam/list.json
  13. 128 0
      pages/schAdmin/coachexam/list.less
  14. 38 2
      pages/schAdmin/coachexam/list.wxml
  15. 108 1
      pages/schAdmin/coachexam/list.wxss
  16. 142 12
      pages/schAdmin/course/add.js
  17. 4 1
      pages/schAdmin/course/add.json
  18. 82 0
      pages/schAdmin/course/add.less
  19. 98 2
      pages/schAdmin/course/add.wxml
  20. 65 1
      pages/schAdmin/course/add.wxss
  21. 92 12
      pages/schAdmin/course/coachadd.js
  22. 4 1
      pages/schAdmin/course/coachadd.json
  23. 82 0
      pages/schAdmin/course/coachadd.less
  24. 29 2
      pages/schAdmin/course/coachadd.wxml
  25. 65 1
      pages/schAdmin/course/coachadd.wxss
  26. 105 28
      pages/schAdmin/course/coachlist.js
  27. 5 2
      pages/schAdmin/course/coachlist.json
  28. 158 0
      pages/schAdmin/course/coachlist.less
  29. 34 2
      pages/schAdmin/course/coachlist.wxml
  30. 129 1
      pages/schAdmin/course/coachlist.wxss
  31. 109 28
      pages/schAdmin/course/list.js
  32. 5 2
      pages/schAdmin/course/list.json
  33. 158 0
      pages/schAdmin/course/list.less
  34. 37 2
      pages/schAdmin/course/list.wxml
  35. 129 1
      pages/schAdmin/course/list.wxss
  36. 76 12
      pages/schAdmin/courseexam/info.js
  37. 4 1
      pages/schAdmin/courseexam/info.json
  38. 62 0
      pages/schAdmin/courseexam/info.less
  39. 62 2
      pages/schAdmin/courseexam/info.wxml
  40. 51 1
      pages/schAdmin/courseexam/info.wxss
  41. 79 28
      pages/schAdmin/courseexam/list.js
  42. 5 2
      pages/schAdmin/courseexam/list.json
  43. 158 0
      pages/schAdmin/courseexam/list.less
  44. 36 2
      pages/schAdmin/courseexam/list.wxml
  45. 129 1
      pages/schAdmin/courseexam/list.wxss
  46. 0 0
      pages/schAdmin/coursetryexam/iinfo.less
  47. 76 12
      pages/schAdmin/coursetryexam/info.js
  48. 4 1
      pages/schAdmin/coursetryexam/info.json
  49. 62 0
      pages/schAdmin/coursetryexam/info.less
  50. 62 2
      pages/schAdmin/coursetryexam/info.wxml
  51. 51 1
      pages/schAdmin/coursetryexam/info.wxss
  52. 78 28
      pages/schAdmin/coursetryexam/list.js
  53. 5 2
      pages/schAdmin/coursetryexam/list.json
  54. 158 0
      pages/schAdmin/coursetryexam/list.less
  55. 36 2
      pages/schAdmin/coursetryexam/list.wxml
  56. 129 1
      pages/schAdmin/coursetryexam/list.wxss
  57. 93 27
      pages/schAdmin/school/info.js
  58. 5 1
      pages/schAdmin/school/info.json
  59. 34 0
      pages/schAdmin/school/info.less
  60. 71 2
      pages/schAdmin/school/info.wxml
  61. 27 1
      pages/schAdmin/school/info.wxss
  62. 128 17
      pages/schAdmin/student/add.js
  63. 5 1
      pages/schAdmin/student/add.json
  64. 35 0
      pages/schAdmin/student/add.less
  65. 69 2
      pages/schAdmin/student/add.wxml
  66. 28 1
      pages/schAdmin/student/add.wxss
  67. 140 27
      pages/schAdmin/student/list.js
  68. 6 2
      pages/schAdmin/student/list.json
  69. 158 0
      pages/schAdmin/student/list.less
  70. 49 2
      pages/schAdmin/student/list.wxml
  71. 129 1
      pages/schAdmin/student/list.wxss
  72. 78 12
      pages/schAdmin/studentexam/info.js
  73. 4 1
      pages/schAdmin/studentexam/info.json
  74. 62 0
      pages/schAdmin/studentexam/info.less
  75. 62 2
      pages/schAdmin/studentexam/info.wxml
  76. 51 1
      pages/schAdmin/studentexam/info.wxss
  77. 78 26
      pages/schAdmin/studentexam/list.js
  78. 5 2
      pages/schAdmin/studentexam/list.json
  79. 158 0
      pages/schAdmin/studentexam/list.less
  80. 36 2
      pages/schAdmin/studentexam/list.wxml
  81. 129 1
      pages/schAdmin/studentexam/list.wxss

+ 112 - 12
pages/schAdmin/coach/add.js

@@ -1,66 +1,166 @@
-// pages/schAdmin/coach/add.js
+const app = getApp()
+import WxValidate from '../../../utils/wxValidate'
+
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
-
+        frameStyle: { useTop: true, name: '教练信息', leftArrow: true, useBar: false },
+        id: '',
+        school_id: '',
+        form: { icon: [] },
+        // 性别
+        genderList: [],
+        // 等级列表
+        levelList: [],
+    },
+    initValidate() {
+        const rules = { icon: { required: true }, name: { required: true }, gender: { required: true }, age: { required: true }, phone: { required: true, tel: true } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { icon: { required: '请选择头像', }, name: { required: '请输入用户姓名', }, gender: { required: '请选择性别', }, age: { required: '请输入年龄', }, phone: { required: '请输入联系电话', } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    imgUpl: function (e) {
+        const that = this;
+        let data = that.data.form.icon;
+        data.push(e.detail)
+        that.setData({ 'form.icon': data })
+    },
+    // 删除图片
+    imgDel: function (e) {
+        const that = this;
+        let list = that.data.form.icon;
+        let arr = list.filter((i, index) => index != e.detail.index)
+        that.setData({ 'form.icon': arr })
+    },
+    // 选择性别
+    genderChange: function (e) {
+        const that = this;
+        let data = that.data.genderList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.gender': data.value });
+            that.setData({ 'form.zhGender': data.label });
+        }
+    },
+    //选择等级
+    coachChange: function (e) {
+        const that = this;
+        let data = that.data.levelList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.level': data.value });
+            that.setData({ 'form.zhLevel': data.label });
+        }
     },
 
+    // 提交登录
+    onSubmit: async function (e) {
+        const that = this;
+        const params = e.detail.value;
+        const form = that.data.form;
+        params.icon = form.icon;
+        params.school_id = that.data.school_id;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            let arr;
+            if (form._id) { arr = await app.$post(`/coach/${form._id}`, params); }
+            else { arr = await app.$post(`/coach`, params); console.log(params); }
+            if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
+            else wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+        }
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ id: options.id || '' })
+        //验证规则函数
+        that.initValidate();
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({ school_id: res.data.info.id })
+                const aee = await app.$get(`/dict`, { code: "coach_grade" });
+                if (aee.errcode == '0' && aee.total > 0) that.setData({ levelList: aee.data[0].list });
+                const ree = await app.$get(`/dict`, { code: "gender" });
+                if (ree.errcode == '0' && ree.total > 0) that.setData({ genderList: ree.data[0].list });
+                if (that.data.id) {
+                    const arr = await app.$get(`/coach/${that.data.id}`);
+                    if (arr.errcode == '0') {
+                        let gender = that.data.genderList.find(i => i.value == arr.data.gender)
+                        if (gender) arr.data.zhGender = gender.label;
+                        let level = that.data.levelList.find(i => i.value == arr.data.level)
+                        if (level) arr.data.zhLevel = level.label;
+                        that.setData({ form: arr.data });
+                    }
+                }
+            },
+            fail: res => {
+                wx.redirectTo({ url: '/pages/index/index', })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
+    onReady: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
+    onShow: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 页面上拉触底事件的处理函数
      */
-    onReachBottom() {
+    onReachBottom: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 1
pages/schAdmin/coach/add.json

@@ -1,3 +1,7 @@
 {
-    "usingComponents": {}
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index",
+        "upload": "/commpents/upload/index"
+    }
 }

+ 53 - 0
pages/schAdmin/coach/add.less

@@ -0,0 +1,53 @@
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+
+    .one {
+        flex-grow: 1;
+        position: relative;
+        height: 81vh;
+
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 73vw;
+                }
+            }
+        }
+    }
+
+    .btn {
+        text-align: center;
+        margin: 5vw 0 0 0;
+
+        button {
+            width: 40vw;
+            margin: 0 2vw;
+            padding: 1vw 0;
+        }
+    }
+
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 73 - 2
pages/schAdmin/coach/add.wxml

@@ -1,2 +1,73 @@
-<!--pages/schAdmin/coach/add.wxml-->
-<text>pages/schAdmin/coach/add.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <form catchsubmit="onSubmit">
+            <view class="one">
+                <scroll-view scroll-y="true" class="scroll-view">
+                    <view class="list-scroll-view">
+                        <view class="content">
+                            <view class="label">头像:</view>
+                            <view class="value">
+                                <upload list="{{form.icon}}" count="{{1}}" previewSize="{{30}}" bind:imgUpload="imgUpl" bind:imgDel="imgDel"></upload>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">姓名:</view>
+                            <view class="value">
+                                <input name="name" value="{{form.name}}" placeholder="请输入姓名" />
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">性别:</view>
+                            <view class="value">
+                                <picker mode="selector" bindchange="genderChange" name="gender" value="{{form.gender}}" range="{{genderList}}" range-key="label">
+                                    <view class="picker">{{form.zhGender||'请选择性别'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">年龄:</view>
+                            <view class="value">
+                                <input type="number" name="age" value="{{form.age}}" placeholder="请输入年龄" />
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">联系电话:</view>
+                            <view class="value">
+                                <input type="number" name="phone" maxlength="11" value="{{form.phone}}" placeholder="请输入联系电话" />
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">教练等级:</view>
+                            <view class="value">
+                                <picker mode="selector" bindchange="coachChange" name="level" value="{{form.level}}" range="{{levelList}}" range-key="label">
+                                    <view class="picker">{{form.zhLevel||'请选择教练等级'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">教练简介:</view>
+                            <view class="value">
+                                <textarea name="brief" value="{{form.brief}}" auto-height maxlength="-1" placeholder="请输入教练简介" />
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">过往荣誉:</view>
+                            <view class="value">
+                                <textarea name="honor" value="{{form.honor}}" auto-height maxlength="-1" placeholder="请输入过往荣誉" />
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">教学经历:</view>
+                            <view class="value">
+                                <textarea name="exp" value="{{form.exp}}" auto-height maxlength="-1" placeholder="请输入教学经历" />
+                            </view>
+                        </view>
+                    </view>
+                </scroll-view>
+            </view>
+            <view class="btn">
+                <button type="primary" size="mini" formType="submit">提交保存</button>
+            </view>
+        </form>
+    </view>
+</mobile-main>

+ 44 - 1
pages/schAdmin/coach/add.wxss

@@ -1 +1,44 @@
-/* pages/schAdmin/coach/add.wxss */
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main .one {
+  flex-grow: 1;
+  position: relative;
+  height: 81vh;
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 73vw;
+}
+.main .btn {
+  text-align: center;
+  margin: 5vw 0 0 0;
+}
+.main .btn button {
+  width: 40vw;
+  margin: 0 2vw;
+  padding: 1vw 0;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 135 - 13
pages/schAdmin/coach/list.js

@@ -1,66 +1,188 @@
-// pages/schAdmin/coach/list.js
+const app = getApp()
+import QRCode from '../../../utils/weapp-qrcode.js';
+
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
+        frameStyle: { useTop: true, name: '教练信息', leftArrow: true, useBar: false },
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+        // 等级列表
+        levelList: [],
+        // dialog弹框
+        dialog: { title: '账号绑定', show: false, type: '1' },
+        form: {}
 
     },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 添加
+    toAdd() {
+        const that = this;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: '/pages/schAdmin/coach/add' })
+    },
+    // 修改
+    toEdit: function (e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: `/pages/schAdmin/coach/add?id=${item.coach_id}` })
+    },
+    // 删除
+    toDel: async function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/school/${item.id}`);
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.setData({ skip: 0, page: 0, list: [] })
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
+    // 绑定账号
+    toBind: async function (e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        const arr = await app.$get(`/coach/${item.coach_id}`);
+        if (arr.errcode == '0') {
+            that.setData({ form: arr.data })
+            // 生成二维码
+            that.makeQRCode();
+            that.setData({ dialog: { title: '账号绑定', show: true, type: '1' } })
+        } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+    },
+    makeQRCode(template = 0) {
+        const that = this;
+        const url = `${app.globalData.publicUrl}/courtappbind?id=${that.data.form.id}&type='2'`;
+        var qrcode = new QRCode(`myQrcode`, {
+            text: url,
+            width: 110,
+            height: 110,
+            padding: 3,
+            colorDark: "#000000",
+            colorLight: "#ffffff",
+            correctLevel: QRCode.CorrectLevel.L,
+        });
+    },
 
+    // 关闭弹框
+    toClose: function () {
+        const that = this;
+        that.setData({ form: {} })
+        that.setData({ dialog: { title: '账号绑定', show: false, type: '1' } })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
-    },
-
+    onLoad: function (options) { },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
+    onReady: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                // 教练等级
+                let aee = await app.$get(`/dict`, { code: 'coach_grade' });
+                if (aee.errcode == '0' && aee.total > 0) that.setData({ levelList: aee.data[0].list })
+                let info = { skip: that.data.skip, limit: that.data.limit, school_id: res.data.info.id };
+                const arr = await app.$get(`/rcs`, { ...info });
+                if (arr.errcode == '0') {
+                    for (const val of arr.data) {
+                        let level = that.data.levelList.find(i => i.value == val.coach_id_level)
+                        if (level) val.zhLevel = level.label;
+                    }
+                    that.setData({ list: [...that.data.list, ...arr.data] });
+                    that.setData({ total: arr.total });
+                }
+                else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
     },
 
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 页面上拉触底事件的处理函数
      */
-    onReachBottom() {
+    onReachBottom: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 1
pages/schAdmin/coach/list.json

@@ -1,3 +1,7 @@
 {
-    "usingComponents": {}
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index",
+        "dialog": "/commpents/dialog/index"
+    }
 }

+ 179 - 0
pages/schAdmin/coach/list.less

@@ -0,0 +1,179 @@
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 2vw 2vw 0;
+            border-radius: 10px;
+
+            .list_1 {
+                display: flex;
+                flex-direction: row;
+                margin: 0 0 2vw 0;
+                border: 2px dashed var(--whiteColor);
+                border-radius: 10px;
+
+                .icon {
+                    width: 18vw;
+                    height: 18vw;
+                    margin-top: 2vw;
+                    margin-left: 2vw;
+
+                    image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 50%;
+                        background-color: var(--whiteColor);
+                    }
+                }
+
+                .content {
+                    display: flex;
+                    flex-direction: column;
+                    margin: 0 0 0 3vw;
+
+                    .name {
+                        font-weight: 700;
+                        font-size: var(--font18Szie);
+                        color: var(--whiteColor);
+                        margin: 1vw 0;
+                    }
+
+                    .other {
+                        font-size: var(--font15Size);
+                        color: var(--f9Color);
+                        margin: 0.5vw 0 1vw 0;
+
+                        text {
+                            color: var(--whiteColor);
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                display: flex;
+                flex-direction: row;
+
+                button {
+                    width: 100%;
+                    padding: 2vw;
+                    font-size: var(--font14Size);
+                    color: var(--whiteColor);
+                    border-radius: 50px;
+                    margin: 0 2vw;
+                    background-color: #35d4bd;
+                    box-sizing: content-box;
+                    border: 2px dashed var(--whiteColor);
+                }
+
+                button:nth-child(2n) {
+                    background-color: #f860df;
+                }
+
+                button:last-child {
+                    background-color: #FF7F50;
+                }
+            }
+        }
+
+        // 助教
+        .level_0 {
+            background-size: 100%, 100%;
+            background-image: url('https://broadcast.waityou24.cn/files/court/elimg/20220816172614.png');
+        }
+
+        // 专业一级
+        .level_1 {
+            background-size: 100%, 100%;
+            background-image: url('https://broadcast.waityou24.cn/files/court/elimg/20220816172720.png');
+        }
+
+        // 专业二级
+        .level_2 {
+            background-size: 100%, 100%;
+            background-image: url('https://broadcast.waityou24.cn/files/court/elimg/20220816172649.png');
+        }
+
+        // 其他
+        .level_3 {
+            background-color: #d39474;
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .name {
+            text-align: center;
+            font-size: var(--font18Szie);
+            font-weight: bold;
+            margin: 3vw 0;
+        }
+
+        .image {
+            text-align: center;
+            height: 18vh;
+            overflow: hidden;
+
+            .qrcode {
+                height: 22vh;
+                position: absolute;
+                left: 32vw;
+            }
+        }
+
+        .remark {
+            text-align: center;
+            font-size: 15px;
+            margin: 0 0 4vw 0;
+        }
+    }
+}

+ 48 - 2
pages/schAdmin/coach/list.wxml

@@ -1,2 +1,48 @@
-<!--pages/schAdmin/coach/list.wxml-->
-<text>pages/schAdmin/coach/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+            <view class="one_2">
+                <button type="primary" bindtap="toAdd">添加</button>
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list {{item.coach_id_level=='0'?'level_0':item.coach_id_level=='1'?'level_1':item.coach_id_level=='2'?'level_2':'level_3'}}" wx:for="{{list}}" wx:key="item">
+                        <view class="list_1">
+                            <view class="icon">
+                                <image src="{{item.coach_id_icon&&item.coach_id_icon.length>0?item.coach_id_icon[0].url:''}}">
+                                </image>
+                            </view>
+                            <view class="content">
+                                <view class="name textOver">{{item.coach_id_name}}</view>
+                                <view class="other">教练等级:<text>{{item.zhLevel||'暂无'}}</text></view>
+                                <view class="other">联系电话:<text>{{item.coach_id_phone}}</text>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button bindtap="toEdit" data-item="{{item}}">信息维护</button>
+                            <button bindtap="toBind" data-item="{{item}}">绑定账号</button>
+                            <button bindtap="toDel" data-item="{{item}}">删除信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>
+<dialog dialog="{{dialog}}" bind:toClose="toClose">
+    <view slot="info" class="dialog">
+        <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
+            <view class="name">{{form.name}}</view>
+            <view class="image">
+                <canvas class="qrcode" canvas-id="myQrcode"></canvas>
+            </view>
+            <view class="remark">用户可扫描二维码进行账号绑定</view>
+        </view>
+    </view>
+</dialog>

+ 143 - 1
pages/schAdmin/coach/list.wxss

@@ -1 +1,143 @@
-/* pages/schAdmin/coach/list.wxss */
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 2vw 2vw 0;
+  border-radius: 10px;
+}
+.main .two .list .list_1 {
+  display: flex;
+  flex-direction: row;
+  margin: 0 0 2vw 0;
+  border: 2px dashed var(--whiteColor);
+  border-radius: 10px;
+}
+.main .two .list .list_1 .icon {
+  width: 18vw;
+  height: 18vw;
+  margin-top: 2vw;
+  margin-left: 2vw;
+}
+.main .two .list .list_1 .icon image {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+  background-color: var(--whiteColor);
+}
+.main .two .list .list_1 .content {
+  display: flex;
+  flex-direction: column;
+  margin: 0 0 0 3vw;
+}
+.main .two .list .list_1 .content .name {
+  font-weight: 700;
+  font-size: var(--font18Szie);
+  color: var(--whiteColor);
+  margin: 1vw 0;
+}
+.main .two .list .list_1 .content .other {
+  font-size: var(--font15Size);
+  color: var(--f9Color);
+  margin: 0.5vw 0 1vw 0;
+}
+.main .two .list .list_1 .content .other text {
+  color: var(--whiteColor);
+}
+.main .two .list .btn {
+  display: flex;
+  flex-direction: row;
+}
+.main .two .list .btn button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+  color: var(--whiteColor);
+  border-radius: 50px;
+  margin: 0 2vw;
+  background-color: #35d4bd;
+  box-sizing: content-box;
+  border: 2px dashed var(--whiteColor);
+}
+.main .two .list .btn button:nth-child(2n) {
+  background-color: #f860df;
+}
+.main .two .list .btn button:last-child {
+  background-color: #FF7F50;
+}
+.main .two .level_0 {
+  background-size: 100%, 100%;
+  background-image: url('https://broadcast.waityou24.cn/files/court/elimg/20220816172614.png');
+}
+.main .two .level_1 {
+  background-size: 100%, 100%;
+  background-image: url('https://broadcast.waityou24.cn/files/court/elimg/20220816172720.png');
+}
+.main .two .level_2 {
+  background-size: 100%, 100%;
+  background-image: url('https://broadcast.waityou24.cn/files/court/elimg/20220816172649.png');
+}
+.main .two .level_3 {
+  background-color: #d39474;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .name {
+  text-align: center;
+  font-size: var(--font18Szie);
+  font-weight: bold;
+  margin: 3vw 0;
+}
+.dialog .dialog_1 .image {
+  text-align: center;
+  height: 18vh;
+  overflow: hidden;
+}
+.dialog .dialog_1 .image .qrcode {
+  height: 22vh;
+  position: absolute;
+  left: 32vw;
+}
+.dialog .dialog_1 .remark {
+  text-align: center;
+  font-size: 15px;
+  margin: 0 0 4vw 0;
+}

+ 49 - 28
pages/schAdmin/coachexam/list.js

@@ -1,66 +1,87 @@
-// pages/schAdmin/coach/list.js
+const app = getApp()
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '审批教练费', leftArrow: true, useBar: false },
+        list: [{ }, {}],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) { },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => { },
+            fail: async res => {
+                // wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pages/schAdmin/coachexam/list.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
-}
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 128 - 0
pages/schAdmin/coachexam/list.less

@@ -0,0 +1,128 @@
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 2vw 2vw 0;
+            border-radius: 10px;
+            border: 1px dashed var(--blackColor);
+
+            .list_1 {
+                display: flex;
+                flex-direction: row;
+                margin: 0 0 2vw 0;
+                border: 2px dashed var(--blackColor);
+                border-radius: 10px;
+
+                .icon {
+                    width: 18vw;
+                    height: 18vw;
+                    margin-top: 2vw;
+                    margin-left: 2vw;
+
+                    image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 50%;
+                        background-color: var(--f85Color);
+                    }
+                }
+
+                .content {
+                    display: flex;
+                    flex-direction: column;
+                    margin: 0 0 0 3vw;
+
+                    .name {
+                        font-weight: 700;
+                        font-size: var(--font18Szie);
+                        color: var(--blackColor);
+                        margin: 1vw 0;
+                    }
+
+                    .other {
+                        font-size: var(--font15Size);
+                        color: var(--f85Color);
+                        margin: 0.5vw 0 1vw 0;
+
+                        text {
+                            color: var(--redColor);
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                display: flex;
+                flex-direction: row;
+
+                button {
+                    width: 100%;
+                    padding: 2vw;
+                    font-size: var(--font14Size);
+                    color: var(--whiteColor);
+                    border-radius: 50px;
+                    margin: 0 2vw;
+                    background-color: #35d4bd;
+                    box-sizing: content-box;
+                    border: 2px dashed var(--whiteColor);
+                }
+
+                button:nth-child(2n) {
+                    background-color: #f860df;
+                }
+
+                button:last-child {
+                    background-color: #FF7F50;
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 38 - 2
pages/schAdmin/coachexam/list.wxml

@@ -1,2 +1,38 @@
-<!--pages/schAdmin/coach/list.wxml-->
-<text>pages/schAdmin/coach/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="list_1">
+                            <view class="icon">
+                                <image src="{{item.icon&&item.icon.length>0?item.icon[0].url:''}}">
+                                </image>
+                            </view>
+                            <view class="content">
+                                <view class="name textOver">{{item.name||'教练姓名'}}</view>
+                                <view class="other">提现金额:<text>{{item.money||'0.00'}}元</text>
+                                </view>
+                                <view class="other">申请原因:<text>{{item.yy||'暂无'}}</text>
+                                </view>
+                                <view class="other">申请时间:{{item.time||'暂无'}}
+                                </view>
+                                <view class="other">审核结果:{{item.result||'暂无'}}
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button bindtap="toEdit">通过</button>
+                            <button bindtap="toDel">拒绝</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 108 - 1
pages/schAdmin/coachexam/list.wxss

@@ -1 +1,108 @@
-/* pages/schAdmin/coach/list.wxss */
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 2vw 2vw 0;
+  border-radius: 10px;
+  border: 1px dashed var(--blackColor);
+}
+.main .two .list .list_1 {
+  display: flex;
+  flex-direction: row;
+  margin: 0 0 2vw 0;
+  border: 2px dashed var(--blackColor);
+  border-radius: 10px;
+}
+.main .two .list .list_1 .icon {
+  width: 18vw;
+  height: 18vw;
+  margin-top: 2vw;
+  margin-left: 2vw;
+}
+.main .two .list .list_1 .icon image {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+  background-color: var(--f85Color);
+}
+.main .two .list .list_1 .content {
+  display: flex;
+  flex-direction: column;
+  margin: 0 0 0 3vw;
+}
+.main .two .list .list_1 .content .name {
+  font-weight: 700;
+  font-size: var(--font18Szie);
+  color: var(--blackColor);
+  margin: 1vw 0;
+}
+.main .two .list .list_1 .content .other {
+  font-size: var(--font15Size);
+  color: var(--f85Color);
+  margin: 0.5vw 0 1vw 0;
+}
+.main .two .list .list_1 .content .other text {
+  color: var(--redColor);
+}
+.main .two .list .btn {
+  display: flex;
+  flex-direction: row;
+}
+.main .two .list .btn button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+  color: var(--whiteColor);
+  border-radius: 50px;
+  margin: 0 2vw;
+  background-color: #35d4bd;
+  box-sizing: content-box;
+  border: 2px dashed var(--whiteColor);
+}
+.main .two .list .btn button:nth-child(2n) {
+  background-color: #f860df;
+}
+.main .two .list .btn button:last-child {
+  background-color: #FF7F50;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 142 - 12
pages/schAdmin/course/add.js


+ 4 - 1
pages/schAdmin/course/add.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index"
+    }
 }

+ 82 - 0
pages/schAdmin/course/add.less

@@ -0,0 +1,82 @@
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+
+    .one {
+        flex-grow: 1;
+        position: relative;
+        height: 81vh;
+
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 73vw;
+                }
+            }
+        }
+    }
+
+    .btn {
+        text-align: center;
+        margin: 5vw 0 0 0;
+
+        button {
+            width: 40vw;
+            margin: 0 2vw;
+            padding: 1vw 0;
+        }
+    }
+
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .name {
+            text-align: center;
+            font-size: var(--font18Szie);
+            font-weight: bold;
+            margin: 3vw 0;
+        }
+
+        .image {
+            text-align: center;
+            height: 18vh;
+            overflow: hidden;
+
+            .qrcode {
+                height: 22vh;
+                position: absolute;
+                left: 32vw;
+            }
+        }
+
+        .remark {
+            text-align: center;
+            font-size: 15px;
+            margin: 0 0 4vw 0;
+        }
+    }
+}

+ 98 - 2
pages/schAdmin/course/add.wxml

@@ -1,2 +1,98 @@
-<!--pages/schAdmin/course/add.wxml-->
-<text>pages/schAdmin/course/add.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <form catchsubmit="onSubmit">
+            <view class="one">
+                <scroll-view scroll-y="true" class="scroll-view">
+                    <view class="list-scroll-view">
+                        <view class="content">
+                            <view class="label">课程类型:</view>
+                            <view class="value">
+                                <picker name="type" value="{{form.type}}" bindchange="typeChange" range="{{typeList}}" range-key="label">
+                                    <view class="picker">{{form.zhtype||'请选择课程类型'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">课程标题:</view>
+                            <view class="value">
+                                <input name="title" value="{{form.title}}" placeholder="请输入课程标题" />
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">简介:</view>
+                            <view class="value">
+                                <textarea name="brief" maxlength="-1" auto-height value="{{form.brief}}" placeholder="请输入课程简介" />
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">人数上限:</view>
+                            <view class="value">
+                                <input name="limit" type="number" value="{{form.limit}}" placeholder="请输入人数上限" />
+                            </view>
+                        </view>
+
+                        <view class="content">
+                            <view class="label">上课开始日期:</view>
+                            <view class="value">
+                                <picker mode="date" name="start_date" value="{{form.start_date}}" bindchange="startdateChange">
+                                    <view class="picker">{{form.start_date||'请选择上课开始日期'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">上课开始时间:</view>
+                            <view class="value">
+                                <picker mode="time" name="start_time" value="{{form.start_time}}" bindchange="starttimeChange">
+                                    <view class="picker">{{form.start_time||'请选择上课开始时间'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">上课结束日期:</view>
+                            <view class="value">
+                                <picker mode="date" name="end_date" value="{{form.end_date}}" bindchange="enddateChange">
+                                    <view class="picker">{{form.end_date||'请选择上课结束日期'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">上课结束时间:</view>
+                            <view class="value">
+                                <picker mode="time" name="end_time" value="{{form.end_time}}" bindchange="endtimeChange">
+                                    <view class="picker">{{form.end_time||'请选择上课结束时间'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">状态:</view>
+                            <view class="value">
+                                <picker mode="selector" bindchange="statusChange" name="status" value="{{form.status}}" range="{{statusList}}" range-key="label">
+                                    <view class="picker">{{form.zhstatus||'请选择状态'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">退款期限(日期):</view>
+                            <view class="value">
+                                <picker mode="date" name="refund_date" value="{{form.refund_date}}" bindchange="refunddateChange">
+                                    <view class="picker">{{form.refund_date||'请选择期限时间'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">退款期限(时间):</view>
+                            <view class="value">
+                                <picker mode="time" name="refund_time" value="{{form.refund_time}}" bindchange="refundtimeChange">
+                                    <view class="picker">{{form.refund_time||'请选择期限日期'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                    </view>
+                </scroll-view>
+            </view>
+            <view class="btn">
+                <button type="primary" size="mini" formType="submit">提交保存</button>
+            </view>
+        </form>
+    </view>
+</mobile-main>

+ 65 - 1
pages/schAdmin/course/add.wxss

@@ -1 +1,65 @@
-/* pages/schAdmin/course/add.wxss */
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main .one {
+  flex-grow: 1;
+  position: relative;
+  height: 81vh;
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 73vw;
+}
+.main .btn {
+  text-align: center;
+  margin: 5vw 0 0 0;
+}
+.main .btn button {
+  width: 40vw;
+  margin: 0 2vw;
+  padding: 1vw 0;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .name {
+  text-align: center;
+  font-size: var(--font18Szie);
+  font-weight: bold;
+  margin: 3vw 0;
+}
+.dialog .dialog_1 .image {
+  text-align: center;
+  height: 18vh;
+  overflow: hidden;
+}
+.dialog .dialog_1 .image .qrcode {
+  height: 22vh;
+  position: absolute;
+  left: 32vw;
+}
+.dialog .dialog_1 .remark {
+  text-align: center;
+  font-size: 15px;
+  margin: 0 0 4vw 0;
+}

+ 92 - 12
pages/schAdmin/course/coachadd.js

@@ -1,66 +1,146 @@
-// pages/schAdmin/course/coachadd.js
+const app = getApp()
+import WxValidate from '../../../utils/wxValidate'
+
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
+        frameStyle: { useTop: true, name: '课程信息', leftArrow: true, useBar: false },
+        id: '',
+        lesson_id: '',
+        school_id: '',
+        form: {},
+        coachList: [],
 
     },
-
+    initValidate() {
+        const rules = { coach_id: { required: true }, money: { required: true }, }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { coach_id: { required: '请选择教练', }, money: { required: '请输入金额', } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 选择教练
+    coachChange: function (e) {
+        const that = this;
+        let data = that.data.coachList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.coach_id': data.coach_id });
+            that.setData({ 'form.zhcoach': data.coach_id_name });
+        }
+    },
+    // 提交保存
+    onSubmit: async function (e) {
+        const that = this;
+        const params = e.detail.value;
+        const form = that.data.form;
+        params.school_id = that.data.school_id;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            let arr;
+            if (form._id) {
+                arr = await app.$post(`/lessonCoach/${form._id}`, params);
+            }
+            else {
+                params.lesson_id = that.data.lesson_id;
+                arr = await app.$post(`/lessonCoach`, params);
+            }
+            if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
+            else wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+        }
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ lesson_id: options.lesson_id || '' })
+        that.setData({ id: options.id || '' })
+        //验证规则函数
+        that.initValidate();
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({ school_id: res.data.info.id })
+                const abb = await app.$get(`/rcs`, { school_id: res.data.info.id });
+                if (abb.errcode == '0' && abb.total > 0) {
+                    that.setData({ coachList: abb.data })
+                }
+                if (that.data.id) {
+                    const arr = await app.$get(`/lessonCoach/${that.data.id}`);
+                    if (arr.errcode == '0') {
+                        // 教练
+                        let coach_id = that.data.coachList.find(i => i.coach_id == arr.data.coach_id)
+                        if (coach_id) arr.data.zhcoach = coach_id.coach_id_name;
+                        that.setData({ form: arr.data });
+                    }
+                }
+            },
+            fail: res => {
+                wx.redirectTo({ url: '/pages/index/index', })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
+    onReady: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
+    onShow: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 页面上拉触底事件的处理函数
      */
-    onReachBottom() {
+    onReachBottom: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 4 - 1
pages/schAdmin/course/coachadd.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index"
+    }
 }

+ 82 - 0
pages/schAdmin/course/coachadd.less

@@ -0,0 +1,82 @@
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+
+    .one {
+        flex-grow: 1;
+        position: relative;
+        height: 81vh;
+
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 73vw;
+                }
+            }
+        }
+    }
+
+    .btn {
+        text-align: center;
+        margin: 5vw 0 0 0;
+
+        button {
+            width: 40vw;
+            margin: 0 2vw;
+            padding: 1vw 0;
+        }
+    }
+
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .name {
+            text-align: center;
+            font-size: var(--font18Szie);
+            font-weight: bold;
+            margin: 3vw 0;
+        }
+
+        .image {
+            text-align: center;
+            height: 18vh;
+            overflow: hidden;
+
+            .qrcode {
+                height: 22vh;
+                position: absolute;
+                left: 32vw;
+            }
+        }
+
+        .remark {
+            text-align: center;
+            font-size: 15px;
+            margin: 0 0 4vw 0;
+        }
+    }
+}

+ 29 - 2
pages/schAdmin/course/coachadd.wxml

@@ -1,2 +1,29 @@
-<!--pages/schAdmin/course/coachadd.wxml-->
-<text>pages/schAdmin/course/coachadd.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <form catchsubmit="onSubmit">
+            <view class="one">
+                <scroll-view scroll-y="true" class="scroll-view">
+                    <view class="list-scroll-view">
+                        <view class="content">
+                            <view class="label">教练:</view>
+                            <view class="value">
+                                <picker mode="selector" bindchange="coachChange" name="coach_id" value="{{form.coach_id}}" range="{{coachList}}" range-key="coach_id_name">
+                                    <view class="picker">{{form.zhcoach||'请选择教练'}}</view>
+                                </picker>
+                            </view>
+                        </view>
+                        <view class="content">
+                            <view class="label">课时费:</view>
+                            <view class="value">
+                                <input name="money" type="number" value="{{form.money}}" placeholder="请输入金额" />
+                            </view>
+                        </view>
+                    </view>
+                </scroll-view>
+            </view>
+            <view class="btn">
+                <button type="primary" size="mini" formType="submit">提交保存</button>
+            </view>
+        </form>
+    </view>
+</mobile-main>

+ 65 - 1
pages/schAdmin/course/coachadd.wxss

@@ -1 +1,65 @@
-/* pages/schAdmin/course/coachadd.wxss */
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main .one {
+  flex-grow: 1;
+  position: relative;
+  height: 81vh;
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 73vw;
+}
+.main .btn {
+  text-align: center;
+  margin: 5vw 0 0 0;
+}
+.main .btn button {
+  width: 40vw;
+  margin: 0 2vw;
+  padding: 1vw 0;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .name {
+  text-align: center;
+  font-size: var(--font18Szie);
+  font-weight: bold;
+  margin: 3vw 0;
+}
+.dialog .dialog_1 .image {
+  text-align: center;
+  height: 18vh;
+  overflow: hidden;
+}
+.dialog .dialog_1 .image .qrcode {
+  height: 22vh;
+  position: absolute;
+  left: 32vw;
+}
+.dialog .dialog_1 .remark {
+  text-align: center;
+  font-size: 15px;
+  margin: 0 0 4vw 0;
+}

+ 105 - 28
pages/schAdmin/course/coachlist.js

@@ -1,66 +1,143 @@
-// pages/schAdmin/course/coachlist.js
+const app = getApp()
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '课程信息', leftArrow: true, useBar: false },
+        // 课程id
+        id: '',
+        list: [],
+        // 类型
+        type:'',
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+        statusList: [],
+        typeList: [],
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 添加
+    toAdd() {
+        const that = this;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: `/pages/schAdmin/course/coachadd?lesson_id=${that.data.id}` })
+    },
+    // 修改
+    toEdit: function (e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: `/pages/schAdmin/course/coachadd?id=${item._id}` })
+    },
+    // 删除
+    toDel: async function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/lessonCoach/${item.id}`);
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.setData({ skip: 0, page: 0, list: [] })
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ id: options.id || '' })
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                let info = { skip: that.data.skip, limit: that.data.limit, lesson_id: that.data.id, shchool_id: res.data.info.id };
+                const aee = await app.$get(`/lesson/${that.data.id}`);
+                if (aee.errcode == '0') {
+                    that.setData({ type: aee.data.type})
+                }
+                const arr = await app.$get(`/lessonCoach`, { ...info });
+                if (arr.errcode == '0') {
+                    that.setData({ list: [...that.data.list, ...arr.data] });
+                    that.setData({ total: arr.total });
+                }
+                else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pages/schAdmin/course/coachlist.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
-}
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 158 - 0
pages/schAdmin/course/coachlist.less

@@ -0,0 +1,158 @@
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 2vw 2vw 0;
+            border-radius: 10px;
+            border: 1px dashed var(--blackColor);
+
+
+            .list_1 {
+                display: flex;
+                flex-direction: row;
+                margin: 0 0 2vw 0;
+                border: 2px dashed var(--blackColor);
+                border-radius: 10px;
+
+                .icon {
+                    width: 18vw;
+                    height: 18vw;
+                    margin-top: 2vw;
+                    margin-left: 2vw;
+
+                    image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 50%;
+                        background-color: var(--f85Color);
+                    }
+                }
+
+                .content {
+                    display: flex;
+                    flex-direction: column;
+                    margin: 0 0 0 3vw;
+
+                    .name {
+                        font-weight: 700;
+                        font-size: var(--font18Szie);
+                        color: var(--blackColor);
+                        margin: 1vw 0;
+                    }
+
+                    .other {
+                        font-size: var(--font15Size);
+                        color: var(--f85Color);
+                        margin: 0.5vw 0 1vw 0;
+
+                        text {
+                            color: var(--redColor);
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                display: flex;
+                flex-direction: row;
+
+                button {
+                    width: 100%;
+                    padding: 2vw;
+                    font-size: var(--font14Size);
+                    color: var(--whiteColor);
+                    border-radius: 50px;
+                    margin: 0 2vw;
+                    background-color: #35d4bd;
+                    box-sizing: content-box;
+                    border: 2px dashed var(--whiteColor);
+                }
+
+                button:nth-child(2n) {
+                    background-color: #f860df;
+                }
+
+                button:last-child {
+                    background-color: #FF7F50;
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .name {
+            text-align: center;
+            font-size: var(--font18Szie);
+            font-weight: bold;
+            margin: 3vw 0;
+        }
+
+        .image {
+            text-align: center;
+            height: 18vh;
+            overflow: hidden;
+
+            .qrcode {
+                height: 22vh;
+                position: absolute;
+                left: 32vw;
+            }
+        }
+
+        .remark {
+            text-align: center;
+            font-size: 15px;
+            margin: 0 0 4vw 0;
+        }
+    }
+}

+ 34 - 2
pages/schAdmin/course/coachlist.wxml

@@ -1,2 +1,34 @@
-<!--pages/schAdmin/course/coachlist.wxml-->
-<text>pages/schAdmin/course/coachlist.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+            <view class="one_2" wx:if="{{type=='0'}}">
+                <button type="primary" bindtap="toAdd">添加</button>
+            </view>
+            <view class="one_2" wx:elif="{{type=='1' && list.length<1}}">
+                <button type="primary" bindtap="toAdd">添加</button>
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="list_1">
+                            <view class="content">
+                                <view class="name textOver">{{item.coach_id_name||'教练姓名'}}</view>
+                                <view class="other">课时费:{{item.money||'暂无'}}
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button bindtap="toEdit" data-item="{{item}}">维护信息</button>
+                            <button bindtap="toDel" data-item="{{item}}">删除信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 129 - 1
pages/schAdmin/course/coachlist.wxss

@@ -1 +1,129 @@
-/* pages/schAdmin/course/coachlist.wxss */
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 2vw 2vw 0;
+  border-radius: 10px;
+  border: 1px dashed var(--blackColor);
+}
+.main .two .list .list_1 {
+  display: flex;
+  flex-direction: row;
+  margin: 0 0 2vw 0;
+  border: 2px dashed var(--blackColor);
+  border-radius: 10px;
+}
+.main .two .list .list_1 .icon {
+  width: 18vw;
+  height: 18vw;
+  margin-top: 2vw;
+  margin-left: 2vw;
+}
+.main .two .list .list_1 .icon image {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+  background-color: var(--f85Color);
+}
+.main .two .list .list_1 .content {
+  display: flex;
+  flex-direction: column;
+  margin: 0 0 0 3vw;
+}
+.main .two .list .list_1 .content .name {
+  font-weight: 700;
+  font-size: var(--font18Szie);
+  color: var(--blackColor);
+  margin: 1vw 0;
+}
+.main .two .list .list_1 .content .other {
+  font-size: var(--font15Size);
+  color: var(--f85Color);
+  margin: 0.5vw 0 1vw 0;
+}
+.main .two .list .list_1 .content .other text {
+  color: var(--redColor);
+}
+.main .two .list .btn {
+  display: flex;
+  flex-direction: row;
+}
+.main .two .list .btn button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+  color: var(--whiteColor);
+  border-radius: 50px;
+  margin: 0 2vw;
+  background-color: #35d4bd;
+  box-sizing: content-box;
+  border: 2px dashed var(--whiteColor);
+}
+.main .two .list .btn button:nth-child(2n) {
+  background-color: #f860df;
+}
+.main .two .list .btn button:last-child {
+  background-color: #FF7F50;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .name {
+  text-align: center;
+  font-size: var(--font18Szie);
+  font-weight: bold;
+  margin: 3vw 0;
+}
+.dialog .dialog_1 .image {
+  text-align: center;
+  height: 18vh;
+  overflow: hidden;
+}
+.dialog .dialog_1 .image .qrcode {
+  height: 22vh;
+  position: absolute;
+  left: 32vw;
+}
+.dialog .dialog_1 .remark {
+  text-align: center;
+  font-size: 15px;
+  margin: 0 0 4vw 0;
+}

+ 109 - 28
pages/schAdmin/course/list.js

@@ -1,66 +1,147 @@
-// pages/schAdmin/coach/list.js
+const app = getApp()
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '课程信息', leftArrow: true, useBar: false },
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+        statusList: [],
+        typeList: [],
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 添加
+    toAdd() {
+        const that = this;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: '/pages/schAdmin/course/add' })
+    },
+    // 修改
+    toEdit: function (e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: `/pages/schAdmin/course/add?id=${item._id}` })
+    },
+    toCoach: function (e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: `/pages/schAdmin/course/coachlist?id=${item._id}` })
+    },
+    // 删除
+    toDel: async function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/lesson/${item.id}`);
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.setData({ skip: 0, page: 0, list: [] })
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) { },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                const aee = await app.$get(`/dict`, { code: "lesson_status" });
+                if (aee.errcode == '0' && aee.total > 0) that.setData({ statusList: aee.data[0].list });
+                const acc = await app.$get(`/dict`, { code: "lesson_type" });
+                if (acc.errcode == '0' && aee.total > 0) that.setData({ typeList: acc.data[0].list });
+                let info = { skip: that.data.skip, limit: that.data.limit, school_id: res.data.info.id };
+                const arr = await app.$get(`/lesson`, { ...info });
+                if (arr.errcode == '0') {
+                    for (const val of arr.data) {
+                        let status = that.data.statusList.find(i => i.value == val.status)
+                        if (status) val.zhstatus = status.label;
+                        let type = that.data.typeList.find(i => i.value == val.type)
+                        if (type) val.zhtype = type.label;
+                    }
+                    that.setData({ list: [...that.data.list, ...arr.data] });
+                    that.setData({ total: arr.total });
+                }
+                else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pages/schAdmin/course/list.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
-}
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 158 - 0
pages/schAdmin/course/list.less

@@ -0,0 +1,158 @@
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 2vw 2vw 0;
+            border-radius: 10px;
+            border: 1px dashed var(--blackColor);
+
+
+            .list_1 {
+                display: flex;
+                flex-direction: row;
+                margin: 0 0 2vw 0;
+                border: 2px dashed var(--blackColor);
+                border-radius: 10px;
+
+                .icon {
+                    width: 18vw;
+                    height: 18vw;
+                    margin-top: 2vw;
+                    margin-left: 2vw;
+
+                    image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 50%;
+                        background-color: var(--f85Color);
+                    }
+                }
+
+                .content {
+                    display: flex;
+                    flex-direction: column;
+                    margin: 0 0 0 3vw;
+
+                    .name {
+                        font-weight: 700;
+                        font-size: var(--font18Szie);
+                        color: var(--blackColor);
+                        margin: 1vw 0;
+                    }
+
+                    .other {
+                        font-size: var(--font15Size);
+                        color: var(--f85Color);
+                        margin: 0.5vw 0 1vw 0;
+
+                        text {
+                            color: var(--redColor);
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                display: flex;
+                flex-direction: row;
+
+                button {
+                    width: 100%;
+                    padding: 2vw;
+                    font-size: var(--font14Size);
+                    color: var(--whiteColor);
+                    border-radius: 50px;
+                    margin: 0 2vw;
+                    background-color: #35d4bd;
+                    box-sizing: content-box;
+                    border: 2px dashed var(--whiteColor);
+                }
+
+                button:nth-child(2n) {
+                    background-color: #f860df;
+                }
+
+                button:last-child {
+                    background-color: #FF7F50;
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .name {
+            text-align: center;
+            font-size: var(--font18Szie);
+            font-weight: bold;
+            margin: 3vw 0;
+        }
+
+        .image {
+            text-align: center;
+            height: 18vh;
+            overflow: hidden;
+
+            .qrcode {
+                height: 22vh;
+                position: absolute;
+                left: 32vw;
+            }
+        }
+
+        .remark {
+            text-align: center;
+            font-size: 15px;
+            margin: 0 0 4vw 0;
+        }
+    }
+}

+ 37 - 2
pages/schAdmin/course/list.wxml

@@ -1,2 +1,37 @@
-<!--pages/schAdmin/coach/list.wxml-->
-<text>pages/schAdmin/coach/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+            <view class="one_2">
+                <button type="primary" bindtap="toAdd">添加</button>
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="list_1">
+                            <view class="content">
+                                <view class="name textOver">{{item.title||'暂无'}}</view>
+                                <view class="other">课程类型:<text>{{item.zhtype||'暂无'}}</text></view>
+                                <view class="other">课程状态:<text>{{item.zhstatus||'暂无'}}</text>
+                                </view>
+                                <view class="other">开课时间:{{item.time_start||'暂无'}}
+                                </view>
+                                <view class="other">人数上限:{{item.limit||'暂无'}}
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button bindtap="toEdit" data-item="{{item}}">信息维护</button>
+                            <button bindtap="toCoach" data-item="{{item}}">教练管理</button>
+                            <button bindtap="toDel" data-item="{{item}}">删除信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 129 - 1
pages/schAdmin/course/list.wxss

@@ -1 +1,129 @@
-/* pages/schAdmin/coach/list.wxss */
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 2vw 2vw 0;
+  border-radius: 10px;
+  border: 1px dashed var(--blackColor);
+}
+.main .two .list .list_1 {
+  display: flex;
+  flex-direction: row;
+  margin: 0 0 2vw 0;
+  border: 2px dashed var(--blackColor);
+  border-radius: 10px;
+}
+.main .two .list .list_1 .icon {
+  width: 18vw;
+  height: 18vw;
+  margin-top: 2vw;
+  margin-left: 2vw;
+}
+.main .two .list .list_1 .icon image {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+  background-color: var(--f85Color);
+}
+.main .two .list .list_1 .content {
+  display: flex;
+  flex-direction: column;
+  margin: 0 0 0 3vw;
+}
+.main .two .list .list_1 .content .name {
+  font-weight: 700;
+  font-size: var(--font18Szie);
+  color: var(--blackColor);
+  margin: 1vw 0;
+}
+.main .two .list .list_1 .content .other {
+  font-size: var(--font15Size);
+  color: var(--f85Color);
+  margin: 0.5vw 0 1vw 0;
+}
+.main .two .list .list_1 .content .other text {
+  color: var(--redColor);
+}
+.main .two .list .btn {
+  display: flex;
+  flex-direction: row;
+}
+.main .two .list .btn button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+  color: var(--whiteColor);
+  border-radius: 50px;
+  margin: 0 2vw;
+  background-color: #35d4bd;
+  box-sizing: content-box;
+  border: 2px dashed var(--whiteColor);
+}
+.main .two .list .btn button:nth-child(2n) {
+  background-color: #f860df;
+}
+.main .two .list .btn button:last-child {
+  background-color: #FF7F50;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .name {
+  text-align: center;
+  font-size: var(--font18Szie);
+  font-weight: bold;
+  margin: 3vw 0;
+}
+.dialog .dialog_1 .image {
+  text-align: center;
+  height: 18vh;
+  overflow: hidden;
+}
+.dialog .dialog_1 .image .qrcode {
+  height: 22vh;
+  position: absolute;
+  left: 32vw;
+}
+.dialog .dialog_1 .remark {
+  text-align: center;
+  font-size: 15px;
+  margin: 0 0 4vw 0;
+}

+ 76 - 12
pages/schAdmin/courseexam/info.js

@@ -1,66 +1,130 @@
-// pages/schAdmin/courseexam/info.js
+const app = getApp()
+
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
-
+        frameStyle: { useTop: true, name: '审核入学', leftArrow: true, useBar: false },
+        id: '',
+        form: {},
+        student_id: '',
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
     },
 
+    // 审核
+    toEdit: function (e) {
+        const that = this;
+        let params = {};
+        const { try_status } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否审核该条数据',
+            async success(res) {
+                if (res.confirm) {
+                    params.try_status = try_status
+                    if (that.data.id) {
+                        const arr = await app.$post(`/lessonStudent/${that.data.id}`, params);
+                        if (arr.errcode == '0') {
+                            wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back();
+                        }
+                        else wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+                    }
+                } else if (res.cancel) {
+                }
+            }
+        })
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ id: options.id || '' })
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({ school_id: res.data.info.id })
+                const aee = await app.$get(`/dict`, { code: "student_grade" });
+                if (aee.errcode == '0' && aee.total > 0) that.setData({ levelList: aee.data[0].list });
+                const ree = await app.$get(`/dict`, { code: "gender" });
+                if (ree.errcode == '0' && ree.total > 0) that.setData({ genderList: ree.data[0].list });
+                if (that.data.id) {
+                    const aee = await app.$get(`/lessonStudent/${that.data.id}`);
+                    if (aee.errcode == '0') {
+                        that.setData({ student_id: aee.data.student_id })
+                    }
+                    const arr = await app.$get(`/student/${that.data.student_id}`);
+                    if (arr.errcode == '0') {
+                        let gender = that.data.genderList.find(i => i.value == arr.data.gender)
+                        if (gender) arr.data.zhGender = gender.label;
+                        let level = that.data.levelList.find(i => i.value == arr.data.level)
+                        if (level) arr.data.zhLevel = level.label;
+                        that.setData({ form: arr.data });
+                    }
+                }
+            },
+            fail: res => {
+                wx.redirectTo({ url: '/pages/index/index', })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
+    onReady: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
+    onShow: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 页面上拉触底事件的处理函数
      */
-    onReachBottom() {
+    onReachBottom: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 4 - 1
pages/schAdmin/courseexam/info.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index"
+    }
 }

+ 62 - 0
pages/schAdmin/courseexam/info.less

@@ -0,0 +1,62 @@
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+
+    .one {
+        flex-grow: 1;
+        position: relative;
+        height: 81vh;
+
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 73vw;
+                }
+
+                image {
+                    width: 100px;
+                    height: 100px;
+                }
+            }
+        }
+    }
+
+    .btn {
+        text-align: center;
+        margin: 5vw 0 0 0;
+
+        button {
+            width: 40vw;
+            margin: 0 2vw;
+            padding: 1vw 0;
+        }
+
+        button:last-child {
+            background-color: #FF7F50;
+        }
+    }
+
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 62 - 2
pages/schAdmin/courseexam/info.wxml

@@ -1,2 +1,62 @@
-<!--pages/schAdmin/courseexam/info.wxml-->
-<text>pages/schAdmin/courseexam/info.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view class="content">
+                        <view class="label">头像:</view>
+                        <view class="value">
+                            <image src="{{form.icon&&form.icon.length>0?form.icon[0].url:''}}">
+                            </image>
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">姓名:</view>
+                        <view class="value">{{form.name}}</view>
+                    </view>
+                    <view class="content">
+                        <view class="label">性别:</view>
+                        <view class="value">{{form.zhGender||'暂无'}} </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">年龄:</view>
+                        <view class="value">{{form.age}}
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">联系电话:</view>
+                        <view class="value">{{form.phone}}
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">运动等级:</view>
+                        <view class="value">{{form.zhLevel||'暂无'}}
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">学员简介:</view>
+                        <view class="value">{{form.brief}}
+                            <textarea name="brief" maxlength="-1" auto-height value="{{form.brief}}" disabled placeholder="请输入学员简介" />
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">过往荣誉:</view>
+                        <view class="value">
+                            <textarea name="honer" maxlength="-1" auto-height value="{{form.honer}}" disabled placeholder="请输入过往荣誉" />
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">训练经历:</view>
+                        <view class="value">
+                            <textarea name="exp" maxlength="-1" auto-height value="{{form.exp}}" disabled placeholder="请输入训练经历" />
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+        <view class="btn">
+            <button type="primary" size="mini" bindtap="toEdit" data-try_status="1">通过</button>
+            <button type="primary" size="mini" bindtap="toEdit" data-try_status="-1">拒绝</button>
+        </view>
+    </view>
+</mobile-main>

+ 51 - 1
pages/schAdmin/courseexam/info.wxss

@@ -1 +1,51 @@
-/* pages/schAdmin/courseexam/info.wxss */
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main .one {
+  flex-grow: 1;
+  position: relative;
+  height: 81vh;
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 73vw;
+}
+.main .one .content .value image {
+  width: 100px;
+  height: 100px;
+}
+.main .btn {
+  text-align: center;
+  margin: 5vw 0 0 0;
+}
+.main .btn button {
+  width: 40vw;
+  margin: 0 2vw;
+  padding: 1vw 0;
+}
+.main .btn button:last-child {
+  background-color: #FF7F50;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 79 - 28
pages/schAdmin/courseexam/list.js

@@ -1,66 +1,117 @@
-// pages/schAdmin/coach/list.js
-Page({
+const app = getApp()
+import QRCode from '../../../utils/weapp-qrcode.js';
 
-    /**
-     * 页面的初始数据
-     */
+Page({
     data: {
-
+        frameStyle: { useTop: true, name: '学员信息', leftArrow: true, useBar: false },
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+        // 等级列表
+        // levelList: [],
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 审核
+    toEdit: function (e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: `/pages/schAdmin/courseexam/info?id=${item._id}` })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) { },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                // 学员等级
+                // let aee = await app.$get(`/dict`, { code: 'student_grade' });
+                // if (aee.errcode == '0' && aee.total > 0) that.setData({ levelList: aee.data[0].list })
+                let info = { skip: that.data.skip, limit: that.data.limit, school_id: res.data.info.id, is_try: 0 };
+                const arr = await app.$get(`/lessonStudent`, { ...info });
+                if (arr.errcode == '0') {
+                    // for (const val of arr.data) {
+                    //     let level = that.data.levelList.find(i => i.value == val.student_id_level)
+                    //     if (level) val.zhLevel = level.label;
+                    // }
+                    that.setData({ list: [...that.data.list, ...arr.data] });
+                    that.setData({ total: arr.total });
+                }
+                else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pages/schAdmin/courseexam/list.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
-}
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 158 - 0
pages/schAdmin/courseexam/list.less

@@ -0,0 +1,158 @@
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 2vw 2vw 0;
+            border-radius: 10px;
+            border: 1px dashed var(--blackColor);
+
+
+            .list_1 {
+                display: flex;
+                flex-direction: row;
+                margin: 0 0 2vw 0;
+                border: 2px dashed var(--blackColor);
+                border-radius: 10px;
+
+                .icon {
+                    width: 18vw;
+                    height: 18vw;
+                    margin-top: 2vw;
+                    margin-left: 2vw;
+
+                    image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 50%;
+                        background-color: var(--f85Color);
+                    }
+                }
+
+                .content {
+                    display: flex;
+                    flex-direction: column;
+                    margin: 0 0 0 3vw;
+
+                    .name {
+                        font-weight: 700;
+                        font-size: var(--font18Szie);
+                        color: var(--blackColor);
+                        margin: 1vw 0;
+                    }
+
+                    .other {
+                        font-size: var(--font15Size);
+                        color: var(--f85Color);
+                        margin: 0.5vw 0 1vw 0;
+
+                        text {
+                            color: var(--redColor);
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                display: flex;
+                flex-direction: row;
+
+                button {
+                    width: 100%;
+                    padding: 2vw;
+                    font-size: var(--font14Size);
+                    color: var(--whiteColor);
+                    border-radius: 50px;
+                    margin: 0 2vw;
+                    background-color: #35d4bd;
+                    box-sizing: content-box;
+                    border: 2px dashed var(--whiteColor);
+                }
+
+                button:nth-child(2n) {
+                    background-color: #f860df;
+                }
+
+                button:last-child {
+                    background-color: #FF7F50;
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .name {
+            text-align: center;
+            font-size: var(--font18Szie);
+            font-weight: bold;
+            margin: 3vw 0;
+        }
+
+        .image {
+            text-align: center;
+            height: 18vh;
+            overflow: hidden;
+
+            .qrcode {
+                height: 22vh;
+                position: absolute;
+                left: 32vw;
+            }
+        }
+
+        .remark {
+            text-align: center;
+            font-size: 15px;
+            margin: 0 0 4vw 0;
+        }
+    }
+}

+ 36 - 2
pages/schAdmin/courseexam/list.wxml

@@ -1,2 +1,36 @@
-<!--pages/schAdmin/coach/list.wxml-->
-<text>pages/schAdmin/coach/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="list_1">
+                            <view class="icon">
+                                <image src="{{item.student_id_icon&&item.student_id_icon.length>0?item.student_id_icon[0].url:''}}">
+                                </image>
+                            </view>
+                            <view class="content">
+                                <view class="name textOver">{{item.student_id_name||'学员姓名'}}</view>
+                                <view class="other">学员等级:<text>{{item.zhLevel||'一级'}}</text>
+                                </view>
+                                <view class="other">联系电话:{{item.student_id_phone||'暂无'}}
+                                </view>
+                                <view class="other">状态:
+                                    <text>{{item.try_status==1?'已通过':item.try_status==-1?'已拒绝':'未审核'}}</text>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button bindtap="toEdit" data-item="{{item}}" wx:if="{{item.try_status==0}}">审核信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 129 - 1
pages/schAdmin/courseexam/list.wxss

@@ -1 +1,129 @@
-/* pages/schAdmin/coach/list.wxss */
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 2vw 2vw 0;
+  border-radius: 10px;
+  border: 1px dashed var(--blackColor);
+}
+.main .two .list .list_1 {
+  display: flex;
+  flex-direction: row;
+  margin: 0 0 2vw 0;
+  border: 2px dashed var(--blackColor);
+  border-radius: 10px;
+}
+.main .two .list .list_1 .icon {
+  width: 18vw;
+  height: 18vw;
+  margin-top: 2vw;
+  margin-left: 2vw;
+}
+.main .two .list .list_1 .icon image {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+  background-color: var(--f85Color);
+}
+.main .two .list .list_1 .content {
+  display: flex;
+  flex-direction: column;
+  margin: 0 0 0 3vw;
+}
+.main .two .list .list_1 .content .name {
+  font-weight: 700;
+  font-size: var(--font18Szie);
+  color: var(--blackColor);
+  margin: 1vw 0;
+}
+.main .two .list .list_1 .content .other {
+  font-size: var(--font15Size);
+  color: var(--f85Color);
+  margin: 0.5vw 0 1vw 0;
+}
+.main .two .list .list_1 .content .other text {
+  color: var(--redColor);
+}
+.main .two .list .btn {
+  display: flex;
+  flex-direction: row;
+}
+.main .two .list .btn button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+  color: var(--whiteColor);
+  border-radius: 50px;
+  margin: 0 2vw;
+  background-color: #35d4bd;
+  box-sizing: content-box;
+  border: 2px dashed var(--whiteColor);
+}
+.main .two .list .btn button:nth-child(2n) {
+  background-color: #f860df;
+}
+.main .two .list .btn button:last-child {
+  background-color: #FF7F50;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .name {
+  text-align: center;
+  font-size: var(--font18Szie);
+  font-weight: bold;
+  margin: 3vw 0;
+}
+.dialog .dialog_1 .image {
+  text-align: center;
+  height: 18vh;
+  overflow: hidden;
+}
+.dialog .dialog_1 .image .qrcode {
+  height: 22vh;
+  position: absolute;
+  left: 32vw;
+}
+.dialog .dialog_1 .remark {
+  text-align: center;
+  font-size: 15px;
+  margin: 0 0 4vw 0;
+}

+ 0 - 0
pages/schAdmin/coursetryexam/iinfo.less


+ 76 - 12
pages/schAdmin/coursetryexam/info.js

@@ -1,66 +1,130 @@
-// pages/schAdmin/coursetryexam/info.js
+const app = getApp()
+
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
-
+        frameStyle: { useTop: true, name: '审核入学', leftArrow: true, useBar: false },
+        id: '',
+        form: {},
+        student_id: '',
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
     },
 
+    // 审核
+    toEdit: function (e) {
+        const that = this;
+        let params = {};
+        const { try_status } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否审核该条数据',
+            async success(res) {
+                if (res.confirm) {
+                    params.try_status = try_status
+                    if (that.data.id) {
+                        const arr = await app.$post(`/lessonStudent/${that.data.id}`, params);
+                        if (arr.errcode == '0') {
+                            wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back();
+                        }
+                        else wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+                    }
+                } else if (res.cancel) {
+                }
+            }
+        })
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ id: options.id || '' })
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({ school_id: res.data.info.id })
+                const aee = await app.$get(`/dict`, { code: "student_grade" });
+                if (aee.errcode == '0' && aee.total > 0) that.setData({ levelList: aee.data[0].list });
+                const ree = await app.$get(`/dict`, { code: "gender" });
+                if (ree.errcode == '0' && ree.total > 0) that.setData({ genderList: ree.data[0].list });
+                if (that.data.id) {
+                    const aee = await app.$get(`/lessonStudent/${that.data.id}`);
+                    if (aee.errcode == '0') {
+                        that.setData({ student_id: aee.data.student_id })
+                    }
+                    const arr = await app.$get(`/student/${that.data.student_id}`);
+                    if (arr.errcode == '0') {
+                        let gender = that.data.genderList.find(i => i.value == arr.data.gender)
+                        if (gender) arr.data.zhGender = gender.label;
+                        let level = that.data.levelList.find(i => i.value == arr.data.level)
+                        if (level) arr.data.zhLevel = level.label;
+                        that.setData({ form: arr.data });
+                    }
+                }
+            },
+            fail: res => {
+                wx.redirectTo({ url: '/pages/index/index', })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
+    onReady: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
+    onShow: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 页面上拉触底事件的处理函数
      */
-    onReachBottom() {
+    onReachBottom: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 4 - 1
pages/schAdmin/coursetryexam/info.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index"
+    }
 }

+ 62 - 0
pages/schAdmin/coursetryexam/info.less

@@ -0,0 +1,62 @@
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+
+    .one {
+        flex-grow: 1;
+        position: relative;
+        height: 81vh;
+
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 73vw;
+                }
+
+                image {
+                    width: 100px;
+                    height: 100px;
+                }
+            }
+        }
+    }
+
+    .btn {
+        text-align: center;
+        margin: 5vw 0 0 0;
+
+        button {
+            width: 40vw;
+            margin: 0 2vw;
+            padding: 1vw 0;
+        }
+
+        button:last-child {
+            background-color: #FF7F50;
+        }
+    }
+
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 62 - 2
pages/schAdmin/coursetryexam/info.wxml

@@ -1,2 +1,62 @@
-<!--pages/schAdmin/coursetryexam/info.wxml-->
-<text>pages/schAdmin/coursetryexam/info.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view class="content">
+                        <view class="label">头像:</view>
+                        <view class="value">
+                            <image src="{{form.icon&&form.icon.length>0?form.icon[0].url:''}}">
+                            </image>
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">姓名:</view>
+                        <view class="value">{{form.name}}</view>
+                    </view>
+                    <view class="content">
+                        <view class="label">性别:</view>
+                        <view class="value">{{form.zhGender||'暂无'}} </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">年龄:</view>
+                        <view class="value">{{form.age}}
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">联系电话:</view>
+                        <view class="value">{{form.phone}}
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">运动等级:</view>
+                        <view class="value">{{form.zhLevel||'暂无'}}
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">学员简介:</view>
+                        <view class="value">{{form.brief}}
+                            <textarea name="brief" maxlength="-1" auto-height value="{{form.brief}}" disabled placeholder="请输入学员简介" />
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">过往荣誉:</view>
+                        <view class="value">
+                            <textarea name="honer" maxlength="-1" auto-height value="{{form.honer}}" disabled placeholder="请输入过往荣誉" />
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">训练经历:</view>
+                        <view class="value">
+                            <textarea name="exp" maxlength="-1" auto-height value="{{form.exp}}" disabled placeholder="请输入训练经历" />
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+        <view class="btn">
+            <button type="primary" size="mini" bindtap="toEdit" data-try_status="1">通过</button>
+            <button type="primary" size="mini" bindtap="toEdit" data-try_status="-1">拒绝</button>
+        </view>
+    </view>
+</mobile-main>

+ 51 - 1
pages/schAdmin/coursetryexam/info.wxss

@@ -1 +1,51 @@
-/* pages/schAdmin/coursetryexam/info.wxss */
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main .one {
+  flex-grow: 1;
+  position: relative;
+  height: 81vh;
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 73vw;
+}
+.main .one .content .value image {
+  width: 100px;
+  height: 100px;
+}
+.main .btn {
+  text-align: center;
+  margin: 5vw 0 0 0;
+}
+.main .btn button {
+  width: 40vw;
+  margin: 0 2vw;
+  padding: 1vw 0;
+}
+.main .btn button:last-child {
+  background-color: #FF7F50;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 78 - 28
pages/schAdmin/coursetryexam/list.js

@@ -1,66 +1,116 @@
-// pages/schAdmin/coach/list.js
-Page({
+const app = getApp()
 
-    /**
-     * 页面的初始数据
-     */
+Page({
     data: {
-
+        frameStyle: { useTop: true, name: '学员信息', leftArrow: true, useBar: false },
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+        // 等级列表
+        // levelList: [],
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 审核
+    toEdit: function (e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: `/pages/schAdmin/coursetryexam/info?id=${item._id}` })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) { },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                // 学员等级
+                // let aee = await app.$get(`/dict`, { code: 'student_grade' });
+                // if (aee.errcode == '0' && aee.total > 0) that.setData({ levelList: aee.data[0].list })
+                let info = { skip: that.data.skip, limit: that.data.limit, school_id: res.data.info.id, is_try: 1 };
+                const arr = await app.$get(`/lessonStudent`, { ...info });
+                if (arr.errcode == '0') {
+                    // for (const val of arr.data) {
+                    //     let level = that.data.levelList.find(i => i.value == val.student_id_level)
+                    //     if (level) val.zhLevel = level.label;
+                    // }
+                    that.setData({ list: [...that.data.list, ...arr.data] });
+                    that.setData({ total: arr.total });
+                }
+                else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pages/schAdmin/coursetryexam/list.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
-}
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 158 - 0
pages/schAdmin/coursetryexam/list.less

@@ -0,0 +1,158 @@
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 2vw 2vw 0;
+            border-radius: 10px;
+            border: 1px dashed var(--blackColor);
+
+
+            .list_1 {
+                display: flex;
+                flex-direction: row;
+                margin: 0 0 2vw 0;
+                border: 2px dashed var(--blackColor);
+                border-radius: 10px;
+
+                .icon {
+                    width: 18vw;
+                    height: 18vw;
+                    margin-top: 2vw;
+                    margin-left: 2vw;
+
+                    image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 50%;
+                        background-color: var(--f85Color);
+                    }
+                }
+
+                .content {
+                    display: flex;
+                    flex-direction: column;
+                    margin: 0 0 0 3vw;
+
+                    .name {
+                        font-weight: 700;
+                        font-size: var(--font18Szie);
+                        color: var(--blackColor);
+                        margin: 1vw 0;
+                    }
+
+                    .other {
+                        font-size: var(--font15Size);
+                        color: var(--f85Color);
+                        margin: 0.5vw 0 1vw 0;
+
+                        text {
+                            color: var(--redColor);
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                display: flex;
+                flex-direction: row;
+
+                button {
+                    width: 100%;
+                    padding: 2vw;
+                    font-size: var(--font14Size);
+                    color: var(--whiteColor);
+                    border-radius: 50px;
+                    margin: 0 2vw;
+                    background-color: #35d4bd;
+                    box-sizing: content-box;
+                    border: 2px dashed var(--whiteColor);
+                }
+
+                button:nth-child(2n) {
+                    background-color: #f860df;
+                }
+
+                button:last-child {
+                    background-color: #FF7F50;
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .name {
+            text-align: center;
+            font-size: var(--font18Szie);
+            font-weight: bold;
+            margin: 3vw 0;
+        }
+
+        .image {
+            text-align: center;
+            height: 18vh;
+            overflow: hidden;
+
+            .qrcode {
+                height: 22vh;
+                position: absolute;
+                left: 32vw;
+            }
+        }
+
+        .remark {
+            text-align: center;
+            font-size: 15px;
+            margin: 0 0 4vw 0;
+        }
+    }
+}

+ 36 - 2
pages/schAdmin/coursetryexam/list.wxml

@@ -1,2 +1,36 @@
-<!--pages/schAdmin/coach/list.wxml-->
-<text>pages/schAdmin/coach/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="list_1">
+                            <view class="icon">
+                                <image src="{{item.student_id_icon&&item.student_id_icon.length>0?item.student_id_icon[0].url:''}}">
+                                </image>
+                            </view>
+                            <view class="content">
+                                <view class="name textOver">{{item.student_id_name||'学员姓名'}}</view>
+                                <view class="other">学员等级:<text>{{item.zhLevel||'一级'}}</text>
+                                </view>
+                                <view class="other">联系电话:{{item.student_id_phone||'暂无'}}
+                                </view>
+                                <view class="other">状态:
+                                    <text>{{item.try_status==1?'已通过':item.try_status==-1?'已拒绝':'未审核'}}</text>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button bindtap="toEdit" data-item="{{item}}" wx:if="{{item.try_status==0}}">审核信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 129 - 1
pages/schAdmin/coursetryexam/list.wxss

@@ -1 +1,129 @@
-/* pages/schAdmin/coach/list.wxss */
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 2vw 2vw 0;
+  border-radius: 10px;
+  border: 1px dashed var(--blackColor);
+}
+.main .two .list .list_1 {
+  display: flex;
+  flex-direction: row;
+  margin: 0 0 2vw 0;
+  border: 2px dashed var(--blackColor);
+  border-radius: 10px;
+}
+.main .two .list .list_1 .icon {
+  width: 18vw;
+  height: 18vw;
+  margin-top: 2vw;
+  margin-left: 2vw;
+}
+.main .two .list .list_1 .icon image {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+  background-color: var(--f85Color);
+}
+.main .two .list .list_1 .content {
+  display: flex;
+  flex-direction: column;
+  margin: 0 0 0 3vw;
+}
+.main .two .list .list_1 .content .name {
+  font-weight: 700;
+  font-size: var(--font18Szie);
+  color: var(--blackColor);
+  margin: 1vw 0;
+}
+.main .two .list .list_1 .content .other {
+  font-size: var(--font15Size);
+  color: var(--f85Color);
+  margin: 0.5vw 0 1vw 0;
+}
+.main .two .list .list_1 .content .other text {
+  color: var(--redColor);
+}
+.main .two .list .btn {
+  display: flex;
+  flex-direction: row;
+}
+.main .two .list .btn button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+  color: var(--whiteColor);
+  border-radius: 50px;
+  margin: 0 2vw;
+  background-color: #35d4bd;
+  box-sizing: content-box;
+  border: 2px dashed var(--whiteColor);
+}
+.main .two .list .btn button:nth-child(2n) {
+  background-color: #f860df;
+}
+.main .two .list .btn button:last-child {
+  background-color: #FF7F50;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .name {
+  text-align: center;
+  font-size: var(--font18Szie);
+  font-weight: bold;
+  margin: 3vw 0;
+}
+.dialog .dialog_1 .image {
+  text-align: center;
+  height: 18vh;
+  overflow: hidden;
+}
+.dialog .dialog_1 .image .qrcode {
+  height: 22vh;
+  position: absolute;
+  left: 32vw;
+}
+.dialog .dialog_1 .remark {
+  text-align: center;
+  font-size: 15px;
+  margin: 0 0 4vw 0;
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 93 - 27
pages/schAdmin/school/info.js


+ 5 - 1
pages/schAdmin/school/info.json

@@ -1,3 +1,7 @@
 {
-    "usingComponents": {}
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index",
+        "upload": "/commpents/upload/index"
+    }
 }

+ 34 - 0
pages/schAdmin/school/info.less

@@ -0,0 +1,34 @@
+.main {
+    background-color: var(--mainColor);
+
+    .one {
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 73vw;
+                }
+            }
+        }
+
+        .btn {
+            text-align: center;
+            margin: 5vw 0 0 0;
+
+            button {
+                width: 40vw;
+                margin: 0 2vw;
+                padding: 1vw 0;
+            }
+        }
+    }
+}

+ 71 - 2
pages/schAdmin/school/info.wxml

@@ -1,2 +1,71 @@
-<!--pages/schAdmin/school/info.wxml-->
-<text>pages/schAdmin/school/info.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">名称:</view>
+                    <view class="value">
+                        <textarea name="name" value="{{form.name}}" auto-height placeholder="请输入名称" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">简介:</view>
+                    <view class="value">
+                        <textarea name="brief" value="{{form.brief}}" auto-height placeholder="请输入简介" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">联系方式:</view>
+                    <view class="value">
+                        <input name="phone" value="{{form.phone}}" placeholder="请输入联系方式" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">训练地址:</view>
+                    <view class="value">
+                        <input name="address" value="{{form.address}}" placeholder="请输入训练地址" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">教练人数:</view>
+                    <view class="value">
+                        <input type="number" name="coach_num" value="{{form.coach_num}}" placeholder="请输入教练人数" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">学员人数:</view>
+                    <view class="value">
+                        <input type="number" name="student_num" value="{{form.student_num}}" placeholder="请输入学员人数" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">过往荣誉:</view>
+                    <view class="value">
+                        <textarea name="honor" value="{{form.honor}}" auto-height placeholder="请输入过往荣誉" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">网址:</view>
+                    <view class="value">
+                        <input name="url" value="{{form.url}}" placeholder="请输入网址(http://)" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">营业执照(1):</view>
+                    <view class="value">
+                        <upload list="{{form.yyzz}}" count="{{1}}" previewSize="{{33}}" bind:imgUpload="yzimgUpl" bind:imgDel="yzimgDel"></upload>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">机构图片(6):</view>
+                    <view class="value">
+                        <upload list="{{form.img_url}}" count="{{6}}" previewSize="{{25}}" bind:imgUpload="imgUpl" bind:imgDel="imgDel"></upload>
+                    </view>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 27 - 1
pages/schAdmin/school/info.wxss

@@ -1 +1,27 @@
-/* pages/schAdmin/school/info.wxss */
+.main {
+  background-color: var(--mainColor);
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 73vw;
+}
+.main .one .btn {
+  text-align: center;
+  margin: 5vw 0 0 0;
+}
+.main .one .btn button {
+  width: 40vw;
+  margin: 0 2vw;
+  padding: 1vw 0;
+}

+ 128 - 17
pages/schAdmin/student/add.js

@@ -1,66 +1,177 @@
-// pages/schAdmin/student/add.js
+const app = getApp()
+import WxValidate from '../../../utils/wxValidate';
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '学员信息管理', leftArrow: true, useBar: false },
+        id: '',
+        school_id: '',
+        form: { icon: [] },
+        // 性别
+        genderList: [],
+        //运动等级
+        levelList: [],
+    },
+    initValidate() {
+        const rules = { icon: { required: true }, name: { required: true }, age: { required: true }, gender: { required: true }, phone: { required: true, tel: true } }
+        // 验证字段的提示信息,若不传则调用默认的信息
+        const messages = { icon: { required: '请选择头像' }, name: { required: '请输入学员姓名' }, age: { required: '请输入年龄' }, gender: { required: '请选择性别' }, phone: { required: '请输入联系电话' } };
+        this.WxValidate = new WxValidate(rules, messages)
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    //上传图片
+    imgUpl: function (e) {
+        const that = this;
+        let data = that.data.form.icon;
+        data.push(e.detail)
+        that.setData({ 'form.icon': data })
+    },
+    // 删除图片
+    imgDel: function (e) {
+        const that = this;
+        let list = that.data.form.icon;
+        let arr = list.filter((i, index) => index != e.detail.index)
+        that.setData({ 'form.icon': arr })
+    },
+    // 选择性别
+    genderChange: function (e) {
+        const that = this;
+        let data = that.data.genderList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.gender': data.value });
+            that.setData({ 'form.zhGender': data.label });
+        }
+    },
+    // 选择等级
+    levelChange: function (e) {
+        const that = this;
+        let data = that.data.levelList[e.detail.value];
+        if (data) {
+            that.setData({ 'form.level': data.value });
+            that.setData({ 'form.zhLevel': data.label });
+        }
+    },
+    //提交
+    onSubmit: async function (e) {
+        const that = this;
+        const form = that.data.form;
+        const params = e.detail.value;
+        params.icon = form.icon;
+        params.school_id = that.data.school_id;
+        if (!this.WxValidate.checkForm(params)) {
+            const error = this.WxValidate.errorList[0];
+            wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+            return false
+        } else {
+            let arr;
+            if (form._id) arr = await app.$post(`/student/${form._id}`, params);
+            else arr = await app.$post(`/student`, params)
+            if (arr.errcode == '0') { wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
+            else wx.showToast({ title: `${errmsg}`, icon: 'error', duration: 2000 })
+        }
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: async function (options) {
+        const that = this;
+        that.setData({ id: options.id || '' })
+        //验证规则函数
+        that.initValidate();
+        // 查询其他信息
+        await that.searchOther();
+        // 监听用户是否登录
+        await that.watchLogin();
+    },
+    searchOther: async function () {
+        const that = this;
+        let arr;
+        // 性别
+        arr = await app.$get(`/dict`, { code: 'gender' });
+        if (arr.errcode == '0' && arr.total > 0) {
+            let list = arr.data[0].list;
+            that.setData({ genderList: list })
+        }
+        // 运动等级
+        arr = await app.$get(`/dict`, { code: 'student_grade' });
+        if (arr.errcode == '0' && arr.total > 0) {
+            let list = arr.data[0].list;
+            that.setData({ levelList: list })
+        }
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        let genderList = that.data.genderList;
+        let levelList = that.data.levelList;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({ school_id: res.data.info.id })
+                if (that.data.id) {
+                    const arr = await app.$get(`/student/${that.data.id}`);
+                    if (arr.errcode == '0') {
+                        let gender = genderList.find(i => i.value == arr.data.gender)
+                        if (gender) arr.data.zhGender = gender.label;
+                        let level = levelList.find(i => i.value == arr.data.level)
+                        if (level) arr.data.zhLevel = level.label;
+                        that.setData({ form: arr.data });
+                    }
+                }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
+    onReady: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
+    onShow: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 页面上拉触底事件的处理函数
      */
-    onReachBottom() {
+    onReachBottom: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 1
pages/schAdmin/student/add.json

@@ -1,3 +1,7 @@
 {
-    "usingComponents": {}
+  "component": true,
+  "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index",
+      "upload": "/commpents/upload/index"
+  }
 }

+ 35 - 0
pages/schAdmin/student/add.less

@@ -0,0 +1,35 @@
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 73vw;
+                }
+            }
+        }
+
+        .btn {
+            text-align: center;
+            margin: 5vw 0 0 0;
+
+            button {
+                width: 40vw;
+                margin: 0 2vw;
+                padding: 1vw 0;
+            }
+        }
+    }
+}

+ 69 - 2
pages/schAdmin/student/add.wxml

@@ -1,2 +1,69 @@
-<!--pages/schAdmin/student/add.wxml-->
-<text>pages/schAdmin/student/add.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <form catchsubmit="onSubmit">
+                <view class="content">
+                    <view class="label">头像:</view>
+                    <view class="value">
+                        <upload list="{{form.icon}}" count="{{1}}" previewSize="{{30}}" bind:imgUpload="imgUpl" bind:imgDel="imgDel"></upload>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">姓名:</view>
+                    <view class="value">
+                        <input type="text" name="name" value="{{form.name}}" placeholder="请输入姓名" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">性别:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="genderChange" name="gender" value="{{form.gender}}" range="{{genderList}}" range-key="label">
+                            <view class="picker">{{form.zhGender||'请选择性别'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">年龄:</view>
+                    <view class="value">
+                        <input type="number" name="age" value="{{form.age}}" placeholder="请输入年龄" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">联系电话:</view>
+                    <view class="value">
+                        <input type="text" name="phone" maxlength="11" value="{{form.phone}}" placeholder="请输入联系电话" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">运动等级:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="levelChange" name="level" value="{{form.level}}" range="{{levelList}}" range-key="label">
+                            <view class="picker">{{form.zhLevel||'请选择运动等级'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">学员简介:</view>
+                    <view class="value">
+                        <textarea name="brief" maxlength="-1" auto-height value="{{form.brief}}" placeholder="请输入学员简介" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">过往荣誉:</view>
+                    <view class="value">
+                        <textarea name="honer" maxlength="-1" auto-height value="{{form.honer}}" placeholder="请输入过往荣誉" />
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">训练经历:</view>
+                    <view class="value">
+                        <textarea name="exp" maxlength="-1" auto-height value="{{form.exp}}" placeholder="请输入训练经历" />
+                    </view>
+                </view>
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交保存</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</mobile-main>

+ 28 - 1
pages/schAdmin/student/add.wxss

@@ -1 +1,28 @@
-/* pages/schAdmin/student/add.wxss */
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 73vw;
+}
+.main .one .btn {
+  text-align: center;
+  margin: 5vw 0 0 0;
+}
+.main .one .btn button {
+  width: 40vw;
+  margin: 0 2vw;
+  padding: 1vw 0;
+}

+ 140 - 27
pages/schAdmin/student/list.js

@@ -1,66 +1,179 @@
-// pages/schAdmin/coach/list.js
-Page({
+const app = getApp()
+import QRCode from '../../../utils/weapp-qrcode.js';
 
-    /**
-     * 页面的初始数据
-     */
+Page({
     data: {
-
+        frameStyle: { useTop: true, name: '学员信息', leftArrow: true, useBar: false },
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+        // 等级列表
+        levelList: [],
+        // dialog弹框
+        dialog: { title: '账号绑定', show: false, type: '1' },
+        form: {},
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 添加
+    toAdd() {
+        const that = this;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: '/pages/schAdmin/student/add' })
+    },
+    // 修改
+    toEdit: function (e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: `/pages/schAdmin/student/add?id=${item.student_id}` })
+    },
+    // 删除
+    toDel: async function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/rss/${item.id}`);
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.setData({ skip: 0, page: 0, list: [] })
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
+    // 绑定账号
+    toBind: async function (e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        const arr = await app.$get(`/student/${item.student_id}`);
+        if (arr.errcode == '0') {
+            that.setData({ form: arr.data })
+            // 生成二维码
+            that.makeQRCode();
+            that.setData({ dialog: { title: '账号绑定', show: true, type: '1' } })
+        } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+    },
+    makeQRCode(template = 0) {
+        const that = this;
+        const url = `${app.globalData.publicUrl}/courtappbind?id=${that.data.form.id}&type='2'`;
+        var qrcode = new QRCode(`myQrcode`, {
+            text: url,
+            width: 110,
+            height: 110,
+            padding: 3,
+            colorDark: "#000000",
+            colorLight: "#ffffff",
+            correctLevel: QRCode.CorrectLevel.L,
+        });
     },
 
+    // 关闭弹框
+    toClose: function () {
+        const that = this;
+        that.setData({ form: {} })
+        that.setData({ dialog: { title: '账号绑定', show: false, type: '1' } })
+    },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) { },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                // 学员等级
+                let aee = await app.$get(`/dict`, { code: 'student_grade' });
+                if (aee.errcode == '0' && aee.total > 0) that.setData({ levelList: aee.data[0].list })
+                let info = { skip: that.data.skip, limit: that.data.limit, school_id: res.data.info.id };
+                const arr = await app.$get(`/rss`, { ...info });
+                if (arr.errcode == '0') {
+                    for (const val of arr.data) {
+                        let level = that.data.levelList.find(i => i.value == val.student_id_level)
+                        if (level) val.zhLevel = level.label;
+                    }
+                    that.setData({ list: [...that.data.list, ...arr.data] });
+                    that.setData({ total: arr.total });
+                }
+                else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 6 - 2
pages/schAdmin/student/list.json

@@ -1,3 +1,7 @@
 {
-    "usingComponents": {}
-}
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index",
+      "dialog": "/commpents/dialog/index"
+    }
+  }

+ 158 - 0
pages/schAdmin/student/list.less

@@ -0,0 +1,158 @@
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 2vw 2vw 0;
+            border-radius: 10px;
+            border: 1px dashed var(--blackColor);
+
+
+            .list_1 {
+                display: flex;
+                flex-direction: row;
+                margin: 0 0 2vw 0;
+                border: 2px dashed var(--blackColor);
+                border-radius: 10px;
+
+                .icon {
+                    width: 18vw;
+                    height: 18vw;
+                    margin-top: 2vw;
+                    margin-left: 2vw;
+
+                    image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 50%;
+                        background-color: var(--f85Color);
+                    }
+                }
+
+                .content {
+                    display: flex;
+                    flex-direction: column;
+                    margin: 0 0 0 3vw;
+
+                    .name {
+                        font-weight: 700;
+                        font-size: var(--font18Szie);
+                        color: var(--blackColor);
+                        margin: 1vw 0;
+                    }
+
+                    .other {
+                        font-size: var(--font15Size);
+                        color: var(--f85Color);
+                        margin: 0.5vw 0 1vw 0;
+
+                        text {
+                            color: var(--redColor);
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                display: flex;
+                flex-direction: row;
+
+                button {
+                    width: 100%;
+                    padding: 2vw;
+                    font-size: var(--font14Size);
+                    color: var(--whiteColor);
+                    border-radius: 50px;
+                    margin: 0 2vw;
+                    background-color: #35d4bd;
+                    box-sizing: content-box;
+                    border: 2px dashed var(--whiteColor);
+                }
+
+                button:nth-child(2n) {
+                    background-color: #f860df;
+                }
+
+                button:last-child {
+                    background-color: #FF7F50;
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .name {
+            text-align: center;
+            font-size: var(--font18Szie);
+            font-weight: bold;
+            margin: 3vw 0;
+        }
+
+        .image {
+            text-align: center;
+            height: 18vh;
+            overflow: hidden;
+
+            .qrcode {
+                height: 22vh;
+                position: absolute;
+                left: 32vw;
+            }
+        }
+
+        .remark {
+            text-align: center;
+            font-size: 15px;
+            margin: 0 0 4vw 0;
+        }
+    }
+}

+ 49 - 2
pages/schAdmin/student/list.wxml

@@ -1,2 +1,49 @@
-<!--pages/schAdmin/coach/list.wxml-->
-<text>pages/schAdmin/coach/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+            <view class="one_2">
+                <button type="primary" bindtap="toAdd">添加</button>
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="list_1">
+                            <view class="icon">
+                                <image src="{{item.student_id_icon&&item.student_id_icon.length>0?item.student_id_icon[0].url:''}}">
+                                </image>
+                            </view>
+                            <view class="content">
+                                <view class="name textOver">{{item.student_id_name||'学员姓名'}}</view>
+                                <view class="other">学员等级:<text>{{item.zhLevel||'一级'}}</text>
+                                </view>
+                                <view class="other">联系电话:{{item.student_id_phone||'暂无'}}
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button bindtap="toEdit" data-item="{{item}}">信息维护</button>
+                            <button bindtap="toBind" data-item="{{item}}">绑定账号</button>
+                            <button bindtap="toDel" data-item="{{item}}">删除信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>
+<dialog dialog="{{dialog}}" bind:toClose="toClose">
+    <view slot="info" class="dialog">
+        <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
+            <view class="name">{{form.name}}</view>
+            <view class="image">
+                <canvas class="qrcode" canvas-id="myQrcode"></canvas>
+            </view>
+            <view class="remark">用户可扫描二维码进行账号绑定</view>
+        </view>
+    </view>
+</dialog>

+ 129 - 1
pages/schAdmin/student/list.wxss

@@ -1 +1,129 @@
-/* pages/schAdmin/coach/list.wxss */
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 2vw 2vw 0;
+  border-radius: 10px;
+  border: 1px dashed var(--blackColor);
+}
+.main .two .list .list_1 {
+  display: flex;
+  flex-direction: row;
+  margin: 0 0 2vw 0;
+  border: 2px dashed var(--blackColor);
+  border-radius: 10px;
+}
+.main .two .list .list_1 .icon {
+  width: 18vw;
+  height: 18vw;
+  margin-top: 2vw;
+  margin-left: 2vw;
+}
+.main .two .list .list_1 .icon image {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+  background-color: var(--f85Color);
+}
+.main .two .list .list_1 .content {
+  display: flex;
+  flex-direction: column;
+  margin: 0 0 0 3vw;
+}
+.main .two .list .list_1 .content .name {
+  font-weight: 700;
+  font-size: var(--font18Szie);
+  color: var(--blackColor);
+  margin: 1vw 0;
+}
+.main .two .list .list_1 .content .other {
+  font-size: var(--font15Size);
+  color: var(--f85Color);
+  margin: 0.5vw 0 1vw 0;
+}
+.main .two .list .list_1 .content .other text {
+  color: var(--redColor);
+}
+.main .two .list .btn {
+  display: flex;
+  flex-direction: row;
+}
+.main .two .list .btn button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+  color: var(--whiteColor);
+  border-radius: 50px;
+  margin: 0 2vw;
+  background-color: #35d4bd;
+  box-sizing: content-box;
+  border: 2px dashed var(--whiteColor);
+}
+.main .two .list .btn button:nth-child(2n) {
+  background-color: #f860df;
+}
+.main .two .list .btn button:last-child {
+  background-color: #FF7F50;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .name {
+  text-align: center;
+  font-size: var(--font18Szie);
+  font-weight: bold;
+  margin: 3vw 0;
+}
+.dialog .dialog_1 .image {
+  text-align: center;
+  height: 18vh;
+  overflow: hidden;
+}
+.dialog .dialog_1 .image .qrcode {
+  height: 22vh;
+  position: absolute;
+  left: 32vw;
+}
+.dialog .dialog_1 .remark {
+  text-align: center;
+  font-size: 15px;
+  margin: 0 0 4vw 0;
+}

+ 78 - 12
pages/schAdmin/studentexam/info.js

@@ -1,66 +1,132 @@
-// pages/schAdmin/studentexam/info.js
+const app = getApp()
+
 Page({
 
     /**
      * 页面的初始数据
      */
     data: {
-
+        frameStyle: { useTop: true, name: '审核入学', leftArrow: true, useBar: false },
+        id: '',
+        form: {},
+        student_id: '',
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
     },
 
+    // 审核
+    toEdit: function (e) {
+        const that = this;
+        let params = {};
+        const { result } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            editable: true,
+            content: '',
+            placeholderText: '请输入审核意见',
+            async success(res) {
+                if (res.confirm) {
+                    params.result = result
+                    params.reason = res.content
+                    if (that.data.id) {
+                        const arr = await app.$post(`/safs/${that.data.id}`, params);
+                        if (arr.errcode == '0') { 
+                            wx.showToast({ title: `维护信息完成`, icon: 'success', duration: 2000 }); that.back(); }
+                        else wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+                    }
+                } else if (res.cancel) {
+                }
+            }
+        })
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ id: options.id || '' })
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({ school_id: res.data.info.id })
+                const aee = await app.$get(`/dict`, { code: "student_grade" });
+                if (aee.errcode == '0' && aee.total > 0) that.setData({ levelList: aee.data[0].list });
+                const ree = await app.$get(`/dict`, { code: "gender" });
+                if (ree.errcode == '0' && ree.total > 0) that.setData({ genderList: ree.data[0].list });
+                if (that.data.id) {
+                    const aee = await app.$get(`/safs/${that.data.id}`);
+                    if (aee.errcode == '0') {
+                        that.setData({ student_id: aee.data.student_id })
+                    }
+                    const arr = await app.$get(`/student/${that.data.student_id}`);
+                    if (arr.errcode == '0') {
+                        let gender = that.data.genderList.find(i => i.value == arr.data.gender)
+                        if (gender) arr.data.zhGender = gender.label;
+                        let level = that.data.levelList.find(i => i.value == arr.data.level)
+                        if (level) arr.data.zhLevel = level.label;
+                        that.setData({ form: arr.data });
+                    }
+                }
+            },
+            fail: res => {
+                wx.redirectTo({ url: '/pages/index/index', })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
+    onReady: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
+    onShow: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 页面上拉触底事件的处理函数
      */
-    onReachBottom() {
+    onReachBottom: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 4 - 1
pages/schAdmin/studentexam/info.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
+    "component": true,
+    "usingComponents": {
+        "mobile-main": "/commpents/mobile-frame/index"
+    }
 }

+ 62 - 0
pages/schAdmin/studentexam/info.less

@@ -0,0 +1,62 @@
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+
+    .one {
+        flex-grow: 1;
+        position: relative;
+        height: 81vh;
+
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    position: static;
+                    width: 73vw;
+                }
+
+                image {
+                    width: 100px;
+                    height: 100px;
+                }
+            }
+        }
+    }
+
+    .btn {
+        text-align: center;
+        margin: 5vw 0 0 0;
+
+        button {
+            width: 40vw;
+            margin: 0 2vw;
+            padding: 1vw 0;
+        }
+
+        button:last-child {
+            background-color: #FF7F50;
+        }
+    }
+
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 62 - 2
pages/schAdmin/studentexam/info.wxml

@@ -1,2 +1,62 @@
-<!--pages/schAdmin/studentexam/info.wxml-->
-<text>pages/schAdmin/studentexam/info.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view class="content">
+                        <view class="label">头像:</view>
+                        <view class="value">
+                            <image src="{{form.icon&&form.icon.length>0?form.icon[0].url:''}}">
+                            </image>
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">姓名:</view>
+                        <view class="value">{{form.name}}</view>
+                    </view>
+                    <view class="content">
+                        <view class="label">性别:</view>
+                        <view class="value">{{form.zhGender||'暂无'}} </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">年龄:</view>
+                        <view class="value">{{form.age}}
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">联系电话:</view>
+                        <view class="value">{{form.phone}}
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">运动等级:</view>
+                        <view class="value">{{form.zhLevel||'暂无'}}
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">学员简介:</view>
+                        <view class="value">{{form.brief}}
+                            <textarea name="brief" maxlength="-1" auto-height value="{{form.brief}}" disabled placeholder="请输入学员简介" />
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">过往荣誉:</view>
+                        <view class="value">
+                            <textarea name="honer" maxlength="-1" auto-height value="{{form.honer}}" disabled placeholder="请输入过往荣誉" />
+                        </view>
+                    </view>
+                    <view class="content">
+                        <view class="label">训练经历:</view>
+                        <view class="value">
+                            <textarea name="exp" maxlength="-1" auto-height value="{{form.exp}}" disabled placeholder="请输入训练经历" />
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+        <view class="btn">
+            <button type="primary" size="mini" bindtap="toEdit" data-result="1">通过</button>
+            <button type="primary" size="mini" bindtap="toEdit" data-result="-1">拒绝</button>
+        </view>
+    </view>
+</mobile-main>

+ 51 - 1
pages/schAdmin/studentexam/info.wxss

@@ -1 +1,51 @@
-/* pages/schAdmin/studentexam/info.wxss */
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main .one {
+  flex-grow: 1;
+  position: relative;
+  height: 81vh;
+}
+.main .one .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .one .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.main .one .content .value textarea {
+  position: static;
+  width: 73vw;
+}
+.main .one .content .value image {
+  width: 100px;
+  height: 100px;
+}
+.main .btn {
+  text-align: center;
+  margin: 5vw 0 0 0;
+}
+.main .btn button {
+  width: 40vw;
+  margin: 0 2vw;
+  padding: 1vw 0;
+}
+.main .btn button:last-child {
+  background-color: #FF7F50;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 78 - 26
pages/schAdmin/studentexam/list.js

@@ -1,66 +1,118 @@
-// pages/schAdmin/coach/list.js
-Page({
+const app = getApp()
 
-    /**
-     * 页面的初始数据
-     */
+Page({
     data: {
+        frameStyle: { useTop: true, name: '学员信息', leftArrow: true, useBar: false },
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+        // 等级列表
+        levelList: [],
+    },
+    // 返回
+    back: function () {
+        wx.navigateBack({ delta: 1 })
+    },
 
+    // 审核
+    toEdit: function (e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: `/pages/schAdmin/studentexam/info?id=${item._id}` })
     },
 
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) { },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                // 学员等级
+                let aee = await app.$get(`/dict`, { code: 'student_grade' });
+                if (aee.errcode == '0' && aee.total > 0) that.setData({ levelList: aee.data[0].list })
+                let info = { skip: that.data.skip, limit: that.data.limit, school_id: res.data.info.id };
+                const arr = await app.$get(`/safs`, { ...info });
+                if (arr.errcode == '0') {
+                    for (const val of arr.data) {
+                        let level = that.data.levelList.find(i => i.value == val.student_id_level)
+                        if (level) val.zhLevel = level.label;
+                    }
+                    that.setData({ list: [...that.data.list, ...arr.data] });
+                    that.setData({ total: arr.total });
+                }
+                else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pages/schAdmin/studentexam/list.json

@@ -1,3 +1,6 @@
 {
-    "usingComponents": {}
-}
+    "component": true,
+    "usingComponents": {
+      "mobile-main": "/commpents/mobile-frame/index"
+    }
+  }

+ 158 - 0
pages/schAdmin/studentexam/list.less

@@ -0,0 +1,158 @@
+.main {
+    height: var(--twoHeight);
+    background-color: var(--mainColor);
+
+    .one {
+        display: flex;
+        flex-direction: row;
+        padding: 2vw;
+        border-bottom: 1px solid var(--f1Color);
+
+        .one_1 {
+            flex-grow: 1;
+
+            input {
+                padding: 1vw 0 2vw 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+        .one_2 {
+            width: 20vw;
+
+            button {
+                width: 100%;
+                padding: 2vw;
+                font-size: var(--font14Size);
+            }
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 2vw 2vw 0;
+            border-radius: 10px;
+            border: 1px dashed var(--blackColor);
+
+
+            .list_1 {
+                display: flex;
+                flex-direction: row;
+                margin: 0 0 2vw 0;
+                border: 2px dashed var(--blackColor);
+                border-radius: 10px;
+
+                .icon {
+                    width: 18vw;
+                    height: 18vw;
+                    margin-top: 2vw;
+                    margin-left: 2vw;
+
+                    image {
+                        width: 100%;
+                        height: 100%;
+                        border-radius: 50%;
+                        background-color: var(--f85Color);
+                    }
+                }
+
+                .content {
+                    display: flex;
+                    flex-direction: column;
+                    margin: 0 0 0 3vw;
+
+                    .name {
+                        font-weight: 700;
+                        font-size: var(--font18Szie);
+                        color: var(--blackColor);
+                        margin: 1vw 0;
+                    }
+
+                    .other {
+                        font-size: var(--font15Size);
+                        color: var(--f85Color);
+                        margin: 0.5vw 0 1vw 0;
+
+                        text {
+                            color: var(--redColor);
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                display: flex;
+                flex-direction: row;
+
+                button {
+                    width: 100%;
+                    padding: 2vw;
+                    font-size: var(--font14Size);
+                    color: var(--whiteColor);
+                    border-radius: 50px;
+                    margin: 0 2vw;
+                    background-color: #35d4bd;
+                    box-sizing: content-box;
+                    border: 2px dashed var(--whiteColor);
+                }
+
+                button:nth-child(2n) {
+                    background-color: #f860df;
+                }
+
+                button:last-child {
+                    background-color: #FF7F50;
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .name {
+            text-align: center;
+            font-size: var(--font18Szie);
+            font-weight: bold;
+            margin: 3vw 0;
+        }
+
+        .image {
+            text-align: center;
+            height: 18vh;
+            overflow: hidden;
+
+            .qrcode {
+                height: 22vh;
+                position: absolute;
+                left: 32vw;
+            }
+        }
+
+        .remark {
+            text-align: center;
+            font-size: 15px;
+            margin: 0 0 4vw 0;
+        }
+    }
+}

+ 36 - 2
pages/schAdmin/studentexam/list.wxml

@@ -1,2 +1,36 @@
-<!--pages/schAdmin/coach/list.wxml-->
-<text>pages/schAdmin/coach/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item">
+                        <view class="list_1">
+                            <view class="icon">
+                                <image src="{{item.student_id_icon&&item.student_id_icon.length>0?item.student_id_icon[0].url:''}}">
+                                </image>
+                            </view>
+                            <view class="content">
+                                <view class="name textOver">{{item.student_id_name||'学员姓名'}}</view>
+                                <view class="other">学员等级:<text>{{item.zhLevel||'一级'}}</text>
+                                </view>
+                                <view class="other">联系电话:{{item.student_id_phone||'暂无'}}
+                                </view>
+                                <view class="other">状态:
+                                    <text>{{item.result==1?'已通过':item.result==-1?'已拒绝':'未审核'}}</text>
+                                </view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button bindtap="toEdit" data-item="{{item}}" wx:if="{{item.result==0}}">审核信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 129 - 1
pages/schAdmin/studentexam/list.wxss

@@ -1 +1,129 @@
-/* pages/schAdmin/coach/list.wxss */
+.main {
+  height: var(--twoHeight);
+  background-color: var(--mainColor);
+}
+.main .one {
+  display: flex;
+  flex-direction: row;
+  padding: 2vw;
+  border-bottom: 1px solid var(--f1Color);
+}
+.main .one .one_1 {
+  flex-grow: 1;
+}
+.main .one .one_1 input {
+  padding: 1vw 0 2vw 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .one .one_2 {
+  width: 20vw;
+}
+.main .one .one_2 button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 2vw 2vw 0;
+  border-radius: 10px;
+  border: 1px dashed var(--blackColor);
+}
+.main .two .list .list_1 {
+  display: flex;
+  flex-direction: row;
+  margin: 0 0 2vw 0;
+  border: 2px dashed var(--blackColor);
+  border-radius: 10px;
+}
+.main .two .list .list_1 .icon {
+  width: 18vw;
+  height: 18vw;
+  margin-top: 2vw;
+  margin-left: 2vw;
+}
+.main .two .list .list_1 .icon image {
+  width: 100%;
+  height: 100%;
+  border-radius: 50%;
+  background-color: var(--f85Color);
+}
+.main .two .list .list_1 .content {
+  display: flex;
+  flex-direction: column;
+  margin: 0 0 0 3vw;
+}
+.main .two .list .list_1 .content .name {
+  font-weight: 700;
+  font-size: var(--font18Szie);
+  color: var(--blackColor);
+  margin: 1vw 0;
+}
+.main .two .list .list_1 .content .other {
+  font-size: var(--font15Size);
+  color: var(--f85Color);
+  margin: 0.5vw 0 1vw 0;
+}
+.main .two .list .list_1 .content .other text {
+  color: var(--redColor);
+}
+.main .two .list .btn {
+  display: flex;
+  flex-direction: row;
+}
+.main .two .list .btn button {
+  width: 100%;
+  padding: 2vw;
+  font-size: var(--font14Size);
+  color: var(--whiteColor);
+  border-radius: 50px;
+  margin: 0 2vw;
+  background-color: #35d4bd;
+  box-sizing: content-box;
+  border: 2px dashed var(--whiteColor);
+}
+.main .two .list .btn button:nth-child(2n) {
+  background-color: #f860df;
+}
+.main .two .list .btn button:last-child {
+  background-color: #FF7F50;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .name {
+  text-align: center;
+  font-size: var(--font18Szie);
+  font-weight: bold;
+  margin: 3vw 0;
+}
+.dialog .dialog_1 .image {
+  text-align: center;
+  height: 18vh;
+  overflow: hidden;
+}
+.dialog .dialog_1 .image .qrcode {
+  height: 22vh;
+  position: absolute;
+  left: 32vw;
+}
+.dialog .dialog_1 .remark {
+  text-align: center;
+  font-size: 15px;
+  margin: 0 0 4vw 0;
+}