From 00567505c20e5b44bb4fa9281507c76e93555b98 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 5 Apr 2024 13:44:36 +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 --- .env.development | 2 +- src/api/shop.js | 22 +++ src/api/store.js | 43 +++-- src/components/pay.vue | 288 +++++++++++++++++++++++++++++ src/layout/index.vue | 4 + src/layout/myAside.vue | 5 + src/layout/myHeader.vue | 2 +- src/router/index.js | 13 +- src/utils/axios.js | 8 +- src/utils/ws.js | 32 ++++ src/views/home/component/order.vue | 24 ++- src/views/home/component/pay.vue | 182 ------------------ src/views/home/component/pupop.vue | 61 ++++-- src/views/home/component/shop.vue | 75 ++++++-- src/views/home/index.vue | 52 ++++-- src/views/login/index.vue | 6 + src/views/notFound/index.vue | 24 +++ src/views/order/index.vue | 213 ++++++++++++++++----- src/views/shop/index.vue | 178 ++++++++++++++++++ 19 files changed, 933 insertions(+), 301 deletions(-) create mode 100644 src/api/shop.js create mode 100644 src/components/pay.vue create mode 100644 src/utils/ws.js delete mode 100644 src/views/home/component/pay.vue create mode 100644 src/views/notFound/index.vue create mode 100644 src/views/shop/index.vue diff --git a/.env.development b/.env.development index e856970..60a7958 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,2 @@ -VITE_BASE_URL = 'http://192.168.1.16:8324' +VITE_BASE_URL = 'http://192.168.1.22:8324' # VITE_BASE_URL = 'https://crmeb-test.shop.lihaink.cn' \ No newline at end of file diff --git a/src/api/shop.js b/src/api/shop.js new file mode 100644 index 0000000..9b61767 --- /dev/null +++ b/src/api/shop.js @@ -0,0 +1,22 @@ +import request from '@/utils/axios.js' + +/** + * @description 商品列表 + */ +export function storeListApi(id, data) { + return request.get(`server/${id}/product/lst`, { params: data }) +} + +/** + * @description 商品详情 + */ +export function getAttrValue(id, data) { + return request.get(`store/product/detail/${id}`, { params: data }) +} + +/** + * @description 免审编辑 + */ +export function userFreeTrialApi(id, data) { + return request.post(`user_free_trial/${id}`, data) +} diff --git a/src/api/store.js b/src/api/store.js index 316713a..7b2e8c4 100644 --- a/src/api/store.js +++ b/src/api/store.js @@ -1,12 +1,5 @@ import request from '@/utils/axios.js' -/** - * @description 商品列表 - */ -export function storeListApi(id, data) { - return request.get(`server/${id}/product/lst`, { params: data }) -} - /** * @description 加入购物车 */ @@ -22,7 +15,7 @@ export function cartListApi(data) { } /** - * @description 购物数量加减 + * @description 编辑购物车数据 */ export function cartChangeApi(id, data) { return request.post(`user/cart/change/${id}`, data) @@ -50,23 +43,37 @@ export function orderCreateApi(data) { return request.post(`v2/order/create`, data) } +/** + * @description 重新支付 + */ +export function orderPayApi(id, data) { + return request.post(`order/pay/${id}`, data) +} + /** * @description 订单状态 */ -export function orderStatusApi(id) { - return request.get(`micropay_query`, { params: { order_id: id } }) +export function orderStatusApi(data) { + return request.get(`micropay_query`, { params: data }) } /** * @description 订单列表 */ -export function orderListApi(data) { - return request.get(`/order/list`, { params: data }) +export function orderListApi(id, data) { + return request.get(`admin/${id}/order_list`, { params: data }) } -// /** -// * @description 购物车数量 -// */ -// export function cartListApi(id, data) { -// return request.get(`count`, { params: data }) -// } \ No newline at end of file +/** + * @description 未支付订单列表 + */ +export function groupOrderListApi(id, data) { + return request.get(`admin/${id}/group_order_list`, { params: data }) +} + +/** + * @description 提单 + */ +export function orderLadingApi(data) { + return request.get(`order_lading`, { params: data }) +} \ No newline at end of file diff --git a/src/components/pay.vue b/src/components/pay.vue new file mode 100644 index 0000000..6b0a0ef --- /dev/null +++ b/src/components/pay.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/layout/index.vue b/src/layout/index.vue index 7f2b3b9..8ebbb8e 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,6 +1,10 @@ @@ -35,6 +39,7 @@ const navTo = (name) => { width: 4.5rem; height: 4.5rem; border-radius: 0.7rem; + cursor: pointer; display: flex; flex-direction: column; justify-content: center; diff --git a/src/layout/myHeader.vue b/src/layout/myHeader.vue index 6ff53b5..5698cd8 100644 --- a/src/layout/myHeader.vue +++ b/src/layout/myHeader.vue @@ -36,7 +36,7 @@ const onLogout = () => {