Parcourir la source

feat:附件下载增加客服接口

zhangsiya il y a 1 an
Parent
commit
8844004cec

+ 3 - 3
src/jfw/modules/app/src/web/templates/frontRouter/fileRecord/sess/index.html

@@ -395,15 +395,15 @@
               <h3>
                   <span>
                       <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/wx2.png" alt="微信icon">
-                      <span>客户成功经理</span>
+                      <span>{ kefuInfo.remark || '专属客服'}</span>
                   </span>
                   <span class="close-icon" @click="kfDialogShow = false">
                       <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/images/icon-close.png?v={{Msg "seo" "version"}}" alt="">
                   </span>
               </h3>
               <div class="content">
-                  <p class="qr-code" v-if="QRCode">
-                      <img id="QRCode-pic" :src="QRCode" alt="">
+                  <p class="qr-code" v-if="kefuInfo.wxer">
+                      <img id="QRCode-pic" :src="kefuInfo.wxer" alt="">
                   </p>
                   <p>微信扫一扫</p>
               </div>

+ 22 - 17
src/web/staticres/common-module/file-pack/js/index-wx.js

@@ -119,8 +119,12 @@ var vm = new Vue({
         freeNum: 0
       },
       kfDialogShow: false,
-      // 二维码
-      QRCode: ''
+      // 客服信息
+      kefuInfo: {
+        name: '',
+        remark: "专属客服",
+        wxer: ''
+      }
     }
   },
   computed: {
@@ -130,6 +134,7 @@ var vm = new Vue({
     }
   },
   created: function () {
+      this.getKefuInfo()
       this.getPType("type")
       this.years = new Date().getFullYear()
       this.months = parseInt(new Date().getMonth() + 1)
@@ -156,21 +161,21 @@ var vm = new Vue({
             _this.userPower.vipStatus = resData.vipStatus
             _this.userPower.memberStatus = resData.memberStatus
             _this.userPower.power = resData.power
-            // 客服二维码获取
-            if(resData.customers && resData.customers.length > 0 ){
-              var qrImgs = {
-                vip: '',
-                default: ''
-              }
-              resData.customers.forEach(function (ele) {
-                if (ele.vip) {
-                  qrImgs.vip = ele.wxer
-                } else {
-                  qrImgs.default = ele.wxer
-                }
-              })
-              _this.QRCode = _this.userPower.isFree ? qrImgs.default : qrImgs.vip
-            }
+          }
+        }
+      })
+    },
+    // 获取客服信息
+    getKefuInfo () {
+      var _this = this
+      $.ajax({
+        type: 'post',
+        url: '/bigmember/use/getCustom',
+        data: { type: "kf" },
+        success: function (res) {
+          if (res && res.data) {
+            const resData = res.data || {}
+            _this.kefuInfo = resData
           }
         }
       })

+ 22 - 17
src/web/staticres/common-module/file-pack/js/index.js

@@ -93,8 +93,12 @@ var vm = new Vue({
         freeNum: 0
       },
       kfDialogShow: false,
-      // 二维码
-      QRCode: '',
+      // 客服信息
+      kefuInfo: {
+        name: '',
+        remark: "专属客服",
+        wxer: ''
+      },
       // 保存图片是否成功
       savePicSuccess: false,
       picImgUrl: null
@@ -107,6 +111,7 @@ var vm = new Vue({
     }
   },
   created: function () {
+    this.getKefuInfo()
     this.getPType("type")
     this.years = new Date().getFullYear()
     this.months = parseInt(new Date().getMonth() + 1)
@@ -133,21 +138,21 @@ var vm = new Vue({
             _this.userPower.vipStatus = resData.vipStatus
             _this.userPower.memberStatus = resData.memberStatus
             _this.userPower.power = resData.power
-            // 客服二维码获取
-            if(resData.customers && resData.customers.length > 0 ){
-              var qrImgs = {
-                vip: '',
-                default: ''
-              }
-              resData.customers.forEach(function (ele) {
-                if (ele.vip) {
-                  qrImgs.vip = ele.wxer
-                } else {
-                  qrImgs.default = ele.wxer
-                }
-              })
-              _this.QRCode = _this.userPower.isFree ? qrImgs.default : qrImgs.vip
-            }
+          }
+        }
+      })
+    },
+    // 获取客服信息
+    getKefuInfo () {
+      var _this = this
+      $.ajax({
+        type: 'post',
+        url: '/bigmember/use/getCustom',
+        data: { type: "kf" },
+        success: function (res) {
+          if (res && res.data) {
+            const resData = res.data || {}
+            _this.kefuInfo = resData
           }
         }
       })

+ 4 - 4
src/web/templates/frontRouter/wx/fileRecord/sess/index.html

@@ -14,7 +14,7 @@
     <meta name="apple-mobile-web-app-capable" content="yes">
     <meta name="apple-mobile-web-app-status-bar-style" content="black">
     <meta name="format-detection" content="telephone=no">
-    <title>附件下载</title>
+    <title>22附件下载</title>
     <script src="/big-member/js/rem.js"></script>
     <!--S-当前页面的css资源-->
     <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
@@ -404,15 +404,15 @@
               <h3>
                   <span>
                       <img src="{{Msg "seo" "cdn"}}/common-module/collection/image/wx2.png" alt="微信icon">
-                      <span>客户成功经理</span>
+                      <span>{ kefuInfo.remark || '专属客服' }</span>
                   </span>
                   <span class="close-icon" @click="kfDialogShow = false">
                       <img id="QRCode-pic" src="{{Msg "seo" "cdn"}}/jyapp/images/icon-close.png?v={{Msg "seo" "version"}}" alt="">
                   </span>
               </h3>
               <div class="content">
-                  <p class="qr-code">
-                      <img :src="QRCode" alt="">
+                  <p class="qr-code" v-if="kefuInfo.wxer">
+                      <img :src="kefuInfo.wxer" alt="">
                   </p>
                   <p>微信扫一扫</p>
               </div>