Lufaneng 9 months ago
parent a63acd6dbf
commit 7e2a9e7594

@ -186,6 +186,12 @@ const getMemberInfo = () => {
.finally(() => {
uni.hideLoading();
});
};
const viewUserAgreement = () => {
uni.navigateTo({
url: "/pagesA/user-agreement/user-agreement",
});
};
//

@ -12,6 +12,7 @@
<view class="order-list">
<view class="order-item" v-for="order in list" :key="order.id">
<!-- 订单头部 -->
<div class="order-title">智能电梯图纸生成平台</div>
<view class="order-header">
<view class="order-info">
<text class="order-number">订单编号: {{ order.order_no }}</text>
@ -328,7 +329,7 @@
const alipayPay = async (orderInfo) => {
// #ifdef H5
// H5
const payUrl = orderInfo.payUrl; // H5
const payUrl = orderInfo.pay_url; // H5
window.location.href = payUrl;
return {
success: true,
@ -361,7 +362,14 @@
//
let paymentResult;
if (order.pay_channel === "wxpay") {
if (order.pay_channel === "wxpay") {
// #ifdef H5
uni.showToast({
icon:"none",
title:'请在小程序端使用微信支付'
})
return
// #endif
// #ifdef MP-WEIXIN
const res = await uni.login({
provider: 'weixin'
@ -383,7 +391,14 @@
});
console.log('orderResult', orderResult)
paymentResult = await wechatPay(orderResult);
} else if (order.pay_channel === "alipay") {
} else if (order.pay_channel === "alipay") {
// #ifdef MP-WEIXIN
uni.showToast({
icon:"none",
title:'请在h5端使用支付宝支付'
})
return
// #endif
const orderResult = await RPC.post('/membership/order/pay_by_alipay', {
order_no: order.order_no
})
@ -546,7 +561,11 @@
background: white;
border-radius: 12px;
margin-bottom: 16px;
overflow: hidden;
overflow: hidden;
.order-title {
padding: 16px 16px 0;
}
.order-header {
display: flex;

@ -129,7 +129,7 @@
//
onLoad((options) => {
orderNo.value = options.order_no || '';
orderNo.value = options.out_trade_no || '';
if (orderNo.value) {
startQueryPaymentStatus();
} else {

@ -44,6 +44,7 @@
<!-- 微信支付 -->
<view
v-if="isWechat"
class="payment-item"
:class="{ active: selectedPayment === 'wxpay' }"
@click="selectPayment('wxpay')"
@ -124,6 +125,7 @@ const planPrice = ref(0);
const selectedPayment = ref("wxpay"); //
const paying = ref(false);
const showAlipay = ref(true); //
const isWechat = ref(true); //
const walletBalance = ref(0);
//
@ -159,11 +161,14 @@ const checkEnvironment = () => {
// #ifdef MP-WEIXIN
//
showAlipay.value = false;
isWechat.value = true
// #endif
// #ifdef H5
// H5
showAlipay.value = true;
isWechat.value = false
selectedPayment.value="alipay"
// #endif
};

@ -41,7 +41,7 @@
<view class="section-title">选择支付方式</view>
<view class="payment-list">
<!-- 微信支付 -->
<view class="payment-item" :class="{ active: selectedPayment === 'wxpay' }"
<view v-if="isWechat" class="payment-item" :class="{ active: selectedPayment === 'wxpay' }"
@click="selectPayment('wxpay')">
<view class="payment-info">
<uv-icon name="weixin-fill" color="#07c160" size="28"></uv-icon>
@ -139,7 +139,8 @@
const customAmount = ref('');
const selectedPayment = ref('wxpay');
const recharging = ref(false);
const showAlipay = ref(true);
const showAlipay = ref(true);
const isWechat = ref(false)
//
const rechargeAmounts = ref([{
@ -216,16 +217,14 @@
// #ifdef MP-WEIXIN
//
showAlipay.value = false;
isWechat.value = true;
selectedPayment.value = 'wxpay';
// #endif
// #ifdef H5
// H5
showAlipay.value = true;
//
const ua = navigator.userAgent.toLowerCase();
const isWechat = ua.indexOf('micromessenger') !== -1;
selectedPayment.value = isWechat ? 'wxpay' : 'alipay';
showAlipay.value = true;
selectedPayment.value = 'alipay';
// #endif
};
@ -297,7 +296,7 @@
const alipayPay = async (orderInfo) => {
// #ifdef H5
// H5
const payUrl = orderInfo.payUrl;
const payUrl = orderInfo.pay_url;
window.location.href = payUrl;
return {
success: true,
@ -399,11 +398,14 @@
});
console.log('orderResult', orderResult)
paymentResult = await wechatPay(orderResult);
} else if (selectedPayment.value === 'alipay') {
} else if (selectedPayment.value === 'alipay') {
const orderResult = await RPC.post('/membership/order/pay_by_alipay', {
order_no: orderNum.order_no
})
uni.showLoading({
title: '正在跳转支付宝...'
});
paymentResult = await alipayPay(orderResult.alipayInfo);
paymentResult = await alipayPay(orderResult);
}
uni.hideLoading();

@ -124,7 +124,8 @@ $uv.http.interceptors.request.use(
}
const method = config.url
config.url = 'https://lift-drawing.ruixininfo.com/jsonrpc'
config.url = 'https://lift-h5.shulinelev.com/jsonrpc'
// config.url = 'https://lift-drawing.ruixininfo.com/jsonrpc'
// #ifdef H5
config.url = '/jsonrpc'
// #endif

Loading…
Cancel
Save