1.扫码支付

master
sws 2023-11-01 12:08:20 +08:00
parent 3acd98ff36
commit ea8dde9b0f
3 changed files with 131 additions and 50 deletions

View File

@ -230,8 +230,31 @@
this.pay_handle(this.propTempPayValue, this.payment_id);
this.$emit('close-payment-poupon', false);
},
//
pay_handle(order_id, payment_id) {
var self = this;
this.propPaymentList.forEach((item) => {
if (item.id == payment_id) {
if (item.payment === 'WalletPay') {
uni.showModal({
title: '温馨提示',
content: '操作后将立即扣除支付费用、确认继续吗?',
confirmText: '确认',
cancelText: '暂不',
success(res) {
if (res.confirm) {
self.pay_handle_event(order_id, payment_id);
}
},
});
} else {
this.pay_handle_event(order_id, payment_id);
}
}
});
},
pay_handle_event(order_id, payment_id) {
// #ifdef H5
// web_openid
if (!app.globalData.is_user_weixin_web_openid(order_id, payment_id || this.payment_id)) {

View File

@ -22,15 +22,22 @@
}
.pay-scroll {
max-height: calc(100vh - 55rem);
max-height: calc(100vh - 1102rpx);
min-height: calc(140rpx);
overflow-y: auto;
}
::-webkit-scrollbar {
display: none;
;
}
.sub-key {
background-color: transparent !important;
box-shadow: none !important;
padding: 0;
}
.title-padding {
padding: 16rpx;
}
@ -39,9 +46,9 @@
*
*/
.page-pay-fixed {
height: calc(100vh - 536rpx - env(safe-area-inset-bottom) + 40rpx);
padding-bottom: calc(536rpx + env(safe-area-inset-bottom) - 40rpx);
/* #ifdef H5 */
height: calc(100vh - 536rpx) !important;
padding-bottom: 536rpx !important;
/* #endif */
}
@ -61,37 +68,60 @@
font-weight: 400;
}
.sub-key-content text {
transition: all 0.15s ease-in-out;
}
.sub-key-content text:active {
background-color: rgba(0, 0, 0, 0.15);
}
/* 弹框 */
::v-deep .uni-popup__info {
color: #333;
font-weight: 400;
.dialog-container {
width: 600rpx;
border-radius: 22rpx;
background-color: #fff;
}
::v-deep .uni-dialog-button-group {
border-top: 0;
padding-bottom: 24rpx;
.dialog-title {
display: flex;
flex-direction: row;
justify-content: center;
padding-top: 30rpx;
font-size: 32rpx;
text-align: center;
}
::v-deep .uni-dialog-button {
height: 60rpx;
.dialog-content {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 40rpx;
}
::v-deep .uni-dialog-button-text {
color: #999;
}
::v-deep .uni-button-color {
color: #333;
}
::v-deep .uni-dialog-input,
::v-deep .uni-dialog-input:focus,
::v-deep .uni-dialog-input:active,
::v-deep .uni-dialog-input:hover,
::v-deep .uni-dialog-input:focus-visible,
::v-deep .uni-dialog-input:visited {
border: 0;
box-shadow: none;
outline: none;
.dialog-input {
flex: 1;
font-size: 28rpx;
border: 2rpx #eee solid;
height: 80rpx;
padding: 0 20rpx;
border-radius: 10rpx;
color: #555;
background: #F1F1F1;
}
.dialog-btn-group {
display: flex;
flex-direction: row;
}
.dialog-btn {
display: flex;
flex: 1;
flex-direction: row;
justify-content: center;
align-items: center;
height: 90rpx;
font-size: 32rpx;
}

View File

@ -24,7 +24,7 @@
</view>
<view class="bg-white border-radius-main padding-main spacing-mb">
<view class="text-size fw-b spacing-mb">支付方式</view>
<view class="flex-col jc-sa" :class="data.payment_list.length>2">
<view class="flex-col jc-sa" :class="is_more ? 'pay-scroll' : ''">
<view v-for="(item, index) in is_more ? data.payment_list : data.payment_list.slice(0, 2)" :key="index" class="flex-row jc-sb align-c padding-vertical-sm" @tap="change_event(index, item.id)">
<div class="flex-1 flex-width flex-row align-c">
<image v-if="item.logo" :src="item.logo" mode="widthFix" class="circle img-pay margin-right-main" />
@ -53,40 +53,52 @@
</block>
<!-- 输入框示例 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="添加备注" placeholder=" " @confirm="input_dialog"></uni-popup-dialog>
<view class="dialog-container">
<view class="dialog-title">
<text>备注</text>
</view>
<view class="dialog-content">
<input type="text" :value="form.note" class="dialog-input" maxlength="200" @input="input_change" />
</view>
<view class="dialog-btn-group">
<view class="dialog-btn cr-grey-9" @tap="input_dialog_colse"></view>
<view class="dialog-btn br-l-f5" @tap="input_dialog_open"></view>
</view>
</view>
<!-- <uni-popup-dialog ref="inputClose" mode="input" title="添加备注" placeholder=" " @confirm="input_dialog"></uni-popup-dialog> -->
</uni-popup>
</view>
<view class="bg-white tc text-size-xl fw-b sub-key-content">
<view class="flex-row">
<view class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('1')">1</view>
<view class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('2')">2</view>
<view class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('3')">3</view>
<view class="flex-1 key-1 br-b-f5" @tap="key_up_event('del')">
<text class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('1')">1</text>
<text class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('2')">2</text>
<text class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('3')">3</text>
<text class="flex-1 key-1 br-b-f5" @tap="key_up_event('del')">
<iconfont name="icon-jianpan-guanbi" size="68rpx" class="fw-n"></iconfont>
</view>
</text>
</view>
<view class="flex-row">
<view class="flex-3">
<view class="flex-row">
<view class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('4')">4</view>
<view class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('5')">5</view>
<view class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('6')">6</view>
<text class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('4')">4</text>
<text class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('5')">5</text>
<text class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('6')">6</text>
</view>
<view class="flex-row">
<view class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('7')">7</view>
<view class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('8')">8</view>
<view class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('9')">9</view>
<text class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('7')">7</text>
<text class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('8')">8</text>
<text class="flex-1 key-1 br-r-f5 br-b-f5" @tap="key_up_event('9')">9</text>
</view>
<view class="flex-row">
<view class="flex-2 key-1 br-r-f5" @tap="key_up_event('0')">0</view>
<view class="flex-1 key-1 repair br-r-f5" @tap="key_up_event('.')">.</view>
</view>
</view>
<view class="flex-1 bg-red cr-white" @tap="key_up_event('sub')">
<view class="flex-col jc-c ht-auto">
<view class="fw-n">支付</view>
<text class="flex-2 key-1 br-r-f5" @tap="key_up_event('0')">0</text>
<text class="flex-1 key-1 repair br-r-f5" @tap="key_up_event('.')">.</text>
</view>
</view>
<text class="flex-1 bg-red cr-white" @tap="key_up_event('sub')">
<text class="flex-col jc-c ht-auto">
<text class="fw-n">支付</text>
</text>
</text>
</view>
</view>
</view>
@ -132,6 +144,7 @@
//
// /pages/plugins/wallet/user/user?type=3
to_appoint_page: '',
input_value: '',
};
},
@ -229,10 +242,25 @@
add_desc_event() {
this.$refs.inputDialog.open();
},
input_change(e) {
this.setData({
input_value: e.detail.value,
});
},
//
input_dialog(val) {
input_dialog_colse(val) {
this.setData({
input_value: this.form.note,
});
//
this.$refs.inputDialog.close();
},
input_dialog_open() {
var new_data = this.form;
new_data.note = val;
new_data.note = this.input_value;
this.setData({
form: new_data,
});