From 742402180b7d40ed283d82f5fe116919bd57f4b1 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 3 Sep 2024 17:14:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=96=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=92=8C=E4=BC=98=E5=8C=96=E7=8E=B0=E6=9C=89=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E5=A2=9E=E5=BC=BA=E7=94=A8=E6=88=B7=E4=BD=93?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/cart.js | 7 +- api/good.js | 7 + components/goodPopup.vue | 31 +- config/app.js | 5 +- pages.json | 7 + pages/afterSales/afterSales.vue | 2 +- pages/login/login.vue | 2 +- pages/login/test.vue | 2 +- pages/my/my.vue | 1 + pages/wholesale/index.vue | 1167 +++++++++++++++++++++++++++++++ pagesOrder/detail/detail.vue | 2 +- pagesOrder/settle/settle.vue | 57 +- utils/request.js | 1 + 13 files changed, 1268 insertions(+), 23 deletions(-) create mode 100644 pages/wholesale/index.vue diff --git a/api/cart.js b/api/cart.js index ad9a17c..41c2178 100644 --- a/api/cart.js +++ b/api/cart.js @@ -21,7 +21,12 @@ export const cartListApi = (data) => { noAuth: true }); } - +//购物车-批发列表 +export const cartWholesaleListApi = (data) => { + return request.get('/order/cart/wholesale_lists', data, { + noAuth: true + }); +} //购物车-常买记录 export const frequentlyPurchaseApi = (data) => { return request.get('/order/order/frequently_purchase', data); diff --git a/api/good.js b/api/good.js index fa7a5df..fe8ee69 100644 --- a/api/good.js +++ b/api/good.js @@ -10,4 +10,11 @@ export const goodClassListApi = (data) => { export const storeProductListApi = (data) => { return request.get('/product/product/store_lists', data); +} + +/** + * 批发商品列表 + */ +export const storeProductWholesaleListApi = (data) => { + return request.get('/product/product/wholesale_lists', data); } \ No newline at end of file diff --git a/components/goodPopup.vue b/components/goodPopup.vue index 1744c24..01ceb8e 100644 --- a/components/goodPopup.vue +++ b/components/goodPopup.vue @@ -14,7 +14,8 @@ 商品单位 - {{ datas.unit_name }} + {{ datas.unit_name }} + 商品价格 @@ -37,7 +38,19 @@ 购买重量* - + + + + @@ -78,7 +91,7 @@ }) - const valChange = () => { + const valChange = (e) => { uni.vibrateShort(); } @@ -87,8 +100,11 @@ }); const setData = (e) => { datas.value = e; - if (Number(e.batch) > 0) datas.value.cart_num = e.batch; - else datas.value.cart_num = 1; + if (Number(e.batch) > 0) { + datas.value.cart_num = e.batch; + } else { + datas.value.cart_num = 1; + } } @@ -114,6 +130,11 @@ let sell = +datas.value[props.priceKey.off_activity == 1 ? props.priceKey.price : props .priceKey .op_price]; + if (!sell) { + sell = datas.value.price + num = datas.value.cart_num + } + return Number(num * sell * 100 / 100).toFixed(2) }) diff --git a/config/app.js b/config/app.js index 0d6283a..dea5d28 100644 --- a/config/app.js +++ b/config/app.js @@ -2,10 +2,10 @@ let BASE_URL let WSS_URL import store from "@/store/user.js" // 环境 -let env = "dev" +// let env = "dev" // let env = "prod" // let env = "release"; -// let env = "local"; +let env = "local"; switch (env) { case 'dev': @@ -33,6 +33,7 @@ let config = { WSS_URL: WSS_URL, HEADER: { 'content-type': 'application/json', + 'accept':'json', //#ifdef MP 'Form-type': 'routine', //#endif diff --git a/pages.json b/pages.json index e9e6a40..6b4cb41 100644 --- a/pages.json +++ b/pages.json @@ -121,6 +121,13 @@ { "navigationBarTitleText" : "提现申请记录" } + }, + { + "path" : "pages/wholesale/index", + "style" : + { + "navigationBarTitleText" : "批发" + } } ], "subPackages": [{ diff --git a/pages/afterSales/afterSales.vue b/pages/afterSales/afterSales.vue index 48acd24..78c94b2 100644 --- a/pages/afterSales/afterSales.vue +++ b/pages/afterSales/afterSales.vue @@ -29,7 +29,7 @@ {{item.unit}} - x5 + x{{item.cart_num}} diff --git a/pages/login/login.vue b/pages/login/login.vue index 8018f19..c6fb583 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -9,7 +9,7 @@ - 欢迎登录泸优采 + 欢迎登录蜀优采 diff --git a/pages/login/test.vue b/pages/login/test.vue index d143df7..0cdc2ec 100644 --- a/pages/login/test.vue +++ b/pages/login/test.vue @@ -3,7 +3,7 @@ - 欢迎登录泸优采 + 欢迎登录蜀优采 diff --git a/pages/my/my.vue b/pages/my/my.vue index c392265..ebf75d9 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -125,6 +125,7 @@ + diff --git a/pages/wholesale/index.vue b/pages/wholesale/index.vue new file mode 100644 index 0000000..ef295aa --- /dev/null +++ b/pages/wholesale/index.vue @@ -0,0 +1,1167 @@ + + + + + + \ No newline at end of file diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue index d48143b..e87fd3e 100644 --- a/pagesOrder/detail/detail.vue +++ b/pagesOrder/detail/detail.vue @@ -9,7 +9,7 @@ @click="callPhone(store_info.phone)"> - 自提点 + 配送点 diff --git a/pagesOrder/settle/settle.vue b/pagesOrder/settle/settle.vue index 1e2ba70..db77dba 100644 --- a/pagesOrder/settle/settle.vue +++ b/pagesOrder/settle/settle.vue @@ -1,8 +1,37 @@