jason.lu 6 tahun lalu
induk
melakukan
645de11ea8
1 mengubah file dengan 10 tambahan dan 10 penghapusan
  1. 10 10
      sourcecode/h5app/vue/src/components/schoolCard.vue

+ 10 - 10
sourcecode/h5app/vue/src/components/schoolCard.vue

@@ -66,25 +66,25 @@
                 console.log(this.photo);
                 let formData = new FormData();
                 formData.append('file', this.photo);
-                BasicFunction.get_data("fileserver/upload?sign=abcdefg", function (res) {
-                    if (res === undefined || res.model === undefined || res.model.length === 0 || res.model.list === undefined) {
+                BasicFunction.get_data("fileserver/upload?sign=abcdefg", function (resUploadPic) {
+                    if (resUploadPic === undefined || resUploadPic.model === undefined || resUploadPic.model.length === 0) {
                         Toast.fail('上传失败,请重试');
                         return;
                     }
-                    if (res.ret === '10000') {
-                        let photoURL = res.model;
+                    if (resUploadPic.ret === '10000') {
+                        let photoURL = resUploadPic.model;
                         let userid = localStorage.getItem('frontend-userid');
-                        BasicFunction.get_data('smartIdentity/list?userId=' + userid, function (res) {
+                        BasicFunction.get_data('smartIdentity/list?userId=' + userid, function (resIndentityList) {
                             // console.log('----- User Identity -----');
-                            // console.log(res);
-                            if (res.ret === '10000') {
-                                let t = res.model.list[0];
+                            // console.log(resIndentityList);
+                            if (resIndentityList.ret === '10000' && resIndentityList.model !== undefined && resIndentityList.model.list !== undefined && resIndentityList.model.list.length > 0) {
+                                let t = resIndentityList.model.list[0];
                                 t.userSchoolCardPic = photoURL;
                                 t.userReviewStatus = 100;
                                 t.reviewerNote = "未审核";
                                 t.reviewerNoteToUser = "未审核";
-                                BasicFunction.get_data('smartIdentity/updateBatch', function (res) {
-                                    if (res.ret === '10000') {
+                                BasicFunction.get_data('smartIdentity/updateBatch', function (rsIndentityUpdate) {
+                                    if (rsIndentityUpdate.ret === '10000') {
                                         Toast.success('上传成功');
                                         location.reload();
                                     }