|
@@ -7,57 +7,200 @@
|
|
|
:LoginNavIndex="3"
|
|
|
/>
|
|
|
<div class="banner">
|
|
|
- <a class="goback" @click="$router.push('/dictionary')"><i class="el-icon-arrow-left"></i>返回</a>
|
|
|
- <div class="banner-inner">
|
|
|
- <img src="../../assets/icon-book-small.png" />
|
|
|
- <SearchInput class="search-compent" :restaurants="restaurants" :searchQuery="searchQuery" />
|
|
|
- </div>
|
|
|
+ <a class="goback" @click="$router.push('/dictionary')"
|
|
|
+ ><i class="el-icon-arrow-left"></i>返回</a
|
|
|
+ >
|
|
|
+ <div class="banner-inner">
|
|
|
+ <img src="../../assets/icon-book-small.png" />
|
|
|
+ <SearchInput
|
|
|
+ class="search-compent"
|
|
|
+ :restaurants="restaurants"
|
|
|
+ :searchQuery="searchQuery"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="main">
|
|
|
- <span class="source">{{data.source}}</span>
|
|
|
- <div class="headWord-box">
|
|
|
- <p>{{data.headWord}}</p>
|
|
|
- <svg-icon icon-class="like" className="icon-like" @click="handleCollect('no')"></svg-icon>
|
|
|
+ <span class="source">{{ data.source }}</span>
|
|
|
+ <div class="headWord-box">
|
|
|
+ <p>{{ data.headWord }}</p>
|
|
|
+ <svg-icon
|
|
|
+ icon-class="like"
|
|
|
+ className="icon-like"
|
|
|
+ @click="handleCollect('no')"
|
|
|
+ ></svg-icon>
|
|
|
+ </div>
|
|
|
+ <p class="testType" v-if="data.testType">{{ data.testType }}</p>
|
|
|
+ <div
|
|
|
+ class="pronunciations-list"
|
|
|
+ v-if="data.pronunciations && data.pronunciations.length > 0"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="pronunciations-item"
|
|
|
+ v-for="(itemP, indexP) in data.pronunciations"
|
|
|
+ :key="indexP"
|
|
|
+ >
|
|
|
+ <label v-if="itemP.region">{{
|
|
|
+ itemP.region == "uk" ? "英" : "美"
|
|
|
+ }}</label>
|
|
|
+ <span v-if="itemP.phonetic">{{ itemP.phonetic }}</span>
|
|
|
+ <img v-if="itemP.sound" src="../../assets/icon-speaker.png" />
|
|
|
</div>
|
|
|
- <p class="testType" v-if="data.testType">{{data.testType}}</p>
|
|
|
- <div class="pronunciations-list" v-if="data.pronunciations&&data.pronunciations.length>0">
|
|
|
- <div class="pronunciations-item" v-for="(itemP,indexP) in data.pronunciations" :key="indexP">
|
|
|
- <label v-if="itemP.region">{{itemP.region=='uk'?'英':'美'}}</label>
|
|
|
- <span v-if="itemP.phonetic">{{itemP.phonetic}}</span>
|
|
|
- <img v-if="itemP.sound" src="../../assets/icon-speaker.png" />
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="definition-list"
|
|
|
+ v-if="data.definition_list && data.definition_list.length > 0"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="definition-item"
|
|
|
+ v-for="(itemD, indexD) in data.definition_list"
|
|
|
+ :key="indexD"
|
|
|
+ >
|
|
|
+ <label>{{ itemD.part }}</label>
|
|
|
+ <p>{{ itemD.des }}</p>
|
|
|
</div>
|
|
|
- <div class="definition-list" v-if="data.definition_list&&data.definition_list.length>0">
|
|
|
- <div class="definition-item" v-for="(itemD,indexD) in data.definition_list" :key="indexD">
|
|
|
- <label>{{itemD.part}}</label>
|
|
|
- <p>{{itemD.des}}</p>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <el-divider content-position="left">例句</el-divider>
|
|
|
+ <div class="number-list" v-if="sentKwicData">
|
|
|
+ <div
|
|
|
+ class="number-item"
|
|
|
+ :class="[activeIndex === 0 ? 'active' : '']"
|
|
|
+ @click="handleLookStore(0)"
|
|
|
+ >
|
|
|
+ <label>全部</label>
|
|
|
+ <span>{{ sentKwicData.total }}</span>
|
|
|
</div>
|
|
|
- <el-divider content-position="left">例句</el-divider>
|
|
|
- <div class="number-list" v-if="data.bookstore&&data.bookstore.length>0">
|
|
|
- <div class="number-item" :class="[activeIndex===indexB?'active':'']" v-for="(itemB,indexB) in data.bookstore" :key="indexB" @click="handleLookStore(indexB)">
|
|
|
- <label>{{itemB.label}}</label>
|
|
|
- <span>{{itemB.value}}</span>
|
|
|
- </div>
|
|
|
+ <div
|
|
|
+ class="number-item"
|
|
|
+ :class="[activeIndex === 1 ? 'active' : '']"
|
|
|
+ @click="handleLookStore(1)"
|
|
|
+ >
|
|
|
+ <label>我的书架</label>
|
|
|
+ <span>{{ sentKwicData.my_bought_total }}</span>
|
|
|
</div>
|
|
|
- <div class="module-box">
|
|
|
- <el-switch
|
|
|
- v-model="kwicFlag"
|
|
|
- active-text="KWIC模式">
|
|
|
- </el-switch>
|
|
|
- <div class="align-box" v-if="kwicFlag">
|
|
|
- <a :class="[kwicAlign=='left'?'active':'']" @click="kwicAlign='left'">
|
|
|
- <svg-icon icon-class="align-left" className="icon-align"></svg-icon>
|
|
|
- </a>
|
|
|
- <a :class="[kwicAlign=='center'?'active':'']" @click="kwicAlign='center'">
|
|
|
- <svg-icon icon-class="align-center" className="icon-align"></svg-icon>
|
|
|
- </a>
|
|
|
- <a :class="[kwicAlign=='right'?'active':'']" @click="kwicAlign='right'">
|
|
|
- <svg-icon icon-class="align-right" className="icon-align"></svg-icon>
|
|
|
- </a>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <div class="module-box">
|
|
|
+ <el-switch
|
|
|
+ v-model="kwicFlag"
|
|
|
+ active-color="#175DFF"
|
|
|
+ active-text="KWIC模式"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ <div class="align-box" v-if="kwicFlag">
|
|
|
+ <a
|
|
|
+ :class="[kwicAlign == 'left' ? 'active' : '']"
|
|
|
+ @click="kwicAlign = 'left'"
|
|
|
+ >
|
|
|
+ <svg-icon icon-class="align-left" className="icon-align"></svg-icon>
|
|
|
+ </a>
|
|
|
+ <a
|
|
|
+ :class="[kwicAlign == 'center' ? 'active' : '']"
|
|
|
+ @click="kwicAlign = 'center'"
|
|
|
+ >
|
|
|
+ <svg-icon
|
|
|
+ icon-class="align-center"
|
|
|
+ className="icon-align"
|
|
|
+ ></svg-icon>
|
|
|
+ </a>
|
|
|
+ <a
|
|
|
+ :class="[kwicAlign == 'right' ? 'active' : '']"
|
|
|
+ @click="kwicAlign = 'right'"
|
|
|
+ >
|
|
|
+ <svg-icon
|
|
|
+ icon-class="align-right"
|
|
|
+ className="icon-align"
|
|
|
+ ></svg-icon>
|
|
|
+ </a>
|
|
|
</div>
|
|
|
-
|
|
|
+ </div>
|
|
|
+ <div class="list">
|
|
|
+ <template v-if="!kwicFlag">
|
|
|
+ <div
|
|
|
+ v-for="(item, i) in activeIndex === 0
|
|
|
+ ? sentKwicData.sentence_list
|
|
|
+ : sentKwicData.shelf_list"
|
|
|
+ :key="i + 'sentence'"
|
|
|
+ class="one"
|
|
|
+ >
|
|
|
+ <div class="top">
|
|
|
+ <div class="number">{{ item.number }}.</div>
|
|
|
+ <div class="words">
|
|
|
+ <span v-html="item.res"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom">
|
|
|
+ {{ item.source_courseware_name_path }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <template v-if="activeIndex === 0">
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in kwicAlign === 'left'
|
|
|
+ ? sentKwicData.sentence_list_sort_left
|
|
|
+ : kwicAlign === 'center'
|
|
|
+ ? sentKwicData.sentence_list_sort_mid
|
|
|
+ : sentKwicData.sentence_list_sort_right"
|
|
|
+ :key="'kwic' + index"
|
|
|
+ class="kwic_one"
|
|
|
+ >
|
|
|
+ <div class="number">{{ item.number }}</div>
|
|
|
+ <el-tooltip effect="dark" placement="bottom">
|
|
|
+ <div class="content" slot="content">
|
|
|
+ {{ item.source_courseware_name_path }}
|
|
|
+ </div>
|
|
|
+ <div class="laiyuan">
|
|
|
+ {{ item.source_courseware_name_path }}
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
+ <div class="word_sentence">
|
|
|
+ <div v-for="(txt, indexs) in item.resArr" :key="indexs">
|
|
|
+ <span
|
|
|
+ v-for="(txts, indexs) in txt"
|
|
|
+ v-html="txts[0]"
|
|
|
+ :key="indexs"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-if="activeIndex === 1">
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in kwicAlign === 'left'
|
|
|
+ ? sentKwicData.shelf_list_sort_left
|
|
|
+ : kwicAlign === 'center'
|
|
|
+ ? sentKwicData.shelf_list_sort_mid
|
|
|
+ : sentKwicData.shelf_list_sort_right"
|
|
|
+ :key="'kwic' + index"
|
|
|
+ class="kwic_one"
|
|
|
+ >
|
|
|
+ <div class="number">{{ item.number }}</div>
|
|
|
+ <el-tooltip effect="dark" placement="bottom">
|
|
|
+ <div class="content" slot="content">
|
|
|
+ {{ item.source_courseware_name_path }}
|
|
|
+ </div>
|
|
|
+ <div class="laiyuan">
|
|
|
+ {{ item.source_courseware_name_path }}
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
+ <div class="word_sentence">
|
|
|
+ <div v-for="(txt, indexs) in item.resArr" :key="indexs">
|
|
|
+ <span
|
|
|
+ v-for="(txts, indexs) in txt"
|
|
|
+ v-html="txts[0]"
|
|
|
+ :key="indexs"
|
|
|
+ ></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <a
|
|
|
+ class="load-more"
|
|
|
+ @click="loadMore"
|
|
|
+ v-if="activeIndex === 0 ? maxPage > pageNo : maxPageShelf > pageNo"
|
|
|
+ >加载更多</a
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -66,7 +209,8 @@
|
|
|
//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
//例如:import 《组件名称》from ‘《组件路径》';
|
|
|
import Header from "../../components/Header.vue";
|
|
|
-import SearchInput from "./components/SearchInput.vue"
|
|
|
+import SearchInput from "./components/SearchInput.vue";
|
|
|
+import { getLogin } from "@/api/ajax";
|
|
|
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
@@ -75,362 +219,979 @@ export default {
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
|
- restaurants: [
|
|
|
- { "value": "co", "para": "abbr. 一氧化碳" },
|
|
|
- { "value": "comco", "para": "abbr. 一氧化碳1111" },
|
|
|
- { "value": "come in", "para": "abbr. 组件对象模型" },
|
|
|
- { "value": "content", "para": "adj. 满足的,满意的,甘愿的" },
|
|
|
- { "value": "cogent", "para": "adj. 有说服力的,令人信服的adj. 有说服力的,令人信服的adj. 有说服力的,令人信服的adj. 有说服力的,令人信服的adj. 有说服力的,令人信服的adj. 有说服力的,令人信服的adj. 有说服力的,令人信服的" },
|
|
|
- ],
|
|
|
- searchQuery: this.$route.query.content?this.$route.query.content:'',
|
|
|
- data:{
|
|
|
- source:'金山词霸',
|
|
|
- headWord:'cogent',
|
|
|
- testType:'GRE/IELTS',
|
|
|
- pronunciations:[
|
|
|
- {
|
|
|
- region:'uk',
|
|
|
- phonetic: '/ˈkəʊdʒənt/',
|
|
|
- sound:'https://mk.wmjh.cn/bva-upload-h8o01cxdm6g/word_mp3/03/03717__bond_n0205.mp3'
|
|
|
- },
|
|
|
- {
|
|
|
- region:'us',
|
|
|
- phonetic: '/ˈkoʊdʒənt/',
|
|
|
- sound:'https://mk.wmjh.cn/bva-upload-h8o01cxdm6g/word_mp3/03/03717__bond_n0205.mp3'
|
|
|
- },
|
|
|
+ restaurants: [],
|
|
|
+ searchQuery: this.$route.query.content ? this.$route.query.content : "",
|
|
|
+ data: {
|
|
|
+ source: "金山词霸",
|
|
|
+ headWord: "cogent",
|
|
|
+ testType: "GRE/IELTS",
|
|
|
+ pronunciations: [
|
|
|
+ {
|
|
|
+ region: "uk",
|
|
|
+ phonetic: "/ˈkəʊdʒənt/",
|
|
|
+ sound:
|
|
|
+ "https://mk.wmjh.cn/bva-upload-h8o01cxdm6g/word_mp3/03/03717__bond_n0205.mp3",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ region: "us",
|
|
|
+ phonetic: "/ˈkoʊdʒənt/",
|
|
|
+ sound:
|
|
|
+ "https://mk.wmjh.cn/bva-upload-h8o01cxdm6g/word_mp3/03/03717__bond_n0205.mp3",
|
|
|
+ },
|
|
|
],
|
|
|
definition_list: [
|
|
|
- {
|
|
|
- part: 'adj.',
|
|
|
- des: '(理由、论据)有说服力的,令人信服的;'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'n.',
|
|
|
- des: '例子,例证;榜样,楷模;典型,范例;例句,例题;警戒,受罚(以示警告)者'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'v.',
|
|
|
- des: '得到说明,可加以举例说明'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'adj.',
|
|
|
- des: '(理由、论据)有说服力的,令人信服的;'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'n.',
|
|
|
- des: '例子,例证;榜样,楷模;典型,范例;例句,例题;警戒,受罚(以示警告)者'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'v.',
|
|
|
- des: '得到说明,可加以举例说明'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'adj.',
|
|
|
- des: '(理由、论据)有说服力的,令人信服的;'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'n.',
|
|
|
- des: '例子,例证;榜样,楷模;典型,范例;例句,例题;警戒,受罚(以示警告)者'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'v.',
|
|
|
- des: '得到说明,可加以举例说明'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'adj.',
|
|
|
- des: '(理由、论据)有说服力的,令人信服的;'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'n.',
|
|
|
- des: '例子,例证;榜样,楷模;典型,范例;例句,例题;警戒,受罚(以示警告)者'
|
|
|
- },
|
|
|
- {
|
|
|
- part: 'v.',
|
|
|
- des: '得到说明,可加以举例说明'
|
|
|
- }
|
|
|
+ {
|
|
|
+ part: "adj.",
|
|
|
+ des: "(理由、论据)有说服力的,令人信服的;",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "n.",
|
|
|
+ des: "例子,例证;榜样,楷模;典型,范例;例句,例题;警戒,受罚(以示警告)者",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "v.",
|
|
|
+ des: "得到说明,可加以举例说明",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "adj.",
|
|
|
+ des: "(理由、论据)有说服力的,令人信服的;",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "n.",
|
|
|
+ des: "例子,例证;榜样,楷模;典型,范例;例句,例题;警戒,受罚(以示警告)者",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "v.",
|
|
|
+ des: "得到说明,可加以举例说明",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "adj.",
|
|
|
+ des: "(理由、论据)有说服力的,令人信服的;",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "n.",
|
|
|
+ des: "例子,例证;榜样,楷模;典型,范例;例句,例题;警戒,受罚(以示警告)者",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "v.",
|
|
|
+ des: "得到说明,可加以举例说明",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "adj.",
|
|
|
+ des: "(理由、论据)有说服力的,令人信服的;",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "n.",
|
|
|
+ des: "例子,例证;榜样,楷模;典型,范例;例句,例题;警戒,受罚(以示警告)者",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ part: "v.",
|
|
|
+ des: "得到说明,可加以举例说明",
|
|
|
+ },
|
|
|
],
|
|
|
bookstore: [
|
|
|
- {
|
|
|
- label:'全部',
|
|
|
- value: 9
|
|
|
- },
|
|
|
- {
|
|
|
- label:'我的书架',
|
|
|
- value: 7
|
|
|
- }
|
|
|
- ]
|
|
|
+ {
|
|
|
+ label: "全部",
|
|
|
+ value: 9,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "我的书架",
|
|
|
+ value: 7,
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
kwicFlag: false,
|
|
|
activeIndex: 0, // 高亮索引
|
|
|
- kwicAlign: 'left',
|
|
|
- }
|
|
|
+ kwicAlign: "left",
|
|
|
+ enFhList: [
|
|
|
+ ",",
|
|
|
+ ".",
|
|
|
+ ";",
|
|
|
+ "?",
|
|
|
+ "!",
|
|
|
+ ":",
|
|
|
+ ">",
|
|
|
+ "<",
|
|
|
+ "'",
|
|
|
+ ")",
|
|
|
+ "”",
|
|
|
+ '"',
|
|
|
+ "#",
|
|
|
+ ],
|
|
|
+ pageNo: 1,
|
|
|
+ pageNoNew: 1,
|
|
|
+ maxPage: 1,
|
|
|
+ maxPageShelf: 1,
|
|
|
+ audio: new Audio(),
|
|
|
+ voiceSrc: "",
|
|
|
+ voicePauseSrc: "",
|
|
|
+ voicePlaySrc: require("../../assets/voice-play-red.png"),
|
|
|
+ sentKwicData: {
|
|
|
+ my_bought_total: 0,
|
|
|
+ total: 0,
|
|
|
+ max_page_no: 0,
|
|
|
+ sentence_list: [],
|
|
|
+ sentence_list_sort_left: [],
|
|
|
+ sentence_list_sort_mid: [],
|
|
|
+ sentence_list_sort_right: [],
|
|
|
+ shelf_list: [],
|
|
|
+ shelf_list_sort_left: [],
|
|
|
+ shelf_list_sort_mid: [],
|
|
|
+ shelf_list_sort_right: [],
|
|
|
+ },
|
|
|
+ };
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
|
computed: {},
|
|
|
//监控data中数据变化
|
|
|
watch: {
|
|
|
- $route:{
|
|
|
- immediate:true,
|
|
|
- handler(){
|
|
|
- if(this.$route.query.content){
|
|
|
- $(".main").animate({
|
|
|
- scrollTop: 0
|
|
|
- }, 200);
|
|
|
- }
|
|
|
- },
|
|
|
- deep: true
|
|
|
- }
|
|
|
+ $route: {
|
|
|
+ immediate: true,
|
|
|
+ handler() {
|
|
|
+ if (this.$route.query.content) {
|
|
|
+ $(".main").animate(
|
|
|
+ {
|
|
|
+ scrollTop: 0,
|
|
|
+ },
|
|
|
+ 200
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
- handleCollect(type){
|
|
|
- if(type=='no'){
|
|
|
- alert('收藏成功')
|
|
|
+ handleCollect(type) {
|
|
|
+ if (type == "no") {
|
|
|
+ alert("收藏成功");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleLookStore(index) {
|
|
|
+ this.activeIndex = index;
|
|
|
+ },
|
|
|
+ getWordDetail() {
|
|
|
+ let MethodName = "/PaperServer/Client/Dict/QueryJinShanDictData";
|
|
|
+ let data = {
|
|
|
+ word: this.searchQuery,
|
|
|
+ };
|
|
|
+ getLogin(MethodName, data).then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 加载更多‘
|
|
|
+ loadMore() {
|
|
|
+ this.pageNoNew++;
|
|
|
+ this.getQuerySentKwic();
|
|
|
+ },
|
|
|
+ // 获取例句
|
|
|
+ getQuerySentKwic() {
|
|
|
+ this.pageNo = this.pageNoNew;
|
|
|
+ this.loading = true;
|
|
|
+ getLogin("/PaperServer/Client/Dict/QuerySentKwicData", {
|
|
|
+ word: this.searchQuery,
|
|
|
+ page_size: 30,
|
|
|
+ page_no: this.pageNo,
|
|
|
+ only_my_bought: false,
|
|
|
+ kwic_type: 0,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ this.sentKwicData.max_page_no = res.data.max_page_no;
|
|
|
+ this.sentKwicData.my_bought_total = res.my_bought_total;
|
|
|
+ this.sentKwicData.total = res.total;
|
|
|
+ if (res.data && res.data.results) {
|
|
|
+ this.maxPage = res.data.max_page_no;
|
|
|
+ res.data.results.forEach((item, indexs) => {
|
|
|
+ let tokenIndexArr = item.token_idx_arr;
|
|
|
+ let str = "";
|
|
|
+ item.number = indexs + 1 + 30 * (this.pageNo - 1);
|
|
|
+ tokenIndexArr.forEach((index) => {
|
|
|
+ item.tokens[index][0] =
|
|
|
+ '<span style="color:#ED5F00;font-weight:600;">' +
|
|
|
+ item.tokens[index][0] +
|
|
|
+ "</span>";
|
|
|
+ });
|
|
|
+ // for(let i = 0; i< item.tokens.length)
|
|
|
+ item.tokens.forEach((items) => {
|
|
|
+ str += items[0] + items[3];
|
|
|
+ });
|
|
|
+ item.res = str;
|
|
|
+ item.source_courseware_name_path =
|
|
|
+ item.study_phase_name +
|
|
|
+ "版 / " +
|
|
|
+ item.iss_no +
|
|
|
+ " / " +
|
|
|
+ item.release_date +
|
|
|
+ " / " +
|
|
|
+ item.art_title;
|
|
|
+ });
|
|
|
+ this.sentKwicData.sentence_list =
|
|
|
+ this.sentKwicData.sentence_list.concat(res.data.results);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ getLogin("/PaperServer/Client/Dict/QuerySentKwicData", {
|
|
|
+ word: this.searchQuery,
|
|
|
+ page_size: 30,
|
|
|
+ page_no: this.pageNo,
|
|
|
+ only_my_bought: false,
|
|
|
+ kwic_type: 1,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ if (res.data && res.data.results) {
|
|
|
+ res.data.results.forEach((item, indexs) => {
|
|
|
+ item.number = indexs + 1 + 30 * (this.pageNo - 1);
|
|
|
+ item.source_courseware_name_path =
|
|
|
+ item.study_phase_name +
|
|
|
+ "版 / " +
|
|
|
+ item.iss_no +
|
|
|
+ " / " +
|
|
|
+ item.release_date +
|
|
|
+ " / " +
|
|
|
+ item.art_title;
|
|
|
+ });
|
|
|
+ this.sentKwicData.sentence_list_sort_left =
|
|
|
+ this.sentKwicData.sentence_list_sort_left.concat(
|
|
|
+ this.handleExample(res.data.results, "left")
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ getLogin("/PaperServer/Client/Dict/QuerySentKwicData", {
|
|
|
+ word: this.searchQuery,
|
|
|
+ page_size: 30,
|
|
|
+ page_no: this.pageNo,
|
|
|
+ only_my_bought: false,
|
|
|
+ kwic_type: 2,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ if (res.data && res.data.results) {
|
|
|
+ res.data.results.forEach((item, indexs) => {
|
|
|
+ item.number = indexs + 1 + 30 * (this.pageNo - 1);
|
|
|
+ item.source_courseware_name_path =
|
|
|
+ item.study_phase_name +
|
|
|
+ "版 / " +
|
|
|
+ item.iss_no +
|
|
|
+ " / " +
|
|
|
+ item.release_date +
|
|
|
+ " / " +
|
|
|
+ item.art_title;
|
|
|
+ });
|
|
|
+ this.sentKwicData.sentence_list_sort_mid =
|
|
|
+ this.sentKwicData.sentence_list_sort_mid.concat(
|
|
|
+ this.handleExample(res.data.results, "mid")
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ getLogin("/PaperServer/Client/Dict/QuerySentKwicData", {
|
|
|
+ word: this.searchQuery,
|
|
|
+ page_size: 30,
|
|
|
+ page_no: this.pageNo,
|
|
|
+ only_my_bought: false,
|
|
|
+ kwic_type: 3,
|
|
|
+ }).then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ if (res.data && res.data.results) {
|
|
|
+ res.data.results.forEach((item, indexs) => {
|
|
|
+ item.number = indexs + 1 + 30 * (this.pageNo - 1);
|
|
|
+ item.source_courseware_name_path =
|
|
|
+ item.study_phase_name +
|
|
|
+ "版 / " +
|
|
|
+ item.iss_no +
|
|
|
+ " / " +
|
|
|
+ item.release_date +
|
|
|
+ " / " +
|
|
|
+ item.art_title;
|
|
|
+ });
|
|
|
+ this.sentKwicData.sentence_list_sort_right =
|
|
|
+ this.sentKwicData.sentence_list_sort_right.concat(
|
|
|
+ this.handleExample(res.data.results, "right")
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ getLogin("/PaperServer/Client/Dict/QuerySentKwicData", {
|
|
|
+ word: this.searchQuery,
|
|
|
+ page_size: 30,
|
|
|
+ page_no: this.pageNo,
|
|
|
+ only_my_bought: true,
|
|
|
+ kwic_type: 0,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ if (res.data && res.data.results) {
|
|
|
+ this.maxPageShelf = res.data.max_page_no;
|
|
|
+ res.data.results.forEach((item, indexs) => {
|
|
|
+ let tokenIndexArr = item.token_idx_arr;
|
|
|
+ let str = "";
|
|
|
+ item.number = indexs + 1 + 30 * (this.pageNo - 1);
|
|
|
+ tokenIndexArr.forEach((index) => {
|
|
|
+ item.tokens[index][0] =
|
|
|
+ '<span style="color:#ED5F00;font-weight:600;">' +
|
|
|
+ item.tokens[index][0] +
|
|
|
+ "</span>";
|
|
|
+ });
|
|
|
+ // for(let i = 0; i< item.tokens.length)
|
|
|
+ item.tokens.forEach((items) => {
|
|
|
+ str += items[0] + items[3];
|
|
|
+ });
|
|
|
+ item.res = str;
|
|
|
+ item.source_courseware_name_path =
|
|
|
+ item.study_phase_name +
|
|
|
+ "版 / " +
|
|
|
+ item.iss_no +
|
|
|
+ " / " +
|
|
|
+ item.release_date +
|
|
|
+ " / " +
|
|
|
+ item.art_title;
|
|
|
+ });
|
|
|
+ this.sentKwicData.shelf_list =
|
|
|
+ this.sentKwicData.shelf_list.concat(res.data.results);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ getLogin("/PaperServer/Client/Dict/QuerySentKwicData", {
|
|
|
+ word: this.searchQuery,
|
|
|
+ page_size: 30,
|
|
|
+ page_no: this.pageNo,
|
|
|
+ only_my_bought: true,
|
|
|
+ kwic_type: 1,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ if (res.data && res.data.results) {
|
|
|
+ res.data.results.forEach((item, indexs) => {
|
|
|
+ item.number = indexs + 1 + 30 * (this.pageNo - 1);
|
|
|
+ item.source_courseware_name_path =
|
|
|
+ item.study_phase_name +
|
|
|
+ "版 / " +
|
|
|
+ item.iss_no +
|
|
|
+ " / " +
|
|
|
+ item.release_date +
|
|
|
+ " / " +
|
|
|
+ item.art_title;
|
|
|
+ });
|
|
|
+ this.sentKwicData.shelf_list_sort_left =
|
|
|
+ this.sentKwicData.shelf_list_sort_left.concat(
|
|
|
+ this.handleExample(res.data.results, "left")
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ getLogin("/PaperServer/Client/Dict/QuerySentKwicData", {
|
|
|
+ word: this.searchQuery,
|
|
|
+ page_size: 30,
|
|
|
+ page_no: this.pageNo,
|
|
|
+ only_my_bought: true,
|
|
|
+ kwic_type: 2,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ if (res.data && res.data.results) {
|
|
|
+ res.data.results.forEach((item, indexs) => {
|
|
|
+ item.number = indexs + 1 + 30 * (this.pageNo - 1);
|
|
|
+ item.source_courseware_name_path =
|
|
|
+ item.study_phase_name +
|
|
|
+ "版 / " +
|
|
|
+ item.iss_no +
|
|
|
+ " / " +
|
|
|
+ item.release_date +
|
|
|
+ " / " +
|
|
|
+ item.art_title;
|
|
|
+ });
|
|
|
+ this.sentKwicData.shelf_list_sort_mid =
|
|
|
+ this.sentKwicData.shelf_list_sort_mid.concat(
|
|
|
+ this.handleExample(res.data.results, "mid")
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ getLogin("/PaperServer/Client/Dict/QuerySentKwicData", {
|
|
|
+ word: this.searchQuery,
|
|
|
+ page_size: 30,
|
|
|
+ page_no: this.pageNo,
|
|
|
+ only_my_bought: true,
|
|
|
+ kwic_type: 3,
|
|
|
+ }).then((res) => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ if (res.data && res.data.results) {
|
|
|
+ res.data.results.forEach((item, indexs) => {
|
|
|
+ item.number = indexs + 1 + 30 * (this.pageNo - 1);
|
|
|
+ item.source_courseware_name_path =
|
|
|
+ item.study_phase_name +
|
|
|
+ "版 / " +
|
|
|
+ item.iss_no +
|
|
|
+ " / " +
|
|
|
+ item.release_date +
|
|
|
+ " / " +
|
|
|
+ item.art_title;
|
|
|
+ });
|
|
|
+ this.sentKwicData.shelf_list_sort_right =
|
|
|
+ this.sentKwicData.shelf_list_sort_right.concat(
|
|
|
+ this.handleExample(res.data.results, "right")
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleExample(list, type) {
|
|
|
+ if (list.length > 0) {
|
|
|
+ list = list.map((item, index) => {
|
|
|
+ let str = item.source_courseware_name_path;
|
|
|
+ item.show_source_courseware_name_path = str.slice(0, 8) + "...";
|
|
|
+ if (type == "left") {
|
|
|
+ let arr = JSON.parse(JSON.stringify(item.tokens));
|
|
|
+ arr.forEach((items, indexs) => {
|
|
|
+ if (indexs == item.token_idx) {
|
|
|
+ arr[
|
|
|
+ indexs
|
|
|
+ ][0] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs][0]}</span>`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let data = this.changefiveword(arr, item.token_idx, type);
|
|
|
+ item.resArr = data;
|
|
|
+ } else if (type == "right") {
|
|
|
+ let arr = JSON.parse(JSON.stringify(item.tokens));
|
|
|
+ arr.forEach((items, indexs) => {
|
|
|
+ if (indexs == item.token_idx) {
|
|
|
+ arr[
|
|
|
+ indexs
|
|
|
+ ][0] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs][0]}</span>`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let data = this.changefiveword(arr, item.token_idx, type);
|
|
|
+ item.resArr = data;
|
|
|
+ } else if (type == "mid") {
|
|
|
+ let arr = JSON.parse(JSON.stringify(item.tokens));
|
|
|
+ arr.forEach((items, indexs) => {
|
|
|
+ if (indexs == item.token_idx) {
|
|
|
+ arr[
|
|
|
+ indexs
|
|
|
+ ][0] = `<span style=color:#DE4444;font-weight:700;>${arr[indexs][0]}</span>`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let data = this.changefiveword(arr, item.token_idx, type);
|
|
|
+ item.resArr = data;
|
|
|
+ } else {
|
|
|
+ let newsentence = JSON.parse(JSON.stringify(item.sentence));
|
|
|
+ let res = "";
|
|
|
+ for (let i = 0; i < item.position_list.length; i++) {
|
|
|
+ let part1 = "";
|
|
|
+ let part2 = "";
|
|
|
+ let part3 = "";
|
|
|
+ if (item.position_list.length > 1) {
|
|
|
+ if (i == 0) {
|
|
|
+ part1 = newsentence.substring(0, item.position_list[i].begin);
|
|
|
+ part2 = newsentence.substring(
|
|
|
+ item.position_list[i].begin,
|
|
|
+ item.position_list[i].end
|
|
|
+ );
|
|
|
+ part3 = newsentence.substring(
|
|
|
+ item.position_list[i].end,
|
|
|
+ item.position_list[i + 1].begin
|
|
|
+ );
|
|
|
+ } else if (i == item.position_list.length - 1) {
|
|
|
+ part2 = newsentence.substring(
|
|
|
+ item.position_list[i].begin,
|
|
|
+ item.position_list[i].end
|
|
|
+ );
|
|
|
+ part3 = newsentence.substring(item.position_list[i].end);
|
|
|
+ } else {
|
|
|
+ part2 = newsentence.substring(
|
|
|
+ item.position_list[i].begin,
|
|
|
+ item.position_list[i].end
|
|
|
+ );
|
|
|
+ part3 = newsentence.substring(
|
|
|
+ item.position_list[i].end,
|
|
|
+ item.position_list[i + 1].begin
|
|
|
+ );
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ part1 = newsentence.substring(0, item.position_list[i].begin);
|
|
|
+ part2 = newsentence.substring(
|
|
|
+ item.position_list[i].begin,
|
|
|
+ item.position_list[i].end
|
|
|
+ );
|
|
|
+ part3 = newsentence.substring(item.position_list[i].end);
|
|
|
+ }
|
|
|
+ res +=
|
|
|
+ part1 +
|
|
|
+ '<span style="color:#DE4444;">' +
|
|
|
+ part2 +
|
|
|
+ "</span>" +
|
|
|
+ part3;
|
|
|
+ }
|
|
|
+ item.res = res;
|
|
|
+ }
|
|
|
+ return item;
|
|
|
+ });
|
|
|
+ return list;
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changefiveword(arr, index, type) {
|
|
|
+ let num = 6;
|
|
|
+ let colorIndex = 0;
|
|
|
+ let colorList = ["#4D7EFF", "#A4430F", "#9342C5", "#FF8718", "#1DAA91"];
|
|
|
+ for (let i = 1; i < num; i++) {
|
|
|
+ if (type == "left") {
|
|
|
+ if (index - i >= 0) {
|
|
|
+ if (this.enFhList.indexOf(arr[index - i][0]) == -1) {
|
|
|
+ // if(arr[index - i + 1]&&arr[index - i + 1][3]===''){
|
|
|
+ arr[index - i][0] = `<span style=color:${
|
|
|
+ colorList[colorIndex]
|
|
|
+ };>${arr[index - i][0]}</span>`;
|
|
|
+ colorIndex++;
|
|
|
+ // }
|
|
|
+ } else {
|
|
|
+ if (arr[index - i - 1] && arr[index - i - 1][3] === "") num++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (type == "right") {
|
|
|
+ if (index + i <= arr.length - 1) {
|
|
|
+ if (this.enFhList.indexOf(arr[index + i][0]) == -1) {
|
|
|
+ arr[index + i][0] = `<span style=color:${
|
|
|
+ colorList[colorIndex]
|
|
|
+ };>${arr[index + i][0]}</span>`;
|
|
|
+ colorIndex++;
|
|
|
+ } else {
|
|
|
+ num++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let newarr = [];
|
|
|
+ let arr1 = [];
|
|
|
+ let arr2 = [];
|
|
|
+ let arr3 = [];
|
|
|
+ arr.forEach((item, i) => {
|
|
|
+ if (i < index) {
|
|
|
+ arr1.push(item);
|
|
|
+ } else if (i == index) {
|
|
|
+ arr2.push(item);
|
|
|
+ } else {
|
|
|
+ arr3.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ newarr.push(arr1);
|
|
|
+ newarr.push(arr2);
|
|
|
+ newarr.push(arr3);
|
|
|
+ return newarr;
|
|
|
},
|
|
|
- handleLookStore(index){
|
|
|
- this.activeIndex = index
|
|
|
- }
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
-
|
|
|
+ this.getWordDetail();
|
|
|
+ this.getQuerySentKwic();
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
- mounted() {
|
|
|
- },
|
|
|
+ mounted() {},
|
|
|
//生命周期-创建之前
|
|
|
- beforeCreated() { },
|
|
|
+ beforeCreated() {},
|
|
|
//生命周期-挂载之前
|
|
|
- beforeMount() { },
|
|
|
+ beforeMount() {},
|
|
|
//生命周期-更新之前
|
|
|
- beforUpdate() { },
|
|
|
+ beforUpdate() {},
|
|
|
//生命周期-更新之后
|
|
|
- updated() { },
|
|
|
+ updated() {},
|
|
|
//生命周期-销毁之前
|
|
|
- beforeDestory() { },
|
|
|
+ beforeDestory() {},
|
|
|
//生命周期-销毁完成
|
|
|
- destoryed() { },
|
|
|
+ destoryed() {},
|
|
|
//如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
- activated() { }
|
|
|
-}
|
|
|
+ activated() {},
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
/* @import url(); 引入css类 */
|
|
|
-.dictionary-detail{
|
|
|
- .banner{
|
|
|
- width: 100%;
|
|
|
- height: 88px;
|
|
|
- background: #3459D2;
|
|
|
- position: relative;
|
|
|
- .goback{
|
|
|
- position: absolute;
|
|
|
- left: 24px;
|
|
|
- top: 24px;
|
|
|
- width: 96px;
|
|
|
- height: 40px;
|
|
|
- display: block;
|
|
|
- text-align: center;
|
|
|
- cursor: pointer;
|
|
|
- color: #FFFFFF;
|
|
|
- line-height: 40px;
|
|
|
- .el-icon-arrow-left{
|
|
|
- width: 24px;
|
|
|
- height: 24px;
|
|
|
- text-align: center;
|
|
|
- line-height: 24px;
|
|
|
- margin: 0 4px;
|
|
|
- }
|
|
|
+.dictionary-detail {
|
|
|
+ .banner {
|
|
|
+ width: 100%;
|
|
|
+ height: 88px;
|
|
|
+ background: #3459d2;
|
|
|
+ position: relative;
|
|
|
+ .goback {
|
|
|
+ position: absolute;
|
|
|
+ left: 24px;
|
|
|
+ top: 24px;
|
|
|
+ width: 96px;
|
|
|
+ height: 40px;
|
|
|
+ display: block;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 40px;
|
|
|
+ .el-icon-arrow-left {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 24px;
|
|
|
+ margin: 0 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .banner-inner {
|
|
|
+ width: 868px;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ margin: 0 auto;
|
|
|
+ position: relative;
|
|
|
+ > img {
|
|
|
+ width: 40px;
|
|
|
+ margin-right: 24px;
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 24px;
|
|
|
+ margin-left: -434px;
|
|
|
+ }
|
|
|
+ .search-compent {
|
|
|
+ position: absolute;
|
|
|
+ top: 16px;
|
|
|
+ box-shadow: 0px 6px 30px 5px rgba(0, 0, 0, 0.05),
|
|
|
+ 0px 16px 24px 2px rgba(0, 0, 0, 0.04),
|
|
|
+ 0px 8px 10px -5px rgba(0, 0, 0, 0.08);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .main {
|
|
|
+ width: 740px;
|
|
|
+ margin: 32px auto;
|
|
|
+ background: #ffffff;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 64px 72px;
|
|
|
+ max-height: calc(100vh - 216px);
|
|
|
+ overflow-y: scroll;
|
|
|
+ &::-webkit-scrollbar {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .source {
|
|
|
+ display: inline-block;
|
|
|
+ padding: 1px 8px;
|
|
|
+ color: #1d2129;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ background: #f2f3f5;
|
|
|
+ border-radius: 2px;
|
|
|
+ }
|
|
|
+ .headWord-box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin: 16px 0;
|
|
|
+ p {
|
|
|
+ color: #175dff;
|
|
|
+ font-weight: 700;
|
|
|
+ font-size: 40px;
|
|
|
+ line-height: 48px;
|
|
|
+ margin: 0;
|
|
|
+ font-family: "Rubik";
|
|
|
+ }
|
|
|
+ svg {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ margin-left: 24px;
|
|
|
+ color: #d0d3d9;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .testType {
|
|
|
+ color: #929ca8;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
+ margin: 0 0 16px;
|
|
|
+ }
|
|
|
+ .pronunciations-list {
|
|
|
+ margin-bottom: 16px;
|
|
|
+ display: flex;
|
|
|
+ > div {
|
|
|
+ display: flex;
|
|
|
+ margin-right: 24px;
|
|
|
+ }
|
|
|
+ label {
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
+ color: #1c2129;
|
|
|
+ margin-right: 8px;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ margin-right: 8px;
|
|
|
+ font-family: "robot";
|
|
|
+ color: #1c2129;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+ img {
|
|
|
+ width: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .definition-list {
|
|
|
+ padding-bottom: 8px;
|
|
|
+ .definition-item {
|
|
|
+ padding-bottom: 16px;
|
|
|
+ display: flex;
|
|
|
+ label {
|
|
|
+ color: #1c2129;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
+ min-width: 44px;
|
|
|
}
|
|
|
- .banner-inner{
|
|
|
- width: 868px;
|
|
|
- height: 100%;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- margin: 0 auto;
|
|
|
- position: relative;
|
|
|
- > img{
|
|
|
- width: 40px;
|
|
|
- margin-right: 24px;
|
|
|
- position: absolute;
|
|
|
- left: 50%;
|
|
|
- top: 24px;
|
|
|
- margin-left: -434px;
|
|
|
- }
|
|
|
- .search-compent{
|
|
|
- position: absolute;
|
|
|
- top: 16px;
|
|
|
- }
|
|
|
+ p {
|
|
|
+ margin: 0;
|
|
|
+ flex: 1;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 24px;
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
- .main{
|
|
|
- width: 740px;
|
|
|
- margin: 32px auto;
|
|
|
- background: #FFFFFF;
|
|
|
- border-radius: 8px;
|
|
|
- padding: 64px 72px;
|
|
|
- max-height: calc(100vh - 216px);
|
|
|
- overflow-y: scroll;
|
|
|
- &::-webkit-scrollbar {
|
|
|
- display: none;
|
|
|
- }
|
|
|
- .source{
|
|
|
- display: inline-block;
|
|
|
- padding: 1px 8px;
|
|
|
- color: #1D2129;
|
|
|
+ .number-list {
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 24px;
|
|
|
+ .number-item {
|
|
|
+ border-radius: 100px;
|
|
|
+ height: 32px;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: #4e5969;
|
|
|
+ padding: 5px 16px;
|
|
|
+ margin-right: 12px;
|
|
|
+ cursor: pointer;
|
|
|
+ &.active {
|
|
|
+ background: #f2f3f5;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #165dff;
|
|
|
+ label {
|
|
|
font-weight: 500;
|
|
|
- font-size: 14px;
|
|
|
- line-height: 22px;
|
|
|
- background: #F2F3F5;
|
|
|
- border-radius: 2px;
|
|
|
+ }
|
|
|
}
|
|
|
- .headWord-box{
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- margin: 16px 0;
|
|
|
- p{
|
|
|
- color: #175DFF;
|
|
|
- font-weight: 700;
|
|
|
- font-size: 40px;
|
|
|
- line-height: 48px;
|
|
|
- margin: 0;
|
|
|
- font-family: 'Rubik';
|
|
|
- }
|
|
|
- svg{
|
|
|
- width: 24px;
|
|
|
- height: 24px;
|
|
|
- margin-left: 24px;
|
|
|
- color: #D0D3D9;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
+ label {
|
|
|
+ font-weight: 400;
|
|
|
+ margin-right: 5px;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
- .testType{
|
|
|
- color: #929CA8;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 16px;
|
|
|
- line-height: 24px;
|
|
|
- margin: 0 0 16px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .module-box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ height: 30px;
|
|
|
+ > div.align-box {
|
|
|
+ background: #e5e6eb;
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-left: 32px;
|
|
|
+ padding: 2px;
|
|
|
+ display: flex;
|
|
|
+ a {
|
|
|
+ width: 48px;
|
|
|
+ height: 26px;
|
|
|
+ display: block;
|
|
|
+ text-align: center;
|
|
|
+ color: rgba(0, 0, 0, 0.56);
|
|
|
+ svg {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ margin-top: 5px;
|
|
|
+ }
|
|
|
+ &.active {
|
|
|
+ background: #ffffff;
|
|
|
+ border-radius: 3px;
|
|
|
+ color: #3459d2;
|
|
|
+ }
|
|
|
}
|
|
|
- .pronunciations-list{
|
|
|
- margin-bottom: 16px;
|
|
|
- display: flex;
|
|
|
- > div{
|
|
|
- display: flex;
|
|
|
- margin-right: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list {
|
|
|
+ margin-top: 16px;
|
|
|
+ max-height: 300px;
|
|
|
+ overflow: auto;
|
|
|
+ .one {
|
|
|
+ margin-bottom: 24px;
|
|
|
+ word-break: break-word;
|
|
|
+ .top {
|
|
|
+ display: flex;
|
|
|
+ // flex-flow: wrap;
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ .number {
|
|
|
+ width: 22px;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: #2f3742;
|
|
|
+ margin-right: 8px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ &-1-false {
|
|
|
+ margin-top: 3px;
|
|
|
}
|
|
|
- label{
|
|
|
- font-weight: 400;
|
|
|
- font-size: 16px;
|
|
|
- line-height: 24px;
|
|
|
- color: #1C2129;
|
|
|
- margin-right: 8px;
|
|
|
+ &-0-true {
|
|
|
+ margin-top: 21px;
|
|
|
}
|
|
|
- span{
|
|
|
- margin-right: 8px;
|
|
|
- font-family: 'robot';
|
|
|
- color: #1C2129;
|
|
|
- font-size: 16px;
|
|
|
- line-height: 24px;
|
|
|
+ &-0-false {
|
|
|
+ margin-top: 5px;
|
|
|
}
|
|
|
- img{
|
|
|
- width: 24px;
|
|
|
+ &-2-true {
|
|
|
+ margin-top: 17px;
|
|
|
}
|
|
|
- }
|
|
|
- .definition-list{
|
|
|
- padding-bottom: 8px;
|
|
|
- .definition-item{
|
|
|
- padding-bottom: 16px;
|
|
|
- display: flex;
|
|
|
- label{
|
|
|
- color: #1C2129;
|
|
|
- font-weight: 500;
|
|
|
- font-size: 16px;
|
|
|
- line-height: 24px;
|
|
|
- min-width: 44px;
|
|
|
- }
|
|
|
- p{
|
|
|
- margin: 0;
|
|
|
- flex: 1;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 16px;
|
|
|
- line-height: 24px;
|
|
|
- }
|
|
|
+ &-2-false {
|
|
|
+ margin-top: 1px;
|
|
|
}
|
|
|
- }
|
|
|
- .number-list{
|
|
|
- display: flex;
|
|
|
- margin-bottom: 24px;
|
|
|
- .number-item{
|
|
|
- border-radius: 100px;
|
|
|
- height: 32px;
|
|
|
+ }
|
|
|
+ .words {
|
|
|
+ word-break: break-all;
|
|
|
+ > div {
|
|
|
+ .pinyin {
|
|
|
+ font-family: "GB-PINYINOK-B";
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 12px;
|
|
|
+ color: rgba(0, 0, 0, 0.5);
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 2px;
|
|
|
+ }
|
|
|
+ .con {
|
|
|
+ font-weight: 400;
|
|
|
font-size: 14px;
|
|
|
line-height: 22px;
|
|
|
- color: #4E5969;
|
|
|
- padding: 5px 16px;
|
|
|
- margin-right: 12px;
|
|
|
- cursor: pointer;
|
|
|
- &.active{
|
|
|
- background: #F2F3F5;
|
|
|
- font-weight: 500;
|
|
|
- color: #165DFF;
|
|
|
- label{
|
|
|
- font-weight: 500;
|
|
|
- }
|
|
|
- }
|
|
|
- label{
|
|
|
- font-weight: 400;
|
|
|
- margin-right: 5px;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
+ color: #2f3742;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
}
|
|
|
+ span {
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ word-break: break-word;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .bottom {
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 20px;
|
|
|
+ color: #929ca8;
|
|
|
+ padding-left: 30px;
|
|
|
+ margin-top: 8px;
|
|
|
}
|
|
|
- .module-box{
|
|
|
+ }
|
|
|
+ .kwic_one {
|
|
|
+ padding: 0 16px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ > :nth-child(1) {
|
|
|
+ width: 32px;
|
|
|
+ justify-content: flex-end;
|
|
|
+ flex-shrink: 0;
|
|
|
+ }
|
|
|
+ .laiyuan,
|
|
|
+ .content {
|
|
|
+ width: 117px;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: rgba(0, 0, 0, 0.65);
|
|
|
+ }
|
|
|
+ .word_sentence {
|
|
|
+ font-family: "FZJCGFKTK";
|
|
|
+ width: 361px;
|
|
|
+ height: 22px;
|
|
|
+ margin-left: 16px;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ color: #000000;
|
|
|
+ opacity: 1;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ > :nth-child(1) {
|
|
|
+ // direction: rtl;
|
|
|
+ // unicode-bidi: plaintext;
|
|
|
+ // text-align: right;
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
- height: 30px;
|
|
|
- > div.align-box{
|
|
|
- background: #E5E6EB;
|
|
|
- border-radius: 4px;
|
|
|
- margin-left: 32px;
|
|
|
- padding: 2px;
|
|
|
- display: flex;
|
|
|
- a{
|
|
|
- width: 48px;
|
|
|
- height: 26px;
|
|
|
- display: block;
|
|
|
- text-align: center;
|
|
|
- color: rgba(0, 0, 0, 0.56);
|
|
|
- svg{
|
|
|
- width: 16px;
|
|
|
- height: 16px;
|
|
|
- margin-top: 5px;
|
|
|
- }
|
|
|
- &.active{
|
|
|
- background: #FFFFFF;
|
|
|
- border-radius: 3px;
|
|
|
- color: #3459D2;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ justify-content: end;
|
|
|
+ width: 172px;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+ > :nth-child(3) {
|
|
|
+ direction: ltr;
|
|
|
+ unicode-bidi: plaintext;
|
|
|
+ text-align: left;
|
|
|
+ width: 172px;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ margin: 0 2px;
|
|
|
+ color: #929ca8;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
+ .load-more {
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 14px;
|
|
|
+ display: block;
|
|
|
+ text-align: center;
|
|
|
+ margin: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
-.dictionary-detail{
|
|
|
- .el-divider--horizontal{
|
|
|
- margin-top: 8px;
|
|
|
- }
|
|
|
- .el-divider__text{
|
|
|
- color: #1D2129;
|
|
|
- }
|
|
|
- .el-switch__label.is-active{
|
|
|
- color: #000000;
|
|
|
- }
|
|
|
- .el-switch.is-checked .el-switch__core{
|
|
|
- background-color: #175DFF;
|
|
|
- border-color: #175DFF;
|
|
|
- }
|
|
|
+.dictionary-detail {
|
|
|
+ .el-divider--horizontal {
|
|
|
+ margin-top: 8px;
|
|
|
+ }
|
|
|
+ .el-divider__text {
|
|
|
+ color: #1d2129;
|
|
|
+ }
|
|
|
+ .el-switch__label.is-active {
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
+ .el-switch.is-checked .el-switch__core {
|
|
|
+ background-color: #175dff;
|
|
|
+ border-color: #175dff;
|
|
|
+ }
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|