From 90504db81dedac4a29bb7267cd832ac00cc1431e Mon Sep 17 00:00:00 2001 From: bb_pan Date: Sat, 8 Feb 2025 17:01:40 +0800 Subject: [PATCH] =?UTF-8?q?bug=20=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/cart/index.vue | 13 +++++++------ vite.config.js | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/pages/cart/index.vue b/src/pages/cart/index.vue index 6ffd31e..614bee2 100644 --- a/src/pages/cart/index.vue +++ b/src/pages/cart/index.vue @@ -405,6 +405,12 @@ const onSelectTime = (type, index, goodsI) => { } const onConfirm = () => { if (timeType.value === 1) { + // 清除结束日期 + cartList.value[activeIndex.value].devInfoVoList[goodsIndex.value].rentEndTime = '' + // 清除天数 + cartList.value[activeIndex.value].devInfoVoList[goodsIndex.value].days = 0 + // 清除费用 + cartList.value[activeIndex.value].devInfoVoList[goodsIndex.value].costs = 0 cartList.value[activeIndex.value].devInfoVoList[goodsIndex.value].rentBeginTime = leaseTime.value.join('-') } else { @@ -415,12 +421,7 @@ const onConfirm = () => { ), ) ) { - showFailToast('租赁结束日期不能小于租赁开始日期') - return - } else if ( - !cartList.value[activeIndex.value].devInfoVoList[goodsIndex.value].rentBeginTime - ) { - showFailToast('请先选择租赁开始日期') + showFailToast('租赁结束日期不能早于租赁开始日期') return } else { cartList.value[activeIndex.value].devInfoVoList[goodsIndex.value].rentEndTime = diff --git a/vite.config.js b/vite.config.js index 8bd6044..05acd0d 100644 --- a/vite.config.js +++ b/vite.config.js @@ -33,11 +33,11 @@ export default defineConfig({ proxy: { // 在此处编写代理规则 '/api': { - // target: 'http://36.33.26.201:17788/proxyApi', + target: 'http://36.33.26.201:17788/proxyApi', // target: 'http://192.168.2.123:28080', // target: 'http://192.168.2.122:28080', // target: 'http://192.168.0.244:28580', // 测试服务 - target: 'http://192.168.2.122:28080', // 测试服务 + // target: 'http://192.168.2.122:28080', // 测试服务 changeOrigin: true, rewrite: (path) => { return path.replace(/\/api/, '')