|
|
|
@ -17,20 +17,22 @@ App<IAppOption>({
@@ -17,20 +17,22 @@ App<IAppOption>({
|
|
|
|
|
// 测试号 wx2b0bb13edf717c1d
|
|
|
|
|
// dev
|
|
|
|
|
// appid:wxbdf6f933281b1eb4
|
|
|
|
|
// url: 'https://m.shizhong.hbraas.com',
|
|
|
|
|
// upFileUrl: 'https://m.shizhong.hbraas.com/',
|
|
|
|
|
// imageUrl: 'https://m.shizhong.hbraas.com/api/shizhong/',
|
|
|
|
|
url: 'https://m.shizhong.hbraas.com', |
|
|
|
|
upFileUrl: 'https://m.shizhong.hbraas.com/', |
|
|
|
|
imageUrl: 'https://m.shizhong.hbraas.com/api/shizhong/', |
|
|
|
|
// pro
|
|
|
|
|
// appid:wxa4a28b299df7d921
|
|
|
|
|
url: 'https://m.shizhong.hbsaas.com', |
|
|
|
|
upFileUrl: 'https://m.shizhong.hbsaas.com/', |
|
|
|
|
imageUrl: 'https://m.shizhong.hbsaas.com/api/shizhong/', |
|
|
|
|
// url: 'https://m.shizhong.hbsaas.com',
|
|
|
|
|
// upFileUrl: 'https://m.shizhong.hbsaas.com/',
|
|
|
|
|
// imageUrl: 'https://m.shizhong.hbsaas.com/api/shizhong/',
|
|
|
|
|
|
|
|
|
|
loginState: '', |
|
|
|
|
isLogin: 0, |
|
|
|
|
isAnswer: '0', |
|
|
|
|
|
|
|
|
|
scene: null, |
|
|
|
|
|
|
|
|
|
backPath: '', |
|
|
|
|
}, |
|
|
|
|
onLaunch() { |
|
|
|
|
Page = page as WechatMiniprogram.Page.Constructor; |
|
|
|
@ -63,7 +65,7 @@ App<IAppOption>({
@@ -63,7 +65,7 @@ App<IAppOption>({
|
|
|
|
|
this.globalData.scene = parseScene(options.query.scene); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
waitLogin(waitLoginState = false, requireLogin = false) { |
|
|
|
|
waitLogin(waitLoginState = false, requireLogin = false, bakcPath = '') { |
|
|
|
|
let time: number; |
|
|
|
|
return new Promise((resolve) => { |
|
|
|
|
time = setInterval(() => { |
|
|
|
@ -73,8 +75,10 @@ App<IAppOption>({
@@ -73,8 +75,10 @@ App<IAppOption>({
|
|
|
|
|
if (waitLoginState) { |
|
|
|
|
resolve(true); |
|
|
|
|
} else if (isLogin === 0 || !isLogin) { |
|
|
|
|
this.globalData.backPath = bakcPath; |
|
|
|
|
wx.reLaunch({ url: '/pages/login/index' }); |
|
|
|
|
} else if (requireLogin && isLogin === 999) { |
|
|
|
|
this.globalData.backPath = bakcPath; |
|
|
|
|
wx.reLaunch({ url: '/pages/login/index' }); |
|
|
|
|
} else { |
|
|
|
|
resolve(true); |
|
|
|
|