jason.lu há 6 anos atrás
pai
commit
b29ae1ade4
1 ficheiros alterados com 4 adições e 3 exclusões
  1. 4 3
      sourcecode/h5app/vue/src/components/schoolidCard.vue

+ 4 - 3
sourcecode/h5app/vue/src/components/schoolidCard.vue

@@ -177,12 +177,13 @@
                 BasicFunction.get_data("smartIdentity/list?userId=" + userId, function (response) {
                     // console.log("------ Data Rcvd in getReviewInfo --------");
                     // console.log(response);
-                    if (response === undefined || response.model === undefined || response.model.list === undefined || response.model.list.length === 0) {
-                        that.$router.push('index');
+                    if (response == undefined || response.model == undefined || response.model.list == undefined || response.model.list.length == 0) {
+                        that.$router.push('login');
+                        return;
                     }
                     try {
                         let t = response.model.list;
-                        if (response.ret === "10000") {
+                        if (response.ret === "10000" && t[0] != undefined && t[0].userSex != undefined) {
                             that.gender = "" + t[0].userSex; // 左侧是vue页面内的变量名字, 右侧是后台数据里的变量名称
                             that.dormDistrict = t[0].dormDistrict.toString(); //TODO: 请注意文本数字转换
                             that.reviewDo = t[0];