From 028578029407ac99f98adcdeb2ea623e8e55afc6 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Mon, 29 Apr 2024 18:14:58 +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 | 7 +- api/order.js | 6 + components/addressPopup.vue | 16 +- components/goodPopup.vue | 129 +++++++++++ config/app.js | 6 +- pages/cart/cart.vue | 90 ++++++-- pages/index/index.vue | 168 +++++++++++---- pages/login/login.vue | 2 +- pagesOrder/addressEdit/addressEdit.vue | 4 +- pagesOrder/addressList/addressList.vue | 18 +- pagesOrder/settle/settle.vue | 120 ++++++++--- store/cart.js | 18 ++ unpackage/dist/dev/mp-weixin/common/vendor.js | 1 + .../dev/mp-weixin/components/addressPopup.js | 47 ++-- .../mp-weixin/components/addressPopup.wxml | 2 +- .../dist/dev/mp-weixin/pages/cart/cart.js | 107 +++++++--- .../dist/dev/mp-weixin/pages/cart/cart.json | 3 +- .../dist/dev/mp-weixin/pages/cart/cart.wxml | 2 +- .../dist/dev/mp-weixin/pages/index/index.js | 200 ++++++++++++------ .../dist/dev/mp-weixin/pages/index/index.json | 4 +- .../dist/dev/mp-weixin/pages/index/index.wxml | 2 +- .../dist/dev/mp-weixin/pages/index/index.wxss | 13 ++ .../dist/dev/mp-weixin/pages/login/login.wxml | 2 +- .../pagesOrder/addressEdit/addressEdit.js | 8 +- .../pagesOrder/addressList/addressList.js | 30 ++- .../pagesOrder/addressList/addressList.wxml | 2 +- utils/request.js | 14 -- 27 files changed, 777 insertions(+), 244 deletions(-) create mode 100644 api/order.js create mode 100644 components/goodPopup.vue create mode 100644 store/cart.js diff --git a/api/cart.js b/api/cart.js index 61c81a5..8e3cba2 100644 --- a/api/cart.js +++ b/api/cart.js @@ -17,5 +17,10 @@ export const cartDeleteApi = (data)=>{ //购物车-零售列表 export const cartListApi = (data)=>{ - return request.get('/order/RetailOrder/checkOrder', data); + return request.get('/order/cart/list', 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 new file mode 100644 index 0000000..eceff70 --- /dev/null +++ b/api/order.js @@ -0,0 +1,6 @@ +import request from '@/utils/request'; + +//提交零售订单 +export const createOrderApi = (data)=>{ + return request.post('/order/RetailOrder/createOrder', data); +} \ No newline at end of file diff --git a/components/addressPopup.vue b/components/addressPopup.vue index 7ece4c2..34dd436 100644 --- a/components/addressPopup.vue +++ b/components/addressPopup.vue @@ -10,14 +10,14 @@ - + - 小李 - 151****9999 - + {{item.real_name}} + {{item.phone}} + - 四川泸州市龙马潭区莲花池街道商业街1号 + {{item.detail}} @@ -37,6 +37,10 @@ show: { type: Boolean, default: false + }, + list: { + type: Array, + default: ()=>[] } }) @@ -46,7 +50,7 @@ } const submitAddress = () => { - emit('change', addressType.value); + emit('change', props.list[addressType.value]); } const navTo = (url)=>{ diff --git a/components/goodPopup.vue b/components/goodPopup.vue new file mode 100644 index 0000000..da77322 --- /dev/null +++ b/components/goodPopup.vue @@ -0,0 +1,129 @@ + + + + + \ No newline at end of file diff --git a/config/app.js b/config/app.js index f314d2a..29766d1 100644 --- a/config/app.js +++ b/config/app.js @@ -1,11 +1,11 @@ let BASE_URL import store from "@/store/user.js" // 环境 -let env = "dev" -// let env = "prod" +// let env = "dev" +let env = "prod" switch(env){ - case 'prod': BASE_URL = '';break; + case 'prod': BASE_URL = 'https://ceshi-erp.lihaink.cn';break; default: BASE_URL = 'http://192.168.1.21:8787'; } diff --git a/pages/cart/cart.vue b/pages/cart/cart.vue index 5b28293..c1cdff8 100644 --- a/pages/cart/cart.vue +++ b/pages/cart/cart.vue @@ -1,8 +1,8 @@