xiaoyuhao 5 yıl önce
işleme
edc9257dc7
100 değiştirilmiş dosya ile 1093 ekleme ve 0 silme
  1. 683 0
      app.js
  2. 64 0
      app.json
  3. 346 0
      app.wxss
  4. BIN
      assets/ajlogo.png
  5. BIN
      assets/arrow_gray_right.png
  6. BIN
      assets/bad_active.png
  7. BIN
      assets/bad_gray.png
  8. BIN
      assets/biao_qian_hong.png
  9. BIN
      assets/biao_qian_hui.png
  10. BIN
      assets/bu_pai.png
  11. BIN
      assets/bu_pai2.png
  12. BIN
      assets/bu_pi_gai.png
  13. BIN
      assets/bu_quan.png
  14. BIN
      assets/bu_quan2.png
  15. BIN
      assets/chong_min_ming.png
  16. BIN
      assets/class_one.png
  17. BIN
      assets/class_two.png
  18. BIN
      assets/cuo_ti.png
  19. BIN
      assets/dai_jie_da.png
  20. BIN
      assets/dao.png
  21. BIN
      assets/default_headicon.png
  22. BIN
      assets/default_headicon1.png
  23. BIN
      assets/default_headicon2.png
  24. BIN
      assets/default_headicon4.png
  25. BIN
      assets/delete.png
  26. BIN
      assets/delete_input.png
  27. BIN
      assets/deng_ji.png
  28. BIN
      assets/deng_lv_logo.png
  29. BIN
      assets/dian_dian.png
  30. BIN
      assets/goods.png
  31. BIN
      assets/gou.png
  32. BIN
      assets/gou_active.png
  33. BIN
      assets/gou_xuan.png
  34. BIN
      assets/guan.png
  35. BIN
      assets/guan_bi.png
  36. BIN
      assets/guan_bi_fu_wu.png
  37. BIN
      assets/hao_active.png
  38. BIN
      assets/hao_gray.png
  39. BIN
      assets/hei_gou_xuan.png
  40. BIN
      assets/hei_hua_ping.png
  41. BIN
      assets/hua_ping.png
  42. BIN
      assets/huan_ban_ji.png
  43. BIN
      assets/huang_guan.png
  44. BIN
      assets/hui_guan.png
  45. BIN
      assets/hui_xiao_shu.png
  46. BIN
      assets/icon_down.png
  47. BIN
      assets/icon_plus.png
  48. BIN
      assets/info.png
  49. BIN
      assets/jia_fa.png
  50. BIN
      assets/jia_hao.png
  51. BIN
      assets/jian_hao.png
  52. BIN
      assets/jian_tou.png
  53. BIN
      assets/jie_xi_deng.png
  54. BIN
      assets/jie_xi_zhong.png
  55. BIN
      assets/jin_ri_deng_ji.png
  56. BIN
      assets/jin_ri_zhuang_tai.png
  57. BIN
      assets/kai.png
  58. BIN
      assets/kai_ke_she_zhi.png
  59. BIN
      assets/lao_shi_liu_yan.png
  60. BIN
      assets/lao_shu_ping_yu.png
  61. BIN
      assets/liu_yan.png
  62. BIN
      assets/me_gray.png
  63. BIN
      assets/me_green.png
  64. BIN
      assets/mo_hu.png
  65. BIN
      assets/mo_hu2.png
  66. BIN
      assets/my_bg.png
  67. BIN
      assets/nan_ti.png
  68. BIN
      assets/nan_ti_jie_xi.png
  69. BIN
      assets/nan_ti_logo.png
  70. BIN
      assets/no_search.png
  71. BIN
      assets/pai_hang_bang.png
  72. BIN
      assets/pencil.png
  73. BIN
      assets/person_add.png
  74. BIN
      assets/ping_ban.png
  75. BIN
      assets/ranking_one.png
  76. BIN
      assets/ranking_three.png
  77. BIN
      assets/ranking_two.png
  78. BIN
      assets/red_jian_tou.png
  79. BIN
      assets/right_code.png
  80. BIN
      assets/right_zy7@2x.png
  81. BIN
      assets/search.png
  82. BIN
      assets/select_off.png
  83. BIN
      assets/select_on.png
  84. BIN
      assets/shanchu.png
  85. BIN
      assets/shang_chuan_ji_lu.png
  86. BIN
      assets/shen_he_zhong.png
  87. BIN
      assets/shi_yong_ji_lv.png
  88. BIN
      assets/shou_ye001.png
  89. BIN
      assets/shu_xue.png
  90. BIN
      assets/shuxue.png
  91. BIN
      assets/shuxue4.0.png
  92. BIN
      assets/student_gray.png
  93. BIN
      assets/student_green.png
  94. BIN
      assets/task_gray.png
  95. BIN
      assets/task_green.png
  96. BIN
      assets/task_logo.png
  97. BIN
      assets/task_nodata.png
  98. BIN
      assets/tian_jia_hai_zi.png
  99. BIN
      assets/wang_qi_ji_lu.png
  100. 0 0
      assets/we_tong_guo.png

+ 683 - 0
app.js

