|
|
@@ -46,36 +46,42 @@ export default {
|
|
|
// 登录
|
|
|
if (isLogin()) {
|
|
|
if (this.init) {
|
|
|
- this.init()
|
|
|
- // let self = this
|
|
|
- // //切换门店,需要先确认有没生成客户id shish 2021.5.2
|
|
|
- // if (oldAccount != option.account) {
|
|
|
- // getShopUser(true).then(res => {
|
|
|
- // if (!this.$util.isEmpty(res)) {
|
|
|
- // self.init()
|
|
|
- // }
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // this.init()
|
|
|
- // }
|
|
|
+ let self = this
|
|
|
+ //查看不同门店商城时,需要先确认有没生成客户id shish 2021.5.2
|
|
|
+ if (option.account && oldAccount != option.account) {
|
|
|
+
|
|
|
+ console.log('已经登陆,有切换门店',option.account,oldAccount)
|
|
|
+
|
|
|
+ getShopUser(true).then(res => {
|
|
|
+ if (!this.$util.isEmpty(res)) {
|
|
|
+ self.init()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ console.log('已经登陆,并且没有切换门店')
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
- console.log(1112)
|
|
|
wxLoginFn().then(res => {
|
|
|
- this.init()
|
|
|
- // if (this.init) {
|
|
|
- // let self = this
|
|
|
- // //切换门店,需要先确认有没生成客户id shish 2021.5.2
|
|
|
- // if (oldAccount != option.account) {
|
|
|
- // getShopUser(true).then(res => {
|
|
|
- // if (!this.$util.isEmpty(res)) {
|
|
|
- // self.init()
|
|
|
- // }
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // this.init()
|
|
|
- // }
|
|
|
- // }
|
|
|
+ if (this.init) {
|
|
|
+ console.log(11113)
|
|
|
+ let self = this
|
|
|
+ //查看不同门店商城时,需要先确认有没生成客户id shish 2021.5.2
|
|
|
+ if (option.account && oldAccount != option.account) {
|
|
|
+
|
|
|
+ console.log('登陆后有切换门店',option.account,oldAccount)
|
|
|
+
|
|
|
+ getShopUser(true).then(res => {
|
|
|
+ if (!this.$util.isEmpty(res)) {
|
|
|
+ self.init()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ console.log('登陆后没有切换门店')
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|