guhongwei 2 years ago
parent
commit
19874e90d0
4 changed files with 35 additions and 7 deletions
  1. 1 0
      pages/scoach/add.js
  2. 2 1
      pages/scoach/list.js
  3. 1 4
      pages/sstudent/list.js
  4. 31 2
      utils/dict.js

+ 1 - 0
pages/scoach/add.js

@@ -12,6 +12,7 @@ Page({
         form: { icon: [] },
         // 性别
         genderList: [],
+        // 等级列表
         levelList: [],
     },
     initValidate() {

+ 2 - 1
pages/scoach/list.js

@@ -8,11 +8,12 @@ Page({
     data: {
         frameStyle: { useTop: true, name: '教练信息', leftArrow: true, useBar: false },
         list: [],
-        levelList: [],
         total: 0,
         page: 0,
         skip: 0,
         limit: 5,
+        // 等级列表
+        levelList: [],
         // dialog弹框
         dialog: { title: '账号绑定', show: false, type: '1' },
         form: {}

+ 1 - 4
pages/sstudent/list.js

@@ -141,10 +141,7 @@ Page({
                 let info = { skip: that.data.skip, limit: that.data.limit };
                 let arr = await app.$get(`/student`, { ...info });
                 if (arr.errcode == '0') {
-                    for (const val of arr.data) {
-                        let level = levelList.find(i => i.value == val.level)
-                        if (level) val.zhLevel = level.label;
-                    }
+                    for (const val of arr.data) { let level = levelList.find(i => i.value == val.level); if (level) val.zhLevel = level.label; }
                     that.setData({ list: [...that.data.list, ...arr.data] })
                     that.setData({ total: arr.total })
                 } else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }) }

+ 31 - 2
utils/dict.js

@@ -5,7 +5,7 @@ export const system = [
     { title: '比赛管理', normal: '/image/tabs/match.png', active: '/image/tabs/match_1.png', route: 'pages/match/index', type: '0' },
 ]
 // 羽校系统菜单
-// -1: 管理员,0:普通用户,1:管理员,2:教练
+// -1: 管理员,0:普通用户,1:管理员,2:教练,3:学员,10:游客
 // 系统默认菜单
 export const school_sysmenu = [
     {
@@ -43,7 +43,36 @@ export const school_menu = [
     },
     {
         type: '0',
-        menu: []
+        menu: [
+            {
+                title: '档案管理',
+                icon: 'icon-yonghu',
+                btn: [
+                    { title: '个人档案', route: 's/list', icon: 'icon-putongyonghu' },
+                ]
+            },
+            {
+                title: '羽校管理',
+                icon: 'icon-yonghu',
+                btn: [
+                    { title: '羽校信息', route: 'suser/list', icon: 'icon-putongyonghu' },
+                ]
+            },
+            {
+                title: '课程管理',
+                icon: 'icon-yonghu',
+                btn: [
+                    { title: '课程信息', route: 'suser/list', icon: 'icon-putongyonghu' },
+                ]
+            },
+            {
+                title: '统计分析',
+                icon: 'icon-yonghu',
+                btn: [
+                    { title: '课程信息', route: 'suser/list', icon: 'icon-putongyonghu' },
+                ]
+            },
+        ]
     },
     {
         type: '1',