Sfoglia il codice sorgente

微信客服链接

baijunde 1 anno fa
parent
commit
ef697a969a

+ 12 - 1
src/components/customerService/floatingBar.vue

@@ -7,6 +7,11 @@
         <img src="../../assets/customerService/customerService.png" alt="">
         <span>客服</span>
       </div>
+      <div class="aiSupport flex f-c a-c " @click="wechatService" v-if="display&&supportStaffUrl !== null">
+        <!-- <img src="../../assets/customerService/customerService.png" alt=""> -->
+        <span>微信</span>
+        <span>客服</span>
+      </div>
       <el-popover placement="right-end" width="30" trigger="hover" v-if="display">
         <div class="flex f-c a-c">
           <img :src="wechatPictureUrl" alt="" style="width: 130px;height:130px;">
@@ -40,6 +45,7 @@ export default {
       qrcodeHeight: "130",
       wechatPictureUrl:"",
       display:"",
+      supportStaffUrl:''
     }
   },
   // 生命周期函数
@@ -57,9 +63,14 @@ export default {
         if (res.code == '200') {
           this.display=res.data.display;
           this.wechatPictureUrl=process.env.APP_BASE_URL+ res.data.wechatPictureUrl;
+          this.supportStaffUrl = res.data.supportStaffUrl
+          console.log(this.supportStaffUrl.length);
         }
       });
     },
+    wechatService(){
+      window.open(this.supportStaffUrl, '_blank');
+    },
     //二维码生成插件
     creatQrCode(text) {
       // 查找并删除旧的二维码DOM元素
@@ -107,7 +118,7 @@ export default {
 .floatingBar {
   width: auto;
   position: fixed;
-  bottom: 10%;
+  bottom: 7%;
   right: 0;
   z-index: 99;
   background: #FFFFFF;

+ 11 - 0
src/views/Sys/PublicizeImg.vue

@@ -86,6 +86,12 @@
           <i v-else class="el-icon-plus avatar-uploader-icon"></i>
         </el-upload>
       </div>
+      <div>
+        上传客服:
+        <el-input v-model="supportStaffUrl" placeholder="请输入客服链接"></el-input>
+
+      </div>
+      <!-- <a href="https://work.weixin.qq.com/kfid/kfcf52bd389cde8a421">https://work.weixin.qq.com/kfid/kfcf52bd389cde8a421</a> -->
       <span slot="footer" class="dialog-footer">
         <el-button size="small" @click="dialogVisible = false">取 消</el-button>
         <el-button size="small" type="primary" @click="submitForm">确 定</el-button>
@@ -173,6 +179,7 @@ export default {
           sortable: false,
         },
       ],
+      supportStaffUrl:''
     };
   },
   created() {
@@ -260,12 +267,14 @@ export default {
       this.dialogVisible = true
       this.CarFrontFile = {}
       this.qrCodeImage = ''
+      this.supportStaffUrl = ''
       this.$api.role
         .pictureFind(params.row.userId)
         .then((res) => {
           if (res.code == "200") {
             if (res.data) {
               this.qrCodeImage = process.env.BASE_URL + res.data.wechatPictureUrl
+              this.supportStaffUrl = res.data.supportStaffUrl
               res.data.url = res.data.wechatPictureUrl
               this.CarFrontFile = res.data
             }
@@ -295,6 +304,7 @@ export default {
       let data = {
         wechatpicture: this.CarFrontFile.id,
         wechatPictureUrl: this.CarFrontFile.url,
+        supportStaffUrl:this.supportStaffUrl,
         userId: this.formData.userId,
         userName: this.formData.name,
       }
@@ -302,6 +312,7 @@ export default {
         .pictureSave(data)
         .then((res) => {
           if (res.code == "200") {
+            this.supportStaffUrl = ''
             this.$message({
               message: res.msg || '操作成功',
               type: 'success'