Browse Source

host移除,企业登录页调整

zwq 6 years ago
parent
commit
e6002cdf4b
2 changed files with 14 additions and 15 deletions
  1. 14 14
      src/view/login/index.vue
  2. 0 1
      vue.config.js

+ 14 - 14
src/view/login/index.vue

@@ -55,7 +55,7 @@
                             type="small"
                             size="large"
                             :color="!phone||!code?'#DDDDDD':'#0177FF'"
-                            @cick="login"
+                            @click="login"
                             text="登录"
                             style="height:47px;margin-top: 65px;border-radius: 47px;font-size: 16px;border-width: 0">
 
@@ -76,7 +76,7 @@
 </template>
 
 <script>
-    // import {postAction} from '@/api/manage'
+    import {postAction} from '@/api/manage'
     import {Button, Cell, CellGroup, Field, Toast, Col, Row} from 'vant';
     import {setStore, getStore} from "@/utils/storage";
 
@@ -109,7 +109,7 @@
         created() {
             //企业已登录,跳转企业首页
             if (getStore('login')) {
-                this.$router.replace({name: 'user', params: {enterprise_id: 123}});
+                this.$router.replace({path:'/business',query: { enterprise_id: 123 }});
             }
         },
         methods: {
@@ -117,7 +117,7 @@
                 this.loading = true;
                 //登录成功,缓存用户信息,跳转相应页面
                 setStore('login', "123");
-                this.$router.replace({path:'/user',query: { enterprise_id: 123 }});
+                this.$router.replace({path:'/business',query: { enterprise_id: 123 }});
             },
             //获取验证码
             sendCode() {
@@ -135,16 +135,16 @@
                 }, 1000);
                 let smsParams = {};
                 smsParams.phone = this.phone;
-                // postAction(this.url.getSmsCaptcha, smsParams)
-                //     .then(() => {
-                //         setTimeout(Toast('验证码发送中~'), 500);
-                //     })
-                //     .catch(() => {
-                //         setTimeout(Toast('验证码发送失败~'), 500);
-                //         clearInterval(interval);
-                //         this.state.time = 60;
-                //         this.state.smsSendBtn = false;
-                //     });
+                postAction(this.url.getSmsCaptcha, smsParams)
+                    .then(() => {
+                        setTimeout(Toast('验证码发送中~'), 500);
+                    })
+                    .catch(() => {
+                        setTimeout(Toast('验证码发送失败~'), 500);
+                        clearInterval(interval);
+                        this.state.time = 60;
+                        this.state.smsSendBtn = false;
+                    });
             },
             join() {
                 this.$router.push({name: 'join'})

+ 0 - 1
vue.config.js

@@ -20,7 +20,6 @@ module.exports = {
     },
 
     devServer: {
-        host:'192.168.101.13',
         port: 8082,
         proxy: {
             '/happyjob': {