支付完成

parent ffa6035b
......@@ -66,7 +66,7 @@
</view>
<view class="address-content" @click="jumpToAddressList">
<image class="location-pic" src="@/static/assistingAgriculture/assets/location.png"></image>
<view class="location-text">{{ addressInfo.areaAddr }} {{ addressInfo.areaName }}</view>
<view class="location-text">{{ addressInfo.addr }} {{ addressInfo.areaName }}</view>
<wd-icon custom-class="my-icon" color="#666" name="arrow-right" size="22px"></wd-icon>
</view>
<view class="address-user-info">
......@@ -220,30 +220,34 @@ onShow(() => {
if (outTradeNos.value) {
// 查询订单状态决定是否支付
sgyOrderOrderInfo({ orderNumber: outTradeNos.value }).then((res) => {
// switch (res.data.baseOrder.subStatus) {
// case '1':
// xma.showToast({
// title: '支付失败',
// icon: 'error',
// duration: 2000,
// success() {
// groupBuyConfirmFn(prodIds.value, skuIds.value);
// },
// });
// break;
// case '2':
// xma.redirectTo({
// url: `/pages/shop/paymentSuccessful?outTradeNos=${outTradeNos.value}`,
// });
// break;
// case '3':
// xma.redirectTo({
// url: `/pages/shop/paymentSuccessful?outTradeNos=${outTradeNos.value}`,
// });
// break;
// default:
// break;
// }
switch (res.data.baseOrder.subStatus) {
case '1':
xma.showToast({
title: '支付失败',
icon: 'error',
duration: 1000,
success() {
setTimeout(() => {
xma.redirectTo({
url: `/pages/assistingAgriculture/order/detail?orderNumber=${outTradeNos.value}`,
});
}, 1500);
},
});
break;
case '2':
xma.redirectTo({
url: `/pages/assistingAgriculture/order/detail?orderNumber=${outTradeNos.value}`,
});
break;
case '3':
xma.redirectTo({
url: `/pages/assistingAgriculture/order/detail?orderNumber=${outTradeNos.value}`,
});
break;
default:
break;
}
});
}
});
......@@ -333,7 +337,7 @@ const useraddrDefaultUserAddrFn = () => {
addressInfo.value = res.data;
addressParams.value.receiverName = res.data.receiver;
addressParams.value.receiverMobile = res.data.mobile;
addressParams.value.receiverAddress = res.data.areaAddr;
addressParams.value.receiverAddress = res.data.addr;
resolve();
}
});
......@@ -378,7 +382,7 @@ const payNow = async (data) => {
if (res.code === 0) {
openUrl(res.data.result);
} else {
groupBuyConfirmFn(prodIds.value, skuIds.value);
sgyrddBasketConfirmFn(basketIds.value);
}
});
}
......@@ -796,12 +800,12 @@ page {
.content {
font-size: 24rpx;
font-weight: 500;
width: 100%;
max-height: 243rpx;
background: #fafafa;
color: #77818f;
box-sizing: border-box;
border-radius: 12rpx;
margin: 0 auto;
}
}
.xj-content {
......
......@@ -2,13 +2,13 @@
<!-- 点评详情页面 -->
<view class="review-details-pages">
<view class="list">
<view class="item" v-for="i in 10" :key="i">
<image mode="aspectFill" src="@/static/assistingAgriculture/reviewDetails/fj.png"></image>
<view class="item" v-for="(item, index) in list" :key="index">
<image mode="aspectFill" :src="imgUrl + item.pic"></image>
<view class="info-box">
<text>红枫湖景区</text>
<text>自然风景</text>
<text class="t-2">4.5</text>
<text class="t-2">门票费用已包含</text>
<text>{{ item.attractionName }}</text>
<text>{{ item.resourceType }}</text>
<text class="t-2">{{ item.score }}</text>
<text class="t-2" v-if="item.isTicket === 1">门票费用已包含</text>
</view>
</view>
</view>
......@@ -18,6 +18,8 @@
<script setup>
import { znprodTourList } from '@/api/assistingAgriculture/scenicSpotDetails';
const prodIds = ref('');
const list = ref([]);
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
onLoad((options) => {
const { prodId } = options;
prodIds.value = prodId;
......@@ -25,7 +27,9 @@ onLoad((options) => {
});
const znprodTourListFn = (prodId) => {
znprodTourList({ prodId }).then((res) => {
console.log('res', res);
if (res.code === 0) {
list.value = res.data;
}
});
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment