Przeglądaj źródła

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

YY 2 lat temu
rodzic
commit
d8d8fdc30c
67 zmienionych plików z 1206 dodań i 238 usunięć
  1. 12 7
      app.json
  2. 60 41
      pages/school/index.less
  3. 14 1
      pages/school/index.wxml
  4. 10 40
      pages/school/index.wxss
  5. 34 9
      pages/school/info.js
  6. 20 1
      pages/school/info.less
  7. 16 2
      pages/school/info.wxml
  8. 17 0
      pages/school/info.wxss
  9. 0 6
      pages/sthrprivate/list.json
  10. 0 6
      pages/sthrschool/list.json
  11. 0 6
      pages/sthrstudystat/list.json
  12. 1 1
      pages/sthrfiles/list.js
  13. 0 0
      pages/stuAdmin/archives/list.json
  14. 0 0
      pages/stuAdmin/archives/list.less
  15. 0 0
      pages/stuAdmin/archives/list.wxml
  16. 0 0
      pages/stuAdmin/archives/list.wxss
  17. 104 0
      pages/stuAdmin/coach/info.js
  18. 0 0
      pages/stuAdmin/coach/info.json
  19. 32 0
      pages/stuAdmin/coach/info.less
  20. 42 0
      pages/stuAdmin/coach/info.wxml
  21. 27 0
      pages/stuAdmin/coach/info.wxss
  22. 28 27
      pages/sthrcoach/list.js
  23. 6 0
      pages/stuAdmin/coach/list.json
  24. 2 1
      pages/sthrcoach/list.less
  25. 5 5
      pages/sthrcoach/list.wxml
  26. 2 1
      pages/sthrcoach/list.wxss
  27. 0 0
      pages/stuAdmin/fee/list.js
  28. 0 0
      pages/stuAdmin/fee/list.json
  29. 0 0
      pages/stuAdmin/fee/list.less
  30. 0 0
      pages/stuAdmin/fee/list.wxml
  31. 0 0
      pages/stuAdmin/fee/list.wxss
  32. 96 0
      pages/stuAdmin/open/info.js
  33. 6 0
      pages/stuAdmin/open/info.json
  34. 32 0
      pages/stuAdmin/open/info.less
  35. 46 0
      pages/stuAdmin/open/info.wxml
  36. 27 0
      pages/stuAdmin/open/info.wxss
  37. 40 25
      pages/sthropen/list.js
  38. 6 0
      pages/stuAdmin/open/list.json
  39. 2 1
      pages/sthrprivate/list.less
  40. 2 3
      pages/sthrprivate/list.wxml
  41. 2 1
      pages/sthrprivate/list.wxss
  42. 96 0
      pages/stuAdmin/private/info.js
  43. 6 0
      pages/stuAdmin/private/info.json
  44. 32 0
      pages/stuAdmin/private/info.less
  45. 46 0
      pages/stuAdmin/private/info.wxml
  46. 27 0
      pages/stuAdmin/private/info.wxss
  47. 40 25
      pages/sthrprivate/list.js
  48. 6 0
      pages/stuAdmin/private/list.json
  49. 2 1
      pages/sthropen/list.less
  50. 2 3
      pages/sthropen/list.wxml
  51. 2 1
      pages/sthropen/list.wxss
  52. 90 0
      pages/stuAdmin/school/info.js
  53. 6 0
      pages/stuAdmin/school/info.json
  54. 42 0
      pages/stuAdmin/school/info.less
  55. 46 0
      pages/stuAdmin/school/info.wxml
  56. 35 0
      pages/stuAdmin/school/info.wxss
  57. 10 5
      pages/sthrschool/list.js
  58. 6 0
      pages/stuAdmin/school/list.json
  59. 3 2
      pages/sthrschool/list.less
  60. 7 7
      pages/sthrschool/list.wxml
  61. 3 2
      pages/sthrschool/list.wxss
  62. 0 0
      pages/stuAdmin/study/list.js
  63. 0 0
      pages/stuAdmin/study/list.json
  64. 0 0
      pages/stuAdmin/study/list.less
  65. 0 0
      pages/stuAdmin/study/list.wxml
  66. 0 0
      pages/stuAdmin/study/list.wxss
  67. 8 8
      utils/dict.js

+ 12 - 7
app.json

@@ -41,13 +41,18 @@
         "pages/soneapply/list",
         "pages/soneapply/info",
         "pages/sonecoachstat/list",
