|
|
@@ -19,7 +19,7 @@ export default {
|
|
|
// ...mapGetters({ userInfo: 'getUser' })
|
|
|
// },
|
|
|
// 页面生命周期才触发
|
|
|
- onLoad: function(option) {
|
|
|
+ onLoad: function (option) {
|
|
|
this.option = option || null
|
|
|
if (option.token) {
|
|
|
uni.setStorageSync('token', option.token)
|
|
|
@@ -34,11 +34,11 @@ export default {
|
|
|
}
|
|
|
uni.setStorageSync('currentQuery', JSON.stringify(option))
|
|
|
// 登录
|
|
|
- if (constant.source == 'business' || constant.source == 'mobile') {
|
|
|
+ if (constant.source == 'store' || constant.source == 'mobile') {
|
|
|
if (isLogin()) {
|
|
|
// #ifdef H5
|
|
|
if (this.init) {
|
|
|
- if (constant.source == 'business') {
|
|
|
+ if (constant.source == 'store') {
|
|
|
getUser()
|
|
|
}
|
|
|
this.init()
|
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
// #ifdef MP-WEIXIN
|
|
|
wxLoginFn().then(res => {
|
|
|
if (this.init) {
|
|
|
- if (constant.source == 'business') {
|
|
|
+ if (constant.source == 'store') {
|
|
|
getUser()
|
|
|
}
|
|
|
this.init()
|
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
} else {
|
|
|
// #ifdef H5
|
|
|
getCheckLogin().then(res => {
|
|
|
- if (constant.source == 'business') {
|
|
|
+ if (constant.source == 'store') {
|
|
|
if (res) {
|
|
|
getUser()
|
|
|
}
|
|
|
@@ -68,7 +68,7 @@ export default {
|
|
|
// #ifdef MP-WEIXIN
|
|
|
wxLoginFn().then(res => {
|
|
|
if (this.init) {
|
|
|
- if (constant.source == 'business') {
|
|
|
+ if (constant.source == 'store') {
|
|
|
getUser()
|
|
|
}
|
|
|
this.init()
|