StephenArk30 пре 6 година
родитељ
комит
3b672c5d40

+ 5 - 5
sourcecode/h5app/vue/src/views/PresentRegister.vue

@@ -308,12 +308,12 @@
                     return;
                 }
                 this.presentId = present.goodid;
-                this.gender = present.gender.toString();
+                this.gender = present.goodFirstKind.toString();
                 this.presentName = present.name;
-                this.desc = present.desc_long;
-                this.tag = present.tags;
-                this.imgUrl = present.imgUrl;
-                this.photo = present.imgUrl;
+                this.desc = present.description;
+                this.tag = present.goodSecondKind;
+                this.imgUrl = 'http://gift.fogice.com' + present.img;
+                this.photo = this.imgUrl;
             }
         },
         created: function () {

+ 14 - 7
sourcecode/h5app/vue/src/views/giftDetail.vue

@@ -20,9 +20,9 @@
         </div>
         <!--我的礼物信息-->
         <gift-card
-                :present-img="myPresent.imgUrl"
+                :present-img="myPresent.img"
                 :present-name="myPresent.name"
-                :present-desc="myPresent.desc_long"
+                :present-desc="myPresent.desc"
                 :owner="0"
                 :placeId="myPresent.placeId"
                 :gender="myPresent.gender"
@@ -160,7 +160,7 @@
                 }
 
                 let that = this;
-                BasicFunction.get_data('smartGoods/list?goodId=' + presentId, function (res) {
+                BasicFunction.get_data('smartGoods/list?goodid=' + presentId, function (res) {
                     if (res.ret === '10000') {
                         if(res.model === undefined || res.model == null || res.model.list == undefined || res.model.list.length <= 0){
                             Toast.fail('礼物查看遇到问题,请稍等一下再试吧');
@@ -174,14 +174,21 @@
             },
             onloadGift(){
                 let that = this;
-                let present = this.giftDo;
+                let present = {};
                 let identity = this.identityDo;
+                present.id = this.giftDo.goodid;
+                present.name = this.giftDo.name;
+                present.desc = this.giftDo.description;
+                present.status = this.giftDo.sort;
+                present.gender = this.giftDo.goodFirstKind;
                 present.comment = '';
                 present.placeId = identity.dormDistrict;
                 present.wechat = identity.userWxAccount;
+                present.img = "http://gift.fogice.com" + this.giftDo.img;
                 that.myPresent = present;
+                console.log(this.myPresent);
                 // console.log(that.myPresent);
-                if (present.status === 3) BasicFunction.get_data('smartOrderFeedback/list?goodId=' + present.id, function (res) {
+                if (present.status === 3) BasicFunction.get_data('smartOrderFeedback/list?goodid=' + present.id, function (res) {
                     // console.log(res);
                     try {
                         let comment = res.model.list[0];
@@ -194,7 +201,7 @@
                         Toast.fail('获取信息失败');
                     }
                 }, {});
-                if (present.status === 4) BasicFunction.get_data('smartGoodReview/list?goodId=' + present.id, function (res) {
+                if (present.status === 4) BasicFunction.get_data('smartGoodReview/list?goodid=' + present.id, function (res) {
                     if (res.ret === '10000') {
                         if (res.model.list.length !== 0) that.reason = res.model.list[0].displayNote;
                     } else Toast.fail('获取信息失败');
@@ -206,7 +213,7 @@
                 this.$router.push('login');
                 return;
             }
-            let present = this.$route.query.present;
+            // let presentId = this.$route.query.presentId;
             // console.log(this.$route.query.present);
             let userid = localStorage.getItem('frontend-userid');
             let that = this;

+ 1 - 1
sourcecode/h5app/vue/src/views/index.vue

@@ -133,7 +133,7 @@
                         });
                         let present = this.presents[i];
                         this.$router.push({
-                            path: 'giftDetail', query: {present: present}
+                            path: 'giftDetail', query: {presentId: present.goodid}
                         });
                     });
                 } else {