@@ -0,0 +1,683 @@
+//app.js
+import { systemInfo, routers, isFn, formatUrl, getGlobalVal, getWxUserInfoSetting, getUpdateManager } from './utils/util.js'
+import { WxLogin, FirstWxLogin, CheckStatus } from './utils/api.js'
+const { reLaunch, redirectTo } = routers()
+const sys = wx.getSystemInfoSync()
+App({
+  onLaunch: function (options) {
+    this.globalData.options = options
+    getUpdateManager()
+    wx.getSystemInfo({
+      success: e => {
+        this.globalData.statusBar = e.statusBarHeight; //状态栏高度
+        let custom = wx.getMenuButtonBoundingClientRect();//菜单按钮
+        this.globalData.custom = custom;
+        this.globalData.customBar = custom.bottom + custom.top - e.statusBarHeight;
+        //计算得到定义的状态栏高度
+      }
+    })
+  },
+
+  onShow: function (options) {
+    this.globalData.options = options
+  },
+
+  onHide: function (e) {
+
+  },
+
+  onError: function (e) {
+    wx.showToast({
+      title: '程序执行失败',
+      icon: 'none'
+    })
+  },
+
+  onPageNotFound: function (e) {
+    wx.showToast({
+      title: '没有找到页面',
+      icon: 'none'
+    })
+    setTimeout(() => {
+      redirectTo({ url: 'pages/index/index' })
+    }, 2000)
+  },
+
+  /**
+   * 初始化 
+   */
+  init: function () {
+    // this.reLaunchCtl({ url: 'onetoone_feedback' }, true)
+    // return
+    // this.login()
+    const userInfo = getGlobalVal('userInfo')
+    getWxUserInfoSetting((type, res) => {
+      if (type != 1 || !userInfo) {
+        redirectTo({ url: 'pages/main/main' })
+        return
+      }
+      this.globalData.userInfo = userInfo
+      wx.checkSession({
+        success: res => {
+          this.globalData.accessToken = getGlobalVal('accessToken')
+          this.globalData.identityList = getGlobalVal('identityList')
+          this.permissionsJumpFn()
+        },
+        fail: res => {
+          this.login()
+        }
+      })
+    })
+  },
+
+  /**
+   * 获取微信code 
+   */
+  getWxloginCode: function (cb) {
+    wx.login({
+      success: res => {
+        if (isFn(cb)) cb(res.code)
+      },
+      fail: res => {
+        wx.showToast({
+          title: '获取微信code失败',
+          icon: 'none'
+        })
+      }
+    })
+  },
+
+  /**
+   * 普通登录
+   */
+  login: function () {
+    const { appType } = this.globalData
+    this.getWxloginCode(code => {
+      WxLogin({ data: { code, appType } }).then(this.handleLogin).catch(e => {
+        if (e.data.code == '888') {
+          redirectTo({ url: 'pages/wx_authority/wx_authority' })
+        }
+      })
+    })
+  },
+  
+  /**
+   * 接收登录返回信息
+   */
+  handleLogin: function (res) {
+    const { postData, continuousFn } = this.globalData
+    
+    const { accessToken, list = [] } = res.data
+
+    // 判断并缓存token
+    if (accessToken) {
+      this.globalData.accessToken = accessToken
+      wx.setStorageSync('accessToken', accessToken)
+    }
+    this.permissionsJumpFn()
+    // 判断并缓存userId
+    // if (userId) {
+    //   this.globalData.userId = userId
+    //   wx.setStorageSync('userId', userId)
+    // }
+
+    // 判断该用户下用户身份和对应身份下的权限列表
+    // if (list.length > 0) {
+    //   const identityList = wx.getStorageSync('identityList')
+    //   if (identityList.length != list.length || JSON.stringify(identityList) !== JSON.stringify(list)) {
+    //     wx.setStorageSync('currentIdentity', 0)
+    //     // wx.setStorageSync('hasBubbleCache', 0)
+    //     wx.setStorageSync('hasLectureNotesCache', 0)
+    //   }
+    //   this.globalData.identityList = list
+    //   wx.setStorageSync('identityList', list)
+
+    //   // 判断是否报登录失效后,接着记录事件继续做用户交互
+    //   if (continuousFn) {
+    //     const { fn, param } = continuousFn
+    //     fn(...param)
+    //     this.globalData.continuousFn = null
+    //     return
+    //   } 
+    //   if (postData) {
+    //     const { fn, param } = postData
+    //     fn(...param)
+    //     this.globalData.postData = null
+    //     return
+    //   } 
+      
+    // } else {
+    //   wx.showToast({
+    //     title: '无任何身份',
+    //     icon: 'none'
+    //   })
+    // }
+  },
+
+  /**
+   * 跳转判断权限控制层
+   */
+  permissionsJumpFn: function () {
+    const res = this.getGlobalAttributeValue('identityList');
+    console.log(res)
+    const currentIdentity = this.getGlobalAttributeValue('currentIdentity') || -1
+    console.log(currentIdentity);
+    // if (res.length > 1) {
+      // if (currentIdentity < 0) {
+      //   this.redirectCtl && this.redirectCtl({ url: 'selectpermissions', method: { identityList: JSON.stringify(res) } }, true)
+      // } else {
+        // this.selectPermissions(res[currentIdentity - 1])
+      // }
+    // } else {
+      this.selectPermissions(res[0])
+    // }
+  },
+
+  /**
+   * 选择权限
+   */
+  selectPermissions: function (obj) {
+    const { tempOptions, options } = this.globalData
+    const { query = {}, scene, path } = options || tempOptions
+    let url = ''
+    this.checkStatus()
+    // if (query && query.type > 1) {
+    //   url = path ? path.split('/')[1] : 'pages/task/task'
+    // } else {
+    //   // if (permissions['isMaster']) {
+    //   //   url = 'pages/course/course'
+    //   // } else {
+    //     url = 'pages/task/task'
+    //   // }
+    // }
+    // const paras = { ...query,url, scene }
+    // console.log(this.globalData)
+    // console.log(paras)
+    // if (isFn(reLaunch)) reLaunch({ url, paras})
+    this.globalData.options = tempOptions
+  },
+
+  /**
+   * 保存微信用户数据
+   * */
+  saveUserInfo: function (res, code) {
+    const { appType } = this.globalData
+    const { encryptedData, iv, signature, userInfo } = res
+    const user = Object.assign(userInfo, { encryptedData, iv, signature })
+    FirstWxLogin({ data: { code, appType, ...user } }).then(res => {
+      this.globalData.userInfo = user
+      wx.setStorageSync('userInfo', user)
+      this.handleLogin(res)
+    })
+  },
+  /**
+   * 审核结果
+   * */
+  checkStatus:function(){
+    CheckStatus({ data: {} }).then(res => {
+      const { curatorName, status, auditFailureReason,phone} = res.data
+      if (status == 1) {
+        this.redirectCtl({ url: 'register', method: { curatorName,phone} }, true)
+      } else if (status == 2) {
+        this.redirectCtl({ url: 'check_status', method: { isCheck: 1, curatorName,phone} }, true)
+      } else if (status == 3) {
+        this.redirectCtl({ url: 'check_status', method: { isCheck: 2, auditFailureReason: JSON.stringify(auditFailureReason), curatorName,phone} }, true)
+      } else if (status == 4) {
+        // this.redirectCtl({ url: 'register', method: { curatorName } }, true)
+        if (!phone) {
+          this.redirectCtl({ url: 'register', method: { isPhone:1,phone} }, true)
+        } else{
+          this.redirectCtl({ url: 'main', method: {} }, true)
+        }
+      }
+    })
+  },
+  /**
+   * 获取微信定位授权
+   */
+  getWxLocationSetting: function (cb) {
+    this.wxSetting({ scope: 'scope.userLocation', text: '微信定位授权' }).then((res) => {
+      wx.setStorageSync('hasPosition', 1)
+      if (typeof cb === 'function') {
+        cb(res)
+      }
+    }).catch((res) => {
+      wx.setStorageSync('hasPosition', 0)
+      wx.showToast({
+        title: res.text,
+        icon: 'none'
+      })
+      setTimeout(() => {
+        wx.navigateBack({
+          delta: 1
+        })
+      }, 1200)
+    })
+  },
+
+  /**
+   * 获取微信相机授权
+   */
+  getWxCameraSetting: function (cb) {
+    this.wxSetting({ scope: 'scope.camera', text: '微信相机授权' }).then((res) => {
+      wx.setStorageSync('hasCamera', 1)
+      if (typeof cb === 'function') {
+        cb(res)
+      }
+    }).catch((res) => {
+      wx.setStorageSync('hasCamera', 0)
+      wx.showToast({
+        title: res.text,
+        icon: 'none'
+      })
+      setTimeout(() => {
+        wx.navigateBack({
+          delta: 1
+        })
+      }, 1200)
+    })
+  },
+
+  /**
+   * 微信授权接口封装
+   */
+  wxSetting: function ({ scope, text }) {
+    const isEmptyObject = function (e) {
+      var temp;
+      for (temp in e)
+        return !1;
+      return !0
+    }
+    return new Promise((resolve, reject) => {
+      wx.getSetting({
+        success: res => {
+          if (isEmptyObject(res.authSetting)) {
+            resolve(Object.assign(res, { type: 1, text: `请手动点击${text}` }))
+          } else if (res.authSetting[scope] === true) {
+            resolve(Object.assign(res, { type: 2, text: `默认${text}成功` }))
+          } else if (res.authSetting[scope] === false) {
+            wx.showModal({
+              content: `检测到您没打开${text},是否去设置打开?`,
+              confirmText: "确认",
+              cancelText: "取消",
+              success: res => {
+                if (res.confirm) {
+                  wx.openSetting({
+                    success: res => {
+                      if (res.authSetting[scope]) {
+                        resolve(Object.assign(res, { type: 3, text: `手动设置${text}成功` }))
+                      } else {
+                        reject(Object.assign(res, { type: 5, text: `没有手动设置${text}` }))
+                      }
+                    },
+                    fail: res => {
+                      reject(Object.assign(res, { type: 4, text: `打开手动设置${text}失败` }))
+                    }
+                  })
+                } else {
+                  reject(Object.assign(res, { type: 3, text: `拒绝打开手动设置${text}` }))
+                }
+              },
+              fail: res => {
+                reject(Object.assign(res, { type: 2, text: `弹出${text}提示框失败` }))
+              }
+            })
+          } else {
+            wx.authorize({
+              scope,
+              success: res => {
+                resolve(Object.assign(res, { type: 4, text: `自动获取${text}成功` }))
+              },
+              fail: res => {
+                // console.log(res)
+                reject(Object.assign(res, { type: 6, text: `自动获取${text}失败` }))
+              }
+            })
+          }
+        },
+        fail: res => {
+          reject(res, { type: 1, text: `获取${text}失败` })
+        }
+      })
+    })
+  },
+
+  /**
+   * 获取全局属性值
+   */
+  getGlobalAttributeValue: function (e1, e2 = e1) {
+    return typeof this.globalData[e1] !== 'undefined' && this.globalData[e1] !== null ? this.globalData[e1] : typeof wx.getStorageSync(e2) !== 'undefined' && wx.getStorageSync(e2) !== null ? wx.getStorageSync(e2) : null
+  },
+
+  /**
+   * POST 封装
+   * @param obj{Object} {src【请求后台路径】, method【拼接在路径的参数对象】, type【判断是否需要把默认token和参数一起拼接在路径后面】} = obj
+   * @param data{Object} data【自定义传的参数数据】
+   * @param head{Boolean} head[true【data参数类型为json对象】,false【data参数类型为json字符串】]
+   * @param postData{Object} postData: { fn: Function, param: Object } 当接口报登录失效401的时候 记录失效的当前状态,等待自动登录成功后接着运行
+   */
+  post: function (obj, data = {}, head, postData) {
+    const { globalData } = this
+    const { host, loginTime, wechatsys, phoneimei, phonesys, phonetype, version, platform, build } = globalData
+    const accessToken = this.globalData.accessToken || wx.getStorageSync('accessToken')
+    const header = { wechatsys, phoneimei, phonesys, phonetype, version, platform, build, "Content-Type": head ? "application/x-www-form-urlencoded" : "application/json"}
+    let url
+    if (typeof obj === 'object') {
+      const { src, method, type } = obj
+      url = formatUrl(host + src, type ? method : Object.assign(method || {}, { accessToken }))
+    } else if (typeof obj === 'string') {
+      url = formatUrl(host + obj, { accessToken })
+    } else {
+      throw new Error('请正确填写访问后台接口路径')
+      return
+    }
+    return new Promise((resolve, reject) => {
+      wx.request({
+        url,
+        data,
+        method: 'POST',
+        header,
+        success: e => {
+          if (e.statusCode == 200) {
+            if (e.data.code == '999') {
+              resolve(e.data)
+            } else {
+              if (url.indexOf('/user/checkToken') < 0) {
+                wx.showToast({
+                  title: e.data.msg,
+                  icon: 'none'
+                })
+              }
+              reject(e.data)
+            }
+            if (loginTime > 0) {
+              this.globalData.loginTime = 0
+            }
+          } else if (e.statusCode == 401) {
+            this.globalData.loginTime = loginTime + 1
+            if (loginTime < 2) {
+              this.globalData.postData = postData || null
+              this.login()
+            } else {
+              reject(e)
+              wx.showToast({
+                title: '登录失效,稍后再试',
+                icon: 'none'
+              })
+            }
+          } else {
+            reject(e)
+            wx.showToast({
+              title: '加载失败',
+              icon: 'none'
+            })
+          }
+          console.log({ url, request: data, response: e.data, globalData })
+        },
+        fail: e => {
+          reject(e)
+          wx.showToast({
+            title: '加载失败',
+            icon: 'none'
+          })
+          console.log({ url, request: data, response: e })
+        }
+      })
+    })
+  },
+
+  /**
+   * uploadFile 封装
+   * @param obj{Object} {src【请求后台路径】, method【拼接在路径的参数对象】, type【判断是否需要把token和参数一起拼接在路径后面】} = obj
+   * @param file{String} file【微信小程序生成的临时文件资源路径】
+   * @param data{Object} data【自定义传的参数数据】
+   * @param head{Boolean} head[true【data参数类型为json对象】,false【data参数类型为json字符串】]
+   * @param progress{Function} progress【上传文件进度条回调函数方法】
+   * @param postData{Object} postData: { fn: Function, param: Object } 当接口报登录失效401的时候 记录失效的当前状态,等待自动登录成功后接着运行
+   */
+  uploadFile: function (obj, file, data = {}, head, progress, postData) {
+    const { globalData } = this
+    const { host, loginTime, wechatsys, phoneimei, phonesys, phonetype, version, platform, build } = globalData
+    const accessToken = this.globalData.accessToken || wx.getStorageSync('accessToken')
+    const header = { wechatsys, phoneimei, phonesys, phonetype, version, platform, build, "Content-Type": head ? "application/x-www-form-urlencoded" : "application/json" }
+    let url
+    if (typeof obj === 'object') {
+      const { src, method, type } = obj
+      url = formatUrl(host + src, type ? method : Object.assign(method || {}, { accessToken }))
+    } else if (typeof obj === 'string') {
+      url = formatUrl(host + obj, { accessToken })
+    } else {
+      throw new Error('请正确填写访问后台接口路径')
+      return
+    }
+    wx.showLoading({
+      title: '上传中...',
+    })
+    return new Promise((resolve, reject) => {
+      const uploadTask = wx.uploadFile({
+        url,
+        filePath: file,
+        name: 'files',
+        formData: data,
+        header,
+        success: e => {
+          if (e.statusCode == 200) {
+            resolve(e.data)
+            if (loginTime > 0) {
+              this.globalData.loginTime = 0
+            }
+          } else if (e.statusCode == 401) {
+            this.globalData.loginTime = loginTime + 1
+            if (loginTime < 2) {
+              this.globalData.postData = postData || null
+              this.login()
+            } else {
+              reject(e)
+              wx.showToast({
+                title: '登录失效,稍后再试',
+                icon: 'none'
+              })
+            }
+          } else {
+            reject(e)
+            wx.showToast({
+              title: '加载失败',
+              icon: 'none'
+            })
+          }
+          console.log({ url, request: data, response: e.data, globalData })
+        },
+        fail (e) {
+          reject(e)
+          wx.showToast({
+            title: '加载失败',
+            icon: 'none'
+          })
+          console.log({ url, request: data, response: e })
+        },
+        complete (e) {
+          wx.hideLoading()
+        }
+      })
+      uploadTask.onProgressUpdate((res) => {
+        progress && progress(res)
+        wx.showLoading({
+          title: ` 已上传(${res.progress}%)`
+        })
+        if (res.progress == 100) {
+          wx.hideLoading()
+        }
+      })
+    })
+  },
+
+  /**
+   * reLaunch路由跳转
+   */
+  reLaunchCtl: function (e, type) {
+    const { method, url, msg } = type ? e : e.currentTarget.dataset
+    if (!url) {
+      wx.showToast({
+        title: msg || '暂未开放',
+        icon: 'none'
+      })
+      return
+    }
+    let array = []
+    if (method) {
+      for (let i in method) {
+        if (typeof data === 'object') {
+          array.push(`${i}=${JSON.stringify(method[i])}`)
+        } else {
+          array.push(`${i}=${method[i]}`)
+        }
+      }
+    }
+    wx.reLaunch({
+      url: `${getCurrentPages().length == 0 ? 'pages' : '..'}/${url}/${url}${array.length > 0 ? '?' + array.join('&') : ''}`,
+      success: res => { },
+      fail: res => {
+        wx.showToast({
+          title: '跳转失败',
+          icon: 'none'
+        })
+      }
+    })
+  },
+
+  /**
+   * navigate路由跳转
+   */
+  navigateCtl: function (e, type) {
+    const { method, url, msg } = type ? e : e.currentTarget.dataset
+    if (!url) {
+      wx.showToast({
+        title: msg || '暂未开放',
+        icon: 'none'
+      })
+      return
+    }
+    let array = []
+    if (method) {
+      for (let i in method) {
+        if (typeof data === 'object') {
+          array.push(`${i}=${JSON.stringify(method[i])}`)
+        } else {
+          array.push(`${i}=${JSON.stringify(method[i])}`)
+        }
+      }
+    }
+    wx.navigateTo({
+      url: `${getCurrentPages().length == 0 ? 'pages' : '..'}/${url}/${url}${array.length > 0 ? '?' + array.join('&') : ''}`,
+      success: res => { },
+      fail: res => {
+        wx.showToast({
+          title: '跳转失败',
+          icon: 'none'
+        })
+      }
+    })
+  },
+
+  /**
+   * redirect路由跳转
+   */
+  redirectCtl: function (e, type) {
+    const { method, url, msg } = type ? e : e.currentTarget.dataset
+    if (!url) {
+      wx.showToast({
+        title: msg || '暂未开放',
+        icon: 'none'
+      })
+      return
+    }
+    let array = []
+    if (method) {
+      for (let i in method) {
+        if (typeof data === 'object') {
+          array.push(`${i}=${JSON.stringify(method[i])}`)
+        } else {
+          array.push(`${i}=${method[i]}`)
+        }
+      }
+    }
+    wx.redirectTo({
+      url: `${getCurrentPages().length == 0 ? 'pages' : '..'}/${url}/${url}${array.length > 0 ? '?' + array.join('&') : ''}`,
+      success: res => { },
+      fail: res => {
+        wx.showToast({
+          title: '跳转失败',
+          icon: 'none'
+        })
+      }
+    })
+  },
+
+  /**
+   * 查看图片
+   */
+  viewImageCtl: function (e, type) {
+    const { images, index, baseurl, url = 'img' } = type ? e : e.currentTarget.dataset
+    const arr = []
+    if (images !== null && typeof images === 'object') {
+      for (const v of images) {
+        arr.push(`${baseurl}${v[url] ? v[url] : v }`)
+      }
+    }
+    wx.previewImage({
+      current: arr[index],
+      urls: arr
+    })
+  },
+
+  /**
+   * 分享控制层
+   */
+  sharePageDefaultCtl: function () {
+    return {
+      title: '私塾家校长版',
+      path: 'pages/index/index',
+      success: res => {
+        wx.showToast({
+          title: '转发成功',
+          icon: 'success'
+        })
+      }
+    }
+  },
+
+  /**
+   * 全局变量
+   */
+  globalData: {
+    sys,
+    wechatsys: sys.version + ' ' + sys.SDKVersion,
+    phoneimei: '',
+    phonesys: sys.system,
+    phonetype: sys.brand + ' ' + sys.model,
+    version: '1.2.4',
+    platform: '3',
+    build: '1.2.4',
+    updateInfo: '私塾家校长版',
+    appid: 'wx5a97ed416d40ac39',
+    userInfo: null,
+    appType: 14,
+    loginTime: 0,
+    // host: 'https://sx.sharingschool.com/sz',
+    // host: 'https://api.sharingschool.com/sz',
+    // baseImgUrl: 'https://img.sharingschool.com',
+    thumbnail: '?x-oss-process=image/resize,m_fill,h_300,w_200',
+    host: 'https://xt.sharingschool.com/sz',
+    baseImgUrl: 'https://xtimg.sharingschool.com',
+    accessToken: null,
+    identityList: null,
+    permissions: null,
+    libId: null,
+    tempOptions: { query: {}, path: 'pages/index/index', scene: 1001 },
+    options: null,
+    postData: null,
+    continuousFn: null,
+    errorText: '出了点小问题',
+    toastText: '您点太快了',
+  }
+})

