Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onLoad(query) {
const pageName = mp.$$adapter.tool.getPageName(this.route)
const pageConfig = this.pageConfig = config.pages[pageName] || {}
if (pageConfig.loadingText) {
wx.showLoading({
title: pageConfig.loadingText,
mask: true,
})
}
const mpRes = mp.createPage(this.route, config)
this.pageId = mpRes.pageId
this.window = mpRes.window
this.document = mpRes.document
this.query = query
init(this.window, this.document)
// 处理跳转页面不存在的情况
if (config.redirect && config.redirect.notFound) {
this.window.addEventListener('pagenotfound', evt => {
dealWithPage(evt, mpRes.window, config.redirect.notFound)
})
}
// 处理跳转受限制页面的情况
if (config.redirect && config.redirect.accessDenied) {
onLoad(query) {
const pageName = mp.$$adapter.tool.getPageName(this.route)
const pageConfig = this.pageConfig = config.pages[pageName] || {}
if (pageConfig.loadingText) {
wx.showLoading({
title: pageConfig.loadingText,
mask: true,
})
}
const mpRes = mp.createPage(this.route, config)
this.pageId = mpRes.pageId
this.window = mpRes.window
this.document = mpRes.document
this.query = query
// 写入 page 的方法
if (typeof this.getTabBar === 'function') this.window.getTabBar = this.getTabBar.bind(this)
init(this.window, this.document)
// 处理跳转页面不存在的情况
if (config.redirect && config.redirect.notFound) {
this.window.addEventListener('pagenotfound', evt => {
dealWithPage(evt, mpRes.window, config.redirect.notFound)
})
}
onLoad(query) {
const pageName = mp.$$adapter.tool.getPageName(this.route)
const pageConfig = this.pageConfig = config.pages[pageName] || {}
if (pageConfig.loadingText) {
wx.showLoading({
title: pageConfig.loadingText,
mask: true,
})
}
const mpRes = mp.createPage(this.route, config)
this.pageId = mpRes.pageId
this.window = mpRes.window
this.document = mpRes.document
this.query = query
init(this.window, this.document)
// 处理跳转页面不存在的情况
if (config.redirect && config.redirect.notFound) {
this.window.addEventListener('pagenotfound', evt => {
dealWithPage(evt, mpRes.window, config.redirect.notFound)
})
}
// 处理跳转受限制页面的情况
if (config.redirect && config.redirect.accessDenied) {
onLoad(query) {
const pageName = mp.$$adapter.tool.getPageName(this.route)
const pageConfig = this.pageConfig = config.pages[pageName] || {}
if (pageConfig.loadingText) {
wx.showLoading({
title: pageConfig.loadingText,
mask: true,
})
}
const mpRes = mp.createPage(this.route, config)
this.pageId = mpRes.pageId
this.window = mpRes.window
this.document = mpRes.document
this.query = query
// 写入 page 的方法
if (typeof this.getTabBar === 'function') this.window.getTabBar = this.getTabBar.bind(this)
init(this.window, this.document)
// 处理跳转页面不存在的情况
if (config.redirect && config.redirect.notFound) {
this.window.addEventListener('pagenotfound', evt => {
dealWithPage(evt, mpRes.window, config.redirect.notFound)
})
}
onLoad(query) {
const pageName = mp.$$adapter.tool.getPageName(this.route)
const pageConfig = this.pageConfig = config.pages[pageName] || {}
if (pageConfig.loadingText) {
wx.showLoading({
title: pageConfig.loadingText,
mask: true,
})
}
const mpRes = mp.createPage(this.route, config)
this.pageId = mpRes.pageId
this.window = mpRes.window
this.document = mpRes.document
this.query = query
init(this.window, this.document)
// 处理跳转页面不存在的情况
if (config.redirect && config.redirect.notFound) {
this.window.addEventListener('pagenotfound', evt => {
dealWithPage(evt, mpRes.window, config.redirect.notFound)
})
}
// 处理跳转受限制页面的情况
if (config.redirect && config.redirect.accessDenied) {
onLoad(query) {
const pageName = mp.$$adapter.tool.getPageName(this.route)
const pageConfig = this.pageConfig = config.pages[pageName] || {}
if (pageConfig.loadingText) {
wx.showLoading({
title: pageConfig.loadingText,
mask: true,
})
}
const mpRes = mp.createPage(this.route, config)
this.pageId = mpRes.pageId
this.window = mpRes.window
this.document = mpRes.document
this.query = query
init(this.window, this.document)
// 处理跳转页面不存在的情况
if (config.redirect && config.redirect.notFound) {
this.window.addEventListener('pagenotfound', evt => {
dealWithPage(evt, mpRes.window, config.redirect.notFound)
})
}
// 处理跳转受限制页面的情况
if (config.redirect && config.redirect.accessDenied) {
onLoad(query) {
const pageName = mp.$$adapter.tool.getPageName(this.route)
const pageConfig = this.pageConfig = config.pages[pageName] || {}
if (pageConfig.loadingText) {
wx.showLoading({
title: pageConfig.loadingText,
mask: true,
})
}
const mpRes = mp.createPage(this.route, config)
this.pageId = mpRes.pageId
this.window = mpRes.window
this.document = mpRes.document
this.query = query
// 写入 page 的方法
if (typeof this.getTabBar === 'function') this.window.getTabBar = this.getTabBar.bind(this)
// 处理跳转页面不存在的情况
if (config.redirect && config.redirect.notFound) {
this.window.addEventListener('pagenotfound', evt => {
dealWithPage(evt, mpRes.window, config.redirect.notFound)
})
}
// 处理跳转受限制页面的情况