Commit ac84265e by 李伟康

修改代码

1 parent bf19caa2
...@@ -66,12 +66,12 @@ Page({ ...@@ -66,12 +66,12 @@ Page({
}, },
init() { init() {
wx.nextTick(() => {
const sessionId = getSessionId(), const sessionId = getSessionId(),
{ {
url, url,
targetPath = url ? decodeURIComponent(url) : '' targetPath = url ? decodeURIComponent(url) : ''
} = this.options } = this.options
wx.nextTick(() => {
let path = 'pages.index', let path = 'pages.index',
obj = {} obj = {}
if (targetPath) obj.targetPath = targetPath if (targetPath) obj.targetPath = targetPath
......
...@@ -21,9 +21,25 @@ class NetWork { ...@@ -21,9 +21,25 @@ class NetWork {
}) })
} else { } else {
if (this[ISCOMMECTED]) { if (this[ISCOMMECTED]) {
const thisPage = wx.$router.getPageInstance(),
options = Object.keys(thisPage.options)
this[ISCOMMECTED] = false this[ISCOMMECTED] = false
if (thisPage.noPageAuth) {
wx.showLoading() wx.showLoading()
this.refreshPage() 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!