-        "pages/sthrfiles/list",
-        "pages/sthrcoach/list",
-        "pages/sthrschool/list",
-        "pages/sthropen/list",
-        "pages/sthrprivate/list",
-        "pages/sthrstudystat/list",
-        "pages/sthrfeestat/list"
+
+        "pages/stuAdmin/archives/list",
+        "pages/stuAdmin/coach/list",
+        "pages/stuAdmin/coach/info",
+        "pages/stuAdmin/school/list",
+        "pages/stuAdmin/school/info",
+        "pages/stuAdmin/open/list",
+        "pages/stuAdmin/open/info",
+        "pages/stuAdmin/private/list",
+        "pages/stuAdmin/private/info",
+        "pages/stuAdmin/study/list",
+        "pages/stuAdmin/fee/list"
     ],
     "usingComponents": {
         "van-sidebar": "@vant/weapp/sidebar/index",

+ 60 - 41
pages/school/index.less

@@ -42,8 +42,15 @@
             padding: 2vw;
             margin: 0 2vw 2vw 2vw;
             border-radius: 5px;
+            display: flex;
+            flex-direction: row;
 
             .list_1 {
+                width: 10vw;
+            }
+
+            .list_2 {
+                width: 10vw;
                 .swiper {
                     height: 30vh;
 
@@ -55,47 +62,59 @@
                 }
             }
 
-            .list_2 {
-                position: absolute;
-                top: 2vw;
-                width: 92vw;
-                color: var(--whiteColor);
-
-                .name {
-                    text-align: center;
-                    font-size: var(--font20Szie);
-                    font-weight: bold;
-                    margin: 3vw 0 1vw 0;
-                    overflow: hidden;
-                    text-overflow: ellipsis;
-                    -webkit-line-clamp: 2;
-                    word-break: break-all;
-                    display: -webkit-box;
-                    -webkit-box-orient: vertical;
-                    -webkit-text-stroke: 1px var(--redColor);
-                }
-
-                .address {
-                    text-align: center;
-                    font-size: var(--font18Szie);
-                    margin: 0 0 2vw 0;
-                    overflow: hidden;
-                    text-overflow: ellipsis;
-                    -webkit-line-clamp: 2;
-                    word-break: break-all;
-                    display: -webkit-box;
-                    -webkit-box-orient: vertical;
-                    -webkit-text-stroke: 1px var(--blueColor);
-                }
-
-                .other {
-                    display: flex;
-                    flex-direction: row;
-                    justify-content: space-around;
-                    font-size: var(--font18Szie);
-                    -webkit-text-stroke: 1px var(--blueColor);
-                }
-            }
+            // .list_1 {
+            //     .swiper {
+            //         height: 30vh;
+
+            //     }
+
+            //     .image {
+            //         width: 100%;
+            //         height: 100%;
+            //     }
+            // }
+
+            // .list_2 {
+            //     position: absolute;
+            //     top: 2vw;
+            //     width: 92vw;
+            //     color: var(--whiteColor);
+
+            //     .name {
+            //         text-align: center;
+            //         font-size: var(--font20Szie);
+            //         font-weight: bold;
+            //         margin: 3vw 0 1vw 0;
+            //         overflow: hidden;
+            //         text-overflow: ellipsis;
+            //         -webkit-line-clamp: 2;
+            //         word-break: break-all;
+            //         display: -webkit-box;
+            //         -webkit-box-orient: vertical;
+            //         -webkit-text-stroke: 1px var(--redColor);
+            //     }
+
+            //     .address {
+            //         text-align: center;
+            //         font-size: var(--font18Szie);
+            //         margin: 0 0 2vw 0;
+            //         overflow: hidden;
+            //         text-overflow: ellipsis;
+            //         -webkit-line-clamp: 2;
+            //         word-break: break-all;
+            //         display: -webkit-box;
+            //         -webkit-box-orient: vertical;
+            //         -webkit-text-stroke: 1px var(--blueColor);
+            //     }
+
+            //     .other {
+            //         display: flex;
+            //         flex-direction: row;
+            //         justify-content: space-around;
+            //         font-size: var(--font18Szie);
+            //         -webkit-text-stroke: 1px var(--blueColor);
+            //     }
+            // }
         }
     }
 }

+ 14 - 1
pages/school/index.wxml

@@ -13,6 +13,19 @@
                 <view class="list-scroll-view">
                     <view class="list" wx:for="{{list}}" wx:key="item" wx:for-item="item" wx:for-index="index" bindtap="toView" data-item="{{item}}">
                         <view class="list_1">
+                            <view class="name">{{item.name}}</view>
+                            <view class="brief">{{item.brief}}</view>
+                        </view>
+                        <view class="list_2">
+                            <swiper autoplay="true" circular="true" interval="3000" duration="1000">
+                                <block wx:for="{{item.img_url}}" wx:key="tag" wx:for-item="tag" wx:for-index="tagindex">
+                                    <swiper-item>
+                                        <image class="image" src="{{tag.url}}"></image>
+                                    </swiper-item>
+                                </block>
+                            </swiper>
+                        </view>
+                        <!-- <view class="list_1">
                             <swiper autoplay="true" circular="true" interval="3000" duration="1000">
                                 <block wx:for="{{item.img_url}}" wx:key="tag" wx:for-item="tag" wx:for-index="tagindex">
                                     <swiper-item>
