Browse Source

动态获取会员价格

threedate
Enzo 4 years ago
parent
commit
7f19095138
  1. 2
      common/api.js
  2. 13
      pages/center/bestar.vue

2
common/api.js

@ -67,6 +67,8 @@ export const API_BINDSALES = '/api/salesman/shareMan'//分销海报分享绑定
export const API_BILLBACKGROUND = '/api/share/img'//海报背景图接口
export const API_WXBILL = '/api/salesman/qrcode'//微信小程序太阳码
export const API_MEMBERPRICE = '/api/getSetting'//会员价格
/* 商户相关 */
export const API_CONFIRM_CODE = '/api/confirm/code'; // 扫码核销

13
pages/center/bestar.vue

@ -20,7 +20,7 @@
<view class="lf-m-t-28 text-black lf-font-24 lf-m-l-20">
需要支付
</view>
<view class="lf-m-l-20 lf-m-t-16"><text class="lf-font-60 lf-font-bold">9.9</text></view>
<view class="lf-m-l-20 lf-m-t-16"><text class="lf-font-60 lf-font-bold">{{prcie}}</text></view>
</view>
</view>
</view>
@ -57,7 +57,7 @@
</view>
<view class="padding-lr-lg">
<button class="cu-btn block bg-orange lg" style="border-radius: 42rpx;" @tap="subimitApply()">
<text class="lf-font-32 text-white">购买并支付¥9.9</text>
<text class="lf-font-32 text-white">购买并支付¥{{prcie}}</text>
</button>
</view>
</view>
@ -72,10 +72,16 @@
info: {},
ifPay: true,
checkedpay: true,
agreement: ''
agreement: '',
prcie: ''
}
},
methods: {
getPrice(){
this.$http(this.API.API_MEMBERPRICE).then(res => {
this.prcie = res.data.price || 0
})
},
//
checkboxChange(event){
this.checked = event.detail.value.length > 0;
@ -153,6 +159,7 @@
onLoad() {
this.getData()
this.getAgree()
this.getPrice()
}
}
</script>

Loading…
Cancel
Save