diff --git a/src/login.vue b/src/login.vue
index ecf412e..cece13f 100644
--- a/src/login.vue
+++ b/src/login.vue
@@ -20,7 +20,7 @@
@@ -53,7 +53,8 @@ export default {
tel: "",
yzm:"",
yztoken:"",
- Verification:""
+ Verification:"",
+ ifsign:false
};
},
methods: {
@@ -63,6 +64,11 @@ export default {
off() {
this.ifshow = false;
},
+ loginpwd(){
+ this.$router.push({
+ path: `/loginpwd`,
+ })
+ },
yz() {
let yz=""
if (this.tel != "") {
@@ -74,6 +80,7 @@ export default {
window.console.log(res.data.data);
yz=res.data.data.yz;
t.yztoken=yz
+ t.ifsign=res.data.data.register
}).catch(function(error) {
window.console.log(error);
});
@@ -84,12 +91,17 @@ export default {
},
sub(){
let t=this;
- if(t.tel&&t.yzm){
+ window.console.log(t.ifsign,4859)
+ if(t.ifsign){
+ if(t.tel&&t.yzm){
this.axios.post("http://lawpro.earnest.pro/api/Main/isVerification",{Verification: t.yzm,yz:this.yztoken, mobile:this.tel}).then((res)=>{
if(res.data.code==200){
this.axios.post("http://lawpro.earnest.pro/api/Main/sign",{yz:t.yztoken,Verification:t.yzm,mobile:this.tel}).then((res)=>{
window.console.log(res)
localStorage.setItem('token', res.data.data)
+ this.$router.push({
+ path: `/index`,
+ })
})
}
window.console.log(res)
@@ -97,6 +109,12 @@ export default {
window.console.log(err)
})
}
+ }else{
+ this.$router.push({
+ path: `/sign?yztoken=`+t.yztoken+'&yzm='+t.yzm+'&tel='+t.tel,
+ })
+ }
+
window.console.log( t.yztoken,t.Verification,9652)
}
}
diff --git a/src/loginpwd.vue b/src/loginpwd.vue
index 8327423..7a1d9ae 100644
--- a/src/loginpwd.vue
+++ b/src/loginpwd.vue
@@ -10,18 +10,18 @@
-->
-
+
-
+
未注册手机验证后自动登录
注册即同意《隐私保护指引》
-
+
密码登录
需要帮助?
@@ -52,7 +52,9 @@
export default {
data() {
return {
- ifshow: false
+ ifshow: false,
+ username:"",
+ pwd:""
};
},
methods: {
@@ -61,6 +63,15 @@ export default {
},
off(){
this.ifshow=false
+ },
+ sub(){
+ let t=this;
+ this.axios.post("http://lawpro.earnest.pro/api/Main/login",{uname:t.username,password:t.pwd}).then((res)=>{
+ localStorage.setItem('token', res.data.data)
+ this.$router.push({
+ path: `/index`,
+ })
+ })
}
}
};
diff --git a/src/router.js b/src/router.js
index 66e3ba0..7bc237a 100644
--- a/src/router.js
+++ b/src/router.js
@@ -15,10 +15,15 @@ import IndexReport from "./IndexReport"
import IndexReport1 from "./IndexReport1"
import IndexReport2 from "./IndexReport2"
import Answer from "./Answer"
+import sign from "./sign"
const router=new Router({
routes: [
{
- path: '/',
+ path: '/sign',
+ component: sign
+ },
+ {
+ path: '/IndexReport',
component: IndexReport
},
{
diff --git a/src/sign.vue b/src/sign.vue
new file mode 100644
index 0000000..96cafc1
--- /dev/null
+++ b/src/sign.vue
@@ -0,0 +1,233 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
未注册手机验证后自动登录
+
注册即同意《隐私保护指引》
+
+
+
+
+
+
+
+
\ No newline at end of file