@@ -28,7 +41,7 @@
                                 <view class="other_1"><text>教练人数:</text><text>{{item.coach_num}}</text></view>
                                 <view class="other_1"><text>学员人数:</text><text>{{item.student_num}}</text></view>
                             </view>
-                        </view>
+                        </view> -->
                     </view>
                 </view>
             </scroll-view>

+ 10 - 40
pages/school/index.wxss

@@ -37,51 +37,21 @@
   padding: 2vw;
   margin: 0 2vw 2vw 2vw;
   border-radius: 5px;
+  display: flex;
+  flex-direction: row;
 }
-.main .two .list .list_1 .swiper {
-  height: 30vh;
-}
-.main .two .list .list_1 .image {
-  width: 100%;
-  height: 100%;
+.main .two .list .list_1 {
+  width: 10vw;
 }
 .main .two .list .list_2 {
-  position: absolute;
-  top: 2vw;
-  width: 92vw;
-  color: var(--whiteColor);
+  width: 10vw;
 }
-.main .two .list .list_2 .name {
-  text-align: center;
-  font-size: var(--font20Szie);
-  font-weight: bold;
-  margin: 3vw 0 1vw 0;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  -webkit-line-clamp: 2;
-  word-break: break-all;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-text-stroke: 1px var(--redColor);
-}
-.main .two .list .list_2 .address {
-  text-align: center;
-  font-size: var(--font18Szie);
-  margin: 0 0 2vw 0;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  -webkit-line-clamp: 2;
-  word-break: break-all;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-text-stroke: 1px var(--blueColor);
+.main .two .list .list_2 .swiper {
+  height: 30vh;
 }
-.main .two .list .list_2 .other {
-  display: flex;
-  flex-direction: row;
-  justify-content: space-around;
-  font-size: var(--font18Szie);
-  -webkit-text-stroke: 1px var(--blueColor);
+.main .two .list .list_2 .image {
+  width: 100%;
+  height: 100%;
 }
 .scroll-view {
   position: absolute;

+ 34 - 9
pages/school/info.js

@@ -1,4 +1,5 @@
 const app = getApp()
+const moment = require("../../utils/moment.min")
 Page({
     data: {
         frameStyle: { useTop: true, name: '羽校信息', leftArrow: true, useBar: false },
@@ -11,8 +12,12 @@ Page({
             menu: [
                 { title: '羽校信息', active: '0' },
                 { title: '师资信息', active: '1' },
+                { title: '公开课', active: '2' },
+                { title: '私教课', active: '3' },
             ]
-        }
+        },
+        // 公开课
+        openList: []
     },
     // 跳转菜单
     back(e) {
@@ -24,8 +29,24 @@ Page({
         let data = e.detail;
         that.setData({ 'tabs.active': data.active })
     },
-
-
+    //申请入学
+    toApply: function () {
+        const that = this;
+        wx.showModal({
+            title: '提示',
+            content: '您是否确定加入此学校?',
+            async success(res) {
+                let user = that.data.user;
+                let form = that.data.form;
+                if (res.confirm) {
+                    var params = { student_id: user.info.id, school_id: form._id, time: moment().format('YYYY-MM-DD HH:mm:ss') };
+                    let arr = await app.$post(`/safs`, params);
+                    if (arr.errcode == '0') { wx.showToast({ title: `申请入学成功`, icon: 'success', duration: 2000 }); that.watchLogin(); }
+                    else wx.showToast({ title: `${error.msg}`, icon: 'error', duration: 2000 })
+                } else if (res.cancel) { }
+            }
+        });
+    },
     /**
      * 生命周期函数--监听页面加载
      */
@@ -41,13 +62,17 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
+                that.setData({ user: res.data })
                 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 })
-                    }
+                    let arr;
+                    // 学校信息
+                    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 }) }
+                    // 公开课
+                    arr = await app.$get(`/lessonPublic`, { school_id: that.data.id, status: '1' });
+                    if (arr.errcode == '0') { that.setData({ openList: arr.data }) }
+                    else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
                 }
             },
             fail: async res => {

+ 20 - 1
pages/school/info.less

@@ -11,7 +11,26 @@
         flex-grow: 1;
         background-color: #0000ff;
 
-        .a {}
+        .a {
+            .school {
+                position: fixed;
+                width: 96vw;
+                bottom: 8vh;
+                right: 1vw;
+                text-align: right;
+
+                .school_txt {
+                    display: inline-block;
+                    width: 10vw;
+                    padding: 1vw;
+                    text-align: center;
+                    background-color: #53C9F8;
+                    color: var(--mainColor);
+                    font-size: var(--font14Size);
+                    border-radius: 5px;
+                }
+            }
+        }
 
         .b {}
     }

+ 16 - 2
pages/school/info.wxml

