|
|
@@ -11,8 +11,8 @@
|
|
|
充值<text style="color: #FF3C00;padding-left: 10upx;">{{initData.recharge}}元</text>,免费使用一年
|
|
|
</view>
|
|
|
<view>
|
|
|
- <picker @change="startTimeFn" class="tui-input" :range="zhifufangshi">
|
|
|
- <input type="text" placeholder="请选择供应商" class="ghsStyle" disabled>
|
|
|
+ <picker @change="startTimeFn" class="tui-input" :range="ghsList" range-key="name" :value="selectIndex">
|
|
|
+ <input type="text" placeholder="请选择供应商" class="ghsStyle" disabled v-model="shopName">
|
|
|
</picker>
|
|
|
</view>
|
|
|
|
|
|
@@ -20,7 +20,7 @@
|
|
|
class="immediately"
|
|
|
@click="onceRecharge"
|
|
|
>立即充值</view>
|
|
|
- <view class="use">本次充值仅限在<text style="color: #666;padding: 0 10upx;font-weight: 700;">{{initData.shopName}}</text>使用</view>
|
|
|
+ <view class="use" :style="{visibility: payShow ? 'hidden' : 'visible'}">本次充值仅限在<text style="color: #666;padding: 0 10upx;font-weight: 700;">{{shopName}}</text>使用</view>
|
|
|
<view class="use use_margin"><text style="color: #666;">{{initData.userNum}}</text> 人已充值</view>
|
|
|
<view class="user_avator">
|
|
|
<image :src="`${constant.imgUrl}/recharge/has_recharge.png`"></image>
|
|
|
@@ -39,6 +39,11 @@ export default {
|
|
|
return {
|
|
|
initData: {},
|
|
|
zhifufangshi:['微信','支付宝'],
|
|
|
+ ghsList: [],
|
|
|
+ shopName: '',
|
|
|
+ ghsId: '',
|
|
|
+ selectIndex: '',
|
|
|
+ payShow: true
|
|
|
}
|
|
|
},
|
|
|
onLoad () {
|
|
|
@@ -55,13 +60,25 @@ export default {
|
|
|
}).catch(err => { console.log(err) })
|
|
|
},
|
|
|
_getGhsList() {
|
|
|
- getList().then(res => {
|
|
|
+ getList({type: '0'}).then(res => {
|
|
|
console.log(res, 58)
|
|
|
+ this.ghsList = res.data.list
|
|
|
}).catch(err => {})
|
|
|
},
|
|
|
+ startTimeFn(e) {
|
|
|
+ this.selectIndex = e.detail.value
|
|
|
+ this.shopName = this.ghsList[this.selectIndex].name
|
|
|
+ this.ghsId = this.ghsList[this.selectIndex].id
|
|
|
+ this.payShow = false
|
|
|
+ console.log(e, this.ghsId)
|
|
|
+ },
|
|
|
// 立即充值
|
|
|
onceRecharge () {
|
|
|
- rechargeRenewPay().then(res => {
|
|
|
+ if(!this.ghsId) {
|
|
|
+ this.$msg('请先选择供货商')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ rechargeRenewPay({ghsId: this.ghsId}).then(res => {
|
|
|
console.log(res)
|
|
|
wexinPay(res.data, this.getSuccess, this.getError)
|
|
|
}).catch(err => { console.log(err) })
|
|
|
@@ -151,9 +168,13 @@ export default {
|
|
|
margin-top: 20upx;
|
|
|
}
|
|
|
& > .use_margin {
|
|
|
- margin-top: 60upx;
|
|
|
+ margin-top: 50upx;
|
|
|
}
|
|
|
& > .user_avator {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 20upx;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
text-align: center;
|
|
|
margin-top: 20upx;
|
|
|
& > image {
|