From 04ea1e5b8a062c175470fcfa0f4cba230df2a684 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Tue, 19 Nov 2024 18:06:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.js | 6 ++ components/user/buyMenu.vue | 68 +++++++++++++ components/user/cartSubmitSelect.vue | 24 ++++- mixins/order.js | 5 +- pages/index/cart.vue | 10 +- pages/index/center.vue | 9 +- pages/index/index.vue | 8 +- pages/index/order.vue | 26 ++++- pages_order/components/product/addLease.vue | 82 +++++++++++++++- pages_order/components/product/addLeaseForm.vue | 5 +- .../components/product/submitUnitSelect.vue | 66 +++++++++++-- pages_order/order/createWash.vue | 107 +++++++++++++++------ pages_order/order/orderDetail.vue | 51 ++++++++-- pages_order/product/productDetail.vue | 4 +- store/store.js | 4 +- 15 files changed, 403 insertions(+), 72 deletions(-) create mode 100644 components/user/buyMenu.vue diff --git a/api/api.js b/api/api.js index de55a95..48a6b83 100644 --- a/api/api.js +++ b/api/api.js @@ -197,6 +197,12 @@ const config = { method: 'POST', showLoading: true, }, + // 获取我的租金 + getRentPrice : { + url : '/user/lease/all/deposit/price', + method: 'GET', + auth: true, + }, // 申请成为水洗店 applyShopHotel: { url: '/shop/apply', diff --git a/components/user/buyMenu.vue b/components/user/buyMenu.vue new file mode 100644 index 0000000..23f73bc --- /dev/null +++ b/components/user/buyMenu.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/components/user/cartSubmitSelect.vue b/components/user/cartSubmitSelect.vue index b672652..c85e773 100644 --- a/components/user/cartSubmitSelect.vue +++ b/components/user/cartSubmitSelect.vue @@ -8,7 +8,7 @@ - + {{ address.name }} @@ -43,10 +43,10 @@ 应付款:¥{{ price }} - 押金:¥{{ depositPrice }} + 押金:¥{{ depositPrice.toFixed(2) }} - 水洗费:¥{{ washPrice }} + 水洗费:¥{{ washPrice.toFixed(2) }} 租金:¥{{ rentPrice }} @@ -84,6 +84,16 @@ + + + 下单说明: + + 租金:从物品确认收货开始计算¥{{ configList.depositPrice }}元/天 + + + 押金:将按照面积计算每平方厘米¥1元 + + @@ -116,6 +126,7 @@ \ No newline at end of file diff --git a/pages_order/order/orderDetail.vue b/pages_order/order/orderDetail.vue index c94cfb1..a79bf3f 100644 --- a/pages_order/order/orderDetail.vue +++ b/pages_order/order/orderDetail.vue @@ -19,6 +19,17 @@ :detail="order"> --> + + + + @@ -225,7 +236,7 @@ - + 水洗费用 @@ -233,6 +244,16 @@ ¥{{ order.washPay}} + + + + + 佣金 + + + ¥{{ order.shopCoin }} + + - + 已优惠 @@ -278,31 +299,41 @@ + - - + + + 租金:从物品确认收货开始计算¥{{ configList.depositPrice }}元/天 + + + 押金:将按照面积计算每平方厘米¥1元 + + + + + + 联系平台客服 - 联系客户 @@ -312,7 +343,7 @@ v-else @click="$refs.customerServicePopup.open(bindShop.phone, '水洗店')" class="btn"> 联系水洗店 - + --> @@ -345,7 +376,7 @@ mixins : [mixinOrder], computed: { ...mapGetters(['userShop']), - ...mapState(['bindShop']), + ...mapState(['bindShop', 'configList']), }, data() { return { diff --git a/pages_order/product/productDetail.vue b/pages_order/product/productDetail.vue index 20ae3b0..bfca133 100644 --- a/pages_order/product/productDetail.vue +++ b/pages_order/product/productDetail.vue @@ -42,12 +42,12 @@ - - + --> diff --git a/store/store.js b/store/store.js index e50b204..7d77982 100644 --- a/store/store.js +++ b/store/store.js @@ -9,7 +9,7 @@ import Position from '@/utils/position.js' //Vuex.Store 构造器选项 const store = new Vuex.Store({ state: { - configList: [], //配置列表 + configList: {}, //配置列表 shop : false, position : {//定位信息 latitude : 0, @@ -35,7 +35,7 @@ const store = new Vuex.Store({ // } // }) - let config = ['privacyXieYi'] + let config = ['privacyXieYi', 'depositPrice'] config.forEach(k => { api('getConfigOne', { name : k