|
@@ -19,7 +19,7 @@
|
|
|
<view class="btn-ts" style="height: 130rpx; background-color: #fff;">
|
|
|
|
|
|
</view>
|
|
|
- <view class="btm-btn" @click="loading? '':reservePackage">
|
|
|
+ <view class="btm-btn" @click="loading? '':reservePackage()">
|
|
|
立即预约
|
|
|
</view>
|
|
|
</view>
|
|
@@ -47,7 +47,7 @@
|
|
|
good_id: '',
|
|
|
time_id: '',
|
|
|
status: 1,
|
|
|
- is_new: 0,//是否是新人 0->是 1->不是
|
|
|
+ is_new: '',
|
|
|
description: '',
|
|
|
loading: false,
|
|
|
}
|
|
@@ -56,19 +56,33 @@
|
|
|
this.good_id = opt.id
|
|
|
this.time_id = opt.time
|
|
|
this.status = opt.status
|
|
|
- this.is_new = opt.is_new == 0 ? 1 : 0
|
|
|
+ if(opt.is_new) {
|
|
|
+ this.is_new = opt.is_new
|
|
|
+ }
|
|
|
+
|
|
|
this.getWholeDetai()
|
|
|
},
|
|
|
methods: {
|
|
|
getWholeDetai() {
|
|
|
let obj = this
|
|
|
- getWholeDetai({}, obj.good_id, obj.time_id, obj.status, obj.is_new).then(({
|
|
|
- data
|
|
|
- }) => {
|
|
|
- obj.goodItem = data.storeInfo
|
|
|
- obj.imgList = data.storeInfo.images
|
|
|
- obj.description = data.storeInfo.description.replace(/\<img/gi, '<img class="rich-img"')
|
|
|
- })
|
|
|
+ if(obj.is_new) {
|
|
|
+ getWholeDetai({}, obj.good_id, obj.time_id, obj.status, 1).then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
+ obj.goodItem = data.storeInfo
|
|
|
+ obj.imgList = data.storeInfo.images
|
|
|
+ obj.description = data.storeInfo.description.replace(/\<img/gi, '<img class="rich-img"')
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ getWholeDetai({}, obj.good_id, obj.time_id, obj.status,0).then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
+ obj.goodItem = data.storeInfo
|
|
|
+ obj.imgList = data.storeInfo.images
|
|
|
+ obj.description = data.storeInfo.description.replace(/\<img/gi, '<img class="rich-img"')
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
// 预约包
|
|
|
reservePackage() {
|
|
@@ -77,9 +91,9 @@
|
|
|
whole_id: obj.good_id,
|
|
|
time_id: obj.time_id,
|
|
|
price: obj.goodItem.price,
|
|
|
- to_uid: obj.is_new == 0 ? '':0,
|
|
|
- first_price: obj.is_new == 0?'':0,
|
|
|
- last_id: obj.is_new== 0? '': 0
|
|
|
+ to_uid: obj.is_new == 'isn' ? 0:'',
|
|
|
+ first_price: obj.is_new =='isn'?0:'',
|
|
|
+ last_id: obj.is_new== 'isn'? 0: ''
|
|
|
}
|
|
|
obj.loading = true
|
|
|
reservePackage(updata).then(res => {
|