@@ -4,8 +4,22 @@
             <s-tab tabs="{{tabs}}" bind:tabsChange="tabsChange"></s-tab>
         </view>
         <view class="two">
-            <view wx:if="{{tabs.active=='0'}}" class="a">{{form.name}}</view>
-            <view wx:elif="{{tabs.active=='1'}}" class="b">第二</view>
+            <view wx:if="{{tabs.active=='0'}}" class="a">
+                {{form.name}}
+                <view class="school" wx:if="{{user.type=='3'}}">
+                    <text class="school_txt" bindtap="toApply">申请入学</text>
+                </view>
+            </view>
+            <view wx:elif="{{tabs.active=='1'}}" class="b">师资信息</view>
+            <view wx:elif="{{tabs.active=='2'}}" class="c">
+                <view class="cList" wx:for="{{openList}}" wx:key="index">
+                    <view class="name">{{item.title}}</view>
+                    <view class="btn">
+                        <button type="primary" size="mini">报名</button>
+                    </view>
+                </view>
+            </view>
+            <view wx:elif="{{tabs.active=='3'}}" class="d">私教课</view>
         </view>
     </view>
 </mobile-main>

+ 17 - 0
pages/school/info.wxss

@@ -10,3 +10,20 @@
   flex-grow: 1;
   background-color: #0000ff;
 }
+.main .two .a .school {
+  position: fixed;
+  width: 96vw;
+  bottom: 8vh;
+  right: 1vw;
+  text-align: right;
+}
+.main .two .a .school .school_txt {
+  display: inline-block;
+  width: 10vw;
+  padding: 1vw;
+  text-align: center;
+  background-color: #53C9F8;
+  color: var(--mainColor);
+  font-size: var(--font14Size);
+  border-radius: 5px;
+}

+ 0 - 6
pages/sthrprivate/list.json

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

+ 0 - 6
pages/sthrschool/list.json

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

+ 0 - 6
pages/sthrstudystat/list.json

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

+ 1 - 1
pages/sthrfiles/list.js

@@ -1,5 +1,5 @@
 const app = getApp()
-import WxValidate from '../../utils/wxValidate';
+import WxValidate from '../../../utils/wxValidate';
 Page({
     data: {
         frameStyle: { useTop: true, name: '学员信息管理', leftArrow: true, useBar: false },

pages/sthrfiles/list.json → pages/stuAdmin/archives/list.json


pages/sthrfiles/list.less → pages/stuAdmin/archives/list.less


pages/sthrfiles/list.wxml → pages/stuAdmin/archives/list.wxml


pages/sthrfiles/list.wxss → pages/stuAdmin/archives/list.wxss


+ 104 - 0
pages/stuAdmin/coach/info.js

@@ -0,0 +1,104 @@
+const app = getApp()
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '教练信息', leftArrow: true, useBar: false },
+        id: '',
+        form: {},
+        // 性别
+        genderList: [],
+        //运动等级
+        levelList: [],
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    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: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

pages/sthrcoach/list.json → pages/stuAdmin/coach/info.json


+ 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 - 0
pages/stuAdmin/coach/info.wxml

@@ -0,0 +1,42 @@
+<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 - 0
pages/stuAdmin/coach/info.wxss

@@ -0,0 +1,27 @@
+.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;
+}

+ 28 - 27
pages/sthrcoach/list.js

@@ -16,6 +16,13 @@ Page({
     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;
@@ -36,21 +43,29 @@ Page({
      */
     onLoad: function (options) {
     },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    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) {
-            let list = arr.data[0].list;
-            that.setData({ genderList: list })
-        }
+        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) {
-            let list = arr.data[0].list;
-            that.setData({ levelList: list })
-        }
+        if (arr.errcode == '0' && arr.total > 0) that.setData({ levelList: arr.data[0].list });
     },
     // 监听用户是否登录
     watchLogin: async function () {
@@ -60,17 +75,15 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
-                let info = { skip: that.data.skip, limit: that.data.limit, student_id: res.data._id };
+                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') {
-                    let list = [{ icon: [{ url: '/image/beijing.jpeg' }], id: '1', name: '教练名称', gender: '0', age: 22, phone: '12345678901', level: '0', honor: '荣誉' }]
-                    that.setData({ list: list })
                     for (const val of arr.data) {
-                        let level = levelList.find(i => i.value == val.level); if (level) val.zhLevel = level.label;
-                        let gender = genderList.find(i => i.value == val.gender); if (gender) val.zhGender = level.label;
+                        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 })
+                    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 => {
@@ -78,18 +91,6 @@ Page({
             }
         })
     },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () { },
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-        const that = this;
-        // 监听用户是否登录
-        that.watchLogin();
-    },
     /**
      * 页面上拉触底事件的处理函数
      */

+ 6 - 0
pages/stuAdmin/coach/list.json

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

