Browse Source

用户协议默认为false

natasha 1 month ago
parent
commit
75c6c986ac
2 changed files with 7 additions and 3 deletions
  1. 6 2
      src/views/login/index.vue
  2. 1 1
      src/views/register/index.vue

+ 6 - 2
src/views/login/index.vue

@@ -63,7 +63,7 @@ export default {
   components: { UserAgreement },
   data() {
     return {
-      isAgree: true, // 是否同意用户协议
+      isAgree: false, // 是否同意用户协议
       form: {
         user_type: 'USER',
         user_name: '',
@@ -104,7 +104,11 @@ export default {
     signIn() {
       this.$refs.loginForm.validate((valid) => {
         if (!valid) return false;
-
+        if (!this.isAgree) {
+          // "阅读并同意用户协议"
+          this.$message.warning('阅读并同意用户协议');
+          return;
+        }
         let _form = { ...this.form, password: md5(this.form.password).toUpperCase() };
         this.$store
           .dispatch('user/login', _form)

+ 1 - 1
src/views/register/index.vue

@@ -193,7 +193,7 @@ export default {
       VerificationCodeShow: false,
       time: 60,
       showUseragreement: false,
-      isAgree: true,
+      isAgree: false,
       institutionList: [],
       parsswordType: 'password',
       twoPasswordType: 'password',