Browse Source

feat:产品服务体系页面更换客服二维码接口

zhangsiya 1 year ago
parent
commit
9d7726beca

+ 22 - 45
src/web/staticres/serviceSystem/js/serviceSystem.js

@@ -8,11 +8,10 @@ var vNode = new Vue({
             tabs: 0,
             tablist: ['供应商服务', '采购单位服务', '招标代理机构服务'],
             isshow: false,
-            text: '扫一扫,立即联系客户经理',
-            // 扫一扫,立即联系您的专属客服
-            url: '',
-            img: "",
-            vip_img: "",
+            kefu: {
+              text: '扫一扫,立即联系客户经理',
+              qr: ''
+            },
             loginFlag: false,
             isbuy_vip: false,
             isbuy_big: false,
@@ -31,7 +30,7 @@ var vNode = new Vue({
           this.urlParams = this.getUrlKey('from')
         }
         this.getcode()
-        this.getImage()
+        this.getKefuInfo()
     },
     mounted: function () {
         this.calcFixedTop()
@@ -79,30 +78,22 @@ var vNode = new Vue({
             })
 
         },
-        getImage: function() {
-            var this_ = this
-            // 此接口未登录也能获取客服信息
-            $.ajax({
-                type: 'POST',
-                url: '/bigmember/use/equity',
-                success: function (res) {
-                    if (res.data) {
-                        // 客服二维码
-                        var customers = res.data.customers
-                        customers.forEach(function (ele) {
-                            if (ele.vip) {
-                              this_.vip_img = ele.wxer
-                            } else  {
-                              this_.img = ele.wxer
-                            }
-                        });
-                    }
-                }
-            })
+       // 获取客服信息
+        getKefuInfo: function () {
+          var _this = this
+          $.ajax({
+            type: 'post',
+            url: '/bigmember/use/getCustom',
+            success: function (res) {
+              if (res && res.data) {
+                const resData = res.data || {}
+                _this.kefu.qr = resData.wxer
+              }
+            }
+          })
         },
         close: function(val) {
             this[val] = false
-
         },
         export_my: function() {//自助导出
             if (this.loginFlag) {
@@ -138,7 +129,7 @@ var vNode = new Vue({
                 //去购买
                 window.location.href = "/swordfish/page_big_pc/free/svip/buy"
             } else {
-                // 进入续费活动页 
+                // 进入续费活动页
                 // window.location.href="/swordfish/page_big_pc/free/svip/buy?type=renew"
                 window.location.href = this.vipRenewActivityPage
               }
@@ -153,7 +144,7 @@ var vNode = new Vue({
               }
             } else {
               // this.toast('您已开通大会员')
-              // 进入续费活动页 
+              // 进入续费活动页
               window.location.href = this.bigRenewActivityPage
             }
           }
@@ -163,25 +154,11 @@ var vNode = new Vue({
           // this.vipshow = true
           location.href = '/page_workDesktop/'
         },
-        showBigCustomQrDialog: function () {
-            if (this.isbuy_big || this.powerInfo.entniche) {
-                this.text = '扫一扫,立即联系您的专属客服'
-                this.url = this.vip_img
-            } else {
-                this.text = '扫一扫,立即联系客户经理'
-                this.url = this.img
-            }
-            this.isshow = true
-        },
         consultation: function(val) {
-
             if (val == 0 && this.isbuy_big) {//供应商服务
-                this.text = '扫一扫,立即联系您的专属客服'
-                this.url = this.vip_img
-
+              this.kefu.text = '扫一扫,立即联系您的专属客服'
             } else {
-                this.text = '扫一扫,立即联系客户经理'
-                this.url = this.img
+              this.kefu.text = '扫一扫,立即联系客户经理'
             }
             this.isshow = true
         },

+ 2 - 2
src/web/templates/frontRouter/pc/serviceSystem/free/index.html

@@ -975,9 +975,9 @@
                 <img src="/serviceSystem/img/close.png" alt="" class="close" @click.stop="close('isshow')">
                 <div class="title">立即咨询</div>
                 <div class="box">
-                    <img :src="url" alt="">
+                    <img :src="kefu.qr" alt="">
                 </div>
-                <p class="text">{text}</p>
+                <p class="text">{kefu.text}</p>
             </div>
         </div>
         <div class="model_ toast_model" v-show="showToast"  @click.self="close('showToast')">