From 781b267b6e013eeaf88688f7f789b54f979df784 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 5 Apr 2024 15:58:51 +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 --- src/assets/icon-404-color.svg | 66 +++++++++++++++++++++++++ src/components/pay.vue | 4 +- src/layout/myHeader.vue | 15 ++++-- src/utils/axios.js | 1 + src/views/home/component/order.vue | 23 +++++++-- src/views/home/component/price.vue | 79 ++++++++++++++++++++++++++++++ src/views/home/index.vue | 9 +++- src/views/login/index.vue | 32 ++++++------ src/views/notFound/index.vue | 2 +- 9 files changed, 202 insertions(+), 29 deletions(-) create mode 100644 src/assets/icon-404-color.svg create mode 100644 src/views/home/component/price.vue diff --git a/src/assets/icon-404-color.svg b/src/assets/icon-404-color.svg new file mode 100644 index 0000000..7e5f96b --- /dev/null +++ b/src/assets/icon-404-color.svg @@ -0,0 +1,66 @@ + + + + 500-彩色-01 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/pay.vue b/src/components/pay.vue index 9f54b4d..f082f75 100644 --- a/src/components/pay.vue +++ b/src/components/pay.vue @@ -211,7 +211,7 @@ defineExpose({
应收金额(元):
- ¥{{ form.total_price }} + ¥{{ form.order_price }}
{ info().then((res) => { @@ -36,18 +38,21 @@ const onLogout = () => { diff --git a/src/views/home/component/price.vue b/src/views/home/component/price.vue new file mode 100644 index 0000000..f7b5ca5 --- /dev/null +++ b/src/views/home/component/price.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 7ed9af5..bba8940 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -91,12 +91,17 @@ const editPupop = (item) => { // 结算 const checkOut = () => { let cart_id = orderRef.value.list.map((item) => item.cart_id); - orderCheckApi({ + let query = { takes: [], use_coupon: {}, use_integral: false, cart_id: cart_id, - }).then((res) => { + } + if(orderRef.value.discounts>0){ + query.deduction_price = orderRef.value.discounts.toFixed(2); + query.pay_type = "micropay"; + } + orderCheckApi(query).then((res) => { payRef.value.setForm({ data: res.data, cart_id: cart_id, diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 7271a6d..56553ea 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -42,23 +42,23 @@ const onLogin = () => { }); login(formLogin.value) .then((res) => { - userStore.setToken(res.data.token); - info().then(({data}) => { - if(!data.service){ - return ElMessage({ - message: "请联系管理员开通服务", - type: "error", - }) - } - userStore.setUserInfo(data); - router.push("/"); - }); + console.log(res); + if(res.data){ + userStore.setToken(res.data.token); + info().then(({data}) => { + if(!data.service){ + return ElMessage({ + message: "请联系管理员开通服务", + type: "error", + }) + } + userStore.setUserInfo(data); + router.push("/"); + }); + } }) .catch((err) => { - ElMessage({ - message: err.message, - type: "error", - }); + }); }; @@ -106,7 +106,7 @@ onMounted(() => { width: 100vw; height: 100vh; box-sizing: border-box; - background-image: url(https://multi-store.crmeb.net/view_cashier/img/bg.b8f6b872.png); + background-image: url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/78559202404051452598712.png); background-size: 100% 100%; background-repeat: no-repeat; display: flex; diff --git a/src/views/notFound/index.vue b/src/views/notFound/index.vue index 30f68f4..de781af 100644 --- a/src/views/notFound/index.vue +++ b/src/views/notFound/index.vue @@ -10,7 +10,7 @@ const back = () => {
404