|
@@ -9,7 +9,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="flex-row price">
|
|
<view class="flex-row price">
|
|
|
<text v-if="isShare">¥{{ activity.sharePrice }}</text>
|
|
<text v-if="isShare">¥{{ activity.sharePrice }}</text>
|
|
|
- <text :style="{textDecorationLine:(isShare ?'line-through' :'none'),color:(isShare ? '#878787':''), fontSize:(isShare ? '24rpx':'') }">
|
|
|
|
|
|
|
+ <text
|
|
|
|
|
+ :style="{textDecorationLine:(isShare ?'line-through' :'none'),color:(isShare ? '#878787':''), fontSize:(isShare ? '24rpx':'') }">
|
|
|
¥{{ activity.salePrice }}
|
|
¥{{ activity.salePrice }}
|
|
|
</text>
|
|
</text>
|
|
|
|
|
|
|
@@ -199,14 +200,16 @@ export default {
|
|
|
show: false,
|
|
show: false,
|
|
|
serviceObjectId: null,
|
|
serviceObjectId: null,
|
|
|
isShare: false,
|
|
isShare: false,
|
|
|
|
|
+ inviteUserId: null,
|
|
|
|
|
+ inviteOrderId: null,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
computed: {
|
|
|
totalAmount() {
|
|
totalAmount() {
|
|
|
- if(this.isShare){
|
|
|
|
|
|
|
+ if (this.isShare) {
|
|
|
return this.activity.sharePrice
|
|
return this.activity.sharePrice
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
return this.activity.salePrice
|
|
return this.activity.salePrice
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -221,6 +224,7 @@ export default {
|
|
|
console.log(e)
|
|
console.log(e)
|
|
|
this.id = e.activityId
|
|
this.id = e.activityId
|
|
|
this.inviteUserId = e.inviteUserId
|
|
this.inviteUserId = e.inviteUserId
|
|
|
|
|
+ this.inviteOrderId = e.inviteOrderId
|
|
|
this.isShare = true
|
|
this.isShare = true
|
|
|
}
|
|
}
|
|
|
// 扫技师端携带的参数,已存在缓存中
|
|
// 扫技师端携带的参数,已存在缓存中
|
|
@@ -356,13 +360,30 @@ export default {
|
|
|
|
|
|
|
|
activityDetail() {
|
|
activityDetail() {
|
|
|
console.log(this.id, '活动ID')
|
|
console.log(this.id, '活动ID')
|
|
|
- this.$api.activityDetail({
|
|
|
|
|
|
|
+ const data = {
|
|
|
id: this.id,
|
|
id: this.id,
|
|
|
- }).then(res => {
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.inviteUserId) {
|
|
|
|
|
+ data.userId = this.inviteUserId
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.inviteOrderId) {
|
|
|
|
|
+ data.inviteOrderId = this.inviteOrderId
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$api.activityDetail(data).then(res => {
|
|
|
console.log(res)
|
|
console.log(res)
|
|
|
this.activity = res.data.data
|
|
this.activity = res.data.data
|
|
|
this.$set(this.activity)
|
|
this.$set(this.activity)
|
|
|
-
|
|
|
|
|
|
|
+ if (this.isShare) {
|
|
|
|
|
+ console.log(this.activity)
|
|
|
|
|
+ if (this.activity.shareMax !== 0 && this.activity.shareMax < this.activity.shareCount) {
|
|
|
|
|
+ this.isShare = false
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ duration: 3000,
|
|
|
|
|
+ title: '已经超出最大分享次数',
|
|
|
|
|
+ icon: 'none'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|