Browse Source

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

YY 2 years ago
parent
commit
8b67fdd982
94 changed files with 1704 additions and 77 deletions
  1. 13 11
      app.json
  2. 2 0
      app.wxss
  3. 3 2
      pages/index/index.wxml
  4. 12 0
      pages/register/index.js
  5. 1 1
      pages/register/index.wxml
  6. 35 1
      pages/school/index.js
  7. 80 1
      pages/school/index.less
  8. 23 1
      pages/school/index.wxml
  9. 68 1
      pages/school/index.wxss
  10. 100 0
      pages/school/info.js
  11. 6 0
      pages/school/info.json
  12. 27 0
      pages/school/info.less
  13. 14 0
      pages/school/info.wxml
  14. 22 0
      pages/school/info.wxss
  15. 4 0
      pages/setting/basic.js
  16. 13 0
      pages/setting/basic.wxml
  17. 123 0
      pages/sthrcoach/list.js
  18. 6 0
      pages/sthrcoach/list.json
  19. 101 0
      pages/sthrcoach/list.less
  20. 31 0
      pages/sthrcoach/list.wxml
  21. 84 0
      pages/sthrcoach/list.wxss
  22. 116 12
      pages/sthrfiles/list.js
  23. 6 5
      pages/sthrfiles/list.json
  24. 32 1
      pages/sthrfiles/list.less
  25. 66 1
      pages/sthrfiles/list.wxml
  26. 25 0
      pages/sthrfiles/list.wxss
  27. 47 3
      pages/sthropen/list.js
  28. 78 1
      pages/sthropen/list.less
  29. 24 1
      pages/sthropen/list.wxml
  30. 64 0
      pages/sthropen/list.wxss
  31. 47 3
      pages/sthrprivate/list.js
  32. 78 1
      pages/sthrprivate/list.less
  33. 24 1
      pages/sthrprivate/list.wxml
  34. 64 0
      pages/sthrprivate/list.wxss
  35. 33 3
      pages/sthrschool/list.js
  36. 98 1
      pages/sthrschool/list.less
  37. 27 1
      pages/sthrschool/list.wxml
  38. 81 0
      pages/sthrschool/list.wxss
  39. 1 1
      pages/sadmin/add.js
  40. 0 0
      pages/superAdmin/sadmin/add.json
  41. 0 0
      pages/superAdmin/sadmin/add.less
  42. 0 0
      pages/superAdmin/sadmin/add.wxml
  43. 0 0
      pages/superAdmin/sadmin/add.wxss
  44. 3 3
      pages/sadmin/list.js
  45. 0 0
      pages/superAdmin/sadmin/list.json
  46. 0 0
      pages/superAdmin/sadmin/list.less
  47. 0 0
      pages/superAdmin/sadmin/list.wxml
  48. 0 0
      pages/superAdmin/sadmin/list.wxss
  49. 1 1
      pages/scoach/add.js
  50. 0 0
      pages/superAdmin/scoach/add.json
  51. 0 0
      pages/superAdmin/scoach/add.less
  52. 0 0
      pages/superAdmin/scoach/add.wxml
  53. 0 0
      pages/superAdmin/scoach/add.wxss
  54. 3 3
      pages/scoach/list.js
  55. 0 0
      pages/superAdmin/scoach/list.json
  56. 0 0
      pages/superAdmin/scoach/list.less
  57. 0 0
      pages/superAdmin/scoach/list.wxml
  58. 0 0
      pages/superAdmin/scoach/list.wxss
  59. 1 1
      pages/sstudent/add.js
  60. 0 0
      pages/superAdmin/sstudent/add.json
  61. 0 0
      pages/superAdmin/sstudent/add.less
  62. 0 0
      pages/superAdmin/sstudent/add.wxml
  63. 0 0
      pages/superAdmin/sstudent/add.wxss
  64. 1 1
      pages/sstudent/list.js
  65. 0 0
      pages/superAdmin/sstudent/list.json
  66. 0 0
      pages/superAdmin/sstudent/list.less
  67. 2 2
      pages/sstudent/list.wxml
  68. 0 0
      pages/superAdmin/sstudent/list.wxss
  69. 1 1
      pages/suser/add.js
  70. 0 0
      pages/superAdmin/suser/add.json
  71. 0 0
      pages/superAdmin/suser/add.less
  72. 0 0
      pages/superAdmin/suser/add.wxml
  73. 0 0
      pages/superAdmin/suser/add.wxss
  74. 0 0
      pages/superAdmin/suser/bind.js
  75. 0 0
      pages/superAdmin/suser/bind.json
  76. 0 0
      pages/superAdmin/suser/bind.less
  77. 0 0
      pages/superAdmin/suser/bind.wxml
  78. 0 0
      pages/superAdmin/suser/bind.wxss
  79. 2 2
      pages/suser/list.js
  80. 0 0
      pages/superAdmin/suser/list.json
  81. 0 0
      pages/superAdmin/suser/list.less
  82. 0 0
      pages/superAdmin/suser/list.wxml
  83. 0 0
      pages/superAdmin/suser/list.wxss
  84. 2 2
      pages/system/adddictionary.js
  85. 0 0
      pages/superAdmin/system/adddictionary.json
  86. 0 0
      pages/superAdmin/system/adddictionary.less
  87. 0 0
      pages/superAdmin/system/adddictionary.wxml
  88. 0 0
      pages/superAdmin/system/adddictionary.wxss
  89. 2 2
      pages/system/dictionary.js
  90. 0 0
      pages/superAdmin/system/dictionary.json
  91. 0 0
      pages/superAdmin/system/dictionary.less
  92. 0 0
      pages/superAdmin/system/dictionary.wxml
  93. 0 0
      pages/superAdmin/system/dictionary.wxss
  94. 7 6
      utils/dict.js

