fix: add recommend dict/books

This commit is contained in:
zyronon
2025-08-23 20:34:56 +08:00
parent 7e780955e8
commit c1d3e95754
3 changed files with 142 additions and 2 deletions

View File

@@ -0,0 +1,106 @@
[
{
"id": "cet4",
"name": "CET-4",
"description": "大学英语四级词库",
"category": "中国考试",
"tags": [
"大学英语"
],
"url": "CET4_T.json",
"length": 2607,
"language": "en",
"translateLanguage": "zh-CN"
},
{
"id": "cet6",
"name": "CET-6",
"description": "大学英语六级词库",
"category": "中国考试",
"tags": [
"大学英语"
],
"url": "CET6_T.json",
"length": 2345,
"language": "en",
"translateLanguage": "zh-CN"
},
{
"id": "level4",
"name": "专四",
"description": "英语专业四级词库",
"category": "中国考试",
"tags": [
"大学英语"
],
"url": "Level4luan_2_T.json",
"length": 4025,
"language": "en",
"translateLanguage": "zh-CN"
},
{
"id": "level8",
"name": "专八",
"description": "英语专业八级词库",
"category": "中国考试",
"tags": [
"大学英语"
],
"url": "Level8luan_2_T.json",
"length": 12197,
"language": "en",
"translateLanguage": "zh-CN"
},
{
"id": "kaoyan",
"name": "考研",
"description": "研究生英语入学考试词库",
"category": "中国考试",
"tags": [
"考研"
],
"url": "KaoYan_3_T.json",
"length": 3728,
"language": "en",
"translateLanguage": "zh-CN"
},
{
"id": "toefl",
"name": "TOEFL",
"description": "托福考试常见词",
"category": "国际考试",
"tags": [
"TOEFL"
],
"url": "TOEFL_3_T.json",
"length": 4264,
"language": "en",
"translateLanguage": "zh-CN"
},
{
"id": "ielts",
"name": "IELTS",
"description": "雅思词库",
"category": "国际考试",
"tags": [
"IELTS"
],
"url": "IELTS_3_T.json",
"length": 3575,
"language": "en",
"translateLanguage": "zh-CN"
},
{
"id": "gaokao3500",
"name": "高考 3500 词",
"description": "高考常见词 3500",
"category": "青少年英语",
"tags": [
"通用"
],
"url": "GaoKao_3500.json",
"length": 3893,
"language": "en",
"translateLanguage": "zh-CN"
}
]

View File

@@ -14,6 +14,7 @@ import PopConfirm from "@/pages/pc/components/PopConfirm.vue";
import {onMounted, watch} from "vue";
import {getDefaultDict} from "@/types/func.ts";
import DeleteIcon from "@/components/icon/DeleteIcon.vue";
import recommendBookList from "@/assets/book-list.json";
const {nav} = useNav()
const base = useBaseStore()
@@ -140,6 +141,22 @@ async function goBookDetail(val: DictResource) {
<Book :is-add="true" @click="router.push('/book-list')"/>
</div>
</div>
<div class="card flex flex-col">
<div class="flex justify-between">
<div class="title">推荐</div>
<div class="flex gap-4 items-center">
<div class="color-blue cursor-pointer" @click="router.push('/book-list')">更多</div>
</div>
</div>
<div class="flex gap-4 flex-wrap mt-4">
<Book :is-add="false"
quantifier=""
:item="item as any"
v-for="(item, j) in recommendBookList[0]" @click="goBookDetail(item as any)"/>
</div>
</div>
</BasePage>
</template>

View File

@@ -18,6 +18,7 @@ import DeleteIcon from "@/components/icon/DeleteIcon.vue";
import PracticeSettingDialog from "@/pages/pc/word/components/PracticeSettingDialog.vue";
import ChangeLastPracticeIndexDialog from "@/pages/pc/word/components/ChangeLastPracticeIndexDialog.vue";
import {useSettingStore} from "@/stores/setting.ts";
import recommendDictList from "@/assets/recommend-dict-list.json";
const store = useBaseStore()
@@ -116,7 +117,6 @@ const progressTextRight = $computed(() => {
return store.sdict?.lastLearnIndex
})
let practiceMode = $ref(0)
function check(cb: Function) {
if (!store.sdict.id) {
@@ -167,7 +167,7 @@ function check(cb: Function) {
<div class="text-4xl font-bold">{{ currentStudy.new.length }}</div>
<div class="text">新词</div>
</div>
<template v-if="settingStore.wordPracticeMode === 0">
<template v-if="settingStore.wordPracticeMode === 0">
<div class="flex-1 flex flex-col items-center">
<div class="text-4xl font-bold">{{ currentStudy.review.length }}</div>
<div class="text">复习</div>
@@ -226,7 +226,24 @@ function check(cb: Function) {
<Book :is-add="true" @click="router.push('/dict-list')"/>
</div>
</div>
<div class="card flex flex-col">
<div class="flex justify-between">
<div class="title">推荐</div>
<div class="flex gap-4 items-center">
<div class="color-blue cursor-pointer" @click="router.push('/dict-list')">更多</div>
</div>
</div>
<div class="flex gap-4 flex-wrap mt-4">
<Book :is-add="false"
quantifier="个词"
:item="item as any"
v-for="(item, j) in recommendDictList" @click="goDictDetail(item as any)"/>
</div>
</div>
</BasePage>
<PracticeSettingDialog
:show-left-option="false"
v-model="showPracticeSettingDialog" @ok="currentStudy = getCurrentStudyWord()"/>