Lufaneng 8 months ago
parent 902623352d
commit 1a03f4fcdf

@ -109,14 +109,12 @@
color="#000"
border="bottom"
:placeholderStyle="{ color: '#666778' }"
:placeholder="
item.name === '土建图号'
:placeholder="item.type === 'number' ? `范围:${item.min} - ${item.max === 0 ? '不限' : item.max}` : (item.name === '土建图号'
? '将根据土建图型号自动生成'
: '请输入'
"
: '请输入')"
></uv-input>
<!-- 数字范围提示 -->
<view
<!-- <view
v-if="
item.type === 'number' &&
(item.min !== undefined || item.max !== undefined)
@ -132,7 +130,7 @@
<text v-else-if="item.max !== undefined">
最大值{{ item.max }}
</text>
</view>
</view> -->
</uv-form-item>
</uv-form>
</view>
@ -380,7 +378,7 @@ const validateNumberRange = (item) => {
}
//
if (item.max !== undefined && value > item.max) {
if (item.max !== undefined && item.max !== 0 && value > item.max) {
uni.showToast({
title: `${item.name}不能大于${item.max}`,
icon: "error",

@ -316,7 +316,7 @@
// #ifdef H5
// H5
const payUrl = orderInfo.mwebUrl; // H5
const payUrl = orderInfo.h5_url; // H5
window.location.href = payUrl;
return {
success: true,

@ -87,6 +87,25 @@
size="20"
></uv-icon>
</view>
<view
v-if="showAlipay"
class="payment-item"
:class="{ active: selectedPayment === 'wxpay' }"
@click="selectPayment('wxpay')"
>
<view class="payment-info">
<uv-icon name="weixin-fill" color="#07c160" size="24"></uv-icon>
<view class="payment-details">
<text class="payment-name">微信支付</text>
<text class="payment-desc">推荐使用微信支付</text>
</view>
</view>
<uv-icon
name="checkmark-circle-fill"
:color="selectedPayment === 'wxpay' ? '#ff3333' : '#ccc'"
size="20"
></uv-icon>
</view>
</view>
<!-- 底部支付按钮 -->
@ -202,7 +221,7 @@ const wechatPay = async (orderInfo) => {
// #ifdef H5
// H5
const payUrl = orderInfo.mwebUrl; // H5
const payUrl = orderInfo.h5_url; // H5
window.location.href = payUrl;
return {
success: true,

@ -258,37 +258,12 @@
// #ifdef H5
// H5
if (typeof WeixinJSBridge !== 'undefined') {
return new Promise((resolve, reject) => {
WeixinJSBridge.invoke('getBrandWCPayRequest', {
appId: orderInfo.appId,
timeStamp: orderInfo.timeStamp,
nonceStr: orderInfo.nonceStr,
package: orderInfo.package,
signType: orderInfo.signType,
paySign: orderInfo.paySign
}, (res) => {
if (res.err_msg === 'get_brand_wcpay_request:ok') {
resolve({
success: true,
data: res
});
} else if (res.err_msg === 'get_brand_wcpay_request:cancel') {
reject(new Error('用户取消支付'));
} else {
reject(new Error('微信支付失败'));
}
});
});
} else {
//
const payUrl = orderInfo.mwebUrl;
const payUrl = orderInfo.h5_url; // H5
window.location.href = payUrl;
return {
success: true,
redirect: true
redirect: true,
};
}
// #endif
};

Loading…
Cancel
Save