Jelajahi Sumber

打印水印隐藏手机号中间几位

natasha 2 minggu lalu
induk
melakukan
7b9aafe341

+ 9 - 1
src/views/bookShelf/components/LexicalType.vue

@@ -1168,7 +1168,15 @@ export default {
               this.isPrintMore = true;
               setTimeout(() => {
                 waterMark.set(
-                  this.userMessage.user_name + " " + this.userMessage.phone,
+                  this.userMessage.user_name +
+                    " " +
+                    (this.userMessage.phone
+                      ? this.userMessage.phone.substring(0, 3) +
+                        "****" +
+                        this.userMessage.phone.substring(
+                          this.userMessage.phone.length - 4
+                        )
+                      : ""),
                   "",
                   "showWaterMarkLexical"
                 );

+ 18 - 2
src/views/bookShelf/components/PrintModel.vue

@@ -1322,7 +1322,15 @@ export default {
       this.resArr = resArr;
       setTimeout(() => {
         waterMark.set(
-          this.userMessage.user_name + " " + this.userMessage.phone,
+          this.userMessage.user_name +
+            " " +
+            (this.userMessage.phone
+              ? this.userMessage.phone.substring(0, 3) +
+                "****" +
+                this.userMessage.phone.substring(
+                  this.userMessage.phone.length - 4
+                )
+              : ""),
           "",
           "showWaterMark"
         );
@@ -1789,7 +1797,15 @@ export default {
       this.isPrintMore = true;
       setTimeout(() => {
         waterMark.set(
-          this.userMessage.user_name + " " + this.userMessage.phone,
+          this.userMessage.user_name +
+            " " +
+            (this.userMessage.phone
+              ? this.userMessage.phone.substring(0, 3) +
+                "****" +
+                this.userMessage.phone.substring(
+                  this.userMessage.phone.length - 4
+                )
+              : ""),
           "",
           "showWaterMarks"
         );