|
|
@@ -3861,7 +3861,34 @@
|
|
|
this.jxsName = item.name || ''
|
|
|
this.showPopup = false
|
|
|
this.showMer = false
|
|
|
- this.initialization()
|
|
|
+ this.getDealerIds()
|
|
|
+ },
|
|
|
+ getDealerIds() {
|
|
|
+ const headers = new Headers()
|
|
|
+ headers.append('token', this.token)
|
|
|
+ headers.append('tenancyId', this.tenancyId)
|
|
|
+ fetch(this.httpUrl + `/scrm/v1/dw-dealer/m/getDealers`, {
|
|
|
+ method: 'GET',
|
|
|
+ headers: headers
|
|
|
+ }).then(res => {
|
|
|
+ return res.json()
|
|
|
+ }).then(result => {
|
|
|
+ let { data, code, msg } = result
|
|
|
+ if (code === 1) {
|
|
|
+ if (data && data.length) {
|
|
|
+ if (data[0].type === 1) {
|
|
|
+ var currentQueryParams = window.location.search
|
|
|
+ window.location.replace('miniJxs.html' + currentQueryParams)
|
|
|
+ } else {
|
|
|
+ this.initialization()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (code === 10001) {
|
|
|
+ this.loginOut()
|
|
|
+ } else {
|
|
|
+ vant.Toast.fail(msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 退出登录
|
|
|
handleLoginOut() {
|