支付接口调用
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
<view class="fontStyle">
|
||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/Meituanquan.png"
|
||||
style="width: 39.46rpx;height: 40rpx;" mode=""></image>
|
||||
<text>美团券</text>
|
||||
<text>优惠券</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
{{info.expDate}}
|
||||
</view>
|
||||
<button v-if="info.refundAble=='1'" class="buttonStyle" @click="makephone(info.phone)">申请退款</button>
|
||||
<view style="height: 2rpx;width: 100%;background-color: #EFEFEF;margin-top: 16rpx;"> </view>
|
||||
<view class="rightStyle" v-for="(item,i) in info.coupons" >
|
||||
<text>
|
||||
<view class="rightStyle" v-for="(item,i) in info.coupons">
|
||||
<text :class="[item.isRefund==1?'tdl':'' ]">
|
||||
{{item.couponNo}}
|
||||
</text>
|
||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/QRcode.png" v-if="info.status=='unused'"
|
||||
@@ -102,4 +102,9 @@
|
||||
justify-content: @start;
|
||||
align-items: @position;
|
||||
}
|
||||
|
||||
.tdl {
|
||||
color: #999;
|
||||
text-decoration: line-through
|
||||
}
|
||||
</style>
|
||||
@@ -32,7 +32,7 @@
|
||||
<view style="height: 100rpx;" v-if="listinfo.status == 'unpaid'"> </view>
|
||||
<!-- 待支付按钮 -->
|
||||
<view class="payBox" v-if="listinfo.status == 'unpaid'">
|
||||
<button @click="payEvent" class="payStyle">立即支付</button>
|
||||
<button @click="payEvent" class="payStyle">立即支付</button>
|
||||
</view>
|
||||
<!-- 二维码展示 -->
|
||||
<view class="qrimg" v-if="isQrimg" @click="clickEvent">
|
||||
@@ -90,11 +90,11 @@
|
||||
if (res) {
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay', //支付类型-固定值
|
||||
partnerid: res.data.payAppId, // 微信支付商户号
|
||||
timeStamp: res.data.payTimeStamp, // 时间戳(单位:秒)
|
||||
nonceStr: res.data.paynonceStr, // 随机字符串
|
||||
package: res.data.payPackage, // 固定值
|
||||
signType: res.data.paySignType, //固定值
|
||||
partnerid: res.data.appId, // 微信支付商户号
|
||||
timeStamp: res.data.timeStamp, // 时间戳(单位:秒)
|
||||
nonceStr: res.data.nonceStr, // 随机字符串
|
||||
package: res.data.package, // 固定值
|
||||
signType: res.data.signType, //固定值
|
||||
paySign: res.data.paySign, //签名
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
@@ -115,7 +115,9 @@
|
||||
}
|
||||
},
|
||||
clickEvent() {
|
||||
this.qrValue = this.qrEvent()
|
||||
this.qrValue =this.listinfo.coupons[0].couponNo
|
||||
console.log(this.listinfo.coupons[0].couponNo)
|
||||
// this.qrValue = this.qrEvent()
|
||||
this.isQrimg = !this.isQrimg
|
||||
},
|
||||
qrR(e) {
|
||||
@@ -182,7 +184,7 @@
|
||||
bottom: 0%;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
|
||||
|
||||
|
||||
.payStyle {
|
||||
background-color: #fe7620;
|
||||
|
||||
Reference in New Issue
Block a user