|
@@ -40,19 +40,19 @@
|
|
|
<div class="search-item">
|
|
|
<label>搜索</label>
|
|
|
<el-input
|
|
|
- placeholder="输入文章名称"
|
|
|
- v-model="searchInput">
|
|
|
- <i slot="suffix" class="el-input__icon el-icon-search" @click="getList" style="cursor: pointer;"></i>
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="searchInput" maxlength="100">
|
|
|
+ <i slot="suffix" class="el-input__icon el-icon-search" @click="getList(1)" style="cursor: pointer;"></i>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
<div class="search-item">
|
|
|
<label>按学段</label>
|
|
|
- <el-select v-model="searchSelect" @change="getList" placeholder="请选择">
|
|
|
+ <el-select v-model="searchSelect" @change="getList(1)" placeholder="请选择">
|
|
|
<el-option
|
|
|
- v-for="item in searchList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
+ v-for="item in $studyTypeAll"
|
|
|
+ :key="item.study_phase"
|
|
|
+ :label="item.study_phase_name"
|
|
|
+ :value="item.study_phase">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -60,21 +60,23 @@
|
|
|
<template v-if="tabsIndex===0">
|
|
|
<ul>
|
|
|
<li v-for="(itemW,indexW) in wordList" :key="indexW">
|
|
|
- <svg-icon icon-class="voice" className="icon-voice"></svg-icon>
|
|
|
+ <svg-icon v-if="itemW.audio_file_url&&!voiceSrc||itemW.audio_file_url&&activeIndex!==indexW" icon-class="voice" className="icon-voice" @click="handlePlayVoice(itemW,indexW)"></svg-icon>
|
|
|
+ <img v-if="itemW.audio_file_url&&voiceSrc&&activeIndex===indexW" :src="voiceSrc" class="icon-voice" />
|
|
|
+ <svg-icon v-if="!itemW.audio_file_url" icon-class="voice" className="icon-voice" style="color:rgba(78, 89, 105, 0.3)"></svg-icon>
|
|
|
<div class="word-info">
|
|
|
<div class="word-info-top">
|
|
|
<b class="word" @click="showWord(itemW)">{{itemW.word}}</b>
|
|
|
- <span class="symbol">{{itemW.symbol}}</span>
|
|
|
+ <span class="symbol">{{itemW.pinyin}}</span>
|
|
|
<div class="para-list">
|
|
|
- <div class="para" v-for="(itemP,indexP) in itemW.paraList" :key="indexP">
|
|
|
+ <div class="para" v-for="(itemP,indexP) in itemW.definition_list" :key="indexP">
|
|
|
<span class="cixing">{{itemP.cixing}}</span>
|
|
|
<span class="shiyi">{{itemP.shiyi}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="word-info-bottom">
|
|
|
- <span style="cursor: pointer;" @click="handleLink(itemW)">{{itemW.source}}</span>
|
|
|
- <span>收藏于:{{itemW.time}}</span>
|
|
|
+ <span style="cursor: pointer;" @click="handleLink(itemW)">{{itemW.issue_study_phase_name}} / {{itemW.issue_iss_no_name}} / {{itemW.article_title}}</span>
|
|
|
+ <span>收藏于:{{itemW.create_time}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<svg-icon icon-class="like" className="icon-like"></svg-icon>
|
|
@@ -83,22 +85,26 @@
|
|
|
</ul>
|
|
|
<el-pagination
|
|
|
background
|
|
|
- @size-change="(val)=>handleSizeChange(val,'pageSize')"
|
|
|
+ @size-change="(val)=>handleSizeChange(val,'pageSize','pageNumber')"
|
|
|
@current-change="(val)=>handleCurrentChange(val,'pageNumber')"
|
|
|
:current-page="pageNumber"
|
|
|
:page-sizes="[10, 20, 30, 40, 50]"
|
|
|
:page-size="pageSize"
|
|
|
layout="total, prev, pager, next, sizes, jumper"
|
|
|
- :total="total_count">
|
|
|
+ :total="total_count"
|
|
|
+ v-if="total_count>0">
|
|
|
</el-pagination>
|
|
|
+ <div class="nodata" v-if="wordList.length===0">
|
|
|
+ <img src="../../../assets/nodata.png" />
|
|
|
+ <p>没有相关内容</p>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template v-if="tabsIndex===1">
|
|
|
<ul>
|
|
|
<li v-for="(itemW,indexW) in phraseList" :key="indexW">
|
|
|
<div class="word-info">
|
|
|
<div class="word-info-top">
|
|
|
- <b class="phrase">{{itemW.word}}</b>
|
|
|
- <span class="symbol">{{itemW.symbol}}</span>
|
|
|
+ <b class="phrase">{{itemW.phrase}}</b>
|
|
|
<div class="para-list">
|
|
|
<div class="para" v-for="(itemP,indexP) in itemW.paraList" :key="indexP">
|
|
|
<span class="shiyi">{{itemP}}</span>
|
|
@@ -106,8 +112,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="word-info-bottom">
|
|
|
- <span style="cursor: pointer;" @click="handleLink(itemW)">{{itemW.source}}</span>
|
|
|
- <span>收藏于:{{itemW.time}}</span>
|
|
|
+ <span style="cursor: pointer;" @click="handleLink(itemW)">{{itemW.issue_study_phase_name}} / {{itemW.issue_iss_no_name}} / {{itemW.article_title}}</span>
|
|
|
+ <span>收藏于:{{itemW.create_time}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<svg-icon icon-class="like" className="icon-like"></svg-icon>
|
|
@@ -116,25 +122,32 @@
|
|
|
</ul>
|
|
|
<el-pagination
|
|
|
background
|
|
|
- @size-change="(val)=>handleSizeChange(val,'pageSizeP')"
|
|
|
+ @size-change="(val)=>handleSizeChange(val,'pageSizeP','pageNumberP')"
|
|
|
@current-change="(val)=>handleCurrentChange(val,'pageNumberP')"
|
|
|
:current-page="pageNumberP"
|
|
|
:page-sizes="[10, 20, 30, 40, 50]"
|
|
|
:page-size="pageSizeP"
|
|
|
layout="total, prev, pager, next, sizes, jumper"
|
|
|
- :total="total_count_p">
|
|
|
+ :total="total_count_p"
|
|
|
+ v-if="total_count_p>0">
|
|
|
</el-pagination>
|
|
|
+ <div class="nodata" v-if="total_count_p===0">
|
|
|
+ <img src="../../../assets/nodata.png" />
|
|
|
+ <p>没有相关内容</p>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template v-if="tabsIndex===2">
|
|
|
<ul>
|
|
|
<li v-for="(itemW,indexW) in sentenceList" :key="indexW">
|
|
|
- <svg-icon icon-class="voice" className="icon-voice"></svg-icon>
|
|
|
+ <svg-icon v-if="itemW.audio_file_id&&!voiceSrc||itemW.audio_file_id&&activeIndex!==indexW" icon-class="voice" className="icon-voice" @click="handlePlayVoice(itemW,indexW)"></svg-icon>
|
|
|
+ <img v-if="itemW.audio_file_id&&voiceSrc&&activeIndex===indexW" :src="voiceSrc" class="icon-voice" />
|
|
|
+ <svg-icon v-if="!itemW.audio_file_id" icon-class="voice" className="icon-voice" style="color:rgba(78, 89, 105, 0.3)"></svg-icon>
|
|
|
<span class="xuhao">{{(pageNumberS-1)*pageSizeS+indexW+1+'.'}}</span>
|
|
|
<div class="word-info">
|
|
|
- <span class="sentence">{{itemW.sentence}}</span>
|
|
|
+ <span class="sentence">{{itemW.sentence_text}}</span>
|
|
|
<div class="word-info-bottom">
|
|
|
- <span style="cursor: pointer;" @click="handleLink(itemW)">{{itemW.source}}</span>
|
|
|
- <span>收藏于:{{itemW.time}}</span>
|
|
|
+ <span style="cursor: pointer;" @click="handleLink(itemW)">{{itemW.issue_study_phase_name}} / {{itemW.issue_iss_no_name}} / {{itemW.article_title}}</span>
|
|
|
+ <span>收藏于:{{itemW.create_time}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<svg-icon icon-class="like" className="icon-like"></svg-icon>
|
|
@@ -143,24 +156,30 @@
|
|
|
</ul>
|
|
|
<el-pagination
|
|
|
background
|
|
|
- @size-change="(val)=>handleSizeChange(val,'pageSizeS')"
|
|
|
+ @size-change="(val)=>handleSizeChange(val,'pageSizeS','pageNumberS')"
|
|
|
@current-change="(val)=>handleCurrentChange(val,'pageNumberS')"
|
|
|
:current-page="pageNumberS"
|
|
|
:page-sizes="[10, 20, 30, 40, 50]"
|
|
|
:page-size="pageSizeS"
|
|
|
layout="total, prev, pager, next, sizes, jumper"
|
|
|
- :total="total_count_s">
|
|
|
+ :total="total_count_s"
|
|
|
+ v-if="total_count_s>0">
|
|
|
</el-pagination>
|
|
|
+ <div class="nodata" v-if="total_count_s===0">
|
|
|
+ <img src="../../../assets/nodata.png" />
|
|
|
+ <p>没有相关内容</p>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template v-if="tabsIndex===3">
|
|
|
<ul>
|
|
|
<li v-for="(itemW,indexW) in articleList" :key="indexW">
|
|
|
- <span class="xuhao">{{(pageNumberS-1)*pageSizeS+indexW+1+'.'}}</span>
|
|
|
+ <span class="xuhao">{{(pageNumberA-1)*pageNumberA+indexW+1+'.'}}</span>
|
|
|
<div class="word-info">
|
|
|
- <span class="sentence">{{itemW.sentence}}</span>
|
|
|
+ <h4>{{itemW.article_title}}</h4>
|
|
|
+ <span class="sentence">{{itemW.article_content_section}}</span>
|
|
|
<div class="word-info-bottom">
|
|
|
- <span style="cursor: pointer;" @click="handleLink(itemW)">{{itemW.source}}</span>
|
|
|
- <span>收藏于:{{itemW.time}}</span>
|
|
|
+ <span style="cursor: pointer;" @click="handleLink(itemW)">{{itemW.article_author}} {{itemW.issue_study_phase_name}} / {{itemW.issue_iss_no_name}} / {{itemW.article_title}}</span>
|
|
|
+ <span>收藏于:{{itemW.create_time}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<svg-icon icon-class="like" className="icon-like"></svg-icon>
|
|
@@ -169,14 +188,19 @@
|
|
|
</ul>
|
|
|
<el-pagination
|
|
|
background
|
|
|
- @size-change="(val)=>handleSizeChange(val,'pageSizeA')"
|
|
|
+ @size-change="(val)=>handleSizeChange(val,'pageSizeA','pageNumberA')"
|
|
|
@current-change="(val)=>handleCurrentChange(val,'pageNumberA')"
|
|
|
:current-page="pageNumberA"
|
|
|
:page-sizes="[10, 20, 30, 40, 50]"
|
|
|
:page-size="pageSizeA"
|
|
|
layout="total, prev, pager, next, sizes, jumper"
|
|
|
- :total="total_count_a">
|
|
|
+ :total="total_count_a"
|
|
|
+ v-if="total_count_a>0">
|
|
|
</el-pagination>
|
|
|
+ <div class="nodata" v-if="total_count_a===0">
|
|
|
+ <img src="../../../assets/nodata.png" />
|
|
|
+ <p>没有相关内容</p>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<el-dialog
|
|
|
:visible.sync="wordcardShow"
|
|
@@ -194,7 +218,8 @@
|
|
|
//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
//例如:import 《组件名称》from ‘《组件路径》';
|
|
|
import WordCard from "./WordCard.vue"
|
|
|
-
|
|
|
+import { mapState } from 'vuex';
|
|
|
+import { getLogin } from "@/api/ajax";
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
|
components: { WordCard, },
|
|
@@ -212,126 +237,14 @@ export default {
|
|
|
pageNumberS: 1,
|
|
|
pageSizeA: 10,
|
|
|
pageNumberA: 1,
|
|
|
- wordList:[
|
|
|
- {
|
|
|
- src: '.',
|
|
|
- word:'cremation',
|
|
|
- symbol:'/krəˈmeɪʃn/',
|
|
|
- paraList:[
|
|
|
- {
|
|
|
- cixing:'n.',
|
|
|
- shiyi:'火葬;火化'
|
|
|
- }
|
|
|
- ],
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- {
|
|
|
- src: '.',
|
|
|
- word:'thrive',
|
|
|
- symbol:'/θraɪv/',
|
|
|
- paraList:[
|
|
|
- {
|
|
|
- cixing:'v.',
|
|
|
- shiyi:'茁壮成长,兴旺,繁荣;(尤指在别人觉得困难的时候)以……为乐,可以出色应对'
|
|
|
- }
|
|
|
- ],
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- {
|
|
|
- src: '.',
|
|
|
- word:'diversify',
|
|
|
- symbol:'/daɪˈvɜːsɪfaɪ/',
|
|
|
- paraList:[
|
|
|
- {
|
|
|
- cixing:'v.',
|
|
|
- shiyi:'(使)多样化,(使)不同;扩大经营范围,增加……的品种;(投资)多元化;'
|
|
|
- },
|
|
|
- {
|
|
|
- cixing:'n.',
|
|
|
- shiyi:"兽医;<美,非正式>老兵;兽医诊所(vet's)"
|
|
|
- }
|
|
|
- ],
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- ],
|
|
|
- phraseList:[
|
|
|
- {
|
|
|
- word:'send off',
|
|
|
- paraList:[
|
|
|
- '火葬;火化'
|
|
|
- ],
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- {
|
|
|
- word:'send off',
|
|
|
- paraList:[
|
|
|
- '火葬;火化'
|
|
|
- ],
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- {
|
|
|
- word:'send off',
|
|
|
- paraList:[
|
|
|
- '火葬;火化'
|
|
|
- ],
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- {
|
|
|
- word:'send off',
|
|
|
- paraList:[
|
|
|
- '火葬;火化'
|
|
|
- ],
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- ],
|
|
|
- sentenceList:[
|
|
|
- {
|
|
|
- src: '.',
|
|
|
- sentence:'The host group should include an interpreter, if necessary. The host group should ',
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- {
|
|
|
- src: '.',
|
|
|
- sentence:'The host group should include an interpreter, if necessary. The host group should ',
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- {
|
|
|
- src: '.',
|
|
|
- sentence:'The host group should include an interpreter, if necessary. The host group should, The host group should include an interpreter, if necessary. The host group should,The host group should include an interpreter, if necessary. The host group should ',
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- ], // 收藏句子得知道是第几段第几句
|
|
|
- articleList:[
|
|
|
- {
|
|
|
- sentence:'Making room for the pet boom',
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- {
|
|
|
- sentence:'Making room for the pet boom',
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- {
|
|
|
- sentence:'The host group should include an interpreter, if necessary. The host group should, The host group should include an interpreter, if necessary. The host group should,The host group should include an interpreter, if necessary. The host group should ',
|
|
|
- source:'高二版/第897期/Making room for the pet boom',
|
|
|
- time:'2022/10/12 15:23'
|
|
|
- },
|
|
|
- ],
|
|
|
+ wordList:[],
|
|
|
+ phraseList:[],
|
|
|
+ sentenceList:[], // 收藏句子得知道是第几段第几句
|
|
|
+ articleList:[],
|
|
|
wordcardShow: false, // 词汇卡片flag
|
|
|
differentNumber: 89,
|
|
|
searchInput:'',
|
|
|
- searchSelect:'',
|
|
|
+ searchSelect:-1,
|
|
|
searchList:[
|
|
|
{
|
|
|
value:'',
|
|
@@ -342,23 +255,31 @@ export default {
|
|
|
{
|
|
|
name: "按收藏时间",
|
|
|
sort: "down",
|
|
|
- sortName: "scsj",
|
|
|
+ sortName: "create_time",
|
|
|
},
|
|
|
{
|
|
|
name: "按名称",
|
|
|
sort: "",
|
|
|
- sortName: "fbsj",
|
|
|
+ sortName: "word",
|
|
|
}
|
|
|
],
|
|
|
- sortField: "scsj",
|
|
|
+ sortField: "",
|
|
|
total_count: 0,
|
|
|
total_count_p: 0,
|
|
|
total_count_s: 0,
|
|
|
- total_count_a: 0
|
|
|
+ total_count_a: 0,
|
|
|
+ dataSort: null,
|
|
|
+ audio: new Audio(),
|
|
|
+ voiceSrc: "",
|
|
|
+ voicePauseSrc: '',
|
|
|
+ voicePlaySrc: require("../../../assets/voice-play-gray.png"),
|
|
|
+ activeIndex: null
|
|
|
}
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
|
- computed: {},
|
|
|
+ computed: {
|
|
|
+ ...mapState(['$studyTypeAll']),
|
|
|
+ },
|
|
|
//监控data中数据变化
|
|
|
watch: {
|
|
|
|
|
@@ -368,13 +289,17 @@ export default {
|
|
|
// 切换tabs
|
|
|
handleChangeTabs(value){
|
|
|
this.tabsIndex = value
|
|
|
- this.pageNumber = 1
|
|
|
+ this.activeIndex = null
|
|
|
+ this.getList(1)
|
|
|
},
|
|
|
- handleSizeChange(val) {
|
|
|
- this.pageSize = val
|
|
|
+ handleSizeChange(val,type,page) {
|
|
|
+ this[type] = val
|
|
|
+ this[page] = 1
|
|
|
+ this.getList()
|
|
|
},
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.pageNumber = val
|
|
|
+ handleCurrentChange(val,type) {
|
|
|
+ this[type] = val
|
|
|
+ this.getList()
|
|
|
},
|
|
|
// 跳转文章
|
|
|
handleLink(row){
|
|
@@ -388,8 +313,149 @@ export default {
|
|
|
closeWord(){
|
|
|
this.wordcardShow = false
|
|
|
},
|
|
|
- getList(){
|
|
|
-
|
|
|
+ getList(val){
|
|
|
+ if(val){
|
|
|
+ if(this.tabsIndex===0){
|
|
|
+ this.pageNumber = val
|
|
|
+ }else if(this.tabsIndex===1){
|
|
|
+ this.pageNumberP = val
|
|
|
+ }else if(this.tabsIndex===2){
|
|
|
+ this.pageNumberS = val
|
|
|
+ }else if(this.tabsIndex===3){
|
|
|
+ this.pageNumberA = val
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.tabsIndex===0){
|
|
|
+ let MethodName = "/ShopServer/Client/CollectManager/PageQueryMyCollectList_Word"
|
|
|
+ let order_column_list = []
|
|
|
+ if(this.sortField !== ''){
|
|
|
+ if(this.sortType===1){
|
|
|
+ order_column_list = [this.sortField + ':desc']
|
|
|
+ }else if(this.sortType===0){
|
|
|
+ // 升序不传值
|
|
|
+ order_column_list = [this.sortField]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ word: this.searchInput.trim(),
|
|
|
+ issue_study_phase: this.searchSelect,
|
|
|
+ page_capacity:this.pageSize,
|
|
|
+ cur_page:this.pageNumber,
|
|
|
+ order_column_list: order_column_list
|
|
|
+ }
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ this.wordList = res.word_list
|
|
|
+ this.total_count = res.total_count
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ });
|
|
|
+ }else if(this.tabsIndex===1){
|
|
|
+ let MethodName = "/ShopServer/Client/CollectManager/PageQueryMyCollectList_Phrase"
|
|
|
+ let order_column_list = []
|
|
|
+ if(this.sortField !== ''){
|
|
|
+ let sortField = ''
|
|
|
+ if(this.sortField==='word'){
|
|
|
+ sortField = 'phrase'
|
|
|
+ }else{
|
|
|
+ sortField = this.sortField
|
|
|
+ }
|
|
|
+ if(this.sortType===1){
|
|
|
+ order_column_list = [sortField + ':desc']
|
|
|
+ }else if(this.sortType===0){
|
|
|
+ // 升序不传值
|
|
|
+ order_column_list = [sortField]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ phrase: this.searchInput.trim(),
|
|
|
+ issue_study_phase: this.searchSelect,
|
|
|
+ page_capacity:this.pageSizeP,
|
|
|
+ cur_page:this.pageNumberP,
|
|
|
+ order_column_list: order_column_list
|
|
|
+ }
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ this.phraseList = res.phrase_list
|
|
|
+ this.total_count_p = res.total_count
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ });
|
|
|
+ }else if(this.tabsIndex===2){
|
|
|
+ let MethodName = "/ShopServer/Client/CollectManager/PageQueryMyCollectList_Sentence"
|
|
|
+ let order_column_list = []
|
|
|
+ if(this.sortField !== ''){
|
|
|
+ let sortField = ''
|
|
|
+ if(this.sortField==='word'){
|
|
|
+ sortField = 'sentence_text'
|
|
|
+ }else{
|
|
|
+ sortField = this.sortField
|
|
|
+ }
|
|
|
+ if(this.sortType===1){
|
|
|
+ order_column_list = [sortField + ':desc']
|
|
|
+ }else if(this.sortType===0){
|
|
|
+ // 升序不传值
|
|
|
+ order_column_list = [sortField]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ sentence_text: this.searchInput.trim(),
|
|
|
+ issue_study_phase: this.searchSelect,
|
|
|
+ page_capacity:this.pageSizeS,
|
|
|
+ cur_page:this.pageNumberS,
|
|
|
+ order_column_list: order_column_list
|
|
|
+ }
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ this.sentenceList = res.sentence_list
|
|
|
+ this.total_count_s = res.total_count
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ });
|
|
|
+ }else if(this.tabsIndex===3){
|
|
|
+ let MethodName = "/ShopServer/Client/CollectManager/PageQueryMyCollectList_Article"
|
|
|
+ let order_column_list = []
|
|
|
+ if(this.sortField !== ''){
|
|
|
+ let sortField = ''
|
|
|
+ if(this.sortField==='word'){
|
|
|
+ sortField = 'article_title'
|
|
|
+ }else{
|
|
|
+ sortField = this.sortField
|
|
|
+ }
|
|
|
+ if(this.sortType===1){
|
|
|
+ order_column_list = [sortField + ':desc']
|
|
|
+ }else if(this.sortType===0){
|
|
|
+ // 升序不传值
|
|
|
+ order_column_list = [sortField]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ article_title: this.searchInput.trim(),
|
|
|
+ issue_study_phase: this.searchSelect,
|
|
|
+ page_capacity:this.pageSizeA,
|
|
|
+ cur_page:this.pageNumberA,
|
|
|
+ order_column_list: order_column_list
|
|
|
+ }
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ this.articleList = res.article_list
|
|
|
+ this.total_count_a = res.total_count
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
SortEvent(type, name, sortName) {
|
|
|
let sort = "";
|
|
@@ -415,10 +481,39 @@ export default {
|
|
|
}
|
|
|
this.sortField = sortName;
|
|
|
this.getList()
|
|
|
- }
|
|
|
+ },
|
|
|
+ async handlePlayVoice(item,index) {
|
|
|
+ let _this = this;
|
|
|
+ let url = ''
|
|
|
+ if(item.audio_file_url.indexOf('http')){
|
|
|
+ await getLogin('/FileServer/GetFileInfo', {file_id:item.audio_file_url})
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ url = res.file_url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ url = item.audio_file_url
|
|
|
+ }
|
|
|
+ if (!url) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // if (!this.audio.paused) {
|
|
|
+ // this.audio.pause();
|
|
|
+ // } else
|
|
|
+ {
|
|
|
+ _this.audio.pause();
|
|
|
+ _this.audio.load();
|
|
|
+ _this.audio.src = url;
|
|
|
+ _this.audio.loop = false;
|
|
|
+ _this.audio.play();
|
|
|
+ _this.activeIndex = index
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
+ this.getList()
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
@@ -570,6 +665,13 @@ export default {
|
|
|
.word-info{
|
|
|
flex: 1;
|
|
|
}
|
|
|
+ h4{
|
|
|
+ color: #2F3742;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 600;
|
|
|
+ line-height: 22px;
|
|
|
+ margin: 0 0 8px 0;
|
|
|
+ }
|
|
|
.sentence{
|
|
|
font-size: 14px;
|
|
|
line-height: 22px;
|