From 7fdd9ab31f3ffc9e3a5cda07a33281bc9e42159c Mon Sep 17 00:00:00 2001 From: HINOTOR <108602298+HINOTOR@users.noreply.github.com> Date: Thu, 16 Nov 2023 22:45:07 +0800 Subject: [PATCH] src --- .../frontend/src/components/detail/head.vue | 35 +++++++++--- .../frontend/src/components/home/carousel.vue | 11 +++- .../frontend/src/components/home/discount.vue | 25 ++++---- .../src/components/home/recommend.vue | 57 ++----------------- src/demo/frontend/src/pages/cart/cart.vue | 23 +------- src/demo/frontend/src/store/state.js | 2 +- src/demo/frontend/src/utils/axios.js | 2 +- 7 files changed, 60 insertions(+), 95 deletions(-) diff --git a/src/demo/frontend/src/components/detail/head.vue b/src/demo/frontend/src/components/detail/head.vue index 26ca8012..4c98e457 100644 --- a/src/demo/frontend/src/components/detail/head.vue +++ b/src/demo/frontend/src/components/detail/head.vue @@ -18,11 +18,10 @@
选择配置:
- - - - - + + + +
@@ -34,9 +33,10 @@
总计:
- ¥{{totalPrice}} + ¥{{this.detail.goodsPrice}}
+ 加入购物车
@@ -45,6 +45,7 @@ diff --git a/src/demo/frontend/src/components/home/discount.vue b/src/demo/frontend/src/components/home/discount.vue index d3679a88..b08be875 100644 --- a/src/demo/frontend/src/components/home/discount.vue +++ b/src/demo/frontend/src/components/home/discount.vue @@ -2,15 +2,15 @@
今日优惠Discount
- - + +
- diff --git a/src/demo/frontend/src/pages/cart/cart.vue b/src/demo/frontend/src/pages/cart/cart.vue index 85c9216a..b5b13aa6 100644 --- a/src/demo/frontend/src/pages/cart/cart.vue +++ b/src/demo/frontend/src/pages/cart/cart.vue @@ -29,23 +29,6 @@ - - - - - - - -
- 确认下单 + 确认下单
@@ -162,10 +145,10 @@ name: "cart", }, //计算单项物品总价 calSingleTotalPrice(item){ - item.singleTotalPrice=item.price*item.goodsCount*item.totalDay + item.TotalPrice=item.goodsPrice*item.goodsCount this.calTotalPrice() console.log(item.totalDay) - console.log(item.singleTotalPrice); + console.log(item.TotalPrice); }, //计算租赁天数 calTotalDay(item){ diff --git a/src/demo/frontend/src/store/state.js b/src/demo/frontend/src/store/state.js index 6f67e70a..6a9cab0d 100644 --- a/src/demo/frontend/src/store/state.js +++ b/src/demo/frontend/src/store/state.js @@ -1,6 +1,6 @@ //一些全局状态量 const state={ - baseUrl: "http://localhost:8088", + baseUrl: "http://localhost:8080", searchKey:"", detailGoodsId:"", editEntrustId:"", diff --git a/src/demo/frontend/src/utils/axios.js b/src/demo/frontend/src/utils/axios.js index 70825df6..8c912420 100644 --- a/src/demo/frontend/src/utils/axios.js +++ b/src/demo/frontend/src/utils/axios.js @@ -1,6 +1,6 @@ import axios from 'axios' -axios.defaults.baseURL = 'http://localhost:8088'//后端地址 +axios.defaults.baseURL = 'http://localhost:8080'//后端地址 axios.defaults.withCredentials = true axios.defaults.headers['X-Requested-With'] = 'XMLHttpRequest' axios.defaults.headers['authToken'] = localStorage.getItem('token') || '' //每次请求都使用token,登录后由shiro发布的sessionId