This commit is contained in:
weipengfei 2024-05-06 14:26:18 +08:00
parent dcd225028c
commit 72b5746a71
12 changed files with 211 additions and 96 deletions

View File

@ -1,9 +1,9 @@
<template>
<view class="">
<view class="count_down">
<!-- <view class="count_down" v-if="datas.paid==0">
还剩<text>00:28:36</text>订单自动取消
</view>
<view class="m-card m-address">
</view> -->
<view class="m-card m-address" style="margin-top: 20rpx;">
<view class="address-info">
<view class="top">
<up-icon name="map"></up-icon>
@ -14,7 +14,7 @@
四川泸州市龙马潭区莲花池街道商业街1号
</view>
</view>
<view class="address-btn">
<view class="address-btn" v-if="datas.paid==0">
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle" color="#f6f6f6"
:customStyle="{color:'#666666'}">修改</up-button></view>
</view>
@ -39,7 +39,7 @@
</view>
</view>
</view>
<view class="m-card good-info">
<view class="m-card good-info" v-if="datas.paid==0">
<view v-if="datas.goods_list" class="row">
<view>商品总价 <text>共计{{datas.goods_list.length}}款商品</text></view>
<view><text>¥</text>{{c_price(datas.total, 0)}}<text>.{{c_price(datas.total, 1)}}</text></view>
@ -55,6 +55,7 @@
</view>
<view class="m-card good-info">
<view class="head-title">订单信息</view>
<block v-if="datas.paid==0">
<view class="row">
<view>订单编号</view>
<up-copy :content="datas.number">
@ -70,6 +71,32 @@
<view v-if="datas.paid">已支付</view>
<view v-else class="red">待支付</view>
</view>
</block>
<block v-else>
<view v-if="datas.goods_list" class="row">
<view>实付款</view>
<view><text>¥</text>{{c_price(datas.total, 0)}}<text>.{{c_price(datas.total, 1)}}</text></view>
</view>
<view class="row">
<view>订单编号</view>
<up-copy :content="datas.number">
<text>{{datas.number}} | 复制</text>
</up-copy>
</view>
<view class="row">
<view>支付方式</view>
<view>{{datas.pay_type==3?'余额支付':'微信支付'}}</view>
</view>
<view class="row">
<view>下单时间</view>
<view>{{datas.create_time}}</view>
</view>
<view class="row" style="margin-bottom: 0;">
<view>支付状态</view>
<view v-if="datas.paid">已支付</view>
<view v-else class="red">待支付</view>
</view>
</block>
</view>
<view style="width: 100%;height: 200rpx;"></view>
@ -97,7 +124,7 @@
</template>
<script setup>
import { onLoad } from "@dcloudio/uni-app";
import { onLoad, onBackPress } from "@dcloudio/uni-app";
import { ref } from "vue";
import cancelDict from "@/dict/cancelDict.js";
import addressPopup from "@/components/addressPopup.vue";
@ -129,6 +156,12 @@
order_id: datas.value.id
}).then(res=>{
datas.value = res.data;
// if(!res.data.paid){
// targetDate = res.data.create_time;
// //
// timer = setInterval(updateCountdown, 1000);
// updateCountdown();
// }
})
}
@ -137,6 +170,29 @@
return price.split('.')[index] || (index ? '00' : '0');
}
//
let targetDate = "";
let timer = null;
//
function updateCountdown() {
const now = new Date().getTime();
const distance = targetDate - now;
//
const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((distance % (1000 * 60)) / 1000);
//
console.log(`${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`);
//
if (distance < 0) {
console.log('倒计时结束');
}
}
onLoad((option) => {
uni.setNavigationBarTitle({
title: option.type == 1 ? '等待付款' : '订单详情'
@ -146,11 +202,16 @@
getDetails()
}
})
onBackPress(()=>{
clearInterval(timer);
console.log("清除");
})
</script>
<style lang="scss">
.count_down {
padding: 20rpx 0;
padding-top: 20rpx;
text-align: center;
color: #444444;

View File

@ -3,7 +3,7 @@
<view class="item-title" @click="navTo">
<view>{{datas.number}}</view>
<view v-if="datas.paid==0">
<text>待付款{{datas.paid}}</text>
<text>待付款</text>
</view>
<view v-else>
<text v-if="datas.status==0">待发货</text>
@ -25,7 +25,7 @@
</view>
<view class="all"> {{datas.goods_count}} 件商品, 总金额 <text>¥{{datas.total}}</text> </view>
</view>
<view v-if="datas.paid=0" class="item-btn">
<view v-if="datas.paid==0" class="item-btn">
<view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle">取消订单</up-button></view>
<view style="width: 80px;"><up-button size="small" plain color="#20B128" shape="circle">立即支付</up-button></view>
</view>

View File

@ -68,10 +68,10 @@
orderListApi({
...where.value,
status: status,
// paid: paid
paid: paid
}).then(res=>{
console.log(res.data);
orderList.value[type] = res.data.lists;
console.log(orderList.value);
})
}

View File

@ -258,8 +258,17 @@
cart_id: cartStore.cartList,
address_id: addressInfo.value.address_id,
mer_id: shopInfo.value.mer_id,
pay_type: 3
pay_type: 1
}).then(res=>{
uni.requestPayment({
provider: 'wxpay',
timeStamp: res.data.config.timeStamp,
nonceStr: res.data.config.nonceStr,
package: res.data.config.package,
signType: res.data.config.signType,
paySign: res.data.config.paySign,
success: (e) => {
if(e.errMsg == 'requestPayment:ok'){
uni.showModal({
title: '订单支付成功',
confirmText: '查看订单',
@ -271,6 +280,23 @@
else uni.navigateBack();
}
})
}else uni.$u.toast('支付失败')
},
fail: (e) => {
uni.$u.toast('用户取消支付')
}
})
// uni.showModal({
// title: '',
// confirmText: '',
// cancelText: '',
// success: (e) => {
// if(e.confirm) uni.navigateTo({
// url: '/pagesOrder/order/order'
// })
// else uni.navigateBack();
// }
// })
})
}

