|
@@ -166,7 +166,7 @@
|
|
|
BasicFunction.get_data("http://gift.fogice.com/server/fileserver/upload?sign=abcdefg", function (res) {
|
|
|
// console.log('----- upload photo result -----');
|
|
|
// console.log(res);
|
|
|
- if (res == undefined || res.model === undefined || res.model.length === 0) {
|
|
|
+ if (res === undefined || res.model === undefined || res.model.length === 0) {
|
|
|
Toast.fail('上传失败,请重试');
|
|
|
return;
|
|
|
}
|
|
@@ -191,7 +191,7 @@
|
|
|
// console.log('----- User Info -----');
|
|
|
BasicFunction.get_data('smartUsers/list?uid=' + userId, function (res) {
|
|
|
// console.log(res);
|
|
|
- if (res.ret === '10000') {
|
|
|
+ if (res.ret === '10000' && ret.model !== undefined && ret.model.list !== undefined) {
|
|
|
let user = res.model.list[0];
|
|
|
user.name = that.username;
|
|
|
user.phone = that.phone;
|
|
@@ -240,11 +240,17 @@
|
|
|
created: function () {
|
|
|
let userid = localStorage.getItem('frontend-userid');
|
|
|
let that = this;
|
|
|
- BasicFunction.get_data('smartUsers/list?uid=' + userid, function (res) {
|
|
|
+ BasicFunction.get_data('smartUsers/me?uid=' + userid, function (res) {
|
|
|
// console.log('----- User Info ----- ' + userid);
|
|
|
// console.log(res);
|
|
|
- if (res.ret === '10000') {
|
|
|
+ if (res !== undefined && res.ret === "10000"
|
|
|
+ && res.model !== undefined
|
|
|
+ && res.model.list !== undefined
|
|
|
+ && res.model.list.length > 0
|
|
|
+ && res.model.list[0].phone !== undefined) {
|
|
|
if (res.model.list[0].phone.length !== 0) that.$router.push('presentRegister');
|
|
|
+ } else {
|
|
|
+ that.$router.push('index');
|
|
|
}
|
|
|
}, {});
|
|
|
}
|
|
@@ -264,7 +270,7 @@
|
|
|
}
|
|
|
} else if (substring.length > 1) {
|
|
|
var ls = substring.charCodeAt(i + 1);
|
|
|
- if (ls == 0x20e3) {
|
|
|
+ if (ls === 0x20e3) {
|
|
|
return true;
|
|
|
}
|
|
|
} else {
|
|
@@ -276,9 +282,9 @@
|
|
|
return true;
|
|
|
} else if (0x3297 <= hs && hs <= 0x3299) {
|
|
|
return true;
|
|
|
- } else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030
|
|
|
- || hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b
|
|
|
- || hs == 0x2b50) {
|
|
|
+ } else if (hs === 0xa9 || hs === 0xae || hs === 0x303d || hs === 0x3030
|
|
|
+ || hs === 0x2b55 || hs === 0x2b1c || hs === 0x2b1b
|
|
|
+ || hs === 0x2b50) {
|
|
|
return true;
|
|
|
}
|
|
|
}
|