Преглед на файлове

feat: 三方认证微信添加客服二维码

cuiyalong преди 2 години
родител
ревизия
88a8662071

+ 16 - 0
src/web/staticres/common-module/mainSearch/css/third-party-verify-mobile.css

@@ -200,3 +200,19 @@
 .third-party-popover-dialog .desc-2 .p-c-h-c-item:not(:last-of-type) {
   margin-bottom: 0.16rem;
 }
+.third-party-popover-dialog .desc-qr {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  flex-direction: column;
+  margin-top: .08rem;
+  margin-bottom: .4rem;
+}
+.third-party-popover-dialog .desc-qr .p-c-h-c-img {
+  width: 1.8rem;
+  height: 1.8rem;
+}
+.desc-qr img {
+  display: block;
+  width: 100%;
+}

+ 30 - 1
src/web/staticres/common-module/mainSearch/js/third-party-verify-mobile.js

@@ -43,6 +43,7 @@ var thirdPartyVerify = {
   },
   init: function () {
     this.getKeywordsList()
+    this.getQrInfo()
   },
   getKeywordsList: function () {
     var arr = []
@@ -56,6 +57,23 @@ var thirdPartyVerify = {
     this.keywordsList = arr
     return arr
   },
+  getQrInfo: function () {
+    $.ajax({
+      url: '/commercial/customer/info',
+      type: 'GET',
+      data: {
+        module: 'tripartiteAuth'
+      },
+      success:function(res) {
+        if (res && res.data) {
+          thirdPartyVerifyDialog.setCustomerInfo(res.data.phone, res.data.wxCodeImg)
+        }
+      },
+      error:function(err) {
+        console.log(err)
+      }
+    })
+  },
   bindEvents: function () {
     $('.third-party-popover').on('click', function () {
       thirdPartyVerifyDialog.showDialog(true)
@@ -180,6 +198,12 @@ var thirdPartyVerifyDialogTemplate = `
               <span>服务体系认证:实力认证,竞争有优势</span>
             </div>
           </div>
+          <div class="t-p-main-desc-container desc-qr" v-if="isWx">
+            <div class="p-c-h-c-img">
+              <img :src="qrImgUrl" alt="客服企业微信二维码">
+            </div>
+            <div class="mt8">长按二维码加客服微信,备注认证服务</div>
+          </div>
         </div>
         <div class="j-footer">
           <div class="t-p-footer-container j-button-group">
@@ -199,7 +223,8 @@ var thirdPartyVerifyDialog = new Vue({
   data: function () {
     return {
       platform: goTemplateData.platform,
-      phone: '15136295365',
+      phone: '',
+      qrImgUrl: '',
       show: false
     }
   },
@@ -218,6 +243,10 @@ var thirdPartyVerifyDialog = new Vue({
     closeIconClick: function () {
       this.showDialog(false)
     },
+    setCustomerInfo: function (phone, qrImgUrl) {
+      this.phone = phone
+      this.qrImgUrl = qrImgUrl
+    },
     callPhone: function () {
       if (!this.isWx) {
         try {

+ 23 - 1
src/web/staticres/common-module/mainSearch/js/third-party-verify.js

@@ -42,6 +42,7 @@ var thirdPartyVerify = {
   },
   init: function () {
     this.getKeywordsList()
+    this.getQrInfo()
   },
   getKeywordsList: function () {
     var arr = []
@@ -55,6 +56,27 @@ var thirdPartyVerify = {
     this.keywordsList = arr
     return arr
   },
+  getQrInfo: function () {
+    $.ajax({
+      url: '/commercial/customer/info',
+      type: 'GET',
+      data: {
+        module: 'tripartiteAuth'
+      },
+      success:function(res) {
+        if (res && res.data) {
+          var phoneContainer = $('.third-party.popover-content-main .bid_phonetext')
+          var text = phoneContainer.text()
+          phoneContainer.text(text.replace('$tel', res.data.phone))
+          // /common-module/bidedoc/image/third-party-verify-customer.png
+          $('.third-party .t-p-verify-customer-qr > img').attr('src', res.data.wxCodeImg)
+        }
+      },
+      error:function(err) {
+        console.log(err)
+      }
+    })
+  },
   bindEvents: function () {
     this.initPopover()
     $('.biddetail-content').on('click', '.third-party-apply-for-button', function () {
@@ -70,7 +92,7 @@ var thirdPartyVerify = {
       html: true,
       content: function () {
         // 填充悬浮窗
-        return $('.third-party-popover-content-template').html().replace('$tel', '15136295365')
+        return $('.third-party-popover-content-template').html()
       },
       delay: {
         hide: 500

+ 3 - 0
src/web/staticres/pccss/pc-detail.css

@@ -929,6 +929,9 @@ a{
 .third-party.popover-content-main {
   border-top: 1px solid #ECECEC;
 }
+.third-party.popover-content-header {
+  padding-bottom: 16px;
+}
 .third-party.popover-content-header .p-c-h-title {
   font-size: 18px;
   line-height: 28px;

+ 3 - 1
src/web/staticres/public-pc/js/article-content.js

@@ -1302,9 +1302,11 @@ $(function(){
       }
     }
   }
-  if(sds&&content){
+  if (content) {
     // 第三方认证替换
     content = thirdPartyVerify.replaceKeys(content)
+  }
+  if(sds&&content){
     var wordsArray = sds.split(" ");
     if(wordsArray!=""){
       for(var i=0;i<wordsArray.length;i++){

+ 1 - 1
src/web/templates/pc/biddetail_rec.html

@@ -1316,7 +1316,7 @@
         </div>
         <div class="p-c-m-content-r">
           <div class="t-p-verify-customer-qr" title="客服企业微信二维码">
-            <img src="/common-module/bidedoc/image/third-party-verify-customer.png" alt="客服企业微信二维码" />
+            <img alt="客服企业微信二维码" />
           </div>
           <div class="p-c-m-c-r-text">添加客服微信<br />备注认证服务</div>
         </div>