| 1234567891011121314151617181920212223242526272829303132333435 |
- const _Http = getApp().globalData.http;
- function loginMsg(res) {
- wx.setStorageSync('account_list', res.account_list)
- if (res.account_list.length == 1) {
- wx.setStorageSync('userMsg', res.account_list[0])
- wx.switchTab({
- url: '/pages/tabbar/home/index'
- })
- query_userauth();
- } else {
- wx.redirectTo({
- url: './selectSite',
- })
- }
- }
- /* 获取用户权限 */
- function query_userauth(i = 0) {
- if (i == 5) return wx.showToast({
- title: '权限查询失败,请稍后再试',
- icon: "none"
- })
- _Http.basic({
- "classname": "sysmanage.develop.userauth.userauth",
- "method": "query_userauth",
- content: {}
- }).then(res => {
- if (res.msg != '成功') return query_userauth(i + 1);
- wx.setStorageSync('userauth', res.data);
- })
- }
- module.exports = {
- loginMsg,
- query_userauth
- }
|