|
@@ -21,14 +21,14 @@
|
|
|
<p class="TT-title">
|
|
|
<span>Hi,用户{{ userPhone }}</span>
|
|
|
<span>您正在开通</span>
|
|
|
- <span>金币会员</span>
|
|
|
+ <span>{{ vipList[activeVipIndex].vipName }}</span>
|
|
|
</p>
|
|
|
<p class="TT-price">
|
|
|
<span>应付金额:</span>
|
|
|
<span>{{ vipList[activeVipIndex].vipPrice }}</span>
|
|
|
<span>金币</span>
|
|
|
</p>
|
|
|
- <p class="TT-desc">{{ vipList[activeVipIndex].vipDesc }}</p>
|
|
|
+ <p class="TT-desc">权益:{{ vipList[activeVipIndex].vipDesc }}</p>
|
|
|
<p slot="footer" class="dialog-footer">
|
|
|
<el-button class="TT-btn-group" type="primary" @click="buyVip">确认购买</el-button>
|
|
|
</p>
|
|
@@ -78,11 +78,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
buyVip () {
|
|
|
- const { vipType } = this.vipList[this.activeVipIndex]
|
|
|
+ const { id, vipType } = this.vipList[this.activeVipIndex]
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl('/user/buyvip'),
|
|
|
method: 'post',
|
|
|
data: this.$http.adornData({
|
|
|
+ 'id': id,
|
|
|
'vipType': vipType // vip类型(1普通会员2包月会员3包年会员)
|
|
|
})
|
|
|
}).then(({ data }) => {
|
|
@@ -94,7 +95,11 @@ export default {
|
|
|
})
|
|
|
this.dialogTableVisible = false
|
|
|
} else {
|
|
|
- this.$message.error(data.msg)
|
|
|
+ if (data.msg === '点券不足请充值') {
|
|
|
+ this.$router.replace({ name: 'payCheck' })
|
|
|
+ } else {
|
|
|
+ this.$message.error(data.msg)
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|