From 27f95b331c7d191613c39aa8a1650b38bc863b80 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Sun, 28 Apr 2024 18:08:57 +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 --- App.vue | 23 +- api/cart.js | 21 ++ api/good.js | 6 +- api/user.js | 32 ++ components/addressPopup.vue | 2 +- components/modal.vue | 18 +- components/viewPopup.vue | 2 +- config/app.js | 17 +- pages.json | 12 +- pages/cart/cart.vue | 23 +- pages/index/index.vue | 198 ++++++++---- pages/login/login.vue | 260 ++++++++++++---- pages/my/my.vue | 2 +- pagesOrder/addressEdit/addressEdit.vue | 32 +- pagesOrder/addressList/addressList.vue | 21 +- pagesOrder/detail/detail.vue | 24 +- pagesOrder/settle/settle.vue | 282 ++++++++++++++++++ store/user.js | 8 + .../components/u-lazy-load/u-lazy-load.vue | 2 +- .../components/u-subsection/u-subsection.vue | 2 +- .../components/u-switch/u-switch.vue | 2 +- .../libs/config/props/subsection.js | 2 +- .../uview-plus/types/comps/subsection.d.ts | 2 +- unpackage/dist/dev/mp-weixin/app.js | 1 + unpackage/dist/dev/mp-weixin/app.json | 3 +- unpackage/dist/dev/mp-weixin/app.wxss | 23 +- unpackage/dist/dev/mp-weixin/common/vendor.js | 1 + .../mp-weixin/components/addressPopup.wxss | 2 +- .../dist/dev/mp-weixin/components/modal.js | 3 +- .../dist/dev/mp-weixin/components/modal.wxml | 2 +- .../dist/dev/mp-weixin/components/modal.wxss | 8 +- .../dev/mp-weixin/components/viewPopup.wxss | 2 +- .../dist/dev/mp-weixin/pages/cart/cart.js | 14 + .../dist/dev/mp-weixin/pages/cart/cart.wxml | 2 +- .../dist/dev/mp-weixin/pages/cart/cart.wxss | 10 +- .../dist/dev/mp-weixin/pages/index/index.js | 176 ++++++++--- .../dist/dev/mp-weixin/pages/index/index.json | 2 + .../dist/dev/mp-weixin/pages/index/index.wxml | 2 +- .../dist/dev/mp-weixin/pages/index/index.wxss | 18 +- .../dist/dev/mp-weixin/pages/login/login.js | 144 ++++++++- .../dist/dev/mp-weixin/pages/login/login.json | 7 +- .../dist/dev/mp-weixin/pages/login/login.wxml | 2 +- .../dist/dev/mp-weixin/pages/login/login.wxss | 17 ++ unpackage/dist/dev/mp-weixin/pages/my/my.js | 2 +- .../pagesOrder/addressEdit/addressEdit.js | 39 ++- .../pagesOrder/addressList/addressList.js | 30 +- .../pagesOrder/addressList/addressList.wxml | 2 +- .../pagesOrder/addressList/addressList.wxss | 2 +- .../mp-weixin/pagesOrder/detail/detail.wxml | 2 +- .../mp-weixin/pagesOrder/detail/detail.wxss | 21 -- .../dev/mp-weixin/project.private.config.json | 2 +- unpackage/dist/dev/mp-weixin/store/user.js | 7 + .../uview-plus/components/u--form/u--form.js | 158 ---------- .../components/u--form/u--form.json | 6 - .../components/u--form/u--form.wxml | 1 - .../components/u--form/u--form.wxss | 0 .../components/u--input/u--input.js | 157 ---------- .../components/u--input/u--input.json | 6 - .../components/u--input/u--input.wxml | 1 - .../components/u--input/u--input.wxss | 0 .../components/u-loading-page/props.js | 52 ---- .../u-loading-page/u-loading-page.js | 153 ---------- .../u-loading-page/u-loading-page.json | 7 - .../u-loading-page/u-loading-page.wxml | 1 - .../u-loading-page/u-loading-page.wxss | 68 ----- .../libs/config/props/subsection.js | 2 +- utils/request.js | 2 +- 67 files changed, 1235 insertions(+), 918 deletions(-) create mode 100644 api/cart.js create mode 100644 api/user.js create mode 100644 pagesOrder/settle/settle.vue delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u--form/u--form.js delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u--form/u--form.json delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u--form/u--form.wxml delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u--form/u--form.wxss delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u--input/u--input.js delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u--input/u--input.json delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u--input/u--input.wxml delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u--input/u--input.wxss delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-loading-page/props.js delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-loading-page/u-loading-page.js delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-loading-page/u-loading-page.json delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-loading-page/u-loading-page.wxml delete mode 100644 unpackage/dist/dev/mp-weixin/uni_modules/uview-plus/components/u-loading-page/u-loading-page.wxss diff --git a/App.vue b/App.vue index ad6a2b1..8533888 100644 --- a/App.vue +++ b/App.vue @@ -18,7 +18,28 @@ page{ font-size: 26rpx; - background-color: #eee; + background-color: #f6f6f6; } + .fiexd-btn-box { + position: fixed; + bottom: 0; + left: 0; + height: 120rpx; + height: calc(constant(safe-area-inset-bottom) + 120rpx); + /* 适用于iOS设备 */ + height: calc(env(safe-area-inset-bottom) + 120rpx); + /* 适用于Android设备 */ + width: 100%; + box-sizing: border-box; + background-color: #fff; + padding: 20rpx; + padding-bottom: calc(constant(safe-area-inset-bottom) + 20rpx); + /* 适用于iOS设备 */ + padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx); + /* 适用于Android设备 */ + display: flex; + justify-content: space-between; + align-items: center; + } diff --git a/api/cart.js b/api/cart.js new file mode 100644 index 0000000..61c81a5 --- /dev/null +++ b/api/cart.js @@ -0,0 +1,21 @@ +import request from '@/utils/request'; + +//添加购物车数量 +export const cartCreateApi = (data)=>{ + return request.post('/order/cart/create', data); +} + +//购物车-调整数量 +export const cartChangeApi = (data)=>{ + return request.post('/order/cart/change', data); +} + +//购物车-清空 +export const cartDeleteApi = (data)=>{ + return request.post('/order/cart/delete', data); +} + +//购物车-零售列表 +export const cartListApi = (data)=>{ + return request.get('/order/RetailOrder/checkOrder', data); +} \ No newline at end of file diff --git a/api/good.js b/api/good.js index 504e0fb..84f653b 100644 --- a/api/good.js +++ b/api/good.js @@ -1,5 +1,9 @@ import request from '@/utils/request'; export const goodListApi = (data)=>{ - return request.get('/good/list', data); + return request.get('/goods/goods/lists', data); +} + +export const goodClassListApi = (data)=>{ + return request.get('/goods/goodsclass/lists', data); } \ No newline at end of file diff --git a/api/user.js b/api/user.js new file mode 100644 index 0000000..4e54b11 --- /dev/null +++ b/api/user.js @@ -0,0 +1,32 @@ +import request from '@/utils/request'; + +// 密码登录 +export const userLoginApi = (data)=>{ + return request.post('/login/account', data); +} + + +// 添加地址 +export const addressCreateApi = (data)=>{ + return request.post('/user/address/create', data); +} + +// 修改地址 +export const addressEditApi = (data)=>{ + return request.post('/user/address/edit', data); +} + +// 删除地址 +export const addressDeleteApi = (data)=>{ + return request.post('/user/address/delete', data); +} + +// 地址列表 +export const addressListsApi = (data)=>{ + return request.post('/user/address/lists', data); +} + +// 地址详情 +export const addressDetailApi = (data)=>{ + return request.post('/user/address/detail', data); +} \ No newline at end of file diff --git a/components/addressPopup.vue b/components/addressPopup.vue index 8e231f7..7ece4c2 100644 --- a/components/addressPopup.vue +++ b/components/addressPopup.vue @@ -94,7 +94,7 @@ align-items: center; justify-content: space-between; padding-bottom: 20rpx; - border-bottom: 1rpx solid #eee; + border-bottom: 1rpx solid #f6f6f6; margin-bottom: 20rpx; &:last-child { diff --git a/components/modal.vue b/components/modal.vue index 231c7d3..e39a18f 100644 --- a/components/modal.vue +++ b/components/modal.vue @@ -1,9 +1,9 @@