微信扫码优化
This commit is contained in:
parent
012da46336
commit
f756d7bf64
30
app.js
30
app.js
|
@ -53,18 +53,24 @@ App({
|
|||
}
|
||||
});
|
||||
wx.hideLoading()
|
||||
// var pages = getCurrentPages()
|
||||
// var currentPage = pages[pages.length-1] //获取当前页面的对象
|
||||
// var url = currentPage.route
|
||||
if(that.globalData.hopeUrl){
|
||||
wx.reLaunch({
|
||||
url: that.globalData.hopeUrl,
|
||||
})
|
||||
}else{
|
||||
wx.reLaunch({
|
||||
url: '/pages/main/main',
|
||||
})
|
||||
}
|
||||
var pages = getCurrentPages()
|
||||
var currentPage = pages[pages.length-1] //获取当前页面的对象
|
||||
var url = currentPage.route
|
||||
if(that.globalData.hopeUrl){
|
||||
wx.redirectTo({
|
||||
url: that.globalData.hopeUrl,
|
||||
})
|
||||
}else{
|
||||
wx.redirectTo({
|
||||
url:'/'+url,
|
||||
fail: function(){
|
||||
wx.reLaunch({
|
||||
url:'/'+url
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
wx.hideLoading()
|
||||
|
|
2
app.json
2
app.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"pages": [
|
||||
"pages/bind/binduser",
|
||||
"pages/main/main",
|
||||
"pages/bind/binduser",
|
||||
"pages/index/index",
|
||||
"pages/logs/logs",
|
||||
"pages/trouble/trouble",
|
||||
|
|
|
@ -178,21 +178,20 @@ Page({
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(getApp().globalData.sessionId){
|
||||
if(url){
|
||||
wx.reLaunch({
|
||||
url: url,
|
||||
if(getApp().globalData.hopeUrl){
|
||||
wx.redirectTo({
|
||||
url: getApp().globalData.hopeUrl,
|
||||
})
|
||||
}else{
|
||||
wx.reLaunch({
|
||||
getApp().globalData.hopeUrl = null
|
||||
}
|
||||
else{
|
||||
wx.switchTab({
|
||||
url: '/pages/main/main',
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -96,8 +96,9 @@ Page({
|
|||
*/
|
||||
onShow: function () {
|
||||
var that = this
|
||||
that.getNew()
|
||||
|
||||
if(getApp().globalData.sessionId){
|
||||
that.getNew()
|
||||
}
|
||||
if (getApp().globalData.userInfo.companyid == 2681) {
|
||||
this.setData({
|
||||
isGjjt: true,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"setting": {
|
||||
"urlCheck": false,
|
||||
"es6": true,
|
||||
"enhance": true,
|
||||
"enhance": false,
|
||||
"postcss": true,
|
||||
"preloadBackgroundData": false,
|
||||
"minified": true,
|
||||
|
@ -19,14 +19,15 @@
|
|||
"uploadWithSourceMap": true,
|
||||
"compileHotReLoad": false,
|
||||
"useMultiFrameRuntime": false,
|
||||
"useApiHook": true,
|
||||
"useApiHook": false,
|
||||
"useApiHostProcess": false,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"bundle": false,
|
||||
"useIsolateContext": true,
|
||||
"enableEngineNative": false,
|
||||
"useIsolateContext": false,
|
||||
"useCompilerModule": false,
|
||||
"userConfirmedUseCompilerModuleSwitch": false,
|
||||
"userConfirmedBundleSwitch": false,
|
||||
|
|
Loading…
Reference in New Issue