ccj 2 лет назад
Родитель
Сommit
89f2d79dfa
2 измененных файлов с 24 добавлено и 23 удалено
  1. 23 22
      src/views/login/index.vue
  2. 1 1
      vue.config.js

+ 23 - 22
src/views/login/index.vue

@@ -38,7 +38,7 @@
           </el-col>
         </el-row>
       </el-form-item>
-      <el-form-item prop="checkCode">
+      <!-- <el-form-item prop="checkCode">
         <el-row :span="24" style="display: flex; align-items: center">
           <el-col :span="20">
             <el-input v-model="loginForm.checkCode" auto-complete="off" placeholder="请输入手机验证码"></el-input>
@@ -52,7 +52,7 @@
           </el-col>
         </el-row>
       </el-form-item>
-      <div class="tips">手机验证码五分钟内有效</div>
+      <div class="tips">手机验证码五分钟内有效</div> -->
       <el-button :loading="loading" type="primary" style="width: 100%; margin-bottom: 30px"
         @click.native.prevent="nextLogin">进入</el-button>
       <!-- handleLogin -->
@@ -166,18 +166,18 @@
               trigger: "blur",
             },
           ],
-          checkCode: [{
-              required: true,
-              message: "请输入手机验证码",
-              trigger: "blur",
-            },
-            {
-              min: 6,
-              max: 6,
-              message: "请输入6位手机验证码",
-              trigger: "blur",
-            },
-          ],
+          // checkCode: [{
+          //     required: true,
+          //     message: "请输入手机验证码",
+          //     trigger: "blur",
+          //   },
+          //   {
+          //     min: 6,
+          //     max: 6,
+          //     message: "请输入6位手机验证码",
+          //     trigger: "blur",
+          //   },
+          // ],
         },
         loading: false,
         rememberMe: true,
@@ -207,14 +207,15 @@
       nextLogin() { //校验验证码
         this.$refs.loginForm.validate(async (valid) => {
           if (valid) {
-            getCheckInfo({
-              phone: this.loginForm.username,
-              verifyCode: this.loginForm.checkCode
-            }).then(response => {
-              if (response.code == 200) { //验证码校验成功   登录
-                this.handleLogin()
-              }
-            })
+            // getCheckInfo({
+            //   phone: this.loginForm.username,
+            //   verifyCode: this.loginForm.checkCode
+            // }).then(response => {
+            //   if (response.code == 200) { //验证码校验成功   登录
+            //     this.handleLogin()
+            //   }
+            // })
+            this.handleLogin()
           }
         })
       },

+ 1 - 1
vue.config.js

@@ -56,7 +56,7 @@ module.exports = {
         },
         proxy: {
             '/pb': {
-                target: 'http://192.168.110.9:8099/', 
+                target: 'https://api.changyuntong56.com/', 
                 // target: 'http://192.168.110.9:8099/',       
                 // target: 'https://apitest.changyuntong56.com',
                 changeOrigin: true, // 开启代理:在本地会创建一个虚拟服务端,然后发送请求的数据,并同时接收请求的数据,这样服务端和服务端进行数据的交互就不会有跨域问题