This commit is contained in:
cun-nan 2024-05-29 17:24:00 +08:00
parent aff136295e
commit 827cb66e35

View File

@ -43,7 +43,13 @@
<view class="wrap-box"> <view class="wrap-box">
<view class="w-box" v-for="(item,index) in numList " :key="index" @click="getindex(index)"> <view class="w-box" v-for="(item,index) in numList " :key="index" @click="getindex(index)">
<view class="hezi" :class="{ 'acv' : listindex == index }"> <view class="hezi" :class="{ 'acv' : listindex == index }">
{{item}} {{item.rechargeBalance}}
</view>
</view>
<view class="w-box" @click="getindex(numList.length)">
<view class="hezi" :class="{ 'acv' : listindex == numList.length }">
<!-- 自定义金额 -->
<input placeholder="自定义金额" v-model="value" @input="custom()"></input>
</view> </view>
</view> </view>
</view> </view>
@ -56,7 +62,7 @@
<view class="">微信扫码支付</view> <view class="">微信扫码支付</view>
</view> </view>
<view class="qiu" v-if="memberId != 0" @click="getmemberId(0)"></view> <view class="qiu" v-if="memberId != 0" @click="getmemberId(0,'WECHAT')"></view>
<view class="qiux" v-if="memberId == 0"> <view class="qiux" v-if="memberId == 0">
<u-icon name="checkmark" color="#fff" size="16"></u-icon> <u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view> </view>
@ -69,7 +75,7 @@
<view class="">支付宝扫码支付</view> <view class="">支付宝扫码支付</view>
</view> </view>
<view class="qiu" v-if="memberId != 1" @click="getmemberId(1)"></view> <view class="qiu" v-if="memberId != 1" @click="getmemberId(1,'ALIPAY')"></view>
<view class="qiux" v-if="memberId == 1"> <view class="qiux" v-if="memberId == 1">
<u-icon name="checkmark" color="#fff" size="16"></u-icon> <u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view> </view>
@ -82,7 +88,7 @@
<view class="">银联扫码支付</view> <view class="">银联扫码支付</view>
</view> </view>
<view class="qiu" v-if="memberId != 2" @click="getmemberId(2)"></view> <view class="qiu" v-if="memberId != 2" @click="getmemberId(2,'UNIONPAY')"></view>
<view class="qiux" v-if="memberId == 2"> <view class="qiux" v-if="memberId == 2">
<u-icon name="checkmark" color="#fff" size="16"></u-icon> <u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view> </view>
@ -95,7 +101,7 @@
<view class="">现金支付</view> <view class="">现金支付</view>
</view> </view>
<view class="qiu" v-if="memberId != 3" @click="getmemberId(3)"></view> <view class="qiu" v-if="memberId != 3" @click="getmemberId(3,'CASH')"></view>
<view class="qiux" v-if="memberId == 3"> <view class="qiux" v-if="memberId == 3">
<u-icon name="checkmark" color="#fff" size="16"></u-icon> <u-icon name="checkmark" color="#fff" size="16"></u-icon>
</view> </view>
@ -131,6 +137,12 @@
isChooseUser: false, isChooseUser: false,
userId: "", userId: "",
userInfo: "", userInfo: "",
order: {
paymentType: "WECHAT"
},
value: "",
realyPayBills: 0,
authCode: "",
} }
}, },
onLoad(e) { onLoad(e) {
@ -143,6 +155,7 @@
onShow() { onShow() {
// this.actList = ["1", "1", "1", "1", "1", ] // this.actList = ["1", "1", "1", "1", "1", ]
// this.status = "nomore" // this.status = "nomore"
this.getRechargeAmount()
}, },
onPullDownRefresh() { onPullDownRefresh() {
console.log("刷新"); console.log("刷新");
@ -158,9 +171,26 @@
headers headers
}, },
methods: { methods: {
getmemberId(num) { //
custom(val) {
this.order.amount = val
},
//
getRechargeAmount() {
request({
url: 'business/marketingActivity/cardFuelDiesel',
method: 'get',
params: {
pageNo: 1,
pageSize: 10000
}
}).then((res) => {
this.numList = res.data.records
})
},
getmemberId(num, payType) {
this.memberId = num this.memberId = num
console.log(this.memberId); this.order.paymentType = payType
}, },
// //
getUser() { getUser() {
@ -180,6 +210,28 @@
this.listindex = index this.listindex = index
}, },
govipjs() { govipjs() {
let actualPayment = 0
if (!this.userInfo) {
uni.showToast({
title: "请先选择会员",
icon: "none"
})
}
if (this.order.paymentType == "CASH") actualPayment = this.authCode
// id
this.order.mtUserId = this.userInfo.id
this.order.name = this.userInfo.name
this.order.mobile = this.userInfo.mobile
//
this.order.authCode = this.authCode
this.order.realyPayBills = this.realyPayBills
this.order.actualPayment = actualPayment
// if (!this.userInfo){
// uni.showToast({
// title:"",
// icon:"none"
// })
// }
// uni.navigateTo({ // uni.navigateTo({
// url: '/pagesHome/MemberRecharge/list' // url: '/pagesHome/MemberRecharge/list'
// }) // })