+ 13 - 11
app.json

@@ -3,16 +3,19 @@
         "pages/index/index",
         "pages/register/index",
         "pages/school/index",
+        "pages/school/info",
         "pages/smy/index",
-        "pages/suser/list",
-        "pages/suser/add",
-        "pages/suser/bind",
-        "pages/sadmin/list",
-        "pages/sadmin/add",
-        "pages/scoach/list",
-        "pages/scoach/add",
-        "pages/sstudent/list",
-        "pages/sstudent/add",
+        "pages/superAdmin/suser/list",
+        "pages/superAdmin/suser/add",
+        "pages/superAdmin/suser/bind",
+        "pages/superAdmin/sadmin/list",
+        "pages/superAdmin/sadmin/add",
+        "pages/superAdmin/scoach/list",
+        "pages/superAdmin/scoach/add",
+        "pages/superAdmin/sstudent/list",
+        "pages/superAdmin/sstudent/add",
+        "pages/superAdmin/system/dictionary",
+        "pages/superAdmin/system/adddictionary",
         "pages/club/index",
         "pages/match/index",
         "pages/other/agree",
@@ -20,8 +23,6 @@
         "pages/test/index",
         "pages/logs/logs",
         "pages/user/basic",
-        "pages/system/dictionary",
-        "pages/system/adddictionary",
         "pages/setting/basic",
         "pages/setting/contact",
         "pages/soneschool/list",
@@ -37,6 +38,7 @@
         "pages/sonestustat/list",
         "pages/sonecoachstat/list",
         "pages/sthrfiles/list",
+        "pages/sthrcoach/list",
         "pages/sthrschool/list",
         "pages/sthropen/list",
         "pages/sthrprivate/list",

+ 2 - 0
app.wxss

