| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 | 
							- const _Http = getApp().globalData.http;
 
- let count = 0; //接口完成数量
 
- function loginMsg(res) {
 
-     wx.setStorageSync('account_list', res.account_list);
 
-     if (res.account_list.length == 1) {
 
-         let item = res.account_list[0];
 
-         if (item.status == "INACTIVE") return wx.showToast({
 
-             title: '该账号已被停用,无法登录',
 
-             icon: "none"
 
-         });
 
-         wx.setStorageSync('userrole', item.usertype == 1 ? '业务员' : '经销商');
 
-         wx.setStorageSync('userMsg', item)
 
-         query_userauth();
 
-     } else {
 
-         wx.redirectTo({
 
-             url: './selectSite',
 
-         })
 
-     }
 
- }
 
- /* 获取用户权限 */
 
- function query_userauth() {
 
-     query_adspacelist();
 
-     querySite_Parameter();
 
-     wx.setStorageSync('userauth', []);
 
-     _Http.basic({
 
-         "classname": "sysmanage.develop.userauth.userauth",
 
-         "method": "query_userauth",
 
-         content: {
 
-             nocache: true
 
-         }
 
-     }).then(res => {
 
-         console.log("查询权限", res)
 
-         if (res.msg != '成功') return wx.showToast({
 
-             title: '权限查询失败,请稍后再试',
 
-             icon: "none"
 
-         })
 
-         wx.setStorageSync('userauth', res.data);
 
-         count += 1;
 
-         toHome();
 
-     });
 
-     let {
 
-         siteid,
 
-         userid
 
-     } = wx.getStorageSync('userMsg');
 
-     _Http.basic({
 
-         "classname": "sysmanage.develop.optiontype.optiontype",
 
-         "method": "optiontypeselect",
 
-         "content": {
 
-             "pageNumber": 1,
 
-             "pageSize": 20,
 
-             "typename": "shieldrole",
 
-             "parameter": {
 
-                 siteid,
 
-                 userid
 
-             }
 
-         }
 
-     }).then(res => {
 
-         console.log("查询是否隐私金额", res)
 
-         if (res.msg == '成功') wx.setStorageSync('hidePrice', res.data.length == 0 ? 0 : 1);
 
-         console.log(wx.getStorageSync('hidePrice'))
 
-     })
 
- }
 
- /* 查询站点数据 */
 
- function querySite_Parameter() {
 
-     _Http.basic({
 
-         "classname": "webmanage.site.site",
 
-         "method": "querySite_Parameter",
 
-         "content": {}
 
-     }).then(res => {
 
-         if (res.msg != '成功') return wx.showToast({
 
-             title: res.msg,
 
-             icon: "none"
 
-         });
 
-         wx.setStorageSync('siteP', res.data);
 
-         count += 1;
 
-         toHome();
 
-     })
 
- }
 
- /* 查询轮播图 */
 
- function query_adspacelist() {
 
-     _Http.basic({
 
-         "classname": "common.adspace.adspace",
 
-         "method": "query_adspacelist",
 
-         "content": {}
 
-     }).then(res => {
 
-         if (res.msg != '成功') return wx.showToast({
 
-             title: res.msg,
 
-             icon: "none"
 
-         });
 
-         wx.setStorageSync('banner_list', res.data)
 
-         count += 1;
 
-         toHome();
 
-     })
 
- }
 
- function toHome() {
 
-     if (count < 3) return;
 
-     wx.reLaunch({
 
-         url: '/pages/index/index'
 
-     })
 
-     getApp().initSocket();
 
-     wx.setStorageSync('isLeader', wx.getStorageSync('userMsg').usertype == 21)
 
- }
 
- /* 站点数据查询 */
 
- module.exports = {
 
-     loginMsg,
 
-     query_userauth
 
- }
 
 
  |