From 264a2c1e93e9b9cd3c7e0568b656325b12b008ec Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期一, 25 八月 2025 15:59:03 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/xiehe_website --- src/views/home/search.vue | 51 ++++++++++++++------------------------------------- 1 files changed, 14 insertions(+), 37 deletions(-) diff --git a/src/views/home/search.vue b/src/views/home/search.vue index 1328347..6f43d2b 100644 --- a/src/views/home/search.vue +++ b/src/views/home/search.vue @@ -23,17 +23,6 @@ <div class="bookfilterList"> <div class="listTitle"> <div>缁撴灉锛氬叡璁{ total }}鏉�</div> - <div style="width: 300px"> - <el-input - v-model="input3" - placeholder="杈撳叆鏁欐潗鍚嶇О銆佷綔鑰呭鍚嶃�佸嚭鍝佹柟鍚嶇О鎼滅储" - class="input-with-select" - > - <template #append> - <el-button :icon="Search" @click="getBookList" /> - </template> - </el-input> - </div> </div> <div> @@ -79,37 +68,13 @@ /> </div> </div> - <div class="recommendBox"> - <div class="recommendTitle">鎺ㄨ崘鏁欐潗</div> - <div class="newRecommendList"> - <div class="recommendItem" v-for="item in recommendBookListData" :key="item.id"> - <div class="recommendItemImg"> - <img class="autoImg" :src="item.icon" /> - </div> - <div class="infoBox"> - <div class="bookName">{{ item.name }}</div> - <div class="author"> - 浣滆�咃細{{ item.authorcaupress_author ? item.caupress_author : '-' }} - </div> - <div class="priceBox"> - <span class="oldPrice" v-if="item.oldPrice">鍘熶环锛毬{ item.oldPrice }}</span> - <span class="price" v-if="item.price && item.price > 0"> - 瀹氫环锛毬� - <span>{{ item.price }}</span> - </span> - <span class="price" v-else> 瀹氫环锛�<span class="freePrice">鍏嶈垂</span> </span> - </div> - </div> - </div> - </div> - </div> </div> </div> </div> </template> <script setup> -import { ref, onBeforeMount, inject, reactive, onMounted } from 'vue' +import { ref, onBeforeMount, inject, reactive, onMounted, watch } from 'vue' import { useRouter, useRoute } from 'vue-router' const MG = inject('MG') @@ -126,6 +91,15 @@ const route = useRoute() const router = useRouter() let currentLevel = ref('all') + +watch( + () => route.query, // 鐩戝惉 path 鍙樺寲 + (newPath, oldPath) => { + console.log('璺敱璺緞浠�', oldPath, '鍙樹负', newPath) + input3.value = newPath.key + getBookList() + }, +) const toDetail = (item) => { router.push({ @@ -282,7 +256,7 @@ padding: 20px; .bookfilterList { - width: 80%; + width: 100%; border: 1px solid #e4e7ed; height: 100%; border-radius: 10px; @@ -330,6 +304,9 @@ margin-right: 0; } } + .recommendItem:hover { + background-image: url(@/assets/images/Mouse_fill.png); + } .recommendItemImg { width: 150px; height: 200px; -- Gitblit v1.9.1