Commit ac84265e by 李伟康

修改代码

1 parent bf19caa2
......@@ -66,12 +66,12 @@ Page({
},
init() {
const sessionId = getSessionId(),
wx.nextTick(() => {
const sessionId = getSessionId(),
{
url,
targetPath = url ? decodeURIComponent(url) : ''
} = this.options
wx.nextTick(() => {
let path = 'pages.index',
obj = {}
if (targetPath) obj.targetPath = targetPath
......
......@@ -21,9 +21,25 @@ class NetWork {
})
} else {
if (this[ISCOMMECTED]) {
const thisPage = wx.$router.getPageInstance(),
options = Object.keys(thisPage.options)
this[ISCOMMECTED] = false
wx.showLoading()
this.refreshPage()
if (thisPage.noPageAuth) {
wx.showLoading()
this.refreshPage()
} else {
let url = `/${thisPage.route}`
if (options.length) {
let query = []
options.map(key => {
query.push(`${key}=${thisPage.options[key]}`)
})
url += `?${query.join('&')}`
}
wx.$router.go('login.loading', {
url
})
}
}
}
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!