+ 2 - 1
pages/sthrcoach/list.less

@@ -80,7 +80,8 @@
                 margin: 2vw 0 0 0;
 
                 button {
-                    background: -webkit-linear-gradient(right, lightblue, rgb(83, 201, 248));
+                    font-size: var(--font14Size);
+                    background: -webkit-linear-gradient(right, lightblue, #53C9F8);
                 }
             }
         }

+ 5 - 5
pages/sthrcoach/list.wxml

@@ -8,16 +8,16 @@
                 <view class="list-scroll-view">
                     <view class="list" wx:for="{{list}}" wx:key="item">
                         <view class="list_1">
-                            <image class="image" src="{{item.icon&&item.icon.length>0?item.icon[0].url:''}}"></image>
+                            <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.name||'暂无'}}</view>
-                                <view class="txt textOver"><text>联系电话:</text><text>{{item.phone||'暂无'}}</text></view>
+                                <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.age||'暂无'}}岁</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.honor||'暂无'}}</text></view>
+                                <view class="txt textOver"><text>所获荣誉:</text><text>{{item.coach_id_honor||'暂无'}}</text></view>
                             </view>
                         </view>
                         <view class="btn">

+ 2 - 1
pages/sthrcoach/list.wxss

@@ -69,7 +69,8 @@
   margin: 2vw 0 0 0;
 }
 .main .two .list .btn button {
-  background: -webkit-linear-gradient(right, lightblue, #53c9f8);
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
 }
 .scroll-view {
   position: absolute;

pages/sthrfeestat/list.js → pages/stuAdmin/fee/list.js


pages/sthrfeestat/list.json → pages/stuAdmin/fee/list.json


pages/sthrfeestat/list.less → pages/stuAdmin/fee/list.less


pages/sthrfeestat/list.wxml → pages/stuAdmin/fee/list.wxml


pages/sthrfeestat/list.wxss → pages/stuAdmin/fee/list.wxss


+ 96 - 0
pages/stuAdmin/open/info.js

@@ -0,0 +1,96 @@
+const app = getApp()
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '公开课信息', leftArrow: true, useBar: false },
+        id: '',
+        form: {},
+        //状态
+        statusList: []
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    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(`/lessonPublic/${that.data.id}`);
+                    if (arr.errcode == '0') {
+                        let status = statusList.find(i => i.value == arr.data.status)
+                        if (status) arr.data.zhStatus = 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: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/stuAdmin/open/info.json

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

+ 32 - 0
pages/stuAdmin/open/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;
+            }
+        }
+    }
+}

+ 46 - 0
pages/stuAdmin/open/info.wxml

@@ -0,0 +1,46 @@
+<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.school_id_name||'暂无'}}</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.brief||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">教练人员:</text>
+                <view class="name" wx:if="{{form.coach_id&&item.coach_id.length>0}}" wx:for="{{form.coach_id}}" wx:key="item">
+                    <text class="text1">姓名:{{item.name||'暂无'}}</text>
+                </view>
+            </view>
+            <view class="one_1">
+                <text class="text">学生人员:</text>
+                <view class="name" wx:if="{{form.student&&item.student.length>0}}" wx:for="{{form.student}}" wx:key="item">
+                    <text class="text1">姓名:{{item.name||'暂无'}}</text>
+                </view>
+            </view>
+        </view>
+    </view>
+</mobile-main>

+ 27 - 0
pages/stuAdmin/open/info.wxss

@@ -0,0 +1,27 @@
+.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;
+}

+ 40 - 25
pages/sthropen/list.js

