|
@@ -66,11 +66,12 @@
|
|
|
console.log(this.photo);
|
|
|
let formData = new FormData();
|
|
|
formData.append('file', this.photo);
|
|
|
- BasicFunction.get_data("http://gift.fogice.com/server/fileserver/upload?sign=abcdefg", function (res) {
|
|
|
- // if (res.model === undefined || res.model.length === 0) {
|
|
|
- // Toast.fail('上传失败,请重试');
|
|
|
- // return;
|
|
|
- // }
|
|
|
+
|
|
|
+ BasicFunction.get_data("fileserver/upload?sign=abcdefg", function (res) {
|
|
|
+ if (res === undefined || res.model === undefined || res.model.length === 0 || res.model.list === undefined) {
|
|
|
+ Toast.fail('上传失败,请重试');
|
|
|
+ return;
|
|
|
+ }
|
|
|
try {
|
|
|
let photoURL = res.model;
|
|
|
if (res.ret === '10000') {
|
|
@@ -114,7 +115,8 @@
|
|
|
BasicFunction.get_data('smartIdentity/list?userId=' + userid, function (res) {
|
|
|
// console.log('----- User Identity -----');
|
|
|
// console.log(res);
|
|
|
- if (res === undefined || res.model === undefined) {
|
|
|
+
|
|
|
+ if (res === undefined || res.model === undefined || res.model.list === undefined) {
|
|
|
Toast('读取失败,请检查网络');
|
|
|
that.$router.push('verify');
|
|
|
}
|