+ 64 - 0
app.json

@@ -0,0 +1,64 @@
+{
+  "pages": [
+    "pages/index/index",
+    "pages/homework_report/homework_report",
+    "pages/main/main",
+    "pages/set_time/set_time",
+    "pages/teacher_detail/teacher_detail",
+    "pages/kids_information/kids_information",
+    "pages/teacher_information/teacher_information",
+    "pages/change_information/change_information",
+    "pages/new_teacher/new_teacher",
+    "pages/ranking_list/ranking_list",
+    "pages/teaching/teaching",
+    "pages/school/school",
+    "pages/wx_authority/wx_authority",
+    "pages/register/register",
+    "pages/select_library/select_library",
+    "pages/select_class/select_class",
+    "pages/select_times/select_times",
+    "pages/student_select_class/student_select_class",
+    "pages/check_status/check_status",
+    "pages/child_list/child_list",
+    "pages/add_student/add_student",
+    "pages/add_teacher/add_teacher",
+    "pages/pay_list/pay_list",
+    "pages/remark/remark",
+    "pages/picker/picker",
+    "pages/usage_record/usage_record",
+    "pages/bound/bound",
+    "pages/batch_renew/batch_renew",
+    "pages/batch_renew_list/batch_renew_list",
+    "pages/add_batch_serve/add_batch_serve",
+    "pages/past_record/past_record",
+    "pages/add_student_serve/add_student_serve",
+    "pages/subject_detail/subject_detail",
+    "pages/student_address_book/student_address_book",
+    "pages/learning_report/learning_report",
+    "pages/problem_list/problem_list",
+    "pages/problem_report/problem_report",
+    "pages/templates/cropper/cropper",
+    "pages/templates/footer_master/footer_master",
+    "pages/webview_protocol/webview_protocol"
+
+  ],
+  "window": {
+    "navigationStyle": "default",
+    "backgroundTextStyle": "dark",
+    "backgroundColor": "#fff",
+    "navigationBarBackgroundColor": "#fff",
+    "navigationBarTitleText": "私塾家校长端",
+    "navigationBarTextStyle": "black"
+  },
+  "permission": {
+    "scope.userLocation": {
+      "desc": "你的位置信息将用于小程序位置接口的效果展示"
+    }
+  },
+  "networkTimeout": {
+    "request": 5000,
+    "downloadFile": 10000
+  },
+  "debug": false,
+  "sitemapLocation": "sitemap.json"
+}

