|
@@ -50,7 +50,7 @@
|
|
|
<ui-title-devider :title="$t('会员服务')"></ui-title-devider>
|
|
<ui-title-devider :title="$t('会员服务')"></ui-title-devider>
|
|
|
<div class="h-26px"></div>
|
|
<div class="h-26px"></div>
|
|
|
<div class="flex justify-around">
|
|
<div class="flex justify-around">
|
|
|
- <ui-vip-preset v-for="vipSmeal in vipSmeals" :item="vipSmeal"></ui-vip-preset>
|
|
|
|
|
|
|
+ <ui-vip-preset @choose="handleChoose(vipSmeal)" v-for="vipSmeal in vipSmeals" :item="vipSmeal"></ui-vip-preset>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="h-111px"></div>
|
|
<div class="h-111px"></div>
|
|
|
</div>
|
|
</div>
|
|
@@ -65,12 +65,40 @@
|
|
|
vipSmeals:[]
|
|
vipSmeals:[]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- async created() {
|
|
|
|
|
- let resp = await this.$http.post(this.$api.mzUser.userinfo);
|
|
|
|
|
|
|
+ methods:{
|
|
|
|
|
+ async handleChoose(vipSmeal) {
|
|
|
|
|
+
|
|
|
|
|
+ let resp = await this.$http.post(this.$api.mzUser.createVipOrder,this.$qs.stringify({vipCode:vipSmeal.code}))
|
|
|
|
|
+ if(resp.data.status === 200){
|
|
|
|
|
+ await this.$confirm('请在弹出的窗口完成付款操作?', '提示', {
|
|
|
|
|
+ confirmButtonText: '已完成付款',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ resp = await this.$http.post(this.$api.mzUser.confirmVipOrder,this.$qs.stringify({orderCode:resp.data.data.vipSmOrder.code}))
|
|
|
|
|
+
|
|
|
|
|
+ if(resp.data.status === 200){
|
|
|
|
|
+ this.$message.success("开通成功");
|
|
|
|
|
+ this.loadData();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- if(resp.data.status === 200){
|
|
|
|
|
- this.userinfo = resp.data.data.mzUser;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ async loadData(){
|
|
|
|
|
+ let resp = await this.$http.post(this.$api.mzUser.userinfo);
|
|
|
|
|
+
|
|
|
|
|
+ if(resp.data.status === 200){
|
|
|
|
|
+ this.userinfo = resp.data.data.mzUser;
|
|
|
|
|
+ this.$store.commit('UPDATE_LOGIN_INFO',resp.data.data.mzUser)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+ async created() {
|
|
|
|
|
+
|
|
|
|
|
+ this.loadData();
|
|
|
|
|
|
|
|
let r = await this.$http.post(this.$api.common.vipSmeals);
|
|
let r = await this.$http.post(this.$api.common.vipSmeals);
|
|
|
if(r.data.status === 200){
|
|
if(r.data.status === 200){
|