Browse Source

验证码

xuqiang 4 năm trước cách đây
mục cha
commit
323423ee2a

+ 11 - 5
src/main/pc-space/src/components/LoginInfo.vue

@@ -96,10 +96,10 @@ export default {
     mixins: [phone],
     components: { RegisterInfo },
     props: {
-        Show: {
-            type: Boolean,
-            default: false
-        }
+        // Show: {
+        //     type: Boolean,
+        //     default: false
+        // }
     },
     data() {
         return {
@@ -108,6 +108,7 @@ export default {
             isShow2: false,
             phoneLogin: false,
             rules: {},
+            Show: false,
             form: {},
             time: 0
         };
@@ -127,6 +128,9 @@ export default {
             this.isShow = true;
             this.isShow2 = true;
         },
+        flag() {
+            this.Show = true;
+        },
         refreash() {
             this.Show = false;
             this.isShow = false;
@@ -148,7 +152,9 @@ export default {
         },
         // 验证码
         send() {
-            this.sendMsg(this.form.phone);
+            if (this.time === 0) {
+                this.sendMsg(this.form.phone);
+            }
         },
         // 密码登录
         check() {

+ 5 - 2
src/main/pc-space/src/components/PageHeader.vue

@@ -45,12 +45,12 @@
                     </el-dropdown>
                 </div>
                 <!-- <div v-else class="login" @click="show = true">[登录]</div> -->
-                <el-button v-else class="login" plain @click="show = true">[登录]</el-button>
+                <el-button v-else class="login" plain @click="Login">[登录]</el-button>
 
                 <!-- <div class="login login1">中文</div> -->
             </div>
         </div>
-        <login-info :Show="show" @close="show = false"></login-info>
+        <login-info ref="ref" @close="show = false"></login-info>
     </div>
 </template>
 <script>
@@ -111,6 +111,9 @@ export default {
         this.getActive();
     },
     methods: {
+        Login() {
+            this.$refs.ref.flag();
+        },
         ...mapMutations(['updateUserInfo']),
         // tab(item) {
         //     this.active = item;

+ 3 - 1
src/main/pc-space/src/components/RegisterInfo.vue

@@ -128,7 +128,9 @@ export default {
         },
         // 验证码
         send() {
-            this.sendMsg(this.form.phone);
+            if (this.time === 0) {
+                this.sendMsg(this.form.phone);
+            }
         },
         handleClose() {
             this.$emit('refreash');

+ 3 - 1
src/main/pc-space/src/components/SecurityPhone.vue

@@ -62,7 +62,9 @@ export default {
     },
     methods: {
         send() {
-            this.sendMsg(this.ruleForm.phone);
+            if (this.time === 0) {
+                this.sendMsg(this.ruleForm.phone);
+            }
         },
         phoneSend() {
             this.$refs.form2.validate(valid => {

+ 3 - 1
src/main/pc-space/src/views/user/Modifypad.vue

@@ -120,7 +120,9 @@ export default {
         ...mapMutations(['updateUserInfo']),
         // 验证码
         send() {
-            this.sendMsg(this.userInfo.phone);
+            if (this.time === 0) {
+                this.sendMsg(this.userInfo.phone);
+            }
         },
         codeSend() {
             this.$refs.form.validate(valid => {

+ 3 - 1
src/main/pc-space/src/views/user/Security.vue

@@ -76,7 +76,9 @@ export default {
     },
     methods: {
         send() {
-            this.sendMsg(this.userInfo.phone);
+            if (this.time === 0) {
+                this.sendMsg(this.userInfo.phone);
+            }
         },
         codeSend() {
             // this.flag = false;

+ 3 - 1
src/main/pc-space/src/views/user/Transaction.vue

@@ -76,7 +76,9 @@ export default {
     },
     methods: {
         send() {
-            this.sendMsg(this.userInfo.phone);
+            if (this.time === 0) {
+                this.sendMsg(this.userInfo.phone);
+            }
         },
 
         codeSend() {