@@ -31,6 +31,8 @@ page {
     /* 底部菜单背景颜色 */
     --footColor: #f1f1f1;
     /* 字体大小 */
+    --font20Szie: 20px;
+    --font19Szie: 19px;
     --font18Szie: 18px;
     --font17Size: 17px;
     --font16Size: 16px;

+ 3 - 2
pages/index/index.wxml

@@ -3,9 +3,10 @@
         <view class="one">
             <view>系统首页</view>
             <view>
-                <button type="primary" size="mini" bindtap="toCommon" data-route="register/index">去注册</button>
-                <button type="primary" size="mini" bindtap="toCommon" data-route="school/index">系统首页</button>
+                <!-- <button type="primary" size="mini" bindtap="toCommon" data-route="register/index">去注册</button> -->
+                <!-- <button type="primary" size="mini" bindtap="toCommon" data-route="school/index">系统首页</button> -->
                 <!-- <button type="primary" size="mini" bindtap="toCommon" data-route="test/index">组件页面</button> -->
+                <!-- <button type="primary" size="mini" bindtap="toCommon" data-route="login/index">去登陆</button> -->
             </view>
         </view>
     </view>

+ 12 - 0
pages/register/index.js

@@ -71,6 +71,18 @@ Page({
 
         }
     },
+    // 游客登录
+    touristSubmit: async function () {
+        let wxInfo = app.globalData.wxInfo;
+        let params = { openid: wxInfo.openid, type: '10', name: '游客' };
+        const arr = await app.$post('/user', params)
+        if (arr.errcode == '0') {
+            wx.showToast({ title: `游客注册成功`, icon: 'success', duration: 2000 });
+            wx.redirectTo({ url: '/pages/index/index' });
+        } else {
+            wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+        }
+    },
     /**
      * 生命周期函数--监听页面加载
      */

+ 1 - 1
pages/register/index.wxml

@@ -30,7 +30,7 @@
                 </view>
                 <view class="btn">
                     <button type="primary" size="mini" formType="submit">提交注册</button>
-                    <button type="warn" size="mini">游客登录</button>
+                    <button type="warn" size="mini" bindtap="touristSubmit">游客登录</button>
                 </view>
                 <view class="agree">
                     <label>

+ 35 - 1
pages/school/index.js

@@ -2,7 +2,12 @@ const app = getApp()
 Page({
     data: {
         frameStyle: { useTop: true, name: '羽校', leftArrow: false, useBar: true },
-        user: {}
+        user: {},
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
     },
     // 跳转菜单
     tabPath(e) {
@@ -11,8 +16,31 @@ Page({
     },
     // 进入系统
     toJoin: function () {
+        that.setData({ skip: 0, page: 0, list: [] })
         wx.navigateTo({ url: `/pages/smy/index` })
     },
+    // 查看详情
+    toView: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        that.setData({ skip: 0, page: 0, list: [] })
+        wx.navigateTo({ url: `/pages/school/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 }) }
+    },
     /**
      * 生命周期函数--监听页面加载
      */
@@ -36,6 +64,12 @@ Page({
             key: 'user',
             success: async res => {
                 that.setData({ user: res.data })
+                let info = { skip: that.data.skip, limit: that.data.limit };
+                const arr = await app.$get(`/school`, { ...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' })

+ 80 - 1
pages/school/index.less

@@ -7,6 +7,7 @@
         flex-direction: row;
         padding: 2vw;
         border-bottom: 1px solid var(--f1Color);
+        margin: 0 0 2vw 0;
 
         .one_1 {
             flex-grow: 1;
@@ -30,6 +31,84 @@
     }
 
     .two {
-        background-color: #ffffff;
+        position: relative;
+        flex-grow: 1;
+        background-color: var(--whiteColor);
+        padding: 0 2vw;
+
+        .list {
+            background-color: var(--f9Color);
+            margin: 0 0 2vw 0;
+            padding: 2vw;
+            margin: 0 2vw 2vw 2vw;
+            border-radius: 5px;
+
+            .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);
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
     }
 }

+ 23 - 1
pages/school/index.wxml

@@ -9,7 +9,29 @@
             </view>
         </view>
         <view class="two">
-            学校
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{list}}" wx:key="item" wx:for-item="item" wx:for-index="index" bindtap="toView" data-item="{{item}}">
+                        <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>
+                                        <image class="image" src="{{tag.url}}"></image>
+                                    </swiper-item>
+                                </block>
+                            </swiper>
+                        </view>
+                        <view class="list_2">
+                            <view class="name">{{item.name}}</view>
+                            <view class="address">{{item.address}}</view>
+                            <view class="other">
+                                <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>
+            </scroll-view>
         </view>
     </view>
 </mobile-main>

+ 68 - 1
pages/school/index.wxss

@@ -7,6 +7,7 @@
   flex-direction: row;
   padding: 2vw;
   border-bottom: 1px solid var(--f1Color);
+  margin: 0 0 2vw 0;
 }
 .main .one .one_1 {
   flex-grow: 1;
@@ -25,5 +26,71 @@
   font-size: var(--font14Size);
 }
 .main .two {
-  background-color: #ffffff;
+  position: relative;
+  flex-grow: 1;
+  background-color: var(--whiteColor);
+  padding: 0 2vw;
+}
+.main .two .list {
+  background-color: var(--f9Color);
+  margin: 0 0 2vw 0;
+  padding: 2vw;
+  margin: 0 2vw 2vw 2vw;
+  border-radius: 5px;
+}
+.main .two .list .list_1 .swiper {
+  height: 30vh;
+}
+.main .two .list .list_1 .image {
+  width: 100%;
+  height: 100%;
+}
+.main .two .list .list_2 {
+  position: absolute;
+  top: 2vw;
+  width: 92vw;
+  color: var(--whiteColor);
+}
+.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 .other {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  font-size: var(--font18Szie);
+  -webkit-text-stroke: 1px var(--blueColor);
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
 }

+ 100 - 0
pages/school/info.js

@@ -0,0 +1,100 @@
+const app = getApp()
+Page({
+    data: {
+        frameStyle: { useTop: true, name: '羽校信息', leftArrow: true, useBar: false },
+        user: {},
+        id: '',
+        form: {},
+        // 选中
+        tabs: {
+            active: '0',
+            menu: [
+                { title: '账号管理1', active: '0' },
+                { title: '信息管理2', active: '1' },
+                { title: '哈哈管理3', active: '2' },
+            ]
+        }
+    },
+    // 跳转菜单
+    back(e) {
+        wx.navigateBack({ delta: 1 })
+    },
+    // 选项卡选择
+    tabsChange: function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        that.setData({ 'tabs.active': item.active })
+    },
+
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    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/school/info.json

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

+ 27 - 0
pages/school/info.less

@@ -0,0 +1,27 @@
+.main {
+    background-color: var(--mainColor);
+
+    .one {
+        background-color: #ff0000;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-around;
+        width: 100vw;
+
+        .list {
+            width: 20vw;
+            text-align: center;
+            border-bottom: 1px solid #00ffff;
+
+            .list_1 {
+                padding: 3vw 0;
+                font-size: 16px;
+
+            }
+        }
+    }
+
+    .two {
+        background-color: #0000ff;
+    }
+}

+ 14 - 0
pages/school/info.wxml

@@ -0,0 +1,14 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+    <view slot="info" class="container main">
+        <view class="one">
+                <view class="list" wx:for="{{tabs.menu}}" wx:key="item" wx:for-item="item" wx:for-index="index" bindtap="tabsChange" data-item="{{item}}">
+                    <view class="list_1"><text>{{item.title}}</text></view>
+                </view>
+        </view>
+        <view class="two">
+            <view wx:if="{{tabs.active=='0'}}">第一</view>
+            <view wx:elif="{{tabs.active=='1'}}">第二</view>
+            <view wx:elif="{{tabs.active=='2'}}">第三</view>
+        </view>
+    </view>
+</mobile-main>

+ 22 - 0
pages/school/info.wxss

@@ -0,0 +1,22 @@
+.main {
+  background-color: var(--mainColor);
+}
+.main .one {
+  background-color: #ff0000;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  width: 100vw;
+}
+.main .one .list {
+  width: 20vw;
+  text-align: center;
+  border-bottom: 1px solid #00ffff;
+}
+.main .one .list .list_1 {
+  padding: 3vw 0;
+  font-size: 16px;
+}
+.main .two {
+  background-color: #0000ff;
+}

+ 4 - 0
pages/setting/basic.js

@@ -43,6 +43,10 @@ Page({
             that.setData({ 'form.zhGender': data.label })
         }
     },
+    typeChange: function (e) {
+        const { value } = e.detail;
+        if (value == '0') wx.showToast({ title: `如进行身份切换,请在维护信息成功后退出登录,系统会自动进行身份置换!`, icon: 'none', duration: 2000 })
+    },
     // 提交登录
     onSubmit: async function (e) {
         const that = this;

+ 13 - 0
pages/setting/basic.wxml

@@ -28,6 +28,19 @@
                         <input name="phone" value="{{form.phone}}" placeholder="请输入手机号" />
                     </view>
                 </view>
+                <view class="content" wx:if="{{form.type=='10'}}">
+                    <view class="label">是否成为正式用户:</view>
+                    <view class="value">
+                        <radio-group name="type" bindchange="typeChange">
+                            <label>
+                                <radio value="10" checked="{{form.type=='10'}}" />否
+                            </label>
+                            <label>
+                                <radio value="0" checked="{{form.type=='0'}}" />是
+                            </label>
+                        </radio-group>
+                    </view>
+                </view>
                 <view class="btn">
                     <button type="primary" size="mini" formType="submit">提交保存</button>
                 </view>

+ 123 - 0
pages/sthrcoach/list.js

@@ -0,0 +1,123 @@
+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 })
+    },
+    // 分页
+    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: function (options) {
+    },
+    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 => {
+                let info = { skip: that.data.skip, limit: that.data.limit, student_id: res.data._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;
+                    }
+                    // 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: function () { },
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+        const that = this;
+        // 监听用户是否登录
+        that.watchLogin();
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 6 - 0
pages/sthrcoach/list.json

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

+ 101 - 0
pages/sthrcoach/list.less

@@ -0,0 +1,101 @@
+.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 {
+                    background: -webkit-linear-gradient(right, lightblue, rgb(83, 201, 248));
+                }
+            }
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 31 - 0
pages/sthrcoach/list.wxml

@@ -0,0 +1,31 @@
+<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.icon&&item.icon.length>0?item.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="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>
+                                <view class="txt textOver"><text>教练等级:</text><text>{{item.zhLevel||'暂无'}}</text></view>
+                                <view class="txt textOver"><text>所获荣誉:</text><text>{{item.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>

+ 84 - 0
pages/sthrcoach/list.wxss

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

+ 116 - 12
pages/sthrfiles/list.js

@@ -1,42 +1,139 @@
 const app = getApp()
+import WxValidate from '../../utils/wxValidate';
 Page({
     data: {
-        frameStyle: { useTop: true, name: '个人档案', leftArrow: true, useBar: false },
+        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(e) {
+    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: function (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 => { },
+            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' })
+                wx.redirectTo({ url: '/pages/index/index' })
             }
         })
     },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */
-    onReady: function () { },
+    onReady: function () {
+
+    },
+
     /**
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-        const that = this;
-        // 监听用户是否登录
-        that.watchLogin();
+
     },
-    /**
-     * 页面上拉触底事件的处理函数
-     */
+
     /**
      * 生命周期函数--监听页面隐藏
      */
@@ -58,6 +155,13 @@ Page({
 
     },
 
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
     /**
      * 用户点击右上角分享
      */

+ 6 - 5
pages/sthrfiles/list.json

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

+ 32 - 1
pages/sthrfiles/list.less

@@ -1,4 +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;
+            }
+        }
+    }
+}

+ 66 - 1
pages/sthrfiles/list.wxml

@@ -1,5 +1,70 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        1
+        <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>

+ 25 - 0
pages/sthrfiles/list.wxss

@@ -1,3 +1,28 @@
 .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;
+}

+ 47 - 3
pages/sthropen/list.js

@@ -2,23 +2,67 @@ const app = getApp()
 Page({
     data: {
         frameStyle: { useTop: true, name: '公开课信息', leftArrow: true, useBar: false },
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+        //类型
+        typeList: [],
+        //状态
+        statusList: []
     },
     // 返回
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) { },
+    onLoad: function (options) {
+    },
     // 监听用户是否登录
     watchLogin: async function () {
         const that = this;
+        let typeList = that.data.typeList;
+        let statusList = that.data.statusList;
         wx.getStorage({
             key: 'user',
-            success: async res => { },
+            success: async res => {
+                let info = { skip: that.data.skip, limit: that.data.limit, type: '1' };
+                let arr = await app.$get(`/lesson`, { ...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 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 })
+                } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
             fail: async res => {
-                // wx.redirectTo({ url: '/pages/index/index' })
+                wx.redirectTo({ url: '/pages/index/index' })
             }
         })
     },

+ 78 - 1
pages/sthropen/list.less

@@ -1,4 +1,81 @@
 .main {
-    background-color: var(--mainColor);
+    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 {
+                .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 {
+                    background: -webkit-linear-gradient(right, lightblue, rgb(83, 201, 248));
+                }
+            }
+        }
+    }
 }
 
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 24 - 1
pages/sthropen/list.wxml

@@ -1,5 +1,28 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        1
+        <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">
+                            <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>
+                        </view>
+                        <view class="btn">
+                            <button size="mini" type="primary" bindtap="toView" data-item="{{item}}">详细信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
     </view>
 </mobile-main>

+ 64 - 0
pages/sthropen/list.wxss

@@ -1,3 +1,67 @@
 .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 .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 {
+  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;
+}

+ 47 - 3
pages/sthrprivate/list.js

@@ -2,23 +2,67 @@ const app = getApp()
 Page({
     data: {
         frameStyle: { useTop: true, name: '私教课信息', leftArrow: true, useBar: false },
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
+        //类型
+        typeList: [],
+        //状态
+        statusList: []
     },
     // 返回
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) { },
+    onLoad: function (options) {
+    },
     // 监听用户是否登录
     watchLogin: async function () {
         const that = this;
+        let typeList = that.data.typeList;
+        let statusList = that.data.statusList;
         wx.getStorage({
             key: 'user',
-            success: async res => { },
+            success: async res => {
+                let info = { skip: that.data.skip, limit: that.data.limit, type: '1' };
+                let arr = await app.$get(`/lesson`, { ...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 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 })
+                } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
             fail: async res => {
-                // wx.redirectTo({ url: '/pages/index/index' })
+                wx.redirectTo({ url: '/pages/index/index' })
             }
         })
     },

+ 78 - 1
pages/sthrprivate/list.less

@@ -1,4 +1,81 @@
 .main {
-    background-color: var(--mainColor);
+    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 {
+                .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 {
+                    background: -webkit-linear-gradient(right, lightblue, rgb(83, 201, 248));
+                }
+            }
+        }
+    }
 }
 
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 24 - 1
pages/sthrprivate/list.wxml

@@ -1,5 +1,28 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        1
+        <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">
+                            <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>
+                        </view>
+                        <view class="btn">
+                            <button size="mini" type="primary" bindtap="toView" data-item="{{item}}">详细信息</button>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
     </view>
 </mobile-main>

+ 64 - 0
pages/sthrprivate/list.wxss

@@ -1,3 +1,67 @@
 .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 .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 {
+  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;
+}

+ 33 - 3
pages/sthrschool/list.js

@@ -2,23 +2,53 @@ const app = getApp()
 Page({
     data: {
         frameStyle: { useTop: true, name: '羽校信息', leftArrow: true, useBar: false },
+        list: [],
+        total: 0,
+        page: 0,
+        skip: 0,
+        limit: 5,
     },
     // 返回
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
+    // 分页
+    toPage: function () {
+        const that = this;
+        let list = that.data.list;
+        let limit = that.data.limit;
+        if (that.data.total > list.length) {
+            wx.showLoading({ title: '加载中', mask: true })
+            let page = that.data.page + 1;
+            that.setData({ page: page })
+            let skip = page * limit;
+            that.setData({ skip: skip })
+            that.watchLogin();
+            wx.hideLoading()
+        } else { wx.showToast({ title: '没有更多数据了', icon: 'none', duration: 2000 }) }
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) { },
+    onLoad: function (options) {
+    },
     // 监听用户是否登录
     watchLogin: async function () {
         const that = this;
         wx.getStorage({
             key: 'user',
-            success: async res => { },
+            success: async res => {
+                let info = { skip: that.data.skip, limit: that.data.limit, student_id: res.data._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 })
+                } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }
+            },
             fail: async res => {
-                // wx.redirectTo({ url: '/pages/index/index' })
+                wx.redirectTo({ url: '/pages/index/index' })
             }
         })
     },

+ 98 - 1
pages/sthrschool/list.less

@@ -1,4 +1,101 @@
 .main {
-    background-color: var(--mainColor);
+    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 {
+                    background: -webkit-linear-gradient(right, lightblue, rgb(83, 201, 248));
+                }
+            }
+        }
+    }
 }
 
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 27 - 1
pages/sthrschool/list.wxml

@@ -1,5 +1,31 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        1
+        <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.img_url&&item.img_url.length>0?item.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="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>
+                                <view class="txt textOver"><text>训练地址:</text><text>{{item.address||'暂无'}}</text></view>
+                                <view class="txt textOver"><text>羽校简介:</text><text>{{item.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>

+ 81 - 0
pages/sthrschool/list.wxss

@@ -1,3 +1,84 @@
 .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 {
+  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;
+}

+ 1 - 1
pages/sadmin/add.js

@@ -1,5 +1,5 @@
 const app = getApp()
-import WxValidate from '../../utils/wxValidate'
+import WxValidate from '../../../utils/wxValidate'
 Page({
 
     /**

pages/sadmin/add.json → pages/superAdmin/sadmin/add.json


pages/sadmin/add.less → pages/superAdmin/sadmin/add.less


pages/sadmin/add.wxml → pages/superAdmin/sadmin/add.wxml


pages/sadmin/add.wxss → pages/superAdmin/sadmin/add.wxss


+ 3 - 3
pages/sadmin/list.js

@@ -1,5 +1,5 @@
 const app = getApp()
-import QRCode from '../../utils/weapp-qrcode.js';
+import QRCode from '../../../utils/weapp-qrcode.js';
 Page({
 
     /**
@@ -24,14 +24,14 @@ Page({
     toAdd() {
         const that = this;
         that.setData({ skip: 0, page: 0, list: [] })
-        wx.navigateTo({ url: '/pages/sadmin/add' })
+        wx.navigateTo({ url: '/pages/superAdmin/sadmin/add' })
     },
     // 修改
     toEdit: function (e) {
         const that = this;
         let { item } = e.currentTarget.dataset;
         that.setData({ skip: 0, page: 0, list: [] })
-        wx.navigateTo({ url: `/pages/sadmin/add?id=${item.id}` })
+        wx.navigateTo({ url: `/pages/superAdmin/sadmin/add?id=${item.id}` })
     },
     // 删除
     toDel: async function (e) {

pages/sadmin/list.json → pages/superAdmin/sadmin/list.json


pages/sadmin/list.less → pages/superAdmin/sadmin/list.less


pages/sadmin/list.wxml → pages/superAdmin/sadmin/list.wxml


pages/sadmin/list.wxss → pages/superAdmin/sadmin/list.wxss


+ 1 - 1
pages/scoach/add.js

@@ -1,5 +1,5 @@
 const app = getApp()
-import WxValidate from '../../utils/wxValidate'
+import WxValidate from '../../../utils/wxValidate'
 
 Page({
 

pages/scoach/add.json → pages/superAdmin/scoach/add.json


pages/scoach/add.less → pages/superAdmin/scoach/add.less


pages/scoach/add.wxml → pages/superAdmin/scoach/add.wxml


pages/scoach/add.wxss → pages/superAdmin/scoach/add.wxss


+ 3 - 3
pages/scoach/list.js

@@ -1,5 +1,5 @@
 const app = getApp()
-import QRCode from '../../utils/weapp-qrcode.js';
+import QRCode from '../../../utils/weapp-qrcode.js';
 Page({
 
     /**
@@ -26,14 +26,14 @@ Page({
     toAdd() {
         const that = this;
         that.setData({ skip: 0, page: 0, list: [] })
-        wx.navigateTo({ url: '/pages/scoach/add' })
+        wx.navigateTo({ url: '/pages/superAdmin/scoach/add' })
     },
     // 修改
     toEdit: function (e) {
         const that = this;
         let { item } = e.currentTarget.dataset;
         that.setData({ skip: 0, page: 0, list: [] })
-        wx.navigateTo({ url: `/pages/scoach/add?id=${item.id}` })
+        wx.navigateTo({ url: `/pages/superAdmin/scoach/add?id=${item.id}` })
     },
     // 删除
     toDel: async function (e) {

pages/scoach/list.json → pages/superAdmin/scoach/list.json


pages/scoach/list.less → pages/superAdmin/scoach/list.less


pages/scoach/list.wxml → pages/superAdmin/scoach/list.wxml


pages/scoach/list.wxss → pages/superAdmin/scoach/list.wxss


+ 1 - 1
pages/sstudent/add.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/sstudent/add.json → pages/superAdmin/sstudent/add.json


pages/sstudent/add.less → pages/superAdmin/sstudent/add.less


pages/sstudent/add.wxml → pages/superAdmin/sstudent/add.wxml


pages/sstudent/add.wxss → pages/superAdmin/sstudent/add.wxss


+ 1 - 1
pages/sstudent/list.js

@@ -1,5 +1,5 @@
 const app = getApp()
-import QRCode from '../../utils/weapp-qrcode.js';
+import QRCode from '../../../utils/weapp-qrcode.js';
 Page({
 
     /**

pages/sstudent/list.json → pages/superAdmin/sstudent/list.json


pages/sstudent/list.less → pages/superAdmin/sstudent/list.less


+ 2 - 2
pages/sstudent/list.wxml

@@ -5,7 +5,7 @@
                 <input type="text" placeholder="请输入关键词" />
             </view>
             <view class="one_2">
-                <button type="primary" bindtap="toCommon" data-route="sstudent/add">添加</button>
+                <button type="primary" bindtap="toCommon" data-route="superAdmin/sstudent/add">添加</button>
             </view>
         </view>
         <view class="two">
@@ -23,7 +23,7 @@
                             </view>
                         </view>
                         <view class="btn">
-                            <button size="mini" type="primary" bindtap="toCommon" data-route="sstudent/add" data-item="{{item}}">信息维护</button>
+                            <button size="mini" type="primary" bindtap="toCommon" data-route="superAdmin/sstudent/add" data-item="{{item}}">信息维护</button>
                             <button size="mini" type="primary" bindtap="toBind" data-item="{{item}}">账号绑定</button>
                             <button size="mini" type="primary" bindtap="toDel" data-item="{{item}}">信息删除</button>
                         </view>

pages/sstudent/list.wxss → pages/superAdmin/sstudent/list.wxss


+ 1 - 1
pages/suser/add.js

@@ -1,5 +1,5 @@
 const app = getApp()
-import WxValidate from '../../utils/wxValidate'
+import WxValidate from '../../../utils/wxValidate'
 Page({
 
     /**

pages/suser/add.json → pages/superAdmin/suser/add.json


pages/suser/add.less → pages/superAdmin/suser/add.less


pages/suser/add.wxml → pages/superAdmin/suser/add.wxml


pages/suser/add.wxss → pages/superAdmin/suser/add.wxss


pages/suser/bind.js → pages/superAdmin/suser/bind.js


pages/suser/bind.json → pages/superAdmin/suser/bind.json


pages/suser/bind.less → pages/superAdmin/suser/bind.less


pages/suser/bind.wxml → pages/superAdmin/suser/bind.wxml


pages/suser/bind.wxss → pages/superAdmin/suser/bind.wxss


+ 2 - 2
pages/suser/list.js

@@ -20,14 +20,14 @@ Page({
     // 信息添加
     toAdd: function () {
         that.setData({ skip: 0, page: 0, list: [] })
-        wx.navigateTo({ url: `/pages/suser/add` })
+        wx.navigateTo({ url: `/pages/superAdmin/suser/add` })
     },
     // 信息维护
     toEdit: function (e) {
         const that = this;
         const { item } = e.currentTarget.dataset;
         that.setData({ skip: 0, page: 0, list: [] })
-        wx.navigateTo({ url: `/pages/suser/add?id=${item.id}` })
+        wx.navigateTo({ url: `/pages/superAdmin/suser/add?id=${item.id}` })
     },
     // 信息删除
     toDel: async function (e) {

pages/suser/list.json → pages/superAdmin/suser/list.json


pages/suser/list.less → pages/superAdmin/suser/list.less


pages/suser/list.wxml → pages/superAdmin/suser/list.wxml


pages/suser/list.wxss → pages/superAdmin/suser/list.wxss


+ 2 - 2
pages/system/adddictionary.js

@@ -1,6 +1,6 @@
 const app = getApp()
-import WxValidate from '../../utils/wxValidate'
-const moment = require("../../utils/moment.min")
+import WxValidate from '../../../utils/wxValidate'
+const moment = require("../../../utils/moment.min")
 Page({
 
     /**

pages/system/adddictionary.json → pages/superAdmin/system/adddictionary.json


pages/system/adddictionary.less → pages/superAdmin/system/adddictionary.less


pages/system/adddictionary.wxml → pages/superAdmin/system/adddictionary.wxml


pages/system/adddictionary.wxss → pages/superAdmin/system/adddictionary.wxss


+ 2 - 2
pages/system/dictionary.js

@@ -20,14 +20,14 @@ Page({
     toAdd: function () {
         const that = this;
         that.setData({ skip: 0, page: 0, list: [] })
-        wx.navigateTo({ url: `/pages/system/adddictionary` })
+        wx.navigateTo({ url: `/pages/superAdmin/system/adddictionary` })
     },
     // 信息维护
     toEdit: function (e) {
         const that = this;
         const { item } = e.currentTarget.dataset;
         that.setData({ skip: 0, page: 0, list: [] })
-        wx.navigateTo({ url: `/pages/system/adddictionary?id=${item.id}` })
+        wx.navigateTo({ url: `/pages/superAdmin/system/adddictionary?id=${item.id}` })
     },
     // 信息删除
     toDel: async function (e) {

pages/system/dictionary.json → pages/superAdmin/system/dictionary.json


pages/system/dictionary.less → pages/superAdmin/system/dictionary.less


pages/system/dictionary.wxml → pages/superAdmin/system/dictionary.wxml


pages/system/dictionary.wxss → pages/superAdmin/system/dictionary.wxss


+ 7 - 6
utils/dict.js

@@ -26,17 +26,17 @@ export const school_menu = [
                 title: '用户管理',
                 icon: 'icon-yonghu',
                 btn: [
-                    { title: '账号管理', route: 'suser/list', icon: 'icon-putongyonghu' },
-                    { title: '羽校信息', route: 'sadmin/list', icon: 'icon-xitongguanli-yonghuchaxun' },
-                    { title: '教练信息', route: 'scoach/list', icon: 'icon-jiaolian1' },
-                    { title: '学员信息', route: 'sstudent/list', icon: 'icon-zaiduxueyuan' },
+                    { title: '账号管理', route: 'superAdmin/suser/list', icon: 'icon-putongyonghu' },
+                    { title: '羽校信息', route: 'superAdmin/sadmin/list', icon: 'icon-xitongguanli-yonghuchaxun' },
+                    { title: '教练信息', route: 'superAdmin/scoach/list', icon: 'icon-jiaolian1' },
+                    { title: '学员信息', route: 'superAdmin/sstudent/list', icon: 'icon-zaiduxueyuan' },
                 ]
             },
             {
                 title: '系统设置',
                 icon: 'icon-shouye',
                 btn: [
-                    { title: '字典表管理', route: 'system/dictionary', icon: 'icon-zidianbiaoguanli' },
+                    { title: '字典表管理', route: 'superAdmin/system/dictionary', icon: 'icon-zidianbiaoguanli' },
                 ]
             },
         ]
@@ -86,10 +86,11 @@ export const school_menu = [
         type: '3',
         menu: [
             {
-                title: '档案管理',
+                title: '信息管理',
                 icon: 'icon-yonghu',
                 btn: [
                     { title: '个人档案', route: 'sthrfiles/list', icon: 'icon-weibiaoti1' },
+                    { title: '教练信息', route: 'sthrcoach/list', icon: 'icon-weibiaoti1' },
                 ]
             },
             {