瀏覽代碼

学员管理

zs 2 年之前
父節點
當前提交
ffcb738357
共有 48 個文件被更改,包括 2073 次插入305 次删除
  1. 122 17
      pages/stuAdmin/archives/list.js
  2. 6 2
      pages/stuAdmin/archives/list.json
  3. 35 0
      pages/stuAdmin/archives/list.less
  4. 70 2
      pages/stuAdmin/archives/list.wxml
  5. 28 1
      pages/stuAdmin/archives/list.wxss
  6. 64 26
      pages/stuAdmin/coach/info.js
  7. 4 1
      pages/stuAdmin/coach/info.json
  8. 32 0
      pages/stuAdmin/coach/info.less
  9. 42 2
      pages/stuAdmin/coach/info.wxml
  10. 27 1
      pages/stuAdmin/coach/info.wxss
  11. 86 28
      pages/stuAdmin/coach/list.js
  12. 4 1
      pages/stuAdmin/coach/list.json
  13. 102 0
      pages/stuAdmin/coach/list.less
  14. 31 2
      pages/stuAdmin/coach/list.wxml
  15. 85 1
      pages/stuAdmin/coach/list.wxss
  16. 68 26
      pages/stuAdmin/course/info.js
  17. 5 2
      pages/stuAdmin/course/info.json
  18. 38 0
      pages/stuAdmin/course/info.less
  19. 50 2
      pages/stuAdmin/course/info.wxml
  20. 32 1
      pages/stuAdmin/course/info.wxss
  21. 93 28
      pages/stuAdmin/course/list.js
  22. 5 1
      pages/stuAdmin/course/list.json
  23. 89 0
      pages/stuAdmin/course/list.less
  24. 56 2
      pages/stuAdmin/course/list.wxml
  25. 71 1
      pages/stuAdmin/course/list.wxss
  26. 113 26
      pages/stuAdmin/course/sign.js
  27. 5 2
      pages/stuAdmin/course/sign.json
  28. 55 0
      pages/stuAdmin/course/sign.less
  29. 61 2
      pages/stuAdmin/course/sign.wxml
  30. 46 1
      pages/stuAdmin/course/sign.wxss
  31. 29 28
      pages/stuAdmin/fee/list.js
  32. 5 2
      pages/stuAdmin/fee/list.json
  33. 4 0
      pages/stuAdmin/fee/list.less
  34. 5 2
      pages/stuAdmin/fee/list.wxml
  35. 3 1
      pages/stuAdmin/fee/list.wxss
  36. 50 26
      pages/stuAdmin/school/info.js
  37. 4 1
      pages/stuAdmin/school/info.json
  38. 42 0
      pages/stuAdmin/school/info.less
  39. 46 2
      pages/stuAdmin/school/info.wxml
  40. 35 1
      pages/stuAdmin/school/info.wxss
  41. 64 28
      pages/stuAdmin/school/list.js
  42. 4 1
      pages/stuAdmin/school/list.json
  43. 102 0
      pages/stuAdmin/school/list.less
  44. 31 2
      pages/stuAdmin/school/list.wxml
  45. 85 1
      pages/stuAdmin/school/list.wxss
  46. 29 28
      pages/stuAdmin/study/list.js
  47. 5 2
      pages/stuAdmin/study/list.json
  48. 5 2
      pages/stuAdmin/study/list.wxml

+ 122 - 17
pages/stuAdmin/archives/list.js

@@ -1,66 +1,171 @@
-// pages/stuAdmin/archives/list.js
+const app = getApp()
+import WxValidate from '../../../utils/wxValidate';
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '学员信息管理', leftArrow: true, useBar: false },
+        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;
+        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);
+            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 => {
+                const arr = await app.$get(`/student/${res.data?.info?._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 () {
 
     }
 })

+ 6 - 2
pages/stuAdmin/archives/list.json

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

+ 35 - 0
pages/stuAdmin/archives/list.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;
+            }
+        }
+    }
+}

+ 70 - 2
pages/stuAdmin/archives/list.wxml

@@ -1,2 +1,70 @@
-<!--pages/stuAdmin/archives/list.wxml-->
-<text>pages/stuAdmin/archives/list.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" 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/stuAdmin/archives/list.wxss

@@ -1 +1,28 @@
-/* pages/stuAdmin/archives/list.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;
+}

+ 64 - 26
pages/stuAdmin/coach/info.js

@@ -1,66 +1,104 @@
-// pages/stuAdmin/coach/info.js
+const app = getApp()
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '教练信息', leftArrow: true, useBar: false },
+        id: '',
+        form: {},
+        // 性别
+        genderList: [],
+        //运动等级
+        levelList: [],
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: async function (options) {
+        const that = this;
+        await that.setData({ id: options.id || null })
+        // 查询其他信息
+        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) that.setData({ genderList: arr.data[0].list });
+        // 运动等级
+        arr = await app.$get(`/dict`, { code: 'student_grade' });
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ levelList: arr.data[0].list });
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        let genderList = that.data.genderList;
+        let levelList = that.data.levelList;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                if (that.data.id) {
+                    const arr = await app.$get(`/coach/${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 })
+                    } 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 () {
 
     },
 
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 4 - 1
pages/stuAdmin/coach/info.json

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

+ 32 - 0
pages/stuAdmin/coach/info.less

@@ -0,0 +1,32 @@
+.main {
+    background-color: var(--mainColor);
+
+    .one {
+        width: 96vw;
+        padding: 0 2vw;
+
+        .one_1 {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            border: 1px dashed var(--f85Color);
+            border-radius: 5px;
+            margin: 0 0 10px 0;
+            padding: 10px;
+
+            .text {
+                color: var(--f85Color);
+                font-size: var(--font16Size);
+            }
+
+            .text1 {
+                font-size: var(--font16Size);
+            }
+
+            .image {
+                width: 15vw;
+                height: 15vw;
+            }
+        }
+    }
+}

