|
@@ -6,7 +6,7 @@ import store from './store'
|
|
|
import { initLocale } from '@/locales/i18n'
|
|
|
import loadCloudFontFace from '@/utils/font'
|
|
|
import Dialog from '@/wxcomponents/vant/dialog/dialog'
|
|
|
-
|
|
|
+
|
|
|
import './uni.promisify.adaptor'
|
|
|
Vue.config.productionTip = false
|
|
|
Vue.prototype.$config = {
|
|
@@ -16,6 +16,8 @@ Vue.prototype.onInitNavbar = function(e) {
|
|
|
this.$config.pageHeight = e.detail.pageHeight
|
|
|
}
|
|
|
Vue.prototype.checkAuth = function(pagePath) {
|
|
|
+ console.log(pagePath)
|
|
|
+ console.log(store.getters.user)
|
|
|
if (!store.getters.user) {
|
|
|
this.redirectTo('/pages/user/login?redirect=' + encodeURIComponent(pagePath))
|
|
|
return false
|
|
@@ -24,6 +26,7 @@ Vue.prototype.checkAuth = function(pagePath) {
|
|
|
}
|
|
|
}
|
|
|
Vue.prototype.redirectTo = function(pagePath) {
|
|
|
+ console.log(pagePath)
|
|
|
if (pagePath.indexOf('https') === -1) {
|
|
|
uni.redirectTo({
|
|
|
url: pagePath
|
|
@@ -35,6 +38,7 @@ Vue.prototype.redirectTo = function(pagePath) {
|
|
|
}
|
|
|
}
|
|
|
Vue.prototype.navigateTo = function(pagePath) {
|
|
|
+ console.log(pagePath)
|
|
|
if (pagePath.indexOf('http') === 0) {
|
|
|
this.webviewTo(pagePath)
|
|
|
} else {
|
|
@@ -157,4 +161,4 @@ export function createApp() {
|
|
|
app
|
|
|
}
|
|
|
}
|
|
|
-// #endif
|
|
|
+// #endif
|