From 5f00696dfb25bc90034448ceb634ed1ef256681a Mon Sep 17 00:00:00 2001 From: qiyunfeng-create <1940665526@qq.com> Date: 星期四, 21 八月 2025 21:13:35 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/xiehe_website --- src/views/personalCenter/myBook.vue | 102 +++++++++++++++++++++++---------------------------- 1 files changed, 46 insertions(+), 56 deletions(-) diff --git a/src/views/personalCenter/myBook.vue b/src/views/personalCenter/myBook.vue index 7b08426..b7ec6bf 100644 --- a/src/views/personalCenter/myBook.vue +++ b/src/views/personalCenter/myBook.vue @@ -11,58 +11,59 @@ @click="goDetail(item)" > <div class="imgBox"> - <img :src="item.product.icon" alt /> + <img v-if="item.product.icon" :src="item.product.icon" /> + <img v-else :src="defaultImg" alt="" /> </div> <div class="details"> <div class="text-flow" v-if="item.product.name"> {{ item.product.name || "-" }} </div> - <div class="text-flow" :title="item.tourism_ISBN"> - ISBN锛歿{ item.tourism_ISBN.length != 0 ? item.tourism_ISBN : "-" }} + <div class="text-flow" :title="item.isbn"> + ISBN锛歿{ item.isbn.length != 0 ? item.isbn : "-" }} </div> <div class="text-flow"> - 浣滆�咃細{{ item.tourism_author.length != 0 ? item.tourism_author : "-" }} + 浣滆�咃細{{ item.author.length != 0 ? item.author : "-" }} </div> <!-- <div class="text-flow" v-if="item.ExpiryDate"> 鎴鏃ユ湡锛�<span style="color: #dd0000">{{ item.ExpiryDate }}</span> </div> --> </div> </div> - <div class="pageCon"> - <!-- 鍒嗛〉 --> - <el-pagination - background - :current-page="paginationData.page - 0" - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - :page-size="paginationData.limit" - layout="total, prev, pager, next, slot" - :total="paginationData.totalCount" - > - <div style="display: inline-block"> - <span class="el-pagination__jump" - >鍓嶅線 - <div class="el-input el-pagination__editor is-in-pagination"> - <input - type="number" - autocomplete="off" - min="1" - :max="paginationData.totalPage" - v-model="inputPage" - class="el-input__inner" - @keyup.enter="jumpFun($event)" - /> - </div> - 椤� - </span> - <el-button type="primary" class="toBtn" @click="jumpFun">纭畾</el-button> - </div> - </el-pagination> - </div> </div> <div class="myCarTopPage" v-else> <el-empty description="鎮ㄨ繕鏈喘涔颁换浣曞浘涔�" :image-size="200" /> </div> + </div> + <div class="pageCon"> + <!-- 鍒嗛〉 --> + <el-pagination + background + :current-page="paginationData.page - 0" + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :page-size="paginationData.limit" + layout="total, prev, pager, next, slot" + :total="paginationData.totalCount" + > + <div style="display: flex; align-items: center"> + <span class="el-pagination__jump" + >鍓嶅線 + <div class="el-input el-pagination__editor is-in-pagination"> + <input + type="number" + autocomplete="off" + min="1" + :max="paginationData.totalPage" + v-model="inputPage" + class="el-input__inner" + @keyup.enter="jumpFun($event)" + /> + </div> + 椤� + </span> + <el-button type="primary" class="toBtn" @click="jumpFun">纭畾</el-button> + </div> + </el-pagination> </div> </div> </div> @@ -71,12 +72,12 @@ <script lang="ts" setup> import { reactive, ref, onMounted, inject, watch } from "vue"; import { useRouter } from "vue-router"; -import { useUserStore, useBreadcrumbStore } from "@/store"; +import defaultImg from "@/assets/images/default-book-img.png"; +import { useUserStore } from "@/store"; import tool from "@/assets/js/toolClass"; const MG: any = inject("MG"); const config: any = inject("config"); const router = useRouter(); -const crumbStore = useBreadcrumbStore(); let collectList = ref([]); let currentCollect = ref("book"); let isLoading = ref(false); @@ -128,7 +129,6 @@ listData.value.forEach((item) => { item.product.icon = tool.getPublicImage(item.product.icon); }); - // console.log(that.collectList); // //褰撳墠椤甸潰 paginationData.totalCount = response.totalSize; paginationData.totalPage = @@ -136,6 +136,7 @@ ? response.totalSize / paginationData.limit : Math.floor(response.totalSize / paginationData.limit) + 1; loading.value = false; + collectList.value = response.datas; }); }; onMounted(() => { @@ -167,23 +168,10 @@ //鍒板浘涔﹁鎯� const goDetail = (item) => { - let crumbs = [ - { - name: "鏁欐潗璇︽儏", - }, - ]; - crumbStore.dispatch("setCrumbs", { - type: "textbooks", - data: crumbs, - callback: (key) => { - router.push({ - name: "digitalTextbooks-textbooksDetail", - query: { - id: item.product.id, - rootCmsItemId: item.product.rootCmsItemId, - crumbsKey: key, - }, - }); + router.push({ + path: "/bookdetail", + query: { + bookId: item.product.id, }, }); }; @@ -220,6 +208,8 @@ justify-content: center; } .myCarTopPage { + display: flex; + justify-content: flex-start; box-sizing: border-box; overflow: hidden; padding-bottom: 20px; @@ -268,7 +258,7 @@ } .bookone { display: flex; - width: 478px; + width: 420px; min-height: 173px; float: left; cursor: pointer; -- Gitblit v1.9.1