@@ -7,8 +7,6 @@ Page({
         page: 0,
         skip: 0,
         limit: 5,
-        //类型
-        typeList: [],
         //状态
         statusList: []
     },
@@ -16,6 +14,13 @@ Page({
     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/open/info?id=${item._id}` })
+    },
     // 分页
     toPage: function () {
         const that = this;
@@ -36,29 +41,51 @@ Page({
      */
     onLoad: function (options) {
     },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    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 typeList = that.data.typeList;
+        var list = [];
         let statusList = that.data.statusList;
         wx.getStorage({
             key: 'user',
             success: async res => {
-                let info = { skip: that.data.skip, limit: that.data.limit, type: '1' };
-                let arr = await app.$get(`/lesson`, { ...info });
+                let info = { skip: that.data.skip, limit: that.data.limit };
+                let arr = await app.$get(`/lessonPublic`, { ...info });
                 if (arr.errcode == '0') {
-                    let list = [{ id: '1', title: '测试名称', class_hour: 10, money: 10, type: '1', time: '2022-08-17', status: '0' }]
-                    that.setData({ list: list })
                     for (const val of arr.data) {
                         if (val.student.length > 0) {
-                            let student = val.student.find(i => i._id == res.data._id);
-                            if (student) { let list = []; list.push(val); }
+                            let student = val.student.find(i => i._id == res.data.info.id);
+                            if (student) {
+                                let status = statusList.find(i => i.value == val.status); if (status) val.zhStatus = status.label;
+                                list.push(val);
+                            }
                         }
-                        let type = typeList.find(i => i.value == val.type); if (type) val.zhType = type.label;
-                        let status = statusList.find(i => i.value == val.status); if (status) val.zhStatus = status.label;
                     }
-                    // that.setData({ list: [...that.data.list, ...list] })
-                    // that.setData({ total: arr.total })
+                    if (list) {
+                        that.setData({ list: [...that.data.list, ...list] })
+                        that.setData({ total: list.length })
+                    }
                 } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
             },
             fail: async res => {
@@ -66,18 +93,6 @@ Page({
             }
         })
     },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () { },
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-        const that = this;
-        // 监听用户是否登录
-        that.watchLogin();
-    },
     /**
      * 页面上拉触底事件的处理函数
      */

+ 6 - 0
pages/stuAdmin/open/list.json

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

+ 2 - 1
pages/sthrprivate/list.less

@@ -60,7 +60,8 @@
                 margin: 2vw 0 0 0;
 
                 button {
-                    background: -webkit-linear-gradient(right, lightblue, rgb(83, 201, 248));
+                    font-size: var(--font14Size);
+                    background: -webkit-linear-gradient(right, lightblue, #53C9F8);
                 }
             }
         }

+ 2 - 3
pages/sthrprivate/list.wxml

@@ -10,11 +10,10 @@
                         <view class="list_1">
                             <view class="name textOver">{{item.title||'暂无'}}</view>
                             <view class="other">
-                                <view class="other_1 textOver"><text>课时:</text><text>{{item.class_hour||'暂无'}}小时</text></view>
                                 <view class="other_1 textOver"><text>金额:</text><text>¥{{item.money||'暂无'}}元</text></view>
-                                <view class="other_1 textOver"><text>类型:</text><text>{{item.zhType||'暂无'}}</text></view>
-                                <view class="other_1 textOver"><text>上课时间:</text><text>{{item.time||'暂无'}}</text></view>
                                 <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.time_start||'暂无'}}-{{item.time_end||'暂无'}}</text></view>
                             </view>
                         </view>
                         <view class="btn">

+ 2 - 1
pages/sthrprivate/list.wxss

@@ -52,7 +52,8 @@
   margin: 2vw 0 0 0;
 }
 .main .two .list .btn button {
-  background: -webkit-linear-gradient(right, lightblue, #53c9f8);
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
 }
 .scroll-view {
   position: absolute;

+ 96 - 0
pages/stuAdmin/private/info.js

@@ -0,0 +1,96 @@
+const app = getApp()
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '私教课信息', leftArrow: true, useBar: false },
+        id: '',
+        form: {},
+        //状态
+        statusList: []
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    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(`/lessonPublic/${that.data.id}`);
+                    if (arr.errcode == '0') {
+                        let status = statusList.find(i => i.value == arr.data.status)
+                        if (status) arr.data.zhStatus = 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: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/stuAdmin/private/info.json

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

+ 32 - 0
pages/stuAdmin/private/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;
+            }
+        }
+    }
+}

+ 46 - 0
pages/stuAdmin/private/info.wxml

@@ -0,0 +1,46 @@
+<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.school_id_name||'暂无'}}</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.brief||'暂无'}}</text>
+            </view>
+            <view class="one_1">
+                <text class="text">教练人员:</text>
+                <view class="name" wx:if="{{form.coach_id&&item.coach_id.length>0}}" wx:for="{{form.coach_id}}" wx:key="item">
+                    <text class="text1">姓名:{{item.name||'暂无'}}</text>
+                </view>
+            </view>
+            <view class="one_1">
+                <text class="text">学生人员:</text>
+                <view class="name" wx:if="{{form.student&&item.student.length>0}}" wx:for="{{form.student}}" wx:key="item">
+                    <text class="text1">姓名:{{item.name||'暂无'}}</text>
+                </view>
+            </view>
+        </view>
+    </view>
+</mobile-main>

+ 27 - 0
pages/stuAdmin/private/info.wxss

@@ -0,0 +1,27 @@
+.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;
+}

+ 40 - 25
pages/sthrprivate/list.js

@@ -7,8 +7,6 @@ Page({
         page: 0,
         skip: 0,
         limit: 5,
-        //类型
-        typeList: [],
         //状态
         statusList: []
     },
@@ -16,6 +14,13 @@ Page({
     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/private/info?id=${item._id}` })
+    },
     // 分页
     toPage: function () {
         const that = this;
@@ -36,29 +41,51 @@ Page({
      */
     onLoad: function (options) {
     },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    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 typeList = that.data.typeList;
+        var list = [];
         let statusList = that.data.statusList;
         wx.getStorage({
             key: 'user',
             success: async res => {
-                let info = { skip: that.data.skip, limit: that.data.limit, type: '1' };
-                let arr = await app.$get(`/lesson`, { ...info });
+                let info = { skip: that.data.skip, limit: that.data.limit };
+                let arr = await app.$get(`/lessonPrivate`, { ...info });
                 if (arr.errcode == '0') {
-                    let list = [{ id: '1', title: '测试名称', class_hour: 10, money: 10, type: '1', time: '2022-08-17', status: '0' }]
-                    that.setData({ list: list })
                     for (const val of arr.data) {
                         if (val.student.length > 0) {
-                            let student = val.student.find(i => i._id == res.data._id);
-                            if (student) { let list = []; list.push(val); }
+                            let student = val.student.find(i => i._id == res.data.info.id);
+                            if (student) {
+                                let status = statusList.find(i => i.value == val.status); if (status) val.zhStatus = status.label;
+                                list.push(val);
+                            }
                         }
-                        let type = typeList.find(i => i.value == val.type); if (type) val.zhType = type.label;
-                        let status = statusList.find(i => i.value == val.status); if (status) val.zhStatus = status.label;
                     }
-                    // that.setData({ list: [...that.data.list, ...list] })
-                    // that.setData({ total: arr.total })
+                    if (list) {
+                        that.setData({ list: [...that.data.list, ...list] })
+                        that.setData({ total: list.length })
+                    }
                 } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
             },
             fail: async res => {
@@ -66,18 +93,6 @@ Page({
             }
         })
     },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () { },
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-        const that = this;
-        // 监听用户是否登录
-        that.watchLogin();
-    },
     /**
      * 页面上拉触底事件的处理函数
      */

+ 6 - 0
pages/stuAdmin/private/list.json

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

+ 2 - 1
pages/sthropen/list.less

@@ -60,7 +60,8 @@
                 margin: 2vw 0 0 0;
 
                 button {
-                    background: -webkit-linear-gradient(right, lightblue, rgb(83, 201, 248));
+                    font-size: var(--font14Size);
+                    background: -webkit-linear-gradient(right, lightblue, #53C9F8);
                 }
             }
         }

+ 2 - 3
pages/sthropen/list.wxml

@@ -10,11 +10,10 @@
                         <view class="list_1">
                             <view class="name textOver">{{item.title||'暂无'}}</view>
                             <view class="other">
-                                <view class="other_1 textOver"><text>课时:</text><text>{{item.class_hour||'暂无'}}小时</text></view>
                                 <view class="other_1 textOver"><text>金额:</text><text>¥{{item.money||'暂无'}}元</text></view>
-                                <view class="other_1 textOver"><text>类型:</text><text>{{item.zhType||'暂无'}}</text></view>
-                                <view class="other_1 textOver"><text>上课时间:</text><text>{{item.time||'暂无'}}</text></view>
                                 <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.time_start||'暂无'}}-{{item.time_end||'暂无'}}</text></view>
                             </view>
                         </view>
                         <view class="btn">