View File

@ -7698,6 +7698,7 @@ const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
};
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
const onBackPress = /* @__PURE__ */ createHook(ON_BACK_PRESS);
exports.Pinia = Pinia;
exports._export_sfc = _export_sfc;
exports.computed = computed;
@ -7710,6 +7711,7 @@ exports.index = index;
exports.n = n;
exports.nextTick$1 = nextTick$1;
exports.o = o;
exports.onBackPress = onBackPress;
exports.onLoad = onLoad;
exports.onShow = onShow;
exports.p = p;

View File

@ -54,6 +54,7 @@ const _sfc_main = {
price = price + "";
return price.split(".")[index] || (index ? "00" : "0");
};
let timer = null;
common_vendor.onLoad((option) => {
common_vendor.index.setNavigationBarTitle({
title: option.type == 1 ? "等待付款" : "订单详情"
@ -63,21 +64,28 @@ const _sfc_main = {
getDetails();
}
});
common_vendor.onBackPress(() => {
clearInterval(timer);
console.log("清除");
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
name: "map"
}),
b: common_vendor.o(($event) => showAddress.value = true),
c: common_vendor.p({
b: datas.value.paid == 0
}, datas.value.paid == 0 ? {
c: common_vendor.o(($event) => showAddress.value = true),
d: common_vendor.p({
size: "small",
shape: "circle",
color: "#f6f6f6",
customStyle: {
color: "#666666"
}
}),
d: common_vendor.f(datas.value.goods_list, (item, index, i0) => {
})
} : {}, {
e: common_vendor.f(datas.value.goods_list, (item, index, i0) => {
return {
a: "666b5ad0-2-" + i0,
b: common_vendor.p({
@ -90,28 +98,46 @@ const _sfc_main = {
e: common_vendor.t(item.nums)
};
}),
e: datas.value.goods_list
f: datas.value.paid == 0
}, datas.value.paid == 0 ? common_vendor.e({
g: datas.value.goods_list
}, datas.value.goods_list ? {
f: common_vendor.t(datas.value.goods_list.length),
g: common_vendor.t(c_price(datas.value.total, 0)),
h: common_vendor.t(c_price(datas.value.total, 1))
} : {}, {
h: common_vendor.t(datas.value.goods_list.length),
i: common_vendor.t(c_price(datas.value.total, 0)),
j: common_vendor.t(c_price(datas.value.total, 1)),
k: common_vendor.t(datas.value.number),
l: common_vendor.p({
j: common_vendor.t(c_price(datas.value.total, 1))
} : {}, {
k: common_vendor.t(c_price(datas.value.total, 0)),
l: common_vendor.t(c_price(datas.value.total, 1))
}) : {}, {
m: datas.value.paid == 0
}, datas.value.paid == 0 ? common_vendor.e({
n: common_vendor.t(datas.value.number),
o: common_vendor.p({
content: datas.value.number
}),
m: common_vendor.t(datas.value.create_time),
n: datas.value.paid
}, datas.value.paid ? {} : {}, {
o: common_vendor.o(($event) => showCancel.value = true),
p: common_vendor.t(datas.value.total),
q: common_vendor.p({
p: common_vendor.t(datas.value.create_time),
q: datas.value.paid
}, datas.value.paid ? {} : {}) : common_vendor.e({
r: datas.value.goods_list
}, datas.value.goods_list ? {
s: common_vendor.t(c_price(datas.value.total, 0)),
t: common_vendor.t(c_price(datas.value.total, 1))
} : {}, {
v: common_vendor.t(datas.value.number),
w: common_vendor.p({
content: datas.value.number
}),
x: common_vendor.t(datas.value.pay_type == 3 ? "余额支付" : "微信支付"),
y: common_vendor.t(datas.value.create_time),
z: datas.value.paid
}, datas.value.paid ? {} : {}), {
A: common_vendor.o(($event) => showCancel.value = true),
B: common_vendor.t(datas.value.total),
C: common_vendor.p({
color: "#20B128",
shape: "circle"
}),
r: common_vendor.f(common_vendor.unref(dict_cancelDict.list), (item, index, i0) => {
D: common_vendor.f(common_vendor.unref(dict_cancelDict.list), (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.name),
b: cancelType.value == item.value
@ -124,23 +150,23 @@ const _sfc_main = {
f: common_vendor.o(($event) => cancelType.value = item.value, item.value)
});
}),
s: common_vendor.o(submitCancel),
t: common_vendor.p({
E: common_vendor.o(submitCancel),
F: common_vendor.p({
color: "#20B128",
shape: "circle"
}),
v: common_vendor.o(($event) => showCancel.value = false),
w: common_vendor.p({
G: common_vendor.o(($event) => showCancel.value = false),
H: common_vendor.p({
show: showCancel.value,
closeable: true,
round: "10"
}),
x: common_vendor.o(($event) => showAddress.value = false),
y: common_vendor.o(changeAddress),
z: common_vendor.p({
I: common_vendor.o(($event) => showAddress.value = false),
J: common_vendor.o(changeAddress),
K: common_vendor.p({
show: showAddress.value
}),
A: common_vendor.p({
L: common_vendor.p({
show: false,
content: "您还没有添加收货地址,请点击添加"
})

View File

@ -1 +1 @@
<view class=""><view class="count_down"> 还剩<text>00:28:36</text>订单自动取消 </view><view class="m-card m-address"><view class="address-info"><view class="top"><up-icon wx:if="{{a}}" u-i="666b5ad0-0" bind:__l="__l" u-p="{{a}}"></up-icon><view class="t-name">小王</view><view>155****9999</view></view><view class="bottom u-line-2"> 四川泸州市龙马潭区莲花池街道商业街1号 </view></view><view class="address-btn"><view style="width:80px"><up-button wx:if="{{c}}" u-s="{{['d']}}" bindclick="{{b}}" u-i="666b5ad0-1" bind:__l="__l" u-p="{{c}}">修改</up-button></view></view></view><view wx:for="{{d}}" wx:for-item="item" class="m-card m-good"><view class="image"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image></view><view class="body-content"><view><view class="title"><view>{{item.c}}</view><view>¥{{item.d}}</view></view><view class="tips"><view>数量</view><view>x{{item.e}}</view></view></view><view class="time"> 预计48小时发货 </view></view></view><view class="m-card good-info"><view wx:if="{{e}}" class="row"><view>商品总价 <text>共计{{f}}款商品</text></view><view><text>¥</text>{{g}}<text>.{{h}}</text></view></view><view class="row"><view>运费</view><view><text>¥</text>0<text>.00</text></view></view><view class="row-need"><view style="margin-right:10rpx">需付款</view><view><text>¥</text>{{i}}<text>.{{j}}</text></view></view></view><view class="m-card good-info"><view class="head-title">订单信息</view><view class="row"><view>订单编号</view><up-copy wx:if="{{l}}" u-s="{{['d']}}" u-i="666b5ad0-3" bind:__l="__l" u-p="{{l}}"><text>{{k}} | 复制</text></up-copy></view><view class="row"><view>下单时间</view><view>{{m}}</view></view><view class="row" style="margin-bottom:0"><view>支付状态</view><view wx:if="{{n}}">已支付</view><view wx:else class="red">待支付</view></view></view><view style="width:100%;height:200rpx"></view><view class="fiexd-btn-box"><view style="color:#777777" bindtap="{{o}}">取消订单</view><view style="width:450rpx"><up-button wx:if="{{q}}" u-s="{{['d']}}" u-i="666b5ad0-4" bind:__l="__l" u-p="{{q}}">立即支付 ¥{{p}}</up-button></view></view><up-popup wx:if="{{w}}" u-s="{{['d']}}" bindclose="{{v}}" u-i="666b5ad0-5" bind:__l="__l" u-p="{{w}}"><view class="cancel-popup"><view class="head-title">订单取消</view><view wx:for="{{r}}" wx:for-item="item" wx:key="e" class="row" bindtap="{{item.f}}"><view>{{item.a}}</view><image wx:if="{{item.b}}" src="{{item.c}}"></image><image wx:else src="{{item.d}}"></image></view><up-button wx:if="{{t}}" u-s="{{['d']}}" bindclick="{{s}}" u-i="666b5ad0-6,666b5ad0-5" bind:__l="__l" u-p="{{t}}">提交</up-button></view></up-popup><address-popup wx:if="{{z}}" bindclose="{{x}}" bindchange="{{y}}" u-i="666b5ad0-7" bind:__l="__l" u-p="{{z}}"></address-popup><modal wx:if="{{A}}" u-i="666b5ad0-8" bind:__l="__l" u-p="{{A}}"></modal></view>
<view class=""><view class="m-card m-address" style="margin-top:20rpx"><view class="address-info"><view class="top"><up-icon wx:if="{{a}}" u-i="666b5ad0-0" bind:__l="__l" u-p="{{a}}"></up-icon><view class="t-name">小王</view><view>155****9999</view></view><view class="bottom u-line-2"> 四川泸州市龙马潭区莲花池街道商业街1号 </view></view><view wx:if="{{b}}" class="address-btn"><view style="width:80px"><up-button wx:if="{{d}}" u-s="{{['d']}}" bindclick="{{c}}" u-i="666b5ad0-1" bind:__l="__l" u-p="{{d}}">修改</up-button></view></view></view><view wx:for="{{e}}" wx:for-item="item" class="m-card m-good"><view class="image"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image></view><view class="body-content"><view><view class="title"><view>{{item.c}}</view><view>¥{{item.d}}</view></view><view class="tips"><view>数量</view><view>x{{item.e}}</view></view></view><view class="time"> 预计48小时发货 </view></view></view><view wx:if="{{f}}" class="m-card good-info"><view wx:if="{{g}}" class="row"><view>商品总价 <text>共计{{h}}款商品</text></view><view><text>¥</text>{{i}}<text>.{{j}}</text></view></view><view class="row"><view>运费</view><view><text>¥</text>0<text>.00</text></view></view><view class="row-need"><view style="margin-right:10rpx">需付款</view><view><text>¥</text>{{k}}<text>.{{l}}</text></view></view></view><view class="m-card good-info"><view class="head-title">订单信息</view><block wx:if="{{m}}"><view class="row"><view>订单编号</view><up-copy wx:if="{{o}}" u-s="{{['d']}}" u-i="666b5ad0-3" bind:__l="__l" u-p="{{o}}"><text>{{n}} | 复制</text></up-copy></view><view class="row"><view>下单时间</view><view>{{p}}</view></view><view class="row" style="margin-bottom:0"><view>支付状态</view><view wx:if="{{q}}">已支付</view><view wx:else class="red">待支付</view></view></block><block wx:else><view wx:if="{{r}}" class="row"><view>实付款</view><view><text>¥</text>{{s}}<text>.{{t}}</text></view></view><view class="row"><view>订单编号</view><up-copy wx:if="{{w}}" u-s="{{['d']}}" u-i="666b5ad0-4" bind:__l="__l" u-p="{{w}}"><text>{{v}} | 复制</text></up-copy></view><view class="row"><view>支付方式</view><view>{{x}}</view></view><view class="row"><view>下单时间</view><view>{{y}}</view></view><view class="row" style="margin-bottom:0"><view>支付状态</view><view wx:if="{{z}}">已支付</view><view wx:else class="red">待支付</view></view></block></view><view style="width:100%;height:200rpx"></view><view class="fiexd-btn-box"><view style="color:#777777" bindtap="{{A}}">取消订单</view><view style="width:450rpx"><up-button wx:if="{{C}}" u-s="{{['d']}}" u-i="666b5ad0-5" bind:__l="__l" u-p="{{C}}">立即支付 ¥{{B}}</up-button></view></view><up-popup wx:if="{{H}}" u-s="{{['d']}}" bindclose="{{G}}" u-i="666b5ad0-6" bind:__l="__l" u-p="{{H}}"><view class="cancel-popup"><view class="head-title">订单取消</view><view wx:for="{{D}}" wx:for-item="item" wx:key="e" class="row" bindtap="{{item.f}}"><view>{{item.a}}</view><image wx:if="{{item.b}}" src="{{item.c}}"></image><image wx:else src="{{item.d}}"></image></view><up-button wx:if="{{F}}" u-s="{{['d']}}" bindclick="{{E}}" u-i="666b5ad0-7,666b5ad0-6" bind:__l="__l" u-p="{{F}}">提交</up-button></view></up-popup><address-popup wx:if="{{K}}" bindclose="{{I}}" bindchange="{{J}}" u-i="666b5ad0-8" bind:__l="__l" u-p="{{K}}"></address-popup><modal wx:if="{{L}}" u-i="666b5ad0-9" bind:__l="__l" u-p="{{L}}"></modal></view>

View File

@ -24,7 +24,7 @@
/* 透明度 */
/* 文章场景相关 */
.count_down {
padding: 20rpx 0;
padding-top: 20rpx;
text-align: center;
color: #444444;
}

View File

@ -34,69 +34,67 @@ const _sfc_main = {
return common_vendor.e({
a: common_vendor.t(__props.datas.number),
b: __props.datas.paid == 0
}, __props.datas.paid == 0 ? {
c: common_vendor.t(__props.datas.paid)
} : common_vendor.e({
d: __props.datas.status == 0
}, __props.datas.paid == 0 ? {} : common_vendor.e({
c: __props.datas.status == 0
}, __props.datas.status == 0 ? {} : {}, {
e: __props.datas.status == 1
d: __props.datas.status == 1
}, __props.datas.status == 1 ? {} : {}, {
f: __props.datas.status == 2 || __props.datas.status == 3
e: __props.datas.status == 2 || __props.datas.status == 3
}, __props.datas.status == 2 || __props.datas.status == 3 ? {} : {}), {
g: common_vendor.o(navTo),
h: common_vendor.f(__props.datas.goods_list, (item, index, i0) => {
f: common_vendor.o(navTo),
g: common_vendor.f(__props.datas.goods_list, (item, index, i0) => {
return {
a: item.imgs,
b: index
};
}),
i: common_vendor.p({
h: common_vendor.p({
name: "arrow-right-double",
color: "#20B128"
}),
j: common_vendor.t(__props.datas.goods_count),
k: common_vendor.t(__props.datas.total),
l: common_vendor.o(navTo),
m: __props.datas.paid = 0
}, (__props.datas.paid = 0) ? {
n: common_vendor.p({
i: common_vendor.t(__props.datas.goods_count),
j: common_vendor.t(__props.datas.total),
k: common_vendor.o(navTo),
l: __props.datas.paid == 0
}, __props.datas.paid == 0 ? {
m: common_vendor.p({
size: "small",
plain: true,
color: "#989898",
shape: "circle"
}),
o: common_vendor.p({
n: common_vendor.p({
size: "small",
plain: true,
color: "#20B128",
shape: "circle"
})
} : common_vendor.e({
p: __props.datas.status == 1
o: __props.datas.status == 1
}, __props.datas.status == 1 ? {
q: common_vendor.p({
p: common_vendor.p({
size: "small",
plain: true,
color: "#20B128",
shape: "circle"
})
} : {}, {
r: __props.datas.status == 2 || __props.datas.status == 3
q: __props.datas.status == 2 || __props.datas.status == 3
}, __props.datas.status == 2 || __props.datas.status == 3 ? {
r: common_vendor.p({
size: "small",
plain: true,
color: "#20B128",
shape: "circle"
})
} : {}, {
s: common_vendor.p({
size: "small",
plain: true,
color: "#20B128",
shape: "circle"
})
} : {}, {
t: common_vendor.p({
size: "small",
plain: true,
color: "#20B128",
shape: "circle"
}),
v: common_vendor.o(navTo)
t: common_vendor.o(navTo)
}));
};
}

View File

@ -1 +1 @@
<view class="shop-item"><view class="item-title" bindtap="{{g}}"><view>{{a}}</view><view wx:if="{{b}}"><text>待付款{{c}}</text></view><view wx:else><text wx:if="{{d}}">待发货</text><text wx:if="{{e}}">待收货</text><text wx:if="{{f}}">已完成</text></view></view><view class="item-body" bindtap="{{l}}"><view class="body-content"><view style="display:flex;flex:1;flex-shrink:0"><view wx:for="{{h}}" wx:for-item="item" wx:key="b"><image class="image" src="{{item.a}}"></image></view></view><view style="display:flex;flex-direction:column;align-items:center;justify-content:center;width:100rpx"><up-icon wx:if="{{i}}" u-i="e1c5d592-0" bind:__l="__l" u-p="{{i}}"></up-icon></view></view><view class="all">共 {{j}} 件商品, 总金额 <text>¥{{k}}</text></view></view><view wx:if="{{m}}" class="item-btn"><view style="width:80px"><up-button wx:if="{{n}}" u-s="{{['d']}}" u-i="e1c5d592-1" bind:__l="__l" u-p="{{n}}">取消订单</up-button></view><view style="width:80px"><up-button wx:if="{{o}}" u-s="{{['d']}}" u-i="e1c5d592-2" bind:__l="__l" u-p="{{o}}">立即支付</up-button></view></view><view wx:else class="item-btn"><view wx:if="{{p}}" style="width:80px"><up-button wx:if="{{q}}" u-s="{{['d']}}" u-i="e1c5d592-3" bind:__l="__l" u-p="{{q}}">确认收货</up-button></view><view wx:if="{{r}}" style="width:80px"><up-button wx:if="{{s}}" u-s="{{['d']}}" u-i="e1c5d592-4" bind:__l="__l" u-p="{{s}}">再次购买</up-button></view><view bindtap="{{v}}" style="width:80px"><up-button wx:if="{{t}}" u-s="{{['d']}}" u-i="e1c5d592-5" bind:__l="__l" u-p="{{t}}">查看详情</up-button></view></view></view>
<view class="shop-item"><view class="item-title" bindtap="{{f}}"><view>{{a}}</view><view wx:if="{{b}}"><text>待付款</text></view><view wx:else><text wx:if="{{c}}">待发货</text><text wx:if="{{d}}">待收货</text><text wx:if="{{e}}">已完成</text></view></view><view class="item-body" bindtap="{{k}}"><view class="body-content"><view style="display:flex;flex:1;flex-shrink:0"><view wx:for="{{g}}" wx:for-item="item" wx:key="b"><image class="image" src="{{item.a}}"></image></view></view><view style="display:flex;flex-direction:column;align-items:center;justify-content:center;width:100rpx"><up-icon wx:if="{{h}}" u-i="e1c5d592-0" bind:__l="__l" u-p="{{h}}"></up-icon></view></view><view class="all">共 {{i}} 件商品, 总金额 <text>¥{{j}}</text></view></view><view wx:if="{{l}}" class="item-btn"><view style="width:80px"><up-button wx:if="{{m}}" u-s="{{['d']}}" u-i="e1c5d592-1" bind:__l="__l" u-p="{{m}}">取消订单</up-button></view><view style="width:80px"><up-button wx:if="{{n}}" u-s="{{['d']}}" u-i="e1c5d592-2" bind:__l="__l" u-p="{{n}}">立即支付</up-button></view></view><view wx:else class="item-btn"><view wx:if="{{o}}" style="width:80px"><up-button wx:if="{{p}}" u-s="{{['d']}}" u-i="e1c5d592-3" bind:__l="__l" u-p="{{p}}">确认收货</up-button></view><view wx:if="{{q}}" style="width:80px"><up-button wx:if="{{r}}" u-s="{{['d']}}" u-i="e1c5d592-4" bind:__l="__l" u-p="{{r}}">再次购买</up-button></view><view bindtap="{{t}}" style="width:80px"><up-button wx:if="{{s}}" u-s="{{['d']}}" u-i="e1c5d592-5" bind:__l="__l" u-p="{{s}}">查看详情</up-button></view></view></view>

View File

@ -52,11 +52,11 @@ const _sfc_main = {
const getOrderList = (type = 0, status = "", paid = 1) => {
api_order.orderListApi({
...where.value,
status
// paid: paid
status,
paid
}).then((res) => {
console.log(res.data);
orderList.value[type] = res.data.lists;
console.log(orderList.value);
});
};
common_vendor.onLoad((options) => {

View File

@ -37,8 +37,10 @@ function baseRequest(url, method, data, {
reslove(res.data);
else if (res.data.code == -1) {
if (res.data.msg == "登录超时,请重新登录") {
userStore.setToken('');
userStore.setUserInfo({});
uni.reLaunch({
url: '/pages/Login/login'
url: '/pages/login/login'
})
}
} else if (res.data.code == 0) {