|
@@ -113,6 +113,7 @@
|
|
|
tag: 0,
|
|
|
photo: null,
|
|
|
loading: false,
|
|
|
+ imgUrl : "",
|
|
|
giftDo: {}
|
|
|
}
|
|
|
},
|
|
@@ -303,6 +304,9 @@
|
|
|
let present = giftDo;
|
|
|
// console.log('----- Present Info -----');
|
|
|
// console.log(present);
|
|
|
+ if(present.id == null || present.id == undefined){
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.presentId = present.id;
|
|
|
this.gender = present.gender.toString();
|
|
|
this.presentName = present.name;
|
|
@@ -317,27 +321,29 @@
|
|
|
this.$router.push('login');
|
|
|
return;
|
|
|
}
|
|
|
+ let that = this;
|
|
|
let presentId = this.$route.query.presentId;
|
|
|
if(presentId == null || presentId == undefined){
|
|
|
- presentId = BasicFunction.utils_get_parm("presentId");
|
|
|
+ presentId = BasicFunction.utils_get_param("presentId");
|
|
|
}
|
|
|
if(presentId == undefined || presentId == null){
|
|
|
- Toast.fail('请重新进入礼物页哦');
|
|
|
- this.$router.push('index');
|
|
|
- }
|
|
|
-
|
|
|
- let that = this;
|
|
|
- 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('礼物查看遇到问题,请稍等一下再试吧');
|
|
|
- that.$router.push('index');
|
|
|
- return;
|
|
|
+ // do nothing
|
|
|
+ that.giftDo = {};
|
|
|
+ that.onReadExisting(that.giftDo);
|
|
|
+ } else {
|
|
|
+ let that = this;
|
|
|
+ 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('礼物查看遇到问题,请稍等一下再试吧');
|
|
|
+ that.$router.push('index');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ that.giftDo = res.model.list[0];
|
|
|
+ that.onReadExisting(that.giftDo);
|
|
|
}
|
|
|
- that.giftDo = res.model.list[0];
|
|
|
- that.onReadExisting(that.giftDo);
|
|
|
- }
|
|
|
- }, {});
|
|
|
+ }, {});
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|