+ 2 - 1
pages/sthropen/list.wxss

@@ -52,7 +52,8 @@
   margin: 2vw 0 0 0;
 }
 .main .two .list .btn button {
-  background: -webkit-linear-gradient(right, lightblue, #53c9f8);
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
 }
 .scroll-view {
   position: absolute;

+ 90 - 0
pages/stuAdmin/school/info.js

@@ -0,0 +1,90 @@
+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: 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: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/stuAdmin/school/info.json

@@ -0,0 +1,6 @@
+{
+  "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 - 0
pages/stuAdmin/school/info.wxml

@@ -0,0 +1,46 @@
+<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 - 0
pages/stuAdmin/school/info.wxss

@@ -0,0 +1,35 @@
+.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%;
+}

+ 10 - 5
pages/sthrschool/list.js

@@ -12,6 +12,13 @@ Page({
     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;
@@ -38,13 +45,11 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
-                let info = { skip: that.data.skip, limit: that.data.limit, student_id: res.data._id };
+                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') {
-                    let list = [{ img_url: [{ url: '/image/beijing.jpeg' }], id: '1', name: '学校名称', coach_num: 9, student_num: 22, address: '地址', brief: '简介', phone: '12345678901' }]
-                    that.setData({ list: list })
-                    // that.setData({ list: [...that.data.list, ...arr.data] })
-                    // that.setData({ total: arr.total })
+                    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 => {

+ 6 - 0
pages/stuAdmin/school/list.json

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

+ 3 - 2
pages/sthrschool/list.less

@@ -68,7 +68,7 @@
                         }
 
                         .other_1 text:nth-child(1) {
-                            color: #666;
+                            color: var(--f85Color);
                         }
                     }
                 }
@@ -80,7 +80,8 @@
                 margin: 2vw 0 0 0;
 
                 button {
-                    background: -webkit-linear-gradient(right, lightblue, rgb(83, 201, 248));
+                    font-size: var(--font14Size);
+                    background: -webkit-linear-gradient(right, lightblue, #53C9F8);
                 }
             }
         }

+ 7 - 7
pages/sthrschool/list.wxml

@@ -8,16 +8,16 @@
                 <view class="list-scroll-view">
                     <view class="list" wx:for="{{list}}" wx:key="item">
                         <view class="list_1">
-                            <image class="image" src="{{item.img_url&&item.img_url.length>0?item.img_url[0].url:''}}"></image>
+                            <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.name||'暂无'}}</view>
-                                <view class="txt textOver"><text>联系电话:</text><text>{{item.phone||'暂无'}}</text></view>
+                                <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.coach_num||'0'}}人</text></view>
-                                    <view class="other_1 textOver"><text>学员人数:</text><text>{{item.student_num||'0'}}人</text></view>
+                                    <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.address||'暂无'}}</text></view>
-                                <view class="txt textOver"><text>羽校简介:</text><text>{{item.brief||'暂无'}}</text></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">

