|
@@ -6,16 +6,13 @@
|
|
|
<i class="el-icon-close" @click="changeIntpShow(false)"></i>
|
|
|
</div>
|
|
|
<div class="bwc-top" v-if="word.detail">
|
|
|
- <span v-if="word.detail.pinyin">{{word.detail.pinyin}}</span>
|
|
|
- <Audio
|
|
|
- :fontSize="20"
|
|
|
- :mp3="mp3Url ? mp3Url : ''"
|
|
|
- />
|
|
|
+ <span v-if="word.detail.pinyin">{{ word.detail.pinyin }}</span>
|
|
|
+ <Audio :fontSize="20" :mp3="mp3Url ? mp3Url : ''" />
|
|
|
</div>
|
|
|
<div
|
|
|
class="bwc-Strockplay"
|
|
|
:style="{ width: word.detail.new_word.length * 126 + 8 + 'px' }"
|
|
|
- v-if="word.detail.new_word.length<5"
|
|
|
+ v-if="word.detail.new_word.length < 5"
|
|
|
>
|
|
|
<div
|
|
|
:key="conindex"
|
|
@@ -28,10 +25,17 @@
|
|
|
:targetDiv="'bwcIntp' + conItem + conindex"
|
|
|
:wordNum="word.detail.new_word.length"
|
|
|
/>
|
|
|
- <div class="bwc-line" v-if="conindex < word.detail.new_word.length - 1"></div>
|
|
|
+ <div
|
|
|
+ class="bwc-line"
|
|
|
+ v-if="conindex < word.detail.new_word.length - 1"
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <p v-else class="bwc-tolength"><span v-for="(item,index) in word.detail.new_word" :key="index">{{item}}</span></p>
|
|
|
+ <p v-else class="bwc-tolength">
|
|
|
+ <span v-for="(item, index) in word.detail.new_word" :key="index">{{
|
|
|
+ item
|
|
|
+ }}</span>
|
|
|
+ </p>
|
|
|
<el-menu
|
|
|
:default-active="activeIndex"
|
|
|
class="el-menu-demo"
|
|
@@ -46,35 +50,53 @@
|
|
|
<div class="bwc-intp">
|
|
|
<!-- 基本释义 -->
|
|
|
<h1>基本释义</h1>
|
|
|
- <span v-if="word.detail.pinyin" class="pinyin">{{word.detail.pinyin}}</span>
|
|
|
- <p v-for="(itemss,indexss) in paraphrase" :key="indexss" class="paraphrase">
|
|
|
- {{itemss['@value']}}
|
|
|
+ <span v-if="word.detail.pinyin" class="pinyin">{{
|
|
|
+ word.detail.pinyin
|
|
|
+ }}</span>
|
|
|
+ <p
|
|
|
+ v-for="(itemss, indexss) in paraphrase"
|
|
|
+ :key="indexss"
|
|
|
+ class="paraphrase"
|
|
|
+ >
|
|
|
+ {{ itemss["@value"] }}
|
|
|
</p>
|
|
|
<hr />
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-if="activeIndex == '2'">
|
|
|
<div class="bwc-intp">
|
|
|
- <h1 v-if="synonymList.length>0">近义词</h1>
|
|
|
+ <h1 v-if="synonymList.length > 0">近义词</h1>
|
|
|
<ul class="synonym">
|
|
|
- <li v-for="(itemss,indexss) in synonymList" :key="indexss" class="paraphrase">
|
|
|
- {{itemss['@value']}}
|
|
|
- </li>
|
|
|
+ <li
|
|
|
+ v-for="(itemss, indexss) in synonymList"
|
|
|
+ :key="indexss"
|
|
|
+ class="paraphrase"
|
|
|
+ >
|
|
|
+ {{ itemss["@value"] }}
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
- <h1 v-if="antonymList.length>0">反义词</h1>
|
|
|
+ <h1 v-if="antonymList.length > 0">反义词</h1>
|
|
|
<ul class="synonym">
|
|
|
- <li v-for="(itemss,indexss) in antonymList" :key="indexss" class="paraphrase">
|
|
|
- {{itemss['@value']}}
|
|
|
- </li>
|
|
|
+ <li
|
|
|
+ v-for="(itemss, indexss) in antonymList"
|
|
|
+ :key="indexss"
|
|
|
+ class="paraphrase"
|
|
|
+ >
|
|
|
+ {{ itemss["@value"] }}
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-if="activeIndex == '3'">
|
|
|
<div class="bwc-intp">
|
|
|
<ul class="synonym">
|
|
|
- <li v-for="(itemss,indexss) in termsList" :key="indexss" class="paraphrase">
|
|
|
- {{itemss['@value']}}
|
|
|
- </li>
|
|
|
+ <li
|
|
|
+ v-for="(itemss, indexss) in termsList"
|
|
|
+ :key="indexss"
|
|
|
+ class="paraphrase"
|
|
|
+ >
|
|
|
+ {{ itemss["@value"] }}
|
|
|
+ </li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -98,234 +120,237 @@ export default {
|
|
|
isPraShow: false,
|
|
|
curData: null,
|
|
|
activeIndex: "1",
|
|
|
- mp3Url:'', // 音频
|
|
|
- paraphrase:[], // 释义
|
|
|
- synonymList:[], // 近义词
|
|
|
- antonymList:[], // 反义词
|
|
|
- termsList:[], // 组词
|
|
|
+ mp3Url: "", // 音频
|
|
|
+ paraphrase: [], // 释义
|
|
|
+ synonymList: [], // 近义词
|
|
|
+ antonymList: [], // 反义词
|
|
|
+ termsList: [], // 组词
|
|
|
dataDetail: [
|
|
|
- {
|
|
|
- "request":{
|
|
|
- "query":"生",
|
|
|
- "queryType":"entity"
|
|
|
- },
|
|
|
- "response":{
|
|
|
- "voice":"这个字读: shēng,一(yi1)声,诗(shi1)鞥(eng1),生(sheng1),意思是:1、生育;出生。 2、生长。 ",
|
|
|
- "sourceUrl":"https://hanyu.baidu.com/zici/s?wd=%E7%94%9F&query=%E7%94%9F&srcid=28532&from=kg2",
|
|
|
- "answer":[
|
|
|
- "生"
|
|
|
+ {
|
|
|
+ request: {
|
|
|
+ query: "生",
|
|
|
+ queryType: "entity",
|
|
|
+ },
|
|
|
+ response: {
|
|
|
+ voice:
|
|
|
+ "这个字读: shēng,一(yi1)声,诗(shi1)鞥(eng1),生(sheng1),意思是:1、生育;出生。 2、生长。 ",
|
|
|
+ sourceUrl:
|
|
|
+ "https://hanyu.baidu.com/zici/s?wd=%E7%94%9F&query=%E7%94%9F&srcid=28532&from=kg2",
|
|
|
+ answer: ["生"],
|
|
|
+ sourceName: "百度汉语",
|
|
|
+ title: "生",
|
|
|
+ entity: [
|
|
|
+ {
|
|
|
+ "@type": ["word"],
|
|
|
+ name: "生",
|
|
|
+ attrs: [
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value":
|
|
|
+ "http://t10.baidu.com/it/u=1615089267,1656681114&fm=58&s=6BAC3062C6E167A91D9015D70300A0A0",
|
|
|
+ },
|
|
|
],
|
|
|
- "sourceName":"百度汉语",
|
|
|
- "title":"生",
|
|
|
- "entity":[
|
|
|
- {
|
|
|
- "@type":[
|
|
|
- "word"
|
|
|
- ],
|
|
|
- "name":"生",
|
|
|
- "attrs":[
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"http://t10.baidu.com/it/u=1615089267,1656681114&fm=58&s=6BAC3062C6E167A91D9015D70300A0A0"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"图片",
|
|
|
- "type":"simple",
|
|
|
- "key":"image"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"https://hanyu.baidu.com/zici/s?wd=%E7%94%9F&query=%E7%94%9F&srcid=28532&from=kg2"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"详情页",
|
|
|
- "type":"simple",
|
|
|
- "key":"url"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"熟"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"死"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"师"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"卒"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"反义词",
|
|
|
- "type":"simple",
|
|
|
- "key":"antonym"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"1.生育;出生。 2.生长。 3.生存;活(跟“死”相对)。 4.生计。 5.生命。 6.生平。 7.具有生命力的;活的。 8.产生;发生。 9.使柴、煤等燃烧。 10.姓。11.果实没有成熟(跟“熟”相对,下12.—13.同)。 14.(食物)没有煮过或煮得不够的。 15.没有进一步加工或炼过的。 16.生疏。 17.生硬;勉强。 18.很(用在少数表示感情、感觉的词的前面)。 19.某些指人的名词后缀。 20.某些副词的后缀,如“好生、怎生”等。"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"释义",
|
|
|
- "type":"simple",
|
|
|
- "key":"definition"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"https://hanyu-word-pinyin-short.cdn.bcebos.com/sheng1.mp3"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"读音",
|
|
|
- "type":"simple",
|
|
|
- "key":"pronunciation"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"生"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"部首",
|
|
|
- "type":"simple",
|
|
|
- "key":"radicals"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"[shēng]"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"拼音",
|
|
|
- "type":"simple",
|
|
|
- "key":"spell"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"5"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"笔画",
|
|
|
- "type":"simple",
|
|
|
- "key":"stroke_count"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"撇、横、横、竖、横"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"笔顺",
|
|
|
- "type":"simple",
|
|
|
- "key":"stroke_order"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"http://appcdn.fanyi.baidu.com/zhdict/gif/b78128322d51c43cbaf2701d467822446.gif"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"笔顺动画",
|
|
|
- "type":"simple",
|
|
|
- "key":"stroke_order_gif"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"单一结构"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"字形结构",
|
|
|
- "type":"simple",
|
|
|
- "key":"struct_type"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"生命"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"五行相生"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"生活"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"大学生"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"诞生"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"生肖"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"油然而生"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"舍生取义"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"栩栩如生"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"芸芸众生"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"生意"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"生机盎然"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"生气"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"妙笔生花"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"浮生"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"陌生"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"衍生"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"生机勃勃"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"生意盎然"
|
|
|
- },
|
|
|
- {
|
|
|
- "@value":"终生"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"组词",
|
|
|
- "type":"simple",
|
|
|
- "key":"terms"
|
|
|
- },
|
|
|
- {
|
|
|
- "objects":[
|
|
|
- {
|
|
|
- "@value":"TGD"
|
|
|
- }
|
|
|
- ],
|
|
|
- "label":"五笔",
|
|
|
- "type":"simple",
|
|
|
- "key":"wubi"
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
+ label: "图片",
|
|
|
+ type: "simple",
|
|
|
+ key: "image",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value":
|
|
|
+ "https://hanyu.baidu.com/zici/s?wd=%E7%94%9F&query=%E7%94%9F&srcid=28532&from=kg2",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "详情页",
|
|
|
+ type: "simple",
|
|
|
+ key: "url",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value": "熟",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "死",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "师",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "卒",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "反义词",
|
|
|
+ type: "simple",
|
|
|
+ key: "antonym",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value":
|
|
|
+ "1.生育;出生。 2.生长。 3.生存;活(跟“死”相对)。 4.生计。 5.生命。 6.生平。 7.具有生命力的;活的。 8.产生;发生。 9.使柴、煤等燃烧。 10.姓。11.果实没有成熟(跟“熟”相对,下12.—13.同)。 14.(食物)没有煮过或煮得不够的。 15.没有进一步加工或炼过的。 16.生疏。 17.生硬;勉强。 18.很(用在少数表示感情、感觉的词的前面)。 19.某些指人的名词后缀。 20.某些副词的后缀,如“好生、怎生”等。",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "释义",
|
|
|
+ type: "simple",
|
|
|
+ key: "definition",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value":
|
|
|
+ "https://hanyu-word-pinyin-short.cdn.bcebos.com/sheng1.mp3",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "读音",
|
|
|
+ type: "simple",
|
|
|
+ key: "pronunciation",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value": "生",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "部首",
|
|
|
+ type: "simple",
|
|
|
+ key: "radicals",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value": "[shēng]",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "拼音",
|
|
|
+ type: "simple",
|
|
|
+ key: "spell",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value": "5",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "笔画",
|
|
|
+ type: "simple",
|
|
|
+ key: "stroke_count",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value": "撇、横、横、竖、横",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "笔顺",
|
|
|
+ type: "simple",
|
|
|
+ key: "stroke_order",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value":
|
|
|
+ "http://appcdn.fanyi.baidu.com/zhdict/gif/b78128322d51c43cbaf2701d467822446.gif",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "笔顺动画",
|
|
|
+ type: "simple",
|
|
|
+ key: "stroke_order_gif",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value": "单一结构",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "字形结构",
|
|
|
+ type: "simple",
|
|
|
+ key: "struct_type",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value": "生命",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "五行相生",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "生活",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "大学生",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "诞生",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "生肖",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "油然而生",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "舍生取义",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "栩栩如生",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "芸芸众生",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "生意",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "生机盎然",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "生气",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "妙笔生花",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "浮生",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "陌生",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "衍生",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "生机勃勃",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "生意盎然",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "@value": "终生",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "组词",
|
|
|
+ type: "simple",
|
|
|
+ key: "terms",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ objects: [
|
|
|
+ {
|
|
|
+ "@value": "TGD",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ label: "五笔",
|
|
|
+ type: "simple",
|
|
|
+ key: "wubi",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -347,50 +372,51 @@ export default {
|
|
|
this.isPraShow = false;
|
|
|
},
|
|
|
handleSelect(val) {
|
|
|
- this.activeIndex = val
|
|
|
+ this.activeIndex = val;
|
|
|
},
|
|
|
- getChineseInfo(){
|
|
|
- let _this = this
|
|
|
- let data = {
|
|
|
- query: this.word.detail.new_word,
|
|
|
- // query: "开心",
|
|
|
- };
|
|
|
- debugger
|
|
|
- getHZChineseInfo(data).then((res) => {
|
|
|
- _this.dataDetail = res.data.result
|
|
|
- _this.handleChineseDetail()
|
|
|
- });
|
|
|
+ getChineseInfo() {
|
|
|
+ let _this = this;
|
|
|
+ let data = {
|
|
|
+ query: this.word.detail.new_word,
|
|
|
+ // query: "开心",
|
|
|
+ };
|
|
|
+ debugger;
|
|
|
+ getHZChineseInfo(data).then((res) => {
|
|
|
+ _this.dataDetail = res.data.result;
|
|
|
+ _this.handleChineseDetail();
|
|
|
+ });
|
|
|
},
|
|
|
// 处理数据
|
|
|
- handleChineseDetail(){
|
|
|
- let _this = this
|
|
|
- _this.dataDetail.forEach(item=>{
|
|
|
- if(item.request.queryType=='entity'){
|
|
|
- // 读音
|
|
|
- item.response.entity.forEach(items=>{
|
|
|
- items.attrs.forEach(itemss=>{
|
|
|
- if(itemss.key=="pronunciation"){
|
|
|
- // 音频
|
|
|
- _this.mp3Url = itemss.objects[0]['@value']?itemss.objects[0]['@value']:''
|
|
|
- }else if(itemss.key=="definition"){
|
|
|
- // 释义
|
|
|
- _this.paraphrase = itemss.objects
|
|
|
- }else if(itemss.key=="synonym"){
|
|
|
- // 近义词
|
|
|
- _this.synonymList = itemss.objects
|
|
|
- }else if(itemss.key=="antonym"){
|
|
|
- // 反义词
|
|
|
- _this.antonymList = itemss.objects
|
|
|
- }else if(itemss.key=="terms"){
|
|
|
- // 反义词
|
|
|
- _this.termsList = itemss.objects
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ handleChineseDetail() {
|
|
|
+ let _this = this;
|
|
|
+ _this.dataDetail.forEach((item) => {
|
|
|
+ if (item.request.queryType == "entity") {
|
|
|
+ // 读音
|
|
|
+ item.response.entity.forEach((items) => {
|
|
|
+ items.attrs.forEach((itemss) => {
|
|
|
+ if (itemss.key == "pronunciation") {
|
|
|
+ // 音频
|
|
|
+ _this.mp3Url = itemss.objects[0]["@value"]
|
|
|
+ ? itemss.objects[0]["@value"]
|
|
|
+ : "";
|
|
|
+ } else if (itemss.key == "definition") {
|
|
|
+ // 释义
|
|
|
+ _this.paraphrase = itemss.objects;
|
|
|
+ } else if (itemss.key == "synonym") {
|
|
|
+ // 近义词
|
|
|
+ _this.synonymList = itemss.objects;
|
|
|
+ } else if (itemss.key == "antonym") {
|
|
|
+ // 反义词
|
|
|
+ _this.antonymList = itemss.objects;
|
|
|
+ } else if (itemss.key == "terms") {
|
|
|
+ // 反义词
|
|
|
+ _this.termsList = itemss.objects;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {},
|
|
@@ -398,8 +424,8 @@ export default {
|
|
|
mounted() {
|
|
|
let _this = this;
|
|
|
console.log(this.word);
|
|
|
- // this.getChineseInfo()
|
|
|
- _this.handleChineseDetail()
|
|
|
+ this.getChineseInfo();
|
|
|
+ // _this.handleChineseDetail();
|
|
|
},
|
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
|
beforeMount() {}, //生命周期 - 挂载之前
|
|
@@ -414,59 +440,59 @@ export default {
|
|
|
//@import url(); 引入公共css类
|
|
|
.wordIntp {
|
|
|
width: 600px;
|
|
|
-// height: 100vh;
|
|
|
+ // height: 100vh;
|
|
|
overflow: hidden;
|
|
|
overflow-y: auto;
|
|
|
margin: 0 auto;
|
|
|
position: relative;
|
|
|
.bwc-intp {
|
|
|
- padding: 16px 0;
|
|
|
- h1{
|
|
|
- color: #000000;
|
|
|
- font-size: 20px;
|
|
|
- line-height: 150%;
|
|
|
- font-weight: normal;
|
|
|
- margin: 8px 0 8px 0;
|
|
|
- }
|
|
|
- .pinyin{
|
|
|
- color: #DE4444;
|
|
|
- font-size: 24px;
|
|
|
- line-height: 36px;
|
|
|
- margin-bottom: 8px;
|
|
|
- font-family: 'GB-PINYINOK-B';
|
|
|
- display: block;
|
|
|
- }
|
|
|
- .paraphrase{
|
|
|
- margin-bottom: 8px;
|
|
|
- margin-top: 0;
|
|
|
- color: #000000;
|
|
|
- font-size: 16px;
|
|
|
- line-height: 150%;
|
|
|
- }
|
|
|
- hr{
|
|
|
- margin: 16px 0 0 0;
|
|
|
- background: rgba($color: #000000, $alpha: 0.15);
|
|
|
- height: 1px;
|
|
|
- border: none;
|
|
|
- }
|
|
|
- ul.synonym{
|
|
|
- display: flex;
|
|
|
- flex-flow: wrap;
|
|
|
- margin-left: -4px;
|
|
|
- padding: 4px 0;
|
|
|
- li{
|
|
|
- padding: 4px 8px;
|
|
|
- background: #FFFFFF;
|
|
|
- border: 1px solid rgba(0, 0, 0, 0.15);
|
|
|
- border-radius: 4px;
|
|
|
- margin: 4px;
|
|
|
- font-size: 16px;
|
|
|
- line-height: 150%;
|
|
|
- color: #000000;
|
|
|
- text-align: center;
|
|
|
- min-width: 127px;
|
|
|
- }
|
|
|
+ padding: 16px 0;
|
|
|
+ h1 {
|
|
|
+ color: #000000;
|
|
|
+ font-size: 20px;
|
|
|
+ line-height: 150%;
|
|
|
+ font-weight: normal;
|
|
|
+ margin: 8px 0 8px 0;
|
|
|
+ }
|
|
|
+ .pinyin {
|
|
|
+ color: #de4444;
|
|
|
+ font-size: 24px;
|
|
|
+ line-height: 36px;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ font-family: "GB-PINYINOK-B";
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .paraphrase {
|
|
|
+ margin-bottom: 8px;
|
|
|
+ margin-top: 0;
|
|
|
+ color: #000000;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 150%;
|
|
|
+ }
|
|
|
+ hr {
|
|
|
+ margin: 16px 0 0 0;
|
|
|
+ background: rgba($color: #000000, $alpha: 0.15);
|
|
|
+ height: 1px;
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+ ul.synonym {
|
|
|
+ display: flex;
|
|
|
+ flex-flow: wrap;
|
|
|
+ margin-left: -4px;
|
|
|
+ padding: 4px 0;
|
|
|
+ li {
|
|
|
+ padding: 4px 8px;
|
|
|
+ background: #ffffff;
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.15);
|
|
|
+ border-radius: 4px;
|
|
|
+ margin: 4px;
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 150%;
|
|
|
+ color: #000000;
|
|
|
+ text-align: center;
|
|
|
+ min-width: 127px;
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
.practiceBox {
|
|
|
position: fixed;
|
|
@@ -490,15 +516,15 @@ export default {
|
|
|
top: 0;
|
|
|
padding: 12px;
|
|
|
> i {
|
|
|
- font-size: 16px;
|
|
|
- color:#000000;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #000000;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
- span{
|
|
|
- color: #000000;
|
|
|
- opacity: 0.2;
|
|
|
- font-size: 14px;
|
|
|
- line-height: 130%;
|
|
|
+ span {
|
|
|
+ color: #000000;
|
|
|
+ opacity: 0.2;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 130%;
|
|
|
}
|
|
|
}
|
|
|
min-width: 312px;
|
|
@@ -514,15 +540,15 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
- .content-voices{
|
|
|
- width: 24px;
|
|
|
+ .content-voices {
|
|
|
+ width: 24px;
|
|
|
}
|
|
|
- >span{
|
|
|
- font-family: 'GB-PINYINOK-B';
|
|
|
- color: #2C2C2C;
|
|
|
- font-size: 20px;
|
|
|
- line-height: 24px;
|
|
|
- margin-right: 4px;
|
|
|
+ > span {
|
|
|
+ font-family: "GB-PINYINOK-B";
|
|
|
+ color: #2c2c2c;
|
|
|
+ font-size: 20px;
|
|
|
+ line-height: 24px;
|
|
|
+ margin-right: 4px;
|
|
|
}
|
|
|
}
|
|
|
.bwc-Strockplay {
|
|
@@ -533,7 +559,7 @@ export default {
|
|
|
height: 130px;
|
|
|
margin: 0 auto;
|
|
|
margin-bottom: 6px;
|
|
|
- border: 2px solid #DE4444;
|
|
|
+ border: 2px solid #de4444;
|
|
|
border-radius: 8px;
|
|
|
box-sizing: border-box;
|
|
|
overflow: hidden;
|
|
@@ -542,30 +568,30 @@ export default {
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
position: relative;
|
|
|
- .collect-icon{
|
|
|
- width: 16px;
|
|
|
- position: absolute;
|
|
|
- right: 4px;
|
|
|
- bottom: 4px;
|
|
|
- cursor: pointer;
|
|
|
+ .collect-icon {
|
|
|
+ width: 16px;
|
|
|
+ position: absolute;
|
|
|
+ right: 4px;
|
|
|
+ bottom: 4px;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
.bwc-line {
|
|
|
width: 2px;
|
|
|
height: 126px;
|
|
|
- background: #DE4444;
|
|
|
+ background: #de4444;
|
|
|
}
|
|
|
}
|
|
|
- .bwc-tolength{
|
|
|
- color: #404040;
|
|
|
- font-size: 30px;
|
|
|
- line-height: 1.5;
|
|
|
- font-family: FZJCGFKTK;
|
|
|
- text-align: center;
|
|
|
- border: 2px solid #DE4444;
|
|
|
- border-radius: 8px;
|
|
|
- padding: 40px 0;
|
|
|
- margin: 0 0 16px 0;
|
|
|
+ .bwc-tolength {
|
|
|
+ color: #404040;
|
|
|
+ font-size: 30px;
|
|
|
+ line-height: 1.5;
|
|
|
+ font-family: FZJCGFKTK;
|
|
|
+ text-align: center;
|
|
|
+ border: 2px solid #de4444;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 40px 0;
|
|
|
+ margin: 0 0 16px 0;
|
|
|
}
|
|
|
.bwc-word-en {
|
|
|
font-style: normal;
|
|
@@ -613,20 +639,20 @@ export default {
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
-.wordIntp{
|
|
|
- .el-menu--horizontal > .el-menu-item {
|
|
|
- width: 33.33%;
|
|
|
- text-align: center;
|
|
|
- color: #000000;
|
|
|
- font-size: 18px;
|
|
|
- }
|
|
|
- .el-menu.el-menu--horizontal{
|
|
|
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
- }
|
|
|
- .el-menu--horizontal>.el-menu-item.is-active{
|
|
|
- color: #DE4444;
|
|
|
- font-weight: bold;
|
|
|
- border-bottom: 2px solid #DE4444;
|
|
|
- }
|
|
|
+.wordIntp {
|
|
|
+ .el-menu--horizontal > .el-menu-item {
|
|
|
+ width: 33.33%;
|
|
|
+ text-align: center;
|
|
|
+ color: #000000;
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
+ .el-menu.el-menu--horizontal {
|
|
|
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
+ }
|
|
|
+ .el-menu--horizontal > .el-menu-item.is-active {
|
|
|
+ color: #de4444;
|
|
|
+ font-weight: bold;
|
|
|
+ border-bottom: 2px solid #de4444;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|