From 49a435043b0b1a289a24606e35253365d7ab3956 Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期一, 25 八月 2025 17:51:57 +0800 Subject: [PATCH] 首页、及教学出版样式修改 --- src/views/bookStore/detail.vue | 63 ++++++++++++++++++------------- 1 files changed, 37 insertions(+), 26 deletions(-) diff --git a/src/views/bookStore/detail.vue b/src/views/bookStore/detail.vue index d2b4537..09c1ca8 100644 --- a/src/views/bookStore/detail.vue +++ b/src/views/bookStore/detail.vue @@ -168,11 +168,29 @@ <el-button v-if="currentRoute == 'teachingServices'" plain @click="addPaperBook" >绾歌川鏍蜂功</el-button > - <el-button plain @click="applyTextBook" v-if="!bookInfo.alreadyBuy" + <el-button + size="large" + type="primary" + @click="useCode" + v-if="!bookInfo.alreadyBuy && currentBook?.state !== 'Normal'" + >浣跨敤璐功鐮�</el-button + > + <el-button + style="background-color: #144941; color: #fff" + @click="applyTextBook" + size="large" + type="primary" + v-if="!bookInfo.alreadyBuy && currentBook?.state !== 'Normal'" >鐢宠璇曠敤</el-button > - <el-button plain @click="useCode" v-if="!bookInfo.alreadyBuy">浣跨敤璐功鐮�</el-button> - <el-button plain @click="read" v-if="bookInfo.alreadyBuy">寮�濮嬮槄璇�</el-button> + + <el-button + plain + size="large" + @click="read" + v-if="bookInfo.alreadyBuy || currentBook?.state == 'Normal'" + >寮�濮嬮槄璇�</el-button + > </div> </div> </div> @@ -317,6 +335,7 @@ let editableTabsValue = ref('1') let activateCode = ref('') let resourceHave = ref(true) +let currentBook = ref(null) let loading = ref(false) let buyBookCodeDialog = ref(false) var chartDom = null @@ -332,18 +351,18 @@ title: '鐩綍', name: '2', }, - { - title: '閰嶅璧勬簮', - name: '3', - }, - { - title: '棰樺簱', - name: '4', - }, - { - title: '鏁欏笀璧勬簮', - name: '5', - }, + // { + // title: '閰嶅璧勬簮', + // name: '3', + // }, + // { + // title: '棰樺簱', + // name: '4', + // }, + // { + // title: '鏁欏笀璧勬簮', + // name: '5', + // }, { title: '璧勬簮缁熻', name: '6', @@ -354,6 +373,7 @@ digitalTextId.value = route.query.bookId getBookDetail(digitalTextId.value) getRecommendBookList() + getTextBookList() }) watchEffect(() => { @@ -380,14 +400,7 @@ item.content = JSON.parse(item.content)[0] item.productId = item.content.id } - const currentBook = res.datas.find((item) => item.productId == digitalTextId.value) - if (currentBook) { - return currentBook - } else { - return null - } - } else { - return null + currentBook.value = res.datas.find((item) => item.productId == digitalTextId.value) } } @@ -498,9 +511,7 @@ //鐢宠璇曠敤 const applyTextBook = async () => { - console.log(userStore.userInfo, 'userInfo') - const isApply = await getTextBookList() - if (isApply?.state == 'WaitAudit') { + if (currentBook.value?.state == 'WaitAudit') { ElMessageBox.confirm('鎮ㄥ凡鐢宠璇曠敤璇ヤ功锛屾槸鍚﹀墠寰�鏌ョ湅', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', -- Gitblit v1.9.1