Compare commits
No commits in common. "ad15f7f497efab8593799880fb5c5b37cd697213" and "bfc7e10860b0d97c3b1ad8f472c19a36411ccd50" have entirely different histories.
ad15f7f497
...
bfc7e10860
@ -24,14 +24,11 @@
|
||||
<!-- store info end -->
|
||||
<list-cell :hover="false" padding="50rpx 30rpx">
|
||||
<view class="w-100 d-flex flex-column">
|
||||
<view v-if="order.paid == 0" class="d-flex align-items-center just-content-center mb-40">
|
||||
<view class="font-size-lg text-color-error">订单未支付</view>
|
||||
</view>
|
||||
<view v-if="order.paid > 0" class="d-flex align-items-center just-content-center">
|
||||
<view class="d-flex align-items-center just-content-center">
|
||||
<view class="sort-num">{{ order.numberId }}</view>
|
||||
</view>
|
||||
<!-- steps begin -->
|
||||
<view v-if="order.paid > 0" class="d-flex just-content-center">
|
||||
<view class="d-flex just-content-center">
|
||||
<view class="steps d-flex flex-column w-80">
|
||||
<view class="steps__img-column">
|
||||
<view class="steps__img-column-item">
|
||||
|
@ -1194,11 +1194,7 @@
|
||||
|
||||
.cart-bar {
|
||||
position: fixed;
|
||||
<<<<<<< HEAD
|
||||
bottom: 100rpx;
|
||||
=======
|
||||
bottom: 100rpx;
|
||||
>>>>>>> bfc7e10860b0d97c3b1ad8f472c19a36411ccd50
|
||||
left: 0;
|
||||
width: calc(100% - 80rpx);
|
||||
height: 100rpx;
|
||||
|
@ -74,15 +74,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<!-- 支付按钮 -->
|
||||
<view class="group_4 flex-row">
|
||||
<view
|
||||
v-if="item.statusDto.type === '0'"
|
||||
class="text-wrapper_6 flex-col action-button"
|
||||
@tap.stop="handlePay(item)"
|
||||
>
|
||||
<text class="text_11">支付</text>
|
||||
</view>
|
||||
<!-- 发票按钮 -->
|
||||
<view
|
||||
v-if="item.statusDto.type === '4'"
|
||||
@ -132,11 +124,6 @@ import { onLoad, onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
|
||||
import { formatDateTime, kmUnit } from "@/utils/util";
|
||||
import { orderGetOrders, orderReceive } from "@/api/order";
|
||||
import { applyInvoice } from "@/api/order";
|
||||
|
||||
// 确保导入payUnify方法
|
||||
import { payUnify } from '@/api/order';
|
||||
import { isWeixin } from '@/utils/util';
|
||||
|
||||
const main = useMainStore();
|
||||
const { isLogin } = storeToRefs(main);
|
||||
const title = ref("我的订单");
|
||||
@ -192,8 +179,8 @@ onReachBottom(() => {
|
||||
|
||||
// tab栏切换
|
||||
const change = (e) => {
|
||||
console.log("e;", e.type);
|
||||
console.log("e.index;", e.index);
|
||||
console.log('e;',e.type)
|
||||
console.log('e.index;',e.index)
|
||||
type.value = e.type;
|
||||
getOrders(true);
|
||||
current.value = e.index;
|
||||
@ -226,56 +213,6 @@ const detail = (id) => {
|
||||
});
|
||||
};
|
||||
|
||||
const handlePay = async (item) => {
|
||||
// uni.showLoading({ title: "加载中" });
|
||||
|
||||
try {
|
||||
// 调用支付接口
|
||||
let from = "routine";
|
||||
// #ifdef H5
|
||||
from = "h5";
|
||||
if (isWeixin()) {
|
||||
from = "wechat";
|
||||
}
|
||||
// #endif
|
||||
|
||||
let data = await payUnify({
|
||||
uni: item.orderId,
|
||||
from: from,
|
||||
paytype: "weixin",
|
||||
});
|
||||
|
||||
if (!data) {
|
||||
// uni.hideLoading();
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.trade_type === "JSAPI") {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: "wxpay",
|
||||
timeStamp: data.data.timeStamp,
|
||||
nonceStr: data.data.nonceStr,
|
||||
package: data.data.package,
|
||||
signType: "MD5",
|
||||
paySign: data.data.paySign,
|
||||
success: function () {
|
||||
uni.showToast({ title: "支付成功" });
|
||||
getOrders(true); // 刷新订单列表
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log("支付失败:", err);
|
||||
// uni.hideLoading();
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("支付异常:", error);
|
||||
// uni.hideLoading();
|
||||
}
|
||||
};
|
||||
|
||||
const handleInvoice = async (item) => {
|
||||
if (item.invoiceStatus === "UNREQUESTED") {
|
||||
// 申请发票
|
||||
@ -289,8 +226,8 @@ const handleInvoice = async (item) => {
|
||||
// 下载发票
|
||||
if (item.invoiceAddress) {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
mask: true,
|
||||
title: '加载中',
|
||||
mask: true
|
||||
});
|
||||
uni.downloadFile({
|
||||
url: item.invoiceAddress,
|
||||
@ -307,11 +244,11 @@ const handleInvoice = async (item) => {
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: "发票下载失败",
|
||||
icon: "none",
|
||||
title: '发票下载失败',
|
||||
icon: 'none'
|
||||
});
|
||||
console.error("下载发票失败:", err);
|
||||
},
|
||||
console.error('下载发票失败:', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -498,7 +435,6 @@ const receive = async (order) => {
|
||||
font-weight: 600;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
padding-right: 20rpx;
|
||||
/* line-height: 194rpx; */
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user