+ 346 - 0
app.wxss

@@ -0,0 +1,346 @@
+/**app.wxss**/
+page {
+  font-size: 32rpx;
+  line-height: 32rpx;
+  color: #000000;
+  background: #Fff;
+  box-sizing: border-box;
+}
+text,
+view {
+  word-break: break-all;
+  box-sizing: border-box;
+  font-family:PingFang SC;
+}    
+image,
+text {
+  display: inline-block;
+  vertical-align: middle;
+}
+button,
+button::after {
+  border: none;
+  border-radius: 0;
+  padding: 0;
+  margin: 0;
+  transition: all .3s;
+}
+.container {
+  position: relative;
+}
+.wrapper {
+  position: absolute;
+  top: 0; 
+  left: 0;
+  width: 100%;
+} 
+.input-placeholder,
+.textarea-placeholder {
+  color: #bfbfbf;
+  font-size: 30rpx;
+}
+.pb {
+  padding-bottom: 98rpx;
+}
+.scroll-view {
+  display: flex;
+  padding-top: 20rpx;
+}
+.scroll-view-item {
+  margin-right: 24rpx;
+  position: relative;
+}
+.scroll-view-image {
+  width: 212rpx;
+  height: 212rpx;
+  /* border: 1rpx solid #CCCCCC; */
+  border-radius: 10rpx;
+} 
+.tag-words{
+  width: 100%;
+  height:52rpx;
+  line-height: 52rpx;
+  text-align: center;
+  background:rgba(0,0,0,0.8);
+  color: #FFFFFF;
+  font-size: 20rpx;
+  position: absolute;
+  bottom: 0;
+  z-index:1000;
+  border-radius: 0 0 20rpx 20rpx;
+}
+
+.login{
+  text-align: center;
+  color: #373737;
+  font-size: 26rpx;
+  margin-top: 30%;
+}
+.login-img{
+  width: 305rpx;
+  height: 331rpx;
+  /* margin-bottom: 109rpx; */
+}
+.login-text{
+  margin: 80rpx 0;
+}
+.login-btn{
+   width:346rpx;
+  height:96rpx;
+  line-height: 96rpx;
+  background:rgba(255,100,101,1);
+  border-radius:48rpx;
+  cursor: pointer;
+  margin: auto;
+  color: #FFFFFF;
+  font-size: 30rpx;
+  text-align: center;
+}
+/* 头部设置 */
+.nav{
+  font-size: 30rpx;
+  font-family: PingFang SC;
+  /* font-weight: bold; */
+  text-align: center;
+  position: relative;
+  /* height: 128rpx;
+  line-height: 128rpx;
+  top: 19rpx; */
+}
+.nav-img{
+  width: 60rpx;
+  height: 60rpx;
+  position: absolute;
+  bottom: 0;
+  left: 24rpx;
+  margin: auto 0;
+  border-radius: 50%;
+}
+.nav-text{
+  /* padding-top: 5%; */
+  /* margin: auto 0; */
+}
+/* 弹幕 */
+.showModel{
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0;
+  left: 0;
+  background: #000;
+  opacity: 0.5;
+  overflow: hidden;
+  z-index: 1000;
+  color: #fff;
+}
+.model{
+  z-index: 10000;
+  position: fixed;
+  top: 30%;
+  margin: 0 60rpx;
+  background: #fff;
+  border-radius:30rpx;
+  text-align: center;
+  width: 84%;
+}
+.model-class{
+  z-index: 10000;
+  position: fixed;
+  bottom: 0;
+  background: #fff;
+  width: 100%;
+}
+.rename{
+  color: #393939;
+  padding: 50rpx;
+}
+.rename-name{
+  font-size: 36rpx;
+  line-height: 70rpx;
+  margin-bottom: 50rpx;
+}
+.rename-input{
+  height:86rpx;
+  line-height: 86rpx;
+  background:rgba(245,245,245,1);
+  border-radius:10rpx;
+  position: relative;
+}
+.rename-input-items{
+  width: 80%;
+  text-align: left;
+  margin-left: 10rpx;
+  height:86rpx;
+  line-height: 86rpx;
+}
+.rename-input-img{
+  width: 40rpx;
+  height: 40rpx;
+  position: absolute;
+  top: 25rpx;
+  right: 21rpx;
+  z-index: 10000
+}
+.rename-footer{
+  display: flex;
+  justify-content: space-around;
+  color: #8489A3;
+  font-size: 34rpx;
+  margin-top: 123rpx;
+}
+.rename-footer-sure{
+  color: #FF6465;
+}
+/* 班级列表 */
+.li-content{
+  padding: 0;
+}
+.li-content-items{
+  padding: 45rpx;
+  position: relative;
+}
+.li-content-items-img{
+  width: 48rpx;
+  height: 36rpx;
+  position: relative;
+  bottom: 23rpx;
+}
+.li-content-items-class{
+  display: inline-block;
+  color: #7C819D;
+  font-size: 24rpx;
+  margin: 0 30rpx;
+  /* text-align: center; */
+}
+.li-content-items-class-num{
+  color: #121212;
+  font-size: 30rpx;
+  margin-bottom: 12rpx;
+  font-weight: 600;
+}
+.li-content-items-right{
+  position: absolute;
+  top: 50rpx;
+  right: 38rpx;
+}
+.li-content-items-right-img{
+  width: 60rpx;
+  height: 60rpx;
+  margin: auto 0
+}
+.li-footer{
+  position: fixed;
+  bottom: 0;
+  height:120rpx;
+  line-height: 120rpx;
+  color: #393939;
+  font-size: 28rpx;
+  background:rgba(245,245,245,1);
+  width: 100%;
+}
+.li-footer-img{
+  width: 44rpx;
+  height: 44rpx;
+  /* transform: rotate(45deg); */
+  margin-left: 50rpx;
+  margin-right: 15rpx;
+}
+/* 底部按钮 */
+.li-class-grade{
+  display: flex;
+  justify-content: space-between;
+  padding: 0 24rpx;
+  font-size: 28rpx;
+  color: #393939;
+  position: fixed;
+  bottom: 0;
+  height:120rpx;
+  background:rgba(245,245,245,1);
+  line-height: 120rpx;
+  width: 100%;
+}
+.li-class-grade-green{
+  width:180rpx;
+  height:74rpx;
+  background:#58C760;
+  border-radius:37rpx;
+  text-align: center;
+  line-height: 74rpx;
+  color: #fff;
+  margin: auto 0;
+}
+.li-class-grade-btn{
+  width:180rpx;
+  height:74rpx;
+  background:rgba(255,100,101,1);
+  border-radius:37rpx;
+  text-align: center;
+  line-height: 74rpx;
+  color: #fff;
+  margin: auto 0;
+}
+.li-class-grade-img{
+  width: 37rpx;
+  height: 34rpx;
+  margin-left: 25rpx;
+  margin-right: 18rpx;
+}
+.li-order{
+  margin-bottom: 120rpx;
+}
+/* 字母导航 */
+.list-shortcut {
+  position: fixed;
+  z-index: 30;
+  right: 0;
+  top: 50%;
+  -webkit-transform: translateY(-50%);
+  transform: translateY(-50%);
+  width: 20px;
+  padding: 20px 0;
+  border-radius: 10px;
+  text-align: center;
+  /* background: rgba(0,0,0,.3); */
+  font-family: Helvetica;
+}
+.list-shortcut-num{
+  display: block;
+  padding: 3px;
+  line-height: 1;
+  color: #4667F6;
+  font-size: 22rpx;
+}
+.list-current{
+  color: #ffcd32 !important;
+}
+.list-letter {
+  height: 50rpx;
+  line-height: 50rpx;
+  padding-left: 40rpx;
+  font-size:26rpx;
+  font-family:PingFang SC;
+  font-weight:bold;
+  color:rgba(83,83,87,1);
+  background: #F1F3FA;
+  margin: auto 0;
+}
+.close-serve{
+  width:138rpx;
+  height:40rpx;
+  background:rgba(242,242,250,1);
+  border-radius:20rpx;
+  text-align: center;
+  line-height: 40rpx;
+  font-size:22rpx;
+  font-family:PingFang SC;
+  font-weight:bold;
+  color:rgba(170,170,170,1);
+  display: inline-block;
+}
+.close_active{
+  /* background:rgba(241,241,241,0.5); */
+  opacity: 0.5;
+}
+.close_color{
+  color: #AAAAAA !important;
+}

BIN
assets/ajlogo.png


BIN
assets/arrow_gray_right.png


BIN
assets/bad_active.png


BIN
assets/bad_gray.png


BIN
assets/biao_qian_hong.png


BIN
assets/biao_qian_hui.png


BIN
assets/bu_pai.png


BIN
assets/bu_pai2.png


BIN
assets/bu_pi_gai.png


BIN
assets/bu_quan.png


BIN
assets/bu_quan2.png


BIN
assets/chong_min_ming.png


BIN
assets/class_one.png


BIN
assets/class_two.png


BIN
assets/cuo_ti.png


BIN
assets/dai_jie_da.png


BIN
assets/dao.png


BIN
assets/default_headicon.png


BIN
assets/default_headicon1.png


BIN
assets/default_headicon2.png


BIN
assets/default_headicon4.png


BIN
assets/delete.png


BIN
assets/delete_input.png


BIN
assets/deng_ji.png


BIN
assets/deng_lv_logo.png


BIN
assets/dian_dian.png


BIN
assets/goods.png


BIN
assets/gou.png


BIN
assets/gou_active.png


BIN
assets/gou_xuan.png


BIN
assets/guan.png


BIN
assets/guan_bi.png


BIN
assets/guan_bi_fu_wu.png


BIN
assets/hao_active.png


