This commit is contained in:
parent
dcd225028c
commit
72b5746a71
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="count_down">
|
<!-- <view class="count_down" v-if="datas.paid==0">
|
||||||
还剩<text>00:28:36</text>订单自动取消
|
还剩<text>00:28:36</text>订单自动取消
|
||||||
</view>
|
</view> -->
|
||||||
<view class="m-card m-address">
|
<view class="m-card m-address" style="margin-top: 20rpx;">
|
||||||
<view class="address-info">
|
<view class="address-info">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<up-icon name="map"></up-icon>
|
<up-icon name="map"></up-icon>
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
四川泸州市龙马潭区莲花池街道商业街1号
|
四川泸州市龙马潭区莲花池街道商业街1号
|
||||||
</view>
|
</view>
|
||||||
</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"
|
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle" color="#f6f6f6"
|
||||||
:customStyle="{color:'#666666'}">修改</up-button></view>
|
:customStyle="{color:'#666666'}">修改</up-button></view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</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 v-if="datas.goods_list" class="row">
|
||||||
<view>商品总价 <text>共计{{datas.goods_list.length}}款商品</text></view>
|
<view>商品总价 <text>共计{{datas.goods_list.length}}款商品</text></view>
|
||||||
<view><text>¥</text>{{c_price(datas.total, 0)}}<text>.{{c_price(datas.total, 1)}}</text></view>
|
<view><text>¥</text>{{c_price(datas.total, 0)}}<text>.{{c_price(datas.total, 1)}}</text></view>
|
||||||
|
@ -55,21 +55,48 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="m-card good-info">
|
<view class="m-card good-info">
|
||||||
<view class="head-title">订单信息</view>
|
<view class="head-title">订单信息</view>
|
||||||
<view class="row">
|
<block v-if="datas.paid==0">
|
||||||
<view>订单编号</view>
|
<view class="row">
|
||||||
<up-copy :content="datas.number">
|
<view>订单编号</view>
|
||||||
<text>{{datas.number}} | 复制</text>
|
<up-copy :content="datas.number">
|
||||||
</up-copy>
|
<text>{{datas.number}} | 复制</text>
|
||||||
</view>
|
</up-copy>
|
||||||
<view class="row">
|
</view>
|
||||||
<view>下单时间</view>
|
<view class="row">
|
||||||
<view>{{datas.create_time}}</view>
|
<view>下单时间</view>
|
||||||
</view>
|
<view>{{datas.create_time}}</view>
|
||||||
<view class="row" style="margin-bottom: 0;">
|
</view>
|
||||||
<view>支付状态</view>
|
<view class="row" style="margin-bottom: 0;">
|
||||||
<view v-if="datas.paid">已支付</view>
|
<view>支付状态</view>
|
||||||
<view v-else class="red">待支付</view>
|
<view v-if="datas.paid">已支付</view>
|
||||||
</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>
|
||||||
<view style="width: 100%;height: 200rpx;"></view>
|
<view style="width: 100%;height: 200rpx;"></view>
|
||||||
|
|
||||||
|
@ -97,7 +124,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad, onBackPress } from "@dcloudio/uni-app";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import cancelDict from "@/dict/cancelDict.js";
|
import cancelDict from "@/dict/cancelDict.js";
|
||||||
import addressPopup from "@/components/addressPopup.vue";
|
import addressPopup from "@/components/addressPopup.vue";
|
||||||
|
@ -129,6 +156,12 @@
|
||||||
order_id: datas.value.id
|
order_id: datas.value.id
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
datas.value = res.data;
|
datas.value = res.data;
|
||||||
|
// if(!res.data.paid){
|
||||||
|
// targetDate = res.data.create_time;
|
||||||
|
// // 每秒更新一次倒计时
|
||||||
|
// timer = setInterval(updateCountdown, 1000);
|
||||||
|
// updateCountdown();
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,6 +169,29 @@
|
||||||
price = price + '';
|
price = price + '';
|
||||||
return price.split('.')[index] || (index ? '00' : '0');
|
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) => {
|
onLoad((option) => {
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
|
@ -146,11 +202,16 @@
|
||||||
getDetails()
|
getDetails()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onBackPress(()=>{
|
||||||
|
clearInterval(timer);
|
||||||
|
console.log("清除");
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.count_down {
|
.count_down {
|
||||||
padding: 20rpx 0;
|
padding-top: 20rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #444444;
|
color: #444444;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<view class="item-title" @click="navTo">
|
<view class="item-title" @click="navTo">
|
||||||
<view>{{datas.number}}</view>
|
<view>{{datas.number}}</view>
|
||||||
<view v-if="datas.paid==0">
|
<view v-if="datas.paid==0">
|
||||||
<text>待付款{{datas.paid}}</text>
|
<text>待付款</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<text v-if="datas.status==0">待发货</text>
|
<text v-if="datas.status==0">待发货</text>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="all">共 {{datas.goods_count}} 件商品, 总金额 <text>¥{{datas.total}}</text> </view>
|
<view class="all">共 {{datas.goods_count}} 件商品, 总金额 <text>¥{{datas.total}}</text> </view>
|
||||||
</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="#989898" shape="circle">取消订单</up-button></view>
|
||||||
<view style="width: 80px;"><up-button size="small" plain color="#20B128" shape="circle">立即支付</up-button></view>
|
<view style="width: 80px;"><up-button size="small" plain color="#20B128" shape="circle">立即支付</up-button></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -68,10 +68,10 @@
|
||||||
orderListApi({
|
orderListApi({
|
||||||
...where.value,
|
...where.value,
|
||||||
status: status,
|
status: status,
|
||||||
// paid: paid
|
paid: paid
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
console.log(res.data);
|
|
||||||
orderList.value[type] = res.data.lists;
|
orderList.value[type] = res.data.lists;
|
||||||
|
console.log(orderList.value);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -258,19 +258,45 @@
|
||||||
cart_id: cartStore.cartList,
|
cart_id: cartStore.cartList,
|
||||||
address_id: addressInfo.value.address_id,
|
address_id: addressInfo.value.address_id,
|
||||||
mer_id: shopInfo.value.mer_id,
|
mer_id: shopInfo.value.mer_id,
|
||||||
pay_type: 3
|
pay_type: 1
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
uni.showModal({
|
uni.requestPayment({
|
||||||
title: '订单支付成功',
|
provider: 'wxpay',
|
||||||
confirmText: '查看订单',
|
timeStamp: res.data.config.timeStamp,
|
||||||
cancelText: '继续购买',
|
nonceStr: res.data.config.nonceStr,
|
||||||
|
package: res.data.config.package,
|
||||||
|
signType: res.data.config.signType,
|
||||||
|
paySign: res.data.config.paySign,
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
if(e.confirm) uni.navigateTo({
|
if(e.errMsg == 'requestPayment:ok'){
|
||||||
url: '/pagesOrder/order/order'
|
uni.showModal({
|
||||||
})
|
title: '订单支付成功',
|
||||||
else uni.navigateBack();
|
confirmText: '查看订单',
|
||||||
|
cancelText: '继续购买',
|
||||||
|
success: (e) => {
|
||||||
|
if(e.confirm) uni.navigateTo({
|
||||||
|
url: '/pagesOrder/order/order'
|
||||||
|
})
|
||||||
|
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();
|
||||||
|
// }
|
||||||
|
// })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7698,6 +7698,7 @@ const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
|
||||||
};
|
};
|
||||||
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
|
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
|
||||||
const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
|
const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
|
||||||
|
const onBackPress = /* @__PURE__ */ createHook(ON_BACK_PRESS);
|
||||||
exports.Pinia = Pinia;
|
exports.Pinia = Pinia;
|
||||||
exports._export_sfc = _export_sfc;
|
exports._export_sfc = _export_sfc;
|
||||||
exports.computed = computed;
|
exports.computed = computed;
|
||||||
|
@ -7710,6 +7711,7 @@ exports.index = index;
|
||||||
exports.n = n;
|
exports.n = n;
|
||||||
exports.nextTick$1 = nextTick$1;
|
exports.nextTick$1 = nextTick$1;
|
||||||
exports.o = o;
|
exports.o = o;
|
||||||
|
exports.onBackPress = onBackPress;
|
||||||
exports.onLoad = onLoad;
|
exports.onLoad = onLoad;
|
||||||
exports.onShow = onShow;
|
exports.onShow = onShow;
|
||||||
exports.p = p;
|
exports.p = p;
|
||||||
|
|
|
@ -54,6 +54,7 @@ const _sfc_main = {
|
||||||
price = price + "";
|
price = price + "";
|
||||||
return price.split(".")[index] || (index ? "00" : "0");
|
return price.split(".")[index] || (index ? "00" : "0");
|
||||||
};
|
};
|
||||||
|
let timer = null;
|
||||||
common_vendor.onLoad((option) => {
|
common_vendor.onLoad((option) => {
|
||||||
common_vendor.index.setNavigationBarTitle({
|
common_vendor.index.setNavigationBarTitle({
|
||||||
title: option.type == 1 ? "等待付款" : "订单详情"
|
title: option.type == 1 ? "等待付款" : "订单详情"
|
||||||
|
@ -63,21 +64,28 @@ const _sfc_main = {
|
||||||
getDetails();
|
getDetails();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
common_vendor.onBackPress(() => {
|
||||||
|
clearInterval(timer);
|
||||||
|
console.log("清除");
|
||||||
|
});
|
||||||
return (_ctx, _cache) => {
|
return (_ctx, _cache) => {
|
||||||
return common_vendor.e({
|
return common_vendor.e({
|
||||||
a: common_vendor.p({
|
a: common_vendor.p({
|
||||||
name: "map"
|
name: "map"
|
||||||
}),
|
}),
|
||||||
b: common_vendor.o(($event) => showAddress.value = true),
|
b: datas.value.paid == 0
|
||||||
c: common_vendor.p({
|
}, datas.value.paid == 0 ? {
|
||||||
|
c: common_vendor.o(($event) => showAddress.value = true),
|
||||||
|
d: common_vendor.p({
|
||||||
size: "small",
|
size: "small",
|
||||||
shape: "circle",
|
shape: "circle",
|
||||||
color: "#f6f6f6",
|
color: "#f6f6f6",
|
||||||
customStyle: {
|
customStyle: {
|
||||||
color: "#666666"
|
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 {
|
return {
|
||||||
a: "666b5ad0-2-" + i0,
|
a: "666b5ad0-2-" + i0,
|
||||||
b: common_vendor.p({
|
b: common_vendor.p({
|
||||||
|
@ -90,28 +98,46 @@ const _sfc_main = {
|
||||||
e: common_vendor.t(item.nums)
|
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 ? {
|
}, datas.value.goods_list ? {
|
||||||
f: common_vendor.t(datas.value.goods_list.length),
|
h: 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))
|
|
||||||
} : {}, {
|
|
||||||
i: common_vendor.t(c_price(datas.value.total, 0)),
|
i: common_vendor.t(c_price(datas.value.total, 0)),
|
||||||
j: common_vendor.t(c_price(datas.value.total, 1)),
|
j: common_vendor.t(c_price(datas.value.total, 1))
|
||||||
k: common_vendor.t(datas.value.number),
|
} : {}, {
|
||||||
l: common_vendor.p({
|
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
|
content: datas.value.number
|
||||||
}),
|
}),
|
||||||
m: common_vendor.t(datas.value.create_time),
|
p: common_vendor.t(datas.value.create_time),
|
||||||
n: datas.value.paid
|
q: datas.value.paid
|
||||||
}, datas.value.paid ? {} : {}, {
|
}, datas.value.paid ? {} : {}) : common_vendor.e({
|
||||||
o: common_vendor.o(($event) => showCancel.value = true),
|
r: datas.value.goods_list
|
||||||
p: common_vendor.t(datas.value.total),
|
}, datas.value.goods_list ? {
|
||||||
q: common_vendor.p({
|
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",
|
color: "#20B128",
|
||||||
shape: "circle"
|
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({
|
return common_vendor.e({
|
||||||
a: common_vendor.t(item.name),
|
a: common_vendor.t(item.name),
|
||||||
b: cancelType.value == item.value
|
b: cancelType.value == item.value
|
||||||
|
@ -124,23 +150,23 @@ const _sfc_main = {
|
||||||
f: common_vendor.o(($event) => cancelType.value = item.value, item.value)
|
f: common_vendor.o(($event) => cancelType.value = item.value, item.value)
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
s: common_vendor.o(submitCancel),
|
E: common_vendor.o(submitCancel),
|
||||||
t: common_vendor.p({
|
F: common_vendor.p({
|
||||||
color: "#20B128",
|
color: "#20B128",
|
||||||
shape: "circle"
|
shape: "circle"
|
||||||
}),
|
}),
|
||||||
v: common_vendor.o(($event) => showCancel.value = false),
|
G: common_vendor.o(($event) => showCancel.value = false),
|
||||||
w: common_vendor.p({
|
H: common_vendor.p({
|
||||||
show: showCancel.value,
|
show: showCancel.value,
|
||||||
closeable: true,
|
closeable: true,
|
||||||
round: "10"
|
round: "10"
|
||||||
}),
|
}),
|
||||||
x: common_vendor.o(($event) => showAddress.value = false),
|
I: common_vendor.o(($event) => showAddress.value = false),
|
||||||
y: common_vendor.o(changeAddress),
|
J: common_vendor.o(changeAddress),
|
||||||
z: common_vendor.p({
|
K: common_vendor.p({
|
||||||
show: showAddress.value
|
show: showAddress.value
|
||||||
}),
|
}),
|
||||||
A: common_vendor.p({
|
L: common_vendor.p({
|
||||||
show: false,
|
show: false,
|
||||||
content: "您还没有添加收货地址,请点击添加"
|
content: "您还没有添加收货地址,请点击添加"
|
||||||
})
|
})
|
||||||
|
|
|
@ -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>
|
|
@ -24,7 +24,7 @@
|
||||||
/* 透明度 */
|
/* 透明度 */
|
||||||
/* 文章场景相关 */
|
/* 文章场景相关 */
|
||||||
.count_down {
|
.count_down {
|
||||||
padding: 20rpx 0;
|
padding-top: 20rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #444444;
|
color: #444444;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,69 +34,67 @@ const _sfc_main = {
|
||||||
return common_vendor.e({
|
return common_vendor.e({
|
||||||
a: common_vendor.t(__props.datas.number),
|
a: common_vendor.t(__props.datas.number),
|
||||||
b: __props.datas.paid == 0
|
b: __props.datas.paid == 0
|
||||||
}, __props.datas.paid == 0 ? {
|
}, __props.datas.paid == 0 ? {} : common_vendor.e({
|
||||||
c: common_vendor.t(__props.datas.paid)
|
c: __props.datas.status == 0
|
||||||
} : common_vendor.e({
|
|
||||||
d: __props.datas.status == 0
|
|
||||||
}, __props.datas.status == 0 ? {} : {}, {
|
}, __props.datas.status == 0 ? {} : {}, {
|
||||||
e: __props.datas.status == 1
|
d: __props.datas.status == 1
|
||||||
}, __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 ? {} : {}), {
|
}, __props.datas.status == 2 || __props.datas.status == 3 ? {} : {}), {
|
||||||
g: common_vendor.o(navTo),
|
f: common_vendor.o(navTo),
|
||||||
h: common_vendor.f(__props.datas.goods_list, (item, index, i0) => {
|
g: common_vendor.f(__props.datas.goods_list, (item, index, i0) => {
|
||||||
return {
|
return {
|
||||||
a: item.imgs,
|
a: item.imgs,
|
||||||
b: index
|
b: index
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
i: common_vendor.p({
|
h: common_vendor.p({
|
||||||
name: "arrow-right-double",
|
name: "arrow-right-double",
|
||||||
color: "#20B128"
|
color: "#20B128"
|
||||||
}),
|
}),
|
||||||
j: common_vendor.t(__props.datas.goods_count),
|
i: common_vendor.t(__props.datas.goods_count),
|
||||||
k: common_vendor.t(__props.datas.total),
|
j: common_vendor.t(__props.datas.total),
|
||||||
l: common_vendor.o(navTo),
|
k: common_vendor.o(navTo),
|
||||||
m: __props.datas.paid = 0
|
l: __props.datas.paid == 0
|
||||||
}, (__props.datas.paid = 0) ? {
|
}, __props.datas.paid == 0 ? {
|
||||||
n: common_vendor.p({
|
m: common_vendor.p({
|
||||||
size: "small",
|
size: "small",
|
||||||
plain: true,
|
plain: true,
|
||||||
color: "#989898",
|
color: "#989898",
|
||||||
shape: "circle"
|
shape: "circle"
|
||||||
}),
|
}),
|
||||||
o: common_vendor.p({
|
n: common_vendor.p({
|
||||||
size: "small",
|
size: "small",
|
||||||
plain: true,
|
plain: true,
|
||||||
color: "#20B128",
|
color: "#20B128",
|
||||||
shape: "circle"
|
shape: "circle"
|
||||||
})
|
})
|
||||||
} : common_vendor.e({
|
} : common_vendor.e({
|
||||||
p: __props.datas.status == 1
|
o: __props.datas.status == 1
|
||||||
}, __props.datas.status == 1 ? {
|
}, __props.datas.status == 1 ? {
|
||||||
q: common_vendor.p({
|
p: common_vendor.p({
|
||||||
size: "small",
|
size: "small",
|
||||||
plain: true,
|
plain: true,
|
||||||
color: "#20B128",
|
color: "#20B128",
|
||||||
shape: "circle"
|
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 ? {
|
}, __props.datas.status == 2 || __props.datas.status == 3 ? {
|
||||||
|
r: common_vendor.p({
|
||||||
|
size: "small",
|
||||||
|
plain: true,
|
||||||
|
color: "#20B128",
|
||||||
|
shape: "circle"
|
||||||
|
})
|
||||||
|
} : {}, {
|
||||||
s: common_vendor.p({
|
s: common_vendor.p({
|
||||||
size: "small",
|
size: "small",
|
||||||
plain: true,
|
plain: true,
|
||||||
color: "#20B128",
|
color: "#20B128",
|
||||||
shape: "circle"
|
shape: "circle"
|
||||||
})
|
|
||||||
} : {}, {
|
|
||||||
t: common_vendor.p({
|
|
||||||
size: "small",
|
|
||||||
plain: true,
|
|
||||||
color: "#20B128",
|
|
||||||
shape: "circle"
|
|
||||||
}),
|
}),
|
||||||
v: common_vendor.o(navTo)
|
t: common_vendor.o(navTo)
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
|
@ -52,11 +52,11 @@ const _sfc_main = {
|
||||||
const getOrderList = (type = 0, status = "", paid = 1) => {
|
const getOrderList = (type = 0, status = "", paid = 1) => {
|
||||||
api_order.orderListApi({
|
api_order.orderListApi({
|
||||||
...where.value,
|
...where.value,
|
||||||
status
|
status,
|
||||||
// paid: paid
|
paid
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res.data);
|
|
||||||
orderList.value[type] = res.data.lists;
|
orderList.value[type] = res.data.lists;
|
||||||
|
console.log(orderList.value);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
common_vendor.onLoad((options) => {
|
common_vendor.onLoad((options) => {
|
||||||
|
|
|
@ -37,8 +37,10 @@ function baseRequest(url, method, data, {
|
||||||
reslove(res.data);
|
reslove(res.data);
|
||||||
else if (res.data.code == -1) {
|
else if (res.data.code == -1) {
|
||||||
if (res.data.msg == "登录超时,请重新登录") {
|
if (res.data.msg == "登录超时,请重新登录") {
|
||||||
|
userStore.setToken('');
|
||||||
|
userStore.setUserInfo({});
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/Login/login'
|
url: '/pages/login/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (res.data.code == 0) {
|
} else if (res.data.code == 0) {
|
||||||
|
|
Loading…
Reference in New Issue