瀏覽代碼

fix: same phone value watch bug

fenghao 3 年之前
父節點
當前提交
dfdc3106cb
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      src/views/platform/profile/components/UserInfoItem.vue

+ 14 - 0
src/views/platform/profile/components/UserInfoItem.vue

@@ -172,6 +172,13 @@ export default {
         })
         return
       }
+      if (this.value === this.initial) {
+        this.$message({
+          type: 'warning',
+          message: `${this.config.tipText}不能相同`
+        })
+        return
+      }
       authcodeSend({
         [this.config.typeKey]: this.value
       })
@@ -215,6 +222,13 @@ export default {
         })
         return
       }
+      if (this.value === this.initial) {
+        this.$message({
+          type: 'warning',
+          message: `${this.config.tipText}不能相同`
+        })
+        return
+      }
       authcodeCheck({
         [this.config.typeKey]: this.value,
         [this.config.codeKey]: this.code