+ 3 - 2
pages/sthrschool/list.wxss

@@ -61,7 +61,7 @@
   padding: 0 0 1vw 0;
 }
 .main .two .list .list_1 .content .other .other_1 text:nth-child(1) {
-  color: #666;
+  color: var(--f85Color);
 }
 .main .two .list .btn {
   width: 92vw;
@@ -69,7 +69,8 @@
   margin: 2vw 0 0 0;
 }
 .main .two .list .btn button {
-  background: -webkit-linear-gradient(right, lightblue, #53c9f8);
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
 }
 .scroll-view {
   position: absolute;

pages/sthrstudystat/list.js → pages/stuAdmin/study/list.js


pages/sthropen/list.json → pages/stuAdmin/study/list.json


pages/sthrstudystat/list.less → pages/stuAdmin/study/list.less


pages/sthrstudystat/list.wxml → pages/stuAdmin/study/list.wxml


pages/sthrstudystat/list.wxss → pages/stuAdmin/study/list.wxss


+ 8 - 8
utils/dict.js

@@ -52,7 +52,7 @@ export const school_menu = [
                 title: '羽校管理',
                 icon: 'icon-xuexiao',
                 btn: [
-                    { title: '学校信息', route: 'soneschool/list', icon: 'icon-xuexiao_xuexiaoxinxi' },
+                    { title: '学校信息', route: '/soneschool/list', icon: 'icon-xuexiao_xuexiaoxinxi' },
                     { title: '教练信息', route: 'sonecoach/list', icon: 'icon-jiaolian1' },
                     { title: '审批教练费', route: 'sonefee/list', icon: 'icon-tianshenpi' },
                     { title: '学员信息', route: 'sonestudent/list', icon: 'icon-zaiduxueyuan' },
@@ -90,25 +90,25 @@ export const school_menu = [
                 title: '信息管理',
                 icon: 'icon-yonghu',
                 btn: [
-                    { title: '个人档案', route: 'sthrfiles/list', icon: 'icon-weibiaoti1' },
-                    { title: '教练信息', route: 'sthrcoach/list', icon: 'icon-weibiaoti1' },
+                    { title: '个人档案', route: 'stuAdmin/archives/list', icon: 'icon-weibiaoti1' },
+                    { title: '教练信息', route: 'stuAdmin/coach/list', icon: 'icon-weibiaoti1' },
                 ]
             },
             {
                 title: '羽校管理',
                 icon: 'icon-yonghu',
                 btn: [
-                    { title: '羽校信息', route: 'sthrschool/list', icon: 'icon-xuexiao' },
-                    { title: '公开课信息', route: 'sthropen/list', icon: 'icon-gongkaikekaifangke' },
-                    { title: '私教课信息', route: 'sthrprivate/list', icon: 'icon-yewutubiaosi' },
+                    { title: '羽校信息', route: 'stuAdmin/school/list', icon: 'icon-xuexiao' },
+                    { title: '公开课信息', route: 'stuAdmin/open/list', icon: 'icon-gongkaikekaifangke' },
+                    { title: '私教课信息', route: 'stuAdmin/private/list', icon: 'icon-yewutubiaosi' },
                 ]
             },
             {
                 title: '统计分析',
                 icon: 'icon-yonghu',
                 btn: [
-                    { title: '学校学习情况', route: 'sthrstudystat/list', icon: 'icon-xuexi-icon' },
-                    { title: '付费情况', route: 'sthrfeestat/list', icon: 'icon-fufei' },
+                    { title: '学校学习情况', route: 'stuAdmin/study/list', icon: 'icon-xuexi-icon' },
+                    { title: '付费情况', route: 'stuAdmin/fee/list', icon: 'icon-fufei' },
                 ]
             },
         ]