diff --git a/apis/request.js b/apis/request.js index 07701d7..c57eff1 100644 --- a/apis/request.js +++ b/apis/request.js @@ -3,8 +3,8 @@ import {errInfo} from './err' import {updToken} from './updateToken' // 请求方式配置 -const api = "https://new-web-test.cnskl.com/api/" -// const api = "https://mi-org.cnskl.com/api/" +// const api = "https://new-web-test.cnskl.com/api/" +const api = "https://mi-org.cnskl.com/api/" const header = { "Accept" : "application/json" } diff --git a/pages/config/config.js b/pages/config/config.js index 0768d29..988f9d8 100644 --- a/pages/config/config.js +++ b/pages/config/config.js @@ -14,18 +14,19 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(e) { - if (e.companyoid && e.companyoid == "") { - wx.showToast({ - title: "参数错误,缺少companyoId" - }) - return - } + // if (e.companyoid && e.companyoid == "") { + // wx.showToast({ + // title: "参数错误,缺少companyoId" + // }) + // return + // } wx.getStorage({ key : 'compayId', success : res=>{ wx.$api.publics.storeConfig({ company_id: res.data }).then(res => { + console.log(res) let tabBarVal = res.concat({}), newTabBar = [] @@ -40,18 +41,12 @@ Page({ case "ticket": newTabBar.push(ticket) break; - default : - newTabBar.push(user) - break; } }) - - if(tabBarVal.length == newTabBar.length){ - getApp().globalData.storeTabBarConfig = newTabBar - wx.redirectTo({ - url: newTabBar[0].pagePath, - }) - } + getApp().globalData.storeTabBarConfig = newTabBar.concat([user]) + wx.redirectTo({ + url: newTabBar[0].pagePath, + }) }).catch(()=>{ this.setData({ loding: false