mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 02:46:46 +08:00
对登录控制验证进行整理
This commit is contained in:
@@ -33,14 +33,17 @@
|
||||
loginName: '',//10181457
|
||||
password: '',//666666
|
||||
loading:false,
|
||||
redirect: undefined
|
||||
redirect: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.redirect=options.returnUrl;
|
||||
},
|
||||
mounted() {
|
||||
//对cookies进行操作,这里是写
|
||||
//document.cookie = "mytest=qweqwe131231; path=/; max-age=" + 30*24*60*60;
|
||||
console.log('process.env.NODE_ENV',process.env.NODE_ENV);
|
||||
console.log('process.env.ENV_TYPE',process.env.ENV_TYPE);
|
||||
//console.log('process.env.NODE_ENV',process.env.NODE_ENV);
|
||||
//console.log('process.env.ENV_TYPE',process.env.ENV_TYPE);
|
||||
},
|
||||
methods: {
|
||||
submitLogin(){
|
||||
@@ -63,9 +66,14 @@
|
||||
// uni.switchTab({
|
||||
// url:'/pages/index/index'
|
||||
// })
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
if($this.redirect){
|
||||
location.href=$this.redirect;
|
||||
}else{
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
}else{
|
||||
console.log(rs.error);
|
||||
|
||||
Reference in New Issue
Block a user