Compare commits

..

No commits in common. "ad15f7f497efab8593799880fb5c5b37cd697213" and "bfc7e10860b0d97c3b1ad8f472c19a36411ccd50" have entirely different histories.

3 changed files with 10 additions and 81 deletions

View File

@ -24,14 +24,11 @@
<!-- store info end --> <!-- store info end -->
<list-cell :hover="false" padding="50rpx 30rpx"> <list-cell :hover="false" padding="50rpx 30rpx">
<view class="w-100 d-flex flex-column"> <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="d-flex align-items-center just-content-center">
<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="sort-num">{{ order.numberId }}</view> <view class="sort-num">{{ order.numberId }}</view>
</view> </view>
<!-- steps begin --> <!-- 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 d-flex flex-column w-80">
<view class="steps__img-column"> <view class="steps__img-column">
<view class="steps__img-column-item"> <view class="steps__img-column-item">

View File

@ -1194,11 +1194,7 @@
.cart-bar { .cart-bar {
position: fixed; position: fixed;
<<<<<<< HEAD
bottom: 100rpx; bottom: 100rpx;
=======
bottom: 100rpx;
>>>>>>> bfc7e10860b0d97c3b1ad8f472c19a36411ccd50
left: 0; left: 0;
width: calc(100% - 80rpx); width: calc(100% - 80rpx);
height: 100rpx; height: 100rpx;

View File

@ -74,15 +74,7 @@
</view> </view>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<!-- 支付按钮 -->
<view class="group_4 flex-row"> <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 <view
v-if="item.statusDto.type === '4'" 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 { formatDateTime, kmUnit } from "@/utils/util";
import { orderGetOrders, orderReceive } from "@/api/order"; import { orderGetOrders, orderReceive } from "@/api/order";
import { applyInvoice } from "@/api/order"; import { applyInvoice } from "@/api/order";
// payUnify
import { payUnify } from '@/api/order';
import { isWeixin } from '@/utils/util';
const main = useMainStore(); const main = useMainStore();
const { isLogin } = storeToRefs(main); const { isLogin } = storeToRefs(main);
const title = ref("我的订单"); const title = ref("我的订单");
@ -192,8 +179,8 @@ onReachBottom(() => {
// tab // tab
const change = (e) => { const change = (e) => {
console.log("e;", e.type); console.log('e;',e.type)
console.log("e.index;", e.index); console.log('e.index;',e.index)
type.value = e.type; type.value = e.type;
getOrders(true); getOrders(true);
current.value = e.index; 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) => { const handleInvoice = async (item) => {
if (item.invoiceStatus === "UNREQUESTED") { if (item.invoiceStatus === "UNREQUESTED") {
// //
@ -289,8 +226,8 @@ const handleInvoice = async (item) => {
// //
if (item.invoiceAddress) { if (item.invoiceAddress) {
uni.showLoading({ uni.showLoading({
title: "加载中", title: '加载中',
mask: true, mask: true
}); });
uni.downloadFile({ uni.downloadFile({
url: item.invoiceAddress, url: item.invoiceAddress,
@ -307,11 +244,11 @@ const handleInvoice = async (item) => {
fail: (err) => { fail: (err) => {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: "发票下载失败", title: '发票下载失败',
icon: "none", icon: 'none'
}); });
console.error("下载发票失败:", err); console.error('下载发票失败:', err);
}, }
}); });
} }
} }
@ -498,7 +435,6 @@ const receive = async (order) => {
font-weight: 600; font-weight: 600;
text-align: right; text-align: right;
white-space: nowrap; white-space: nowrap;
padding-right: 20rpx;
/* line-height: 194rpx; */ /* line-height: 194rpx; */
} }