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