Explorar o código

feat:银行行业解决方案更换客服二维码接口

zhangsiya hai 1 ano
pai
achega
773f001378
Modificáronse 1 ficheiros con 42 adicións e 28 borrados
  1. 42 28
      src/web/staticres/common-module/consult-dialog/js/index.js

+ 42 - 28
src/web/staticres/common-module/consult-dialog/js/index.js

@@ -17,33 +17,47 @@ var consultDialog = new Vue({
   created: function () {
   },
   mounted: function () {
-    this.getimage()
+    this.getKefuInfo()
   },
   methods: {
-      getimage: function () {
-          var this_ = this
-          $.ajax({
-              type: 'POST',
-              url: '/bigmember/use/equity',
-              data: {
-
-              },
-              success: function (res) {
-                  if (res.data) {
-                      var customers = res.data.customers
-                      customers.forEach(function (ele) {
-                          if (ele.vip == false) {
-                              this_.img = ele.wxer
-
-                          } else if (ele.vip == true) {
-                              this_.vip_img = ele.wxer
-
-                          }
-                      });
-                      this_.getstates()
-                  }
-              }
-          })
+      // getimage: function () {
+      //     var this_ = this
+      //     $.ajax({
+      //         type: 'POST',
+      //         url: '/bigmember/use/equity',
+      //         data: {
+      //
+      //         },
+      //         success: function (res) {
+      //             if (res.data) {
+      //                 var customers = res.data.customers
+      //                 customers.forEach(function (ele) {
+      //                     if (ele.vip == false) {
+      //                         this_.img = ele.wxer
+      //
+      //                     } else if (ele.vip == true) {
+      //                         this_.vip_img = ele.wxer
+      //
+      //                     }
+      //                 });
+      //                 this_.getstates()
+      //             }
+      //         }
+      //     })
+      // },
+      getKefuInfo: function () {
+        var _this = this
+        $.ajax({
+          type: 'post',
+          url: '/bigmember/use/getCustom',
+          success: function (res) {
+            if (res && res.data) {
+              const resData = res.data || {}
+              _this.url = resData.wxer
+              _this.getstates()
+            }
+          }
+        })
       },
       getstates: function () {
         var this_ = this
@@ -70,11 +84,11 @@ var consultDialog = new Vue({
                     }
                 }
                 if(this_.isbuy_big){
-                  this_.url = this_.vip_img
+                  // this_.url = this_.vip_img
                   this_.text='扫一扫,立即联系您的专属客服'
 
                 }else{
-                  this_.url = this_.img
+                  // this_.url = this_.img
                   this_.text='扫一扫,立即联系客户经理'
                 }
             }
@@ -82,7 +96,7 @@ var consultDialog = new Vue({
     },
     close: function (val) {
           this[val] = false
-   },   
+   },
   }
 })