32edc977 by 张猛

级位支付

1 parent a463bd31
......@@ -76,14 +76,14 @@
<view class="section-title">支付方式</view>
<view class="payment-methods">
<radio-group @change="onPayTypeChange">
<label class="payment-item" :class="{ selected: payType === '1' }">
<radio :checked="payType === '1'" value="1" />
<label :class="{ selected: payType === '0' }" class="payment-item">
<radio :checked="payType === '0'" value="0"/>
<image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon ml10" mode="widthFix"></image>
<text class="payment-name ml10">民生付</text>
<!-- <view v-if="payType === '1'" class="check-icon"></view> -->
</label>
<label class="payment-item" :class="{ selected: payType === '3' }">
<radio :checked="payType === '3'" value="3" />
<label :class="{ selected: payType === '3' }" class="payment-item">
<radio :checked="payType === '3'" value="3"/>
<image :src="config.baseUrl_api + '/fs/static/min.png'" class="icon ml10" mode="widthFix"></image>
<text class="payment-name ml10">对公转账</text>
<!-- <view v-if="payType === '3'" class="check-icon"></view> -->
......@@ -91,16 +91,16 @@
</radio-group>
</view>
</view>
<!-- 对公转账表单 -->
<view v-if="payType === '3'" class="info-card transfer-form">
<view class="form-item">
<text class="form-label">联系人</text>
<input class="form-input" v-model="formData.contactPerson" placeholder="请输入联系人" />
<input v-model="formData.contactPerson" class="form-input" placeholder="请输入联系人"/>
</view>
<view class="form-item">
<text class="form-label">联系方式</text>
<input class="form-input" v-model="formData.contactTel" type="number" placeholder="请输入联系方式" />
<input v-model="formData.contactTel" class="form-input" placeholder="请输入联系方式" type="number"/>
</view>
</view>
</view>
......@@ -239,7 +239,7 @@ const handleSubmit = async () => {
if (!selectedAddress.value.id) {
return uni.showToast({title: '请先选择地址', icon: 'none'});
}
// 对公转账校验
if (payType.value === '3') {
if (!formData.value.contactPerson) {
......@@ -253,7 +253,7 @@ const handleSubmit = async () => {
return uni.showToast({title: '请输入正确的手机号', icon: 'none'});
}
}
uni.showModal({
title: '提示',
content: `确定提交订单吗?`,
......@@ -271,7 +271,7 @@ const handleSubmit = async () => {
contactPerson: formData.value.contactPerson,
contactTel: formData.value.contactTel
})
// 对公转账
if (commitRes.data.payFlag == 2) {
uni.hideLoading();
......@@ -280,7 +280,7 @@ const handleSubmit = async () => {
});
return;
}
// 民生付
if (commitRes.data.payResult && commitRes.data.payResult.encryptedData) {
const res = await minShengPay(commitRes.data.orderId, commitRes.data.payResult.encryptedData)
......@@ -293,7 +293,7 @@ const handleSubmit = async () => {
}, 1500)
}
}
} catch (e) {
uni.hideLoading();
console.error('提交失败', e);
......@@ -492,7 +492,7 @@ const handleSubmit = async () => {
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 20rpx;
.section-title {
font-size: 32rpx;
font-weight: 600;
......@@ -500,7 +500,7 @@ const handleSubmit = async () => {
margin-bottom: 20rpx;
position: relative;
padding-left: 20rpx;
&::before {
content: '';
position: absolute;
......@@ -513,28 +513,28 @@ const handleSubmit = async () => {
border-radius: 3rpx;
}
}
.payment-methods {
background: #f8f9fa;
border-radius: 12rpx;
padding: 20rpx;
.payment-item {
display: flex;
align-items: center;
padding: 16rpx;
border-radius: 12rpx;
border: 2rpx solid transparent;
&.selected {
border-color: #e4393c;
background: #fff;
.check-icon {
display: flex;
}
}
// 覆盖原生 radio 样式
::v-deep radio .wx-radio-input,
::v-deep radio .uni-radio-input {
......@@ -542,26 +542,26 @@ const handleSubmit = async () => {
height: 36rpx;
border-color: #ccc !important;
}
::v-deep radio .wx-radio-input.wx-radio-input-checked,
::v-deep radio .uni-radio-input-checked {
border-color: #e4393c !important;
background: #e4393c !important;
}
.payment-icon {
width: 48rpx;
height: 48rpx;
margin-right: 16rpx;
}
.payment-name {
flex: 1;
font-size: 30rpx;
color: #333;
font-weight: 500;
}
.check-icon {
width: 40rpx;
height: 40rpx;
......@@ -633,19 +633,19 @@ const handleSubmit = async () => {
align-items: center;
padding: 20rpx 0;
border-bottom: 1rpx solid #f5f5f5;
&:last-child {
border-bottom: none;
}
}
.form-label {
font-size: 28rpx;
color: #333;
width: 140rpx;
flex-shrink: 0;
}
.form-input {
flex: 1;
font-size: 28rpx;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!