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 @@
购买重量*
-
+
+
+ {{ datas.unit_name }}
+
+
+
@@ -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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 购物车
+
+
+
+ 我的订单
+ {{ userStore.userInfo.no_writeoff }}
+
+
+
+ 个人中心
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+ 全
+ 部
+
+
+
+
+
+ 全部分类
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+ 综合
+
+
+ 价格
+
+
+
+
+
+ 销量
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.store_name }}
+
+
+
+ 售价
+
+ ¥{{item[priceKey.price]}}/{{ item.unit_name }}
+
+
+
+ {{item.tag}}
+
+
+
+ 原价
+ ¥{{item[priceKey.op_price]}}
+
+
+
+ 售价
+ ¥{{item[priceKey.op_price]}}
+
+
+
+
+
+ 规格
+ {{ item.store_info }}
+
+
+
+
+
+ 起批量
+ {{ item.batch }}{{ item.unit_name }}起卖
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 合计
+ ¥{{ cartInfo.pay_price }}
+
+
+ {{cartInfo.msg }}
+
+
+
+ 支付
+
+
+
+ {{ cartInfo.count }}
+
+
+
+
+
+
+
+
+
+ 温馨提示
+
+
+ 只需再凑满 {{500- cartInfo.pay_price}} 元,即可享受采购金额10%的品牌礼品兑换券,错过此次机会则无礼品券。
+
+
+
+ 放弃礼品券
+
+
+ 继续采购
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
-
+
+
+
+
+
+
+
+ {{shop_Info.name}}
+
+
+ {{shop_Info.detailed_address}}
+
+
+
+ {{shop_Info.phone}}
+
+
+
+
+
+ 切换配送点
+
+
+
商品明细
-
+
@@ -22,7 +51,7 @@
{{ orderInfo.delivery_msg }}
-
+
@@ -59,8 +88,8 @@
-
-
+
+
@@ -201,9 +230,10 @@
// 用户选择的门店信息
let STORE_INFO = uni.getStorageSync('STORE_INFO');
+ console.log(STORE_INFO)
if (STORE_INFO) {
shop_Info.value = JSON.parse(STORE_INFO)
- }else{
+ } else {
uni.$u.toast('获取门店信息失败,请在首页选择门店')
}
@@ -211,8 +241,8 @@
const reservation_time = ref('')
const is_storage = ref(0)
const LocationShow = ref(false)
- const timeShow=ref(false)
- const timeContent=ref('')
+ const timeShow = ref(false)
+ const timeContent = ref('')
const formData = ref({
remark: ""
})
@@ -354,9 +384,9 @@
cartList.value = res.data.cart_list;
orderInfo.value = res.data.order;
shop_Info.value = res.data.shopInfo || {}
- if(res.data.alert!=''){
- timeShow.value=true
- timeContent.value=res.data.alert
+ if (res.data.alert != '') {
+ timeShow.value = true
+ timeContent.value = res.data.alert
}
checkInventoryApi({
cart_id: cartStore.cartList,
@@ -494,6 +524,11 @@
onShow(() => {
getAddressList();
})
+
+ uni.$on('settle', function(data) {
+ let datas = JSON.parse(data)
+ shop_Info.value = datas
+ })