JacquesLu 6 tahun lalu
induk
melakukan
81fdaf7976

+ 6 - 1
sourcecode/h5app/vue/src/components/schoolCard.vue

@@ -67,7 +67,7 @@
                 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) {
+                    if (res.model === undefined || res.model.length === 0 || res === undefined ) {
                         Toast.fail('上传失败,请重试');
                         return;
                     }
@@ -111,6 +111,11 @@
             BasicFunction.get_data('smartIdentity/list?userId=' + userid, function (res) {
                 // console.log('----- User Identity -----');
                 // console.log(res);
+                if(res === undefined || res.model === undefined )
+                {
+                    Toast('读取失败,请检查网络');
+                    that.$router.push('verify');
+                }
                 if (res.ret === '10000') {
                     var t=res.model.list;
                     that.status=t[0].userReviewStatus;

+ 5 - 0
sourcecode/h5app/vue/src/components/schoolidCard.vue

@@ -151,6 +151,8 @@
                 BasicFunction.get_data("smartUsers/list?uid=" + userId, function (response) {
                     // console.log("------ Data Rcvd in getIdentityInfo --------");
                     // console.log(response);
+                    if(response === undefined){
+                        that.$router.push('index');}
                     if (response.ret === "10000") {
                         let t = response.model.list;
                         that.personName = t[0].name; // 左侧是vue页面内的变量名字, 右侧是后台数据里的变量名称
@@ -171,6 +173,9 @@
                 BasicFunction.get_data("smartIdentity/list?userId=" + userId, function (response) {
                     // console.log("------ Data Rcvd in getReviewInfo --------");
                     // console.log(response);
+                    if( response === undefined){
+                        that.$router.push('index');
+                    }
                     if (response.ret === "10000") {
                         var t = response.model.list;
                         that.gender = ""+t[0].userSex; // 左侧是vue页面内的变量名字, 右侧是后台数据里的变量名称