+ 42 - 2
pages/stuAdmin/coach/info.wxml

@@ -1,2 +1,42 @@
-<!--pages/stuAdmin/coach/info.wxml-->
-<text>pages/stuAdmin/coach/info.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <text class="text">头像:</text>
+                <image class="image" src="{{form.icon&&form.icon.length>0?form.icon[0].url:''}}"></image>
+            </view>
+            <view class="one_1">
+                <text class="text">姓名:</text>
+                <text class="text1">{{form.name||'暂无昵称'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">性别:</text>
+                <text class="text1">{{form.zhGender||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">年龄:</text>
+                <text class="text1">{{form.age||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">电话:</text>
+                <text class="text1">{{form.phone||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">等级:</text>
+                <text class="text1">{{form.zhLevel||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">简介:</text>
+                <text class="text1">{{form.brief||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">荣誉:</text>
+                <text class="text1">{{form.honor||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">教学经历:</text>
+                <text class="text1">{{form.exp||'暂无'}}</text>
+            </view>
+        </view>
+    </view>
+</mobile-main>

+ 27 - 1
pages/stuAdmin/coach/info.wxss

@@ -1 +1,27 @@
-/* pages/stuAdmin/coach/info.wxss */
+.main {
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 96vw;
+  padding: 0 2vw;
+}
+.main .one .one_1 {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  border: 1px dashed var(--f85Color);
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  padding: 10px;
+}
+.main .one .one_1 .text {
+  color: var(--f85Color);
+  font-size: var(--font16Size);
+}
+.main .one .one_1 .text1 {
+  font-size: var(--font16Size);
+}
+.main .one .one_1 .image {
+  width: 15vw;
+  height: 15vw;
+}

+ 86 - 28
pages/stuAdmin/coach/list.js

@@ -1,66 +1,124 @@
-// pages/stuAdmin/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,
+        // 性别
+        genderList: [],
+        //运动等级
+        levelList: [],
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 查看
+    toView: async function (e) {
+        const that = this;
+        that.setData({ skip: 0, page: 0, list: [] })
+        const { item } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/stuAdmin/coach/info?id=${item.coach_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 }) }
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: async function () {
+        const that = this;
+        // 查询其他信息
+        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) that.setData({ genderList: arr.data[0].list });
+        // 运动等级
+        arr = await app.$get(`/dict`, { code: 'student_grade' });
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ levelList: arr.data[0].list });
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        let genderList = that.data.genderList;
+        let levelList = that.data.levelList;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                let info = { skip: that.data.skip, limit: that.data.limit, student_id: res.data.info.id };
+                let arr = await app.$get(`/rsc`, { ...info });
+                if (arr.errcode == '0') {
+                    for (const val of arr.data) {
+                        let level = levelList.find(i => i.value == val.coach_id_level); if (level) val.zhLevel = level.label;
+                        let gender = genderList.find(i => i.value == val.coach_id_gender); if (gender) val.zhGender = 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() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 4 - 1
pages/stuAdmin/coach/list.json

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

+ 102 - 0
pages/stuAdmin/coach/list.less

@@ -0,0 +1,102 @@
+.main {
+    height: var(--twoHeight);
+
+    .one {
+        width: 96vw;
+        padding: 2vw;
+
+        input {
+            padding: 2vw;
+            background-color: var(--f1Color);
+            border-radius: 5px;
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+        width: 96vw;
+        margin: 0 2vw 2vw 2vw;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 0 0 2vw 0;
+            background-color: var(--mainColor);
+
+            .list_1 {
+                display: flex;
+                align-items: center;
+
+                .image {
+                    width: 90px;
+                    height: 90px;
+                }
+
+                .content {
+                    width: 65vw;
+                    margin: 0 0 0 2vw;
+
+                    .name {
+                        font-size: var(--font16Size);
+                        font-weight: bold;
+                        margin: 0 0 1vw 0;
+                        text-align: center;
+                        border-bottom: 1px dashed var(--f1Color);
+                    }
+
+                    .txt {
+                        font-size: var(--font14Size);
+                        padding: 0 0 1vw 0;
+                        border-bottom: 1px dashed var(--f1Color);
+                    }
+
+                    .txt text:nth-child(1) {
+                        color: #666;
+                    }
+
+                    .other {
+                        display: flex;
+                        flex-direction: row;
+                        justify-content: space-between;
+                        font-size: var(--font14Size);
+                        border-bottom: 1px dashed var(--f1Color);
+
+                        .other_1 {
+                            padding: 0 0 1vw 0;
+                        }
+
+                        .other_1 text:nth-child(1) {
+                            color: #666;
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                width: 92vw;
+                text-align: center;
+                margin: 2vw 0 0 0;
+
+                button {
+                    font-size: var(--font14Size);
+                    background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 31 - 2
pages/stuAdmin/coach/list.wxml

@@ -1,2 +1,31 @@
-<!--pages/stuAdmin/coach/list.wxml-->
-<text>pages/stuAdmin/coach/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <input type="text" placeholder="请输入关键词" />
+        </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">
+                            <image class="image" src="{{item.coach_id_icon&&item.coach_id_icon.length>0?item.coach_id_icon[0].url:''}}"></image>
+                            <view class="content">
+                                <view class="name textOver">{{item.coach_id_name||'暂无'}}</view>
+                                <view class="txt textOver"><text>联系电话:</text><text>{{item.coach_id_phone||'暂无'}}</text></view>
+                                <view class="other textOver">
+                                    <view class="other_1 textOver"><text>性别:</text><text>{{item.zhGender||'暂无'}}</text></view>
+                                    <view class="other_1 textOver"><text>年龄:</text><text>{{item.coach_id_age||'暂无'}}岁</text></view>
+                                </view>
+                                <view class="txt textOver"><text>教练等级:</text><text>{{item.zhLevel||'暂无'}}</text></view>
+                                <view class="txt textOver"><text>所获荣誉:</text><text>{{item.coach_id_honor||'暂无'}}</text></view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button size="mini" type="primary" bindtap="toView" data-item="{{item}}">详细信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 85 - 1
pages/stuAdmin/coach/list.wxss

@@ -1 +1,85 @@
-/* pages/stuAdmin/coach/list.wxss */
+.main {
+  height: var(--twoHeight);
+}
+.main .one {
+  width: 96vw;
+  padding: 2vw;
+}
+.main .one input {
+  padding: 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+  width: 96vw;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 0 0 2vw 0;
+  background-color: var(--mainColor);
+}
+.main .two .list .list_1 {
+  display: flex;
+  align-items: center;
+}
+.main .two .list .list_1 .image {
+  width: 90px;
+  height: 90px;
+}
+.main .two .list .list_1 .content {
+  width: 65vw;
+  margin: 0 0 0 2vw;
+}
+.main .two .list .list_1 .content .name {
+  font-size: var(--font16Size);
+  font-weight: bold;
+  margin: 0 0 1vw 0;
+  text-align: center;
+  border-bottom: 1px dashed var(--f1Color);
+}
+.main .two .list .list_1 .content .txt {
+  font-size: var(--font14Size);
+  padding: 0 0 1vw 0;
+  border-bottom: 1px dashed var(--f1Color);
+}
+.main .two .list .list_1 .content .txt text:nth-child(1) {
+  color: #666;
+}
+.main .two .list .list_1 .content .other {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  font-size: var(--font14Size);
+  border-bottom: 1px dashed var(--f1Color);
+}
+.main .two .list .list_1 .content .other .other_1 {
+  padding: 0 0 1vw 0;
+}
+.main .two .list .list_1 .content .other .other_1 text:nth-child(1) {
+  color: #666;
+}
+.main .two .list .btn {
+  width: 92vw;
+  text-align: center;
+  margin: 2vw 0 0 0;
+}
+.main .two .list .btn button {
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 68 - 26
pages/stuAdmin/course/info.js

@@ -1,66 +1,108 @@
-// pages/stuAdmin/course/info.js
+const app = getApp()
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '课程信息', leftArrow: true, useBar: false },
+        id: '',
+        form: {},
+        //状态
+        statusList: [],
+        //学员
+        student: {},
+        // 教练
+        coach: {}
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: async function (options) {
+        const that = this;
+        await that.setData({ id: options.id || null })
+        // 查询其他信息
+        await that.searchOther();
+        // 监听用户是否登录
+        await that.watchLogin();
+    },
+    searchOther: async function () {
+        const that = this;
+        let arr;
+        // 状态
+        arr = await app.$get(`/dict`, { code: 'lesson_status' });
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ statusList: arr.data[0].list });
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        let statusList = that.data.statusList;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                if (that.data.id) {
+                    const arr = await app.$get(`/lesson/${that.data.id}`);
+                    if (arr.errcode == '0') {
+                        let status = statusList.find(i => i.value == arr.data.status)
+                        if (status) arr.data.zhStatus = status.label;
+                        if (arr.data.school_id) {
+                            const school = await app.$get(`/school/${arr.data.school_id}`)
+                            if (school.errcode == '0') arr.data.zhSchool = school.data.name;
+                        }
+                        const coach = await app.$get(`/lessonCoach`, { lesson_id: that.data.id })
+                        if (coach.errcode == '0') that.setData({ coach: coach.data })
+                        const student = await app.$get(`/lessonStudent`, { lesson_id: that.data.id, try_status: '1' })
+                        if (student.errcode == '0') that.setData({ student: student.data })
+                        that.setData({ form: arr.data })
+                    } 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 () {
 
     },
 
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pages/stuAdmin/course/info.json

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

+ 38 - 0
pages/stuAdmin/course/info.less

@@ -0,0 +1,38 @@
+.main {
+    background-color: var(--mainColor);
+
+    .one {
+        width: 96vw;
+        padding: 0 2vw;
+        margin: 2vw 0 0 0;
+
+        .one_1 {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            border: 1px dashed var(--f85Color);
+            border-radius: 5px;
+            margin: 0 0 10px 0;
+            padding: 10px;
+
+            .text {
+                color: var(--f85Color);
+                font-size: var(--font16Size);
+            }
+
+            .text1 {
+                font-size: var(--font16Size);
+            }
+
+            .image {
+                width: 15vw;
+                height: 15vw;
+            }
+
+            .name {
+                display: flex;
+                flex-direction: column;
+            }
+        }
+    }
+}

+ 50 - 2
pages/stuAdmin/course/info.wxml

@@ -1,2 +1,50 @@
-<!--pages/stuAdmin/course/info.wxml-->
-<text>pages/stuAdmin/course/info.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <text class="text">课程标题:</text>
+                <text class="text1">{{form.title||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">学校名称:</text>
+                <text class="text1">{{form.zhSchool||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">人数上限:</text>
+                <text class="text1">{{form.limit||'暂无'}}人</text>
+            </view>
+            <view class="one_1">
+                <text class="text">开始时间:</text>
+                <text class="text1">{{form.time_start||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">结束时间:</text>
+                <text class="text1">{{form.time_end||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">状态:</text>
+                <text class="text1">{{form.zhStatus||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">退款期限:</text>
+                <text class="text1">{{form.refund_hour||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">简介:</text>
+                <text class="text1">{{form.brief||'暂无'}}</text>
+            </view>
+            <view class="one_1" wx:if="{{coach&&coach.length>0}}">
+                <text class="text">教练人员:</text>
+                <view class="name">
+                    <text wx:for="{{coach}}" wx:key="item" class="text1 textOver">姓名:{{item.coach_id_name||'暂无'}}</text>
+                </view>
+            </view>
+            <view class="one_1" wx:if="{{student&&student.length>0}}">
+                <text class="text">学生人员:</text>
+                <view class="name">
+                    <text wx:for="{{student}}" wx:key="item" class="text1 textOver">姓名:{{item.student_id_name||'暂无'}}</text>
+                </view>
+            </view>
+        </view>
+    </view>
+</mobile-main>

+ 32 - 1
pages/stuAdmin/course/info.wxss

@@ -1 +1,32 @@
-/* pages/stuAdmin/course/info.wxss */
+.main {
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 96vw;
+  padding: 0 2vw;
+  margin: 2vw 0 0 0;
+}
+.main .one .one_1 {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  border: 1px dashed var(--f85Color);
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  padding: 10px;
+}
+.main .one .one_1 .text {
+  color: var(--f85Color);
+  font-size: var(--font16Size);
+}
+.main .one .one_1 .text1 {
+  font-size: var(--font16Size);
+}
+.main .one .one_1 .image {
+  width: 15vw;
+  height: 15vw;
+}
+.main .one .one_1 .name {
+  display: flex;
+  flex-direction: column;
+}

+ 93 - 28
pages/stuAdmin/course/list.js

@@ -1,66 +1,131 @@
-// pages/stuAdmin/course/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: [],
+        // 选中
+        tabs: {
+            active: '0',
+            menu: [
+                { title: '公开课', active: '0' },
+                { title: '私教课', active: '1' },
+            ]
+        },
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 选项卡选择
+    tabsChange: function (e) {
+        const that = this;
+        let data = e.detail;
+        that.setData({ 'tabs.active': data.active })
+        that.setData({ skip: 0, page: 0, list: [] })
+        that.watchLogin();
+    },
+    // 查看
+    toView: async function (e) {
+        const that = this;
+        that.setData({ skip: 0, page: 0, list: [] })
+        const { item } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/stuAdmin/course/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 }) }
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: async function () {
+        const that = this;
+        // 查询其他信息
+        await that.searchOther();
+        // 监听用户是否登录
+        await that.watchLogin();
     },
-
+    searchOther: async function () {
+        const that = this;
+        let arr;
+        // 状态
+        arr = await app.$get(`/dict`, { code: 'lesson_status' });
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ statusList: arr.data[0].list });
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        let statusList = that.data.statusList;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                let info = { skip: that.data.skip, limit: that.data.limit, type: that.data.tabs.active, student_id: res.data.info._id };
+                let arr = await app.$get(`/studentView/lessonList`, { ...info });
+                if (arr.errcode == '0') {
+                    for (const val of arr.data) { let status = statusList.find(i => i.value == val.status); if (status) val.zhStatus = status.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() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 1
pages/stuAdmin/course/list.json

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

+ 89 - 0
pages/stuAdmin/course/list.less

@@ -0,0 +1,89 @@
+.main {
+    height: var(--twoHeight);
+
+    .one {
+        width: 96vw;
+        padding: 0 2vw 2vw 2vw;
+
+        .tab {
+            margin: 0 0 2vw 0;
+        }
+
+        .input {
+            input {
+                padding: 2vw;
+                background-color: var(--f1Color);
+                border-radius: 5px;
+            }
+        }
+
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+        width: 96vw;
+        margin: 0 2vw 2vw 2vw;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 0 0 2vw 0;
+            background-color: var(--mainColor);
+
+            .list_1 {
+                .name {
+                    font-size: var(--font16Size);
+                    font-weight: bold;
+                    margin: 0 0 1vw 0;
+                    text-align: center;
+                }
+
+                .other {
+                    display: flex;
+                    flex-direction: column;
+                    width: 90vw;
+                    justify-content: space-between;
+                    border-top: 1px dashed var(--f1Color);
+                    border-bottom: 1px dashed var(--f1Color);
+                    padding: 1vw;
+                    font-size: var(--font14Size);
+                    margin: 0 0 1vw 0;
+
+                    .other_1 {
+                        padding: 0 0 1vw 0;
+                    }
+
+                    .other_1 text:nth-child(1) {
+                        color: #666;
+                    }
+                }
+            }
+
+            .btn {
+                width: 92vw;
+                text-align: center;
+                margin: 2vw 0 0 0;
+
+                button {
+                    font-size: var(--font14Size);
+                    background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 56 - 2
pages/stuAdmin/course/list.wxml

@@ -1,2 +1,56 @@
-<!--pages/stuAdmin/course/list.wxml-->
-<text>pages/stuAdmin/course/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="tab">
+                <s-tab tabs="{{tabs}}" bind:tabsChange="tabsChange"></s-tab>
+            </view>
+            <view class="input">
+                <input type="text" placeholder="请输入关键词" />
+            </view>
+        </view>
+        <view class="two">
+            <view wx:if="{{tabs.active=='0'}}" class="a">
+                <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="name textOver">{{item.title||'暂无'}}</view>
+                                <view class="other">
+                                    <view class="other_1 textOver"><text>状态:</text><text>{{item.zhStatus||'暂无'}}</text></view>
+                                    <view class="other_1 textOver"><text>人数上限:</text><text>{{item.limit||'暂无'}}人</text></view>
+                                    <view class="other_1 textOver"><text>课程费:</text><text>{{item.money||'暂无'}}</text></view>
+                                    <view class="other_1 textOver"><text>退款期限:</text><text>{{item.refund_hour||'暂无'}}</text></view>
+                                    <view class="other_1 textOver"><text>上课时间:</text><text>{{item.time_start||'暂无'}}-{{item.time_end||'暂无'}}</text></view>
+                                </view>
+                            </view>
+                            <view class="btn">
+                                <button size="mini" type="primary" bindtap="toView" data-item="{{item}}">详细信息</button>
+                            </view>
+                        </view>
+                    </view>
+                </scroll-view>
+            </view>
+            <view wx:if="{{tabs.active=='1'}}" class="a">
+                <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="name textOver">{{item.title||'暂无'}}</view>
+                                <view class="other">
+                                    <view class="other_1 textOver"><text>状态:</text><text>{{item.zhStatus||'暂无'}}</text></view>
+                                    <view class="other_1 textOver"><text>人数上限:</text><text>{{item.limit||'暂无'}}人</text></view>
+                                    <view class="other_1 textOver"><text>课程费:</text><text>{{item.money||'暂无'}}</text></view>
+                                    <view class="other_1 textOver"><text>退款期限:</text><text>{{item.refund_hour||'暂无'}}</text></view>
+                                    <view class="other_1 textOver"><text>上课时间:</text><text>{{item.time_start||'暂无'}}-{{item.time_end||'暂无'}}</text></view>
+                                </view>
+                            </view>
+                            <view class="btn">
+                                <button size="mini" type="primary" bindtap="toView" data-item="{{item}}">详细信息</button>
+                            </view>
+                        </view>
+                    </view>
+                </scroll-view>
+            </view>
+        </view>
+    </view>
+</mobile-main>

+ 71 - 1
pages/stuAdmin/course/list.wxss

@@ -1 +1,71 @@
-/* pages/stuAdmin/course/list.wxss */
+.main {
+  height: var(--twoHeight);
+}
+.main .one {
+  width: 96vw;
+  padding: 0 2vw 2vw 2vw;
+}
+.main .one .tab {
+  margin: 0 0 2vw 0;
+}
+.main .one .input input {
+  padding: 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+  width: 96vw;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 0 0 2vw 0;
+  background-color: var(--mainColor);
+}
+.main .two .list .list_1 .name {
+  font-size: var(--font16Size);
+  font-weight: bold;
+  margin: 0 0 1vw 0;
+  text-align: center;
+}
+.main .two .list .list_1 .other {
+  display: flex;
+  flex-direction: column;
+  width: 90vw;
+  justify-content: space-between;
+  border-top: 1px dashed var(--f1Color);
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 1vw;
+  font-size: var(--font14Size);
+  margin: 0 0 1vw 0;
+}
+.main .two .list .list_1 .other .other_1 {
+  padding: 0 0 1vw 0;
+}
+.main .two .list .list_1 .other .other_1 text:nth-child(1) {
+  color: #666;
+}
+.main .two .list .btn {
+  width: 92vw;
+  text-align: center;
+  margin: 2vw 0 0 0;
+}
+.main .two .list .btn button {
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 113 - 26
pages/stuAdmin/course/sign.js

@@ -1,66 +1,153 @@
-// pages/stuAdmin/course/sign.js
+const app = getApp()
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '报名', leftArrow: true, useBar: false },
+        id: '',
+        form: {},
+        user: {},
+        //是否试课
+        is_try: '0',
+        //状态
+        statusList: [],
+        //学员
+        student: {},
+        // 教练
+        coach: {}
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    //试课
+    toClass: function () {
+        const that = this;
+        wx.showModal({
+            title: '提示',
+            content: '您是否确定试课?',
+            async success(res) {
+                if (res.confirm) {
+                    that.setData({ is_try: '1' })
+                } else if (res.cancel) { }
+            }
+        });
+    },
+    //提交
+    onSubmit: async function (e) {
+        const that = this;
+        const form = that.data.form;
+        const user = that.data.user;
+        wx.showModal({
+            title: '提示',
+            content: '您是否确定报名?',
+            async success(res) {
+                if (res.confirm) {
+                    let arr;
+                    let params = {
+                        school_id: form.school_id,
+                        lesson_id: form._id,
+                        student_id: user.info.id,
+                        money: form.money || 0,
+                        is_try: that.data.is_try,
+                        try_status: '0'
+                    }
+                    const student = await app.$get(`/lessonStudent`, { lesson_id: that.data.id, student_id: user.info.id })
+                    if (student.errcode == '0' && student.total > 0) arr = await app.$post(`/lessonStudent/${student.data[0]._id}`, params);
+                    else arr = await app.$post(`/lessonStudent`, params);
+                    if (arr.errcode == '0') { wx.showToast({ title: `报名申请完成`, icon: 'success', duration: 2000 }); that.watchLogin(); }
+                    else wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                } else if (res.cancel) { }
+            }
+        });
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: async function (options) {
+        const that = this;
+        await that.setData({ id: options.id || null })
+        // 查询其他信息
+        await that.searchOther();
+        // 监听用户是否登录
+        await that.watchLogin();
+    },
+    searchOther: async function () {
+        const that = this;
+        let arr;
+        // 状态
+        arr = await app.$get(`/dict`, { code: 'lesson_status' });
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ statusList: arr.data[0].list });
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        let statusList = that.data.statusList;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({ user: res.data })
+                if (that.data.id) {
+                    const arr = await app.$get(`/lesson/${that.data.id}`);
+                    if (arr.errcode == '0') {
+                        let status = statusList.find(i => i.value == arr.data.status)
+                        if (status) arr.data.zhStatus = status.label;
+                        if (arr.data.school_id) {
+                            const school = await app.$get(`/school/${arr.data.school_id}`)
+                            if (school.errcode == '0') arr.data.zhSchool = school.data.name;
+                        }
+                        const coach = await app.$get(`/lessonCoach`, { lesson_id: that.data.id })
+                        if (coach.errcode == '0') that.setData({ coach: coach.data })
+                        const student = await app.$get(`/lessonStudent`, { lesson_id: that.data.id, try_status: '1' })
+                        if (student.errcode == '0') that.setData({ student: student.data })
+                        that.setData({ form: arr.data })
+                    } 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 () {
 
     },
 
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 5 - 2
pages/stuAdmin/course/sign.json

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

+ 55 - 0
pages/stuAdmin/course/sign.less

@@ -0,0 +1,55 @@
+.main {
+    background-color: var(--mainColor);
+
+    .one {
+        width: 96vw;
+        padding: 0 2vw;
+        margin: 2vw 0 0 0;
+
+        .one_1 {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            border: 1px dashed var(--f85Color);
+            border-radius: 5px;
+            margin: 0 0 10px 0;
+            padding: 10px;
+
+            .text {
+                color: var(--f85Color);
+                font-size: var(--font16Size);
+            }
+
+            .text1 {
+                font-size: var(--font16Size);
+            }
+
+            .image {
+                width: 15vw;
+                height: 15vw;
+            }
+
+            .name {
+                display: flex;
+                flex-direction: column;
+            }
+
+            button {
+                margin: 0;
+                font-size: var(--font14Size);
+                background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+            }
+        }
+
+        .btn {
+            width: 92vw;
+            text-align: center;
+            margin: 2vw 0 0 0;
+
+            button {
+                font-size: var(--font14Size);
+                background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+            }
+        }
+    }
+}

+ 61 - 2
pages/stuAdmin/course/sign.wxml

@@ -1,2 +1,61 @@
-<!--pages/stuAdmin/course/sign.wxml-->
-<text>pages/stuAdmin/course/sign.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <form class="one" catchsubmit="onSubmit">
+            <view class="one_1">
+                <text class="text">课程标题:</text>
+                <text class="text1">{{form.title||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">学校名称:</text>
+                <text class="text1">{{form.zhSchool||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">人数上限:</text>
+                <text class="text1">{{form.limit||'暂无'}}人</text>
+            </view>
+            <view class="one_1">
+                <text class="text">开始时间:</text>
+                <text class="text1">{{form.time_start||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">结束时间:</text>
+                <text class="text1">{{form.time_end||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">状态:</text>
+                <text class="text1">{{form.zhStatus||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">课程费:</text>
+                <text class="text1">{{form.money||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">退款期限:</text>
+                <text class="text1">{{form.refund_hour||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">简介:</text>
+                <text class="text1">{{form.brief||'暂无'}}</text>
+            </view>
+            <view class="one_1" wx:if="{{coach&&coach.length>0}}">
+                <text class="text">教练人员:</text>
+                <view class="name">
+                    <text wx:for="{{coach}}" wx:key="item" class="text1 textOver">姓名:{{item.coach_id_name||'暂无'}}</text>
+                </view>
+            </view>
+            <view class="one_1" wx:if="{{student&&student.length>0}}">
+                <text class="text">学生人员:</text>
+                <view class="name">
+                    <text wx:for="{{student}}" wx:key="item" class="text1 textOver">姓名:{{item.student_id_name||'暂无'}}</text>
+                </view>
+            </view>
+            <view class="one_1" wx:if="{{form.type=='0'}}">
+                <text class="text">是否试课:</text>
+                <button type="primary" size="mini" bindtap="toClass">试课</button>
+            </view>
+            <view class="btn">
+                <button type="primary" size="mini" formType="submit">报名</button>
+            </view>
+        </form>
+    </view>
+</mobile-main>

+ 46 - 1
pages/stuAdmin/course/sign.wxss

@@ -1 +1,46 @@
-/* pages/stuAdmin/course/sign.wxss */
+.main {
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 96vw;
+  padding: 0 2vw;
+  margin: 2vw 0 0 0;
+}
+.main .one .one_1 {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  border: 1px dashed var(--f85Color);
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  padding: 10px;
+}
+.main .one .one_1 .text {
+  color: var(--f85Color);
+  font-size: var(--font16Size);
+}
+.main .one .one_1 .text1 {
+  font-size: var(--font16Size);
+}
+.main .one .one_1 .image {
+  width: 15vw;
+  height: 15vw;
+}
+.main .one .one_1 .name {
+  display: flex;
+  flex-direction: column;
+}
+.main .one .one_1 button {
+  margin: 0;
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+}
+.main .one .btn {
+  width: 92vw;
+  text-align: center;
+  margin: 2vw 0 0 0;
+}
+.main .one .btn button {
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+}

+ 29 - 28
pages/stuAdmin/fee/list.js

@@ -1,66 +1,67 @@
-// pages/stuAdmin/fee/list.js
+const app = getApp()
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '付费情况', leftArrow: true, useBar: false },
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    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/stuAdmin/fee/list.json

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

+ 4 - 0
pages/stuAdmin/fee/list.less

@@ -0,0 +1,4 @@
+.main {
+    background-color: var(--mainColor);
+}
+

+ 5 - 2
pages/stuAdmin/fee/list.wxml

@@ -1,2 +1,5 @@
-<!--pages/stuAdmin/fee/list.wxml-->
-<text>pages/stuAdmin/fee/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        1
+    </view>
+</mobile-main>

+ 3 - 1
pages/stuAdmin/fee/list.wxss

@@ -1 +1,3 @@
-/* pages/stuAdmin/fee/list.wxss */
+.main {
+  background-color: var(--mainColor);
+}

+ 50 - 26
pages/stuAdmin/school/info.js

@@ -1,66 +1,90 @@
-// pages/stuAdmin/school/info.js
+const app = getApp()
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '学校信息', leftArrow: true, useBar: false },
+        id: '',
+        form: {},
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 预览
+    toView: function (e) {
+        const { item } = e.currentTarget.dataset;
+        wx.previewImage({
+            current: '',
+            urls: [item.url]
+        })
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
+        const that = this;
+        that.setData({ id: options.id || null })
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                if (that.data.id) {
+                    const arr = await app.$get(`/school/${that.data.id}`);
+                    if (arr.errcode == '0') {
+                        that.setData({ form: arr.data })
+                    } 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 () {
 
     },
 
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 4 - 1
pages/stuAdmin/school/info.json

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

+ 42 - 0
pages/stuAdmin/school/info.less

@@ -0,0 +1,42 @@
+.main {
+    background-color: var(--mainColor);
+
+    .one {
+        width: 96vw;
+        padding: 0 2vw;
+
+        .one_1 {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            border: 1px dashed var(--f85Color);
+            border-radius: 5px;
+            margin: 0 0 10px 0;
+            padding: 10px;
+
+            .text {
+                color: var(--f85Color);
+                font-size: var(--font16Size);
+            }
+
+            .text1 {
+                font-size: var(--font16Size);
+            }
+
+            .image {
+                width: 90vw;
+                height: 90vw;
+            }
+
+            swiper {
+                width: 90vw;
+                height: 25vh;
+
+                .image {
+                    width: 100%;
+                    height: 100%;
+                }
+            }
+        }
+    }
+}

+ 46 - 2
pages/stuAdmin/school/info.wxml

@@ -1,2 +1,46 @@
-<!--pages/stuAdmin/school/info.wxml-->
-<text>pages/stuAdmin/school/info.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <view class="one_1">
+                <swiper autoplay="true" circular="true" interval="3000" duration="1000">
+                    <block wx:for="{{form.img_url}}" wx:key="index">
+                        <swiper-item>
+                            <image class="image" src="{{item.url}}"></image>
+                        </swiper-item>
+                    </block>
+                </swiper>
+            </view>
+            <view class="one_1">
+                <text class="text">名称:</text>
+                <text class="text1">{{form.name||'暂无名称'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">电话:</text>
+                <text class="text1">{{form.phone||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">地址:</text>
+                <text class="text1">{{form.address||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">教练人数:</text>
+                <text class="text1">{{form.coach_num||'暂无'}}人</text>
+            </view>
+            <view class="one_1">
+                <text class="text">学员人数:</text>
+                <text class="text1">{{form.student_num||'暂无'}}人</text>
+            </view>
+            <view class="one_1">
+                <text class="text">所获荣誉:</text>
+                <text class="text1">{{form.honor||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">学校简介:</text>
+                <text class="text1">{{form.brief||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <image bindtap="toView" data-item="{{form.yyzz[0]}}" class="image" src="{{form.yyzz&&form.yyzz.length>0?form.yyzz[0].url:''}}"></image>
+            </view>
+        </view>
+    </view>
+</mobile-main>

+ 35 - 1
pages/stuAdmin/school/info.wxss

@@ -1 +1,35 @@
-/* pages/stuAdmin/school/info.wxss */
+.main {
+  background-color: var(--mainColor);
+}
+.main .one {
+  width: 96vw;
+  padding: 0 2vw;
+}
+.main .one .one_1 {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  border: 1px dashed var(--f85Color);
+  border-radius: 5px;
+  margin: 0 0 10px 0;
+  padding: 10px;
+}
+.main .one .one_1 .text {
+  color: var(--f85Color);
+  font-size: var(--font16Size);
+}
+.main .one .one_1 .text1 {
+  font-size: var(--font16Size);
+}
+.main .one .one_1 .image {
+  width: 90vw;
+  height: 90vw;
+}
+.main .one .one_1 swiper {
+  width: 90vw;
+  height: 25vh;
+}
+.main .one .one_1 swiper .image {
+  width: 100%;
+  height: 100%;
+}

+ 64 - 28
pages/stuAdmin/school/list.js

@@ -1,66 +1,102 @@
-// pages/stuAdmin/school/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 })
+    },
+    // 查看
+    toView: async function (e) {
+        const that = this;
+        that.setData({ skip: 0, page: 0, list: [] })
+        const { item } = e.currentTarget.dataset;
+        wx.navigateTo({ url: `/pages/stuAdmin/school/info?id=${item.school_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 }) }
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad(options) {
-
+    onLoad: function (options) {
+    },
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                let info = { skip: that.data.skip, limit: that.data.limit, student_id: res.data.info.id };
+                let arr = await app.$get(`/rss`, { ...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' })
+            }
+        })
     },
-
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady() {
-
-    },
-
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow() {
-
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
-    onHide() {
+    onHide: function () {
 
     },
 
     /**
      * 生命周期函数--监听页面卸载
      */
-    onUnload() {
+    onUnload: function () {
 
     },
 
     /**
      * 页面相关事件处理函数--监听用户下拉动作
      */
-    onPullDownRefresh() {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
+    onPullDownRefresh: function () {
 
     },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage() {
+    onShareAppMessage: function () {
 
     }
 })

+ 4 - 1
pages/stuAdmin/school/list.json

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

+ 102 - 0
pages/stuAdmin/school/list.less

@@ -0,0 +1,102 @@
+.main {
+    height: var(--twoHeight);
+
+    .one {
+        width: 96vw;
+        padding: 2vw;
+
+        input {
+            padding: 2vw;
+            background-color: var(--f1Color);
+            border-radius: 5px;
+        }
+    }
+
+    .two {
+        flex-grow: 1;
+        position: relative;
+        width: 96vw;
+        margin: 0 2vw 2vw 2vw;
+
+        .list {
+            display: flex;
+            flex-direction: column;
+            padding: 2vw;
+            margin: 0 0 2vw 0;
+            background-color: var(--mainColor);
+
+            .list_1 {
+                display: flex;
+                align-items: center;
+
+                .image {
+                    width: 90px;
+                    height: 90px;
+                }
+
+                .content {
+                    width: 65vw;
+                    margin: 0 0 0 2vw;
+
+                    .name {
+                        font-size: var(--font16Size);
+                        font-weight: bold;
+                        margin: 0 0 1vw 0;
+                        text-align: center;
+                        border-bottom: 1px dashed var(--f1Color);
+                    }
+
+                    .txt {
+                        font-size: var(--font14Size);
+                        padding: 0 0 1vw 0;
+                        border-bottom: 1px dashed var(--f1Color);
+                    }
+
+                    .txt text:nth-child(1) {
+                        color: #666;
+                    }
+
+                    .other {
+                        display: flex;
+                        flex-direction: row;
+                        justify-content: space-between;
+                        font-size: var(--font14Size);
+                        border-bottom: 1px dashed var(--f1Color);
+
+                        .other_1 {
+                            padding: 0 0 1vw 0;
+                        }
+
+                        .other_1 text:nth-child(1) {
+                            color: var(--f85Color);
+                        }
+                    }
+                }
+            }
+
+            .btn {
+                width: 92vw;
+                text-align: center;
+                margin: 2vw 0 0 0;
+
+                button {
+                    font-size: var(--font14Size);
+                    background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 31 - 2
pages/stuAdmin/school/list.wxml

@@ -1,2 +1,31 @@
-<!--pages/stuAdmin/school/list.wxml-->
-<text>pages/stuAdmin/school/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+            <input type="text" placeholder="请输入关键词" />
+        </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">
+                            <image class="image" src="{{item.school_id_img_url&&item.school_id_img_url.length>0?item.school_id_img_url[0].url:''}}"></image>
+                            <view class="content">
+                                <view class="name textOver">{{item.school_id_name||'暂无'}}</view>
+                                <view class="txt textOver"><text>联系电话:</text><text>{{item.school_id_phone||'暂无'}}</text></view>
+                                <view class="other textOver">
+                                    <view class="other_1 textOver"><text>教练人数:</text><text>{{item.school_id_coach_num||'0'}}人</text></view>
+                                    <view class="other_1 textOver"><text>学员人数:</text><text>{{item.school_id_student_num||'0'}}人</text></view>
+                                </view>
+                                <view class="txt textOver"><text>训练地址:</text><text>{{item.school_id_address||'暂无'}}</text></view>
+                                <view class="txt textOver"><text>羽校简介:</text><text>{{item.school_id_brief||'暂无'}}</text></view>
+                            </view>
+                        </view>
+                        <view class="btn">
+                            <button size="mini" type="primary" bindtap="toView" data-item="{{item}}">详细信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 85 - 1
pages/stuAdmin/school/list.wxss

@@ -1 +1,85 @@
-/* pages/stuAdmin/school/list.wxss */
+.main {
+  height: var(--twoHeight);
+}
+.main .one {
+  width: 96vw;
+  padding: 2vw;
+}
+.main .one input {
+  padding: 2vw;
+  background-color: var(--f1Color);
+  border-radius: 5px;
+}
+.main .two {
+  flex-grow: 1;
+  position: relative;
+  width: 96vw;
+  margin: 0 2vw 2vw 2vw;
+}
+.main .two .list {
+  display: flex;
+  flex-direction: column;
+  padding: 2vw;
+  margin: 0 0 2vw 0;
+  background-color: var(--mainColor);
+}
+.main .two .list .list_1 {
+  display: flex;
+  align-items: center;
+}
+.main .two .list .list_1 .image {
+  width: 90px;
+  height: 90px;
+}
+.main .two .list .list_1 .content {
+  width: 65vw;
+  margin: 0 0 0 2vw;
+}
+.main .two .list .list_1 .content .name {
+  font-size: var(--font16Size);
+  font-weight: bold;
+  margin: 0 0 1vw 0;
+  text-align: center;
+  border-bottom: 1px dashed var(--f1Color);
+}
+.main .two .list .list_1 .content .txt {
+  font-size: var(--font14Size);
+  padding: 0 0 1vw 0;
+  border-bottom: 1px dashed var(--f1Color);
+}
+.main .two .list .list_1 .content .txt text:nth-child(1) {
+  color: #666;
+}
+.main .two .list .list_1 .content .other {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  font-size: var(--font14Size);
+  border-bottom: 1px dashed var(--f1Color);
+}
+.main .two .list .list_1 .content .other .other_1 {
+  padding: 0 0 1vw 0;
+}
+.main .two .list .list_1 .content .other .other_1 text:nth-child(1) {
+  color: var(--f85Color);
+}
+.main .two .list .btn {
+  width: 92vw;
+  text-align: center;
+  margin: 2vw 0 0 0;
+}
+.main .two .list .btn button {
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 29 - 28
pages/stuAdmin/study/list.js

@@ -1,66 +1,67 @@
-// pages/stuAdmin/study/list.js
+const app = getApp()
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
-
+        frameStyle: { useTop: true, name: '学校学习情况', leftArrow: true, useBar: false },
+    },
+    // 返回
+    back(e) {
+        wx.navigateBack({ delta: 1 })
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    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/stuAdmin/study/list.json

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

+ 5 - 2
pages/stuAdmin/study/list.wxml

@@ -1,2 +1,5 @@
-<!--pages/stuAdmin/study/list.wxml-->
-<text>pages/stuAdmin/study/list.wxml</text>
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        1
+    </view>
+</mobile-main>