|
@@ -269,11 +269,22 @@
|
|
created: function () {
|
|
created: function () {
|
|
let userid = localStorage.getItem('frontend-userid');
|
|
let userid = localStorage.getItem('frontend-userid');
|
|
let that = this;
|
|
let that = this;
|
|
|
|
+ if(userid == null || userid === undefined){
|
|
|
|
+ this.$router.push('login');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
BasicFunction.get_data('smartUsers/list?uid=' + userid, function (res) {
|
|
BasicFunction.get_data('smartUsers/list?uid=' + userid, function (res) {
|
|
// console.log('----- User Info ----- ' + userid);
|
|
// console.log('----- User Info ----- ' + userid);
|
|
// console.log(res);
|
|
// console.log(res);
|
|
if (res.ret === '10000') {
|
|
if (res.ret === '10000') {
|
|
- if (res.model.list[0].phone.length !== 0) that.$router.push('presentRegister');
|
|
|
|
|
|
+ if(res.model === undefined || res.model == null || res.model.list == undefined || res.model.list.length <= 0){
|
|
|
|
+ this.$router.push('login');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if (res.model.list[0].phone.length !== 0) {
|
|
|
|
+ that.$router.push('presentRegister');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}, {});
|
|
}, {});
|
|
}
|
|
}
|