BIN
assets/hao_gray.png


BIN
assets/hei_gou_xuan.png


BIN
assets/hei_hua_ping.png


BIN
assets/hua_ping.png


BIN
assets/huan_ban_ji.png


BIN
assets/huang_guan.png


BIN
assets/hui_guan.png


BIN
assets/hui_xiao_shu.png


BIN
assets/icon_down.png


BIN
assets/icon_plus.png


BIN
assets/info.png


BIN
assets/jia_fa.png


BIN
assets/jia_hao.png


BIN
assets/jian_hao.png


BIN
assets/jian_tou.png


BIN
assets/jie_xi_deng.png


BIN
assets/jie_xi_zhong.png


BIN
assets/jin_ri_deng_ji.png


BIN
assets/jin_ri_zhuang_tai.png


BIN
assets/kai.png


BIN
assets/kai_ke_she_zhi.png


BIN
assets/lao_shi_liu_yan.png


BIN
assets/lao_shu_ping_yu.png


BIN
assets/liu_yan.png


BIN
assets/me_gray.png


BIN
assets/me_green.png


BIN
assets/mo_hu.png


BIN
assets/mo_hu2.png


BIN
assets/my_bg.png


BIN
assets/nan_ti.png


BIN
assets/nan_ti_jie_xi.png


BIN
assets/nan_ti_logo.png


BIN
assets/no_search.png


BIN
assets/pai_hang_bang.png


BIN
assets/pencil.png


BIN
assets/person_add.png


BIN
assets/ping_ban.png


BIN
assets/ranking_one.png


BIN
assets/ranking_three.png


BIN
assets/ranking_two.png


BIN
assets/red_jian_tou.png


BIN
assets/right_code.png


BIN
assets/right_zy7@2x.png


BIN
assets/search.png


BIN
assets/select_off.png


BIN
assets/select_on.png


BIN
assets/shanchu.png


BIN
assets/shang_chuan_ji_lu.png


BIN
assets/shen_he_zhong.png


BIN
assets/shi_yong_ji_lv.png


BIN
assets/shou_ye001.png


BIN
assets/shu_xue.png


BIN
assets/shuxue.png


BIN
assets/shuxue4.0.png


BIN
assets/student_gray.png


BIN
assets/student_green.png


BIN
assets/task_gray.png


BIN
assets/task_green.png


BIN
assets/task_logo.png


BIN
assets/task_nodata.png


BIN
assets/tian_jia_hai_zi.png


BIN
assets/wang_qi_ji_lu.png


+ 0 - 0
assets/we_tong_guo.png


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor