Bläddra i källkod

简版经销商

duanshenglang 2 veckor sedan
förälder
incheckning
7dd245c820
1 ändrade filer med 28 tillägg och 1 borttagningar
  1. 28 1
      lottery/bigJxs.html

+ 28 - 1
lottery/bigJxs.html

@@ -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() {