From 7825a73d37dc9a7f2831995986e8e12e2d3d0dbc Mon Sep 17 00:00:00 2001
From: weipengfei <2187978347@qq.com>
Date: Mon, 6 May 2024 14:54:47 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/cart.js | 2 +-
api/order.js | 7 ++-
config/app.js | 4 +-
pages/my/my.vue | 6 +-
pagesOrder/detail/detail.vue | 34 ++++++++---
pagesOrder/order/order.vue | 3 +-
unpackage/dist/dev/mp-weixin/pages/my/my.js | 11 ++--
unpackage/dist/dev/mp-weixin/pages/my/my.wxml | 2 +-
unpackage/dist/dev/mp-weixin/pages/my/my.wxss | 2 +-
.../dev/mp-weixin/pagesOrder/detail/detail.js | 58 ++++++++++++++-----
.../mp-weixin/pagesOrder/detail/detail.wxml | 2 +-
.../dev/mp-weixin/pagesOrder/order/order.js | 13 ++++-
.../dev/mp-weixin/pagesOrder/order/order.wxml | 2 +-
13 files changed, 106 insertions(+), 40 deletions(-)
diff --git a/api/cart.js b/api/cart.js
index cd60254..94f7427 100644
--- a/api/cart.js
+++ b/api/cart.js
@@ -28,4 +28,4 @@ export const frequentlyPurchaseApi = (data)=>{
//购物车-零售购物车预检
export const checkOrderApi = (data)=>{
return request.post('/order/RetailOrder/checkOrder', data);
-}
\ No newline at end of file
+}
diff --git a/api/order.js b/api/order.js
index 4fca412..7fce174 100644
--- a/api/order.js
+++ b/api/order.js
@@ -1,6 +1,6 @@
import request from '@/utils/request';
-//提交零售订单
+//提交零售订单(支付一起)
export const createOrderApi = (data)=>{
return request.post('/order/RetailOrder/createOrder', data);
}
@@ -13,4 +13,9 @@ export const orderListApi = (data)=>{
//订单详情
export const orderDetailApi = (data)=>{
return request.get('/order/RetailOrder/detail', data);
+}
+
+//提交
+export const rePaymentApi = (data)=>{
+ return request.post('/order/RetailOrder/Repayment', data);
}
\ No newline at end of file
diff --git a/config/app.js b/config/app.js
index b99f537..f9ef99d 100644
--- a/config/app.js
+++ b/config/app.js
@@ -1,9 +1,9 @@
let BASE_URL
import store from "@/store/user.js"
// 环境
-let env = "dev"
+// let env = "dev"
// let env = "test"
-// let env = "prod"
+let env = "prod"
switch(env){
case 'prod': BASE_URL = 'https://erp.lihaink.cn';break;
diff --git a/pages/my/my.vue b/pages/my/my.vue
index 6bbfaed..ac72203 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -23,6 +23,10 @@
待付款
+
+ 待发货
+
+
待收货
@@ -130,7 +134,7 @@
left: 0;
z-index: 3;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a8863202404261349533191.png');
- background-size: 38% 100%;
+ background-size: 28% 100%;
background-position: right;
background-repeat: no-repeat;
diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue
index f94912d..491fcf5 100644
--- a/pagesOrder/detail/detail.vue
+++ b/pagesOrder/detail/detail.vue
@@ -30,12 +30,12 @@
¥{{item.sell}}
- 数量
+ {{item.goods_unit}}
x{{item.nums}}
- 预计48小时发货
+ {{item.msg}}
@@ -100,11 +100,20 @@
-
- 取消订单
-
- 立即支付 ¥{{datas.total}}
-
+
+
+ 取消订单
+
+ 立即支付 ¥{{datas.total}}
+
+
+
+
+
+ 确认收货
+ 再次购买
+
+
@@ -129,7 +138,7 @@
import cancelDict from "@/dict/cancelDict.js";
import addressPopup from "@/components/addressPopup.vue";
import modal from "@/components/modal.vue";
- import { orderDetailApi } from "@/api/order.js"
+ import { orderDetailApi, rePaymentApi } from "@/api/order.js"
const showCancel = ref(false);
const showAddress = ref(false);
@@ -170,6 +179,15 @@
return price.split('.')[index] || (index ? '00' : '0');
}
+ const rePay = ()=>{
+ rePaymentApi({
+ order_id: datas.value.id,
+ pay_type: 1
+ }).then(res=>{
+ console.log(res);
+ })
+ }
+
// 设置目标日期
let targetDate = "";
let timer = null;
diff --git a/pagesOrder/order/order.vue b/pagesOrder/order/order.vue
index 8eb349e..9c08f58 100644
--- a/pagesOrder/order/order.vue
+++ b/pagesOrder/order/order.vue
@@ -11,7 +11,7 @@
-
+
@@ -71,7 +71,6 @@
paid: paid
}).then(res=>{
orderList.value[type] = res.data.lists;
- console.log(orderList.value);
})
}
diff --git a/unpackage/dist/dev/mp-weixin/pages/my/my.js b/unpackage/dist/dev/mp-weixin/pages/my/my.js
index 085147f..ce9e853 100644
--- a/unpackage/dist/dev/mp-weixin/pages/my/my.js
+++ b/unpackage/dist/dev/mp-weixin/pages/my/my.js
@@ -40,21 +40,22 @@ const _sfc_main = {
d: common_vendor.t(common_vendor.unref(userInfo).id),
e: common_vendor.o(($event) => navTo(1)),
f: common_vendor.o(($event) => navTo(2)),
- g: common_vendor.o(($event) => navTo()),
- h: common_vendor.p({
+ g: common_vendor.o(($event) => navTo(3)),
+ h: common_vendor.o(($event) => navTo()),
+ i: common_vendor.p({
title: "我的地址",
isLink: true,
url: "/pagesOrder/addressList/addressList"
}),
- i: common_vendor.p({
+ j: common_vendor.p({
title: "意见反馈",
isLink: true
}),
- j: common_vendor.p({
+ k: common_vendor.p({
title: "关于我们",
isLink: true
}),
- k: common_vendor.p({
+ l: common_vendor.p({
title: "退出登录",
isLink: true,
url: "/pages/login/login"
diff --git a/unpackage/dist/dev/mp-weixin/pages/my/my.wxml b/unpackage/dist/dev/mp-weixin/pages/my/my.wxml
index cfb8cdb..2a9f929 100644
--- a/unpackage/dist/dev/mp-weixin/pages/my/my.wxml
+++ b/unpackage/dist/dev/mp-weixin/pages/my/my.wxml
@@ -1 +1 @@
-{{c}}ID: {{d}}我的订单待付款待收货全部订单
\ No newline at end of file
+{{c}}ID: {{d}}我的订单待付款待发货待收货全部订单
\ No newline at end of file
diff --git a/unpackage/dist/dev/mp-weixin/pages/my/my.wxss b/unpackage/dist/dev/mp-weixin/pages/my/my.wxss
index 1371ad2..3fb80dc 100644
--- a/unpackage/dist/dev/mp-weixin/pages/my/my.wxss
+++ b/unpackage/dist/dev/mp-weixin/pages/my/my.wxss
@@ -74,7 +74,7 @@
left: 0;
z-index: 3;
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a8863202404261349533191.png");
- background-size: 38% 100%;
+ background-size: 28% 100%;
background-position: right;
background-repeat: no-repeat;
}
diff --git a/unpackage/dist/dev/mp-weixin/pagesOrder/detail/detail.js b/unpackage/dist/dev/mp-weixin/pagesOrder/detail/detail.js
index 5db6730..af1d886 100644
--- a/unpackage/dist/dev/mp-weixin/pagesOrder/detail/detail.js
+++ b/unpackage/dist/dev/mp-weixin/pagesOrder/detail/detail.js
@@ -54,6 +54,14 @@ const _sfc_main = {
price = price + "";
return price.split(".")[index] || (index ? "00" : "0");
};
+ const rePay = () => {
+ api_order.rePaymentApi({
+ order_id: datas.value.id,
+ pay_type: 1
+ }).then((res) => {
+ console.log(res);
+ });
+ };
let timer = null;
common_vendor.onLoad((option) => {
common_vendor.index.setNavigationBarTitle({
@@ -95,7 +103,9 @@ const _sfc_main = {
}),
c: common_vendor.t(item.class_name),
d: common_vendor.t(item.sell),
- e: common_vendor.t(item.nums)
+ e: common_vendor.t(item.goods_unit),
+ f: common_vendor.t(item.nums),
+ g: common_vendor.t(item.msg)
};
}),
f: datas.value.paid == 0
@@ -131,13 +141,35 @@ const _sfc_main = {
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({
+ A: datas.value.number
+ }, datas.value.number ? common_vendor.e({
+ B: !datas.value.paid
+ }, !datas.value.paid ? {
+ C: common_vendor.o(($event) => showCancel.value = true),
+ D: common_vendor.t(datas.value.total),
+ E: common_vendor.o(rePay),
+ F: common_vendor.p({
color: "#20B128",
shape: "circle"
+ })
+ } : common_vendor.e({
+ G: datas.value.status == 0 || datas.value.status == 1
+ }, datas.value.status == 0 || datas.value.status == 1 ? {
+ H: common_vendor.o(() => {
}),
- D: common_vendor.f(common_vendor.unref(dict_cancelDict.list), (item, index, i0) => {
+ I: common_vendor.p({
+ color: "#20B128",
+ shape: "circle"
+ })
+ } : {
+ J: common_vendor.o(() => {
+ }),
+ K: common_vendor.p({
+ color: "#20B128",
+ shape: "circle"
+ })
+ })) : {}, {
+ L: 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
@@ -150,23 +182,23 @@ const _sfc_main = {
f: common_vendor.o(($event) => cancelType.value = item.value, item.value)
});
}),
- E: common_vendor.o(submitCancel),
- F: common_vendor.p({
+ M: common_vendor.o(submitCancel),
+ N: common_vendor.p({
color: "#20B128",
shape: "circle"
}),
- G: common_vendor.o(($event) => showCancel.value = false),
- H: common_vendor.p({
+ O: common_vendor.o(($event) => showCancel.value = false),
+ P: common_vendor.p({
show: showCancel.value,
closeable: true,
round: "10"
}),
- I: common_vendor.o(($event) => showAddress.value = false),
- J: common_vendor.o(changeAddress),
- K: common_vendor.p({
+ Q: common_vendor.o(($event) => showAddress.value = false),
+ R: common_vendor.o(changeAddress),
+ S: common_vendor.p({
show: showAddress.value
}),
- L: common_vendor.p({
+ T: common_vendor.p({
show: false,
content: "您还没有添加收货地址,请点击添加"
})
diff --git a/unpackage/dist/dev/mp-weixin/pagesOrder/detail/detail.wxml b/unpackage/dist/dev/mp-weixin/pagesOrder/detail/detail.wxml
index 21e1d5b..d5f04bd 100644
--- a/unpackage/dist/dev/mp-weixin/pagesOrder/detail/detail.wxml
+++ b/unpackage/dist/dev/mp-weixin/pagesOrder/detail/detail.wxml
@@ -1 +1 @@
-小王155****9999 四川泸州市龙马潭区莲花池街道商业街1号 修改{{item.c}}¥{{item.d}}数量x{{item.e}} 预计48小时发货 商品总价 共计{{h}}款商品¥{{i}}.{{j}}运费¥0.00需付款¥{{k}}.{{l}}订单信息订单编号{{n}} | 复制下单时间{{p}}支付状态已支付待支付实付款¥{{s}}.{{t}}订单编号{{v}} | 复制支付方式{{x}}下单时间{{y}}支付状态已支付待支付取消订单立即支付 ¥{{B}}
\ No newline at end of file
+小王155****9999 四川泸州市龙马潭区莲花池街道商业街1号 修改{{item.c}}¥{{item.d}}{{item.e}}x{{item.f}}{{item.g}}商品总价 共计{{h}}款商品¥{{i}}.{{j}}运费¥0.00需付款¥{{k}}.{{l}}订单信息订单编号{{n}} | 复制下单时间{{p}}支付状态已支付待支付实付款¥{{s}}.{{t}}订单编号{{v}} | 复制支付方式{{x}}下单时间{{y}}支付状态已支付待支付取消订单立即支付 ¥{{D}}确认收货再次购买
\ No newline at end of file
diff --git a/unpackage/dist/dev/mp-weixin/pagesOrder/order/order.js b/unpackage/dist/dev/mp-weixin/pagesOrder/order/order.js
index a6d270e..4308104 100644
--- a/unpackage/dist/dev/mp-weixin/pagesOrder/order/order.js
+++ b/unpackage/dist/dev/mp-weixin/pagesOrder/order/order.js
@@ -56,7 +56,6 @@ const _sfc_main = {
paid
}).then((res) => {
orderList.value[type] = res.data.lists;
- console.log(orderList.value);
});
};
common_vendor.onLoad((options) => {
@@ -93,7 +92,9 @@ const _sfc_main = {
}),
e: common_vendor.f(orderList.value, (list, k, i0) => {
return common_vendor.e({
- a: common_vendor.f(list, (item, index, i1) => {
+ a: list.length > 0
+ }, list.length > 0 ? {
+ b: common_vendor.f(list, (item, index, i1) => {
return {
a: index,
b: "aea1ad54-3-" + i0 + "-" + i1,
@@ -103,8 +104,14 @@ const _sfc_main = {
})
};
})
+ } : {
+ c: "aea1ad54-4-" + i0,
+ d: common_vendor.p({
+ text: "订单空空如也",
+ icon: "https://lihai001.oss-cn-chengdu.aliyuncs.com/def/29955202404260944367594.png"
+ })
}, {
- d: k
+ e: k
});
}),
f: swiperCurrent.value,
diff --git a/unpackage/dist/dev/mp-weixin/pagesOrder/order/order.wxml b/unpackage/dist/dev/mp-weixin/pagesOrder/order/order.wxml
index f3ad924..44a6b68 100644
--- a/unpackage/dist/dev/mp-weixin/pagesOrder/order/order.wxml
+++ b/unpackage/dist/dev/mp-weixin/pagesOrder/order/order.wxml
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file