guhongwei 5 年之前
父節點
當前提交
1cc703f3b8
共有 2 個文件被更改,包括 27 次插入7 次删除
  1. 12 0
      src/views/direct.vue
  2. 15 7
      src/views/market/marketlists.vue

+ 12 - 0
src/views/direct.vue

@@ -617,8 +617,20 @@ export default {
     // 专家详情
     twoBtnDetail(data) {
       this.dialogExport = true;
+      data.phone = this.phoneNumFilter(data.phone);
+      data.cardnumber = this.cardnumberNumFilter(data.cardnumber);
       this.$set(this, `exportInfo`, data);
     },
+    phoneNumFilter(phone) {
+      let start = phone.slice(0, 3);
+      let end = phone.slice(-4);
+      return `${start}****${end}`;
+    },
+    cardnumberNumFilter(cardnumber) {
+      let start = cardnumber.slice(0, 4);
+      let end = cardnumber.slice(-3);
+      return `${start}****${end}`;
+    },
 
     zhuanjiaduijies(data) {
       this.$router.push({ path: '/live/hall/dock/zhanjiaduijie', query: { id: data.id, dockid: this.id } });

+ 15 - 7
src/views/market/marketlists.vue

@@ -212,17 +212,23 @@ export default {
       if (this.display == '2') {
         const res = await this.newfetch(this.id);
         this.$set(this, `detailInfo`, res.data);
-      }
-      // else if (this.dispaly == '1') {
-      //   const res = await this.newquery(this.id);
-      //   console.log(res.data);
-      //   this.$set(this, `detailInfo`, res.data);
-      // }
-      else if (this.dispaly == '3') {
+      } else if (this.dispaly == '3') {
         const res = await this.fetch(this.id);
+        res.data.phone = this.phoneNumFilter(res.data.phone);
+        res.data.cardnumber = this.cardnumberNumFilter(res.data.cardnumber);
         this.$set(this, `zhuanjiainfo`, res.data);
       }
     },
+    phoneNumFilter(phone) {
+      let start = phone.slice(0, 3);
+      let end = phone.slice(-4);
+      return `${start}****${end}`;
+    },
+    cardnumberNumFilter(cardnumber) {
+      let start = cardnumber.slice(0, 4);
+      let end = cardnumber.slice(-3);
+      return `${start}****${end}`;
+    },
     async clickfuwu(id) {
       this.display = '2';
       const res = await this.newfetch(id);
@@ -231,6 +237,8 @@ export default {
     async clickzhuanjia(id) {
       this.display = '3';
       const res = await this.fetch(id);
+      res.data.phone = this.phoneNumFilter(res.data.phone);
+      res.data.cardnumber = this.cardnumberNumFilter(res.data.cardnumber);
       this.$set(this, `zhuanjiainfo`, res.data);
     },
     fabu() {