|
@@ -12,10 +12,11 @@
|
|
|
<el-button slot="append">搜索</el-button>
|
|
|
</el-input> -->
|
|
|
</div>
|
|
|
- <p class="tabs-title" v-if="tabsIndex===0">共收藏了 {{wordList.length}} 条记录,{{differentNumber}}个不同词汇</p>
|
|
|
- <p class="tabs-title" v-else-if="tabsIndex===1">共收藏了 {{phraseList.length}} 条记录,{{differentNumber}}个不同短语</p>
|
|
|
- <p class="tabs-title" v-else-if="tabsIndex===2">共收藏了 {{sentenceList.length}} 个句子</p>
|
|
|
- <p class="tabs-title" v-else-if="tabsIndex===3">共收藏了 {{articleList.length}} 篇文章</p>
|
|
|
+ <!-- ,{{differentNumber}}个不同词汇 ,{{differentNumber}}个不同短语-->
|
|
|
+ <p class="tabs-title" v-if="tabsIndex===0">共收藏了 {{total_count}} 条记录</p>
|
|
|
+ <p class="tabs-title" v-else-if="tabsIndex===1">共收藏了 {{total_count_p}} 条记录</p>
|
|
|
+ <p class="tabs-title" v-else-if="tabsIndex===2">共收藏了 {{total_count_s}} 个句子</p>
|
|
|
+ <p class="tabs-title" v-else-if="tabsIndex===3">共收藏了 {{total_count_a}} 篇文章</p>
|
|
|
<div class="search-box">
|
|
|
<div class="search-item" style="width:auto;padding-right:8px;">
|
|
|
<label>排序</label>
|
|
@@ -68,9 +69,9 @@
|
|
|
<b class="word" @click="showWord(itemW)">{{itemW.word}}</b>
|
|
|
<span class="symbol">{{itemW.pinyin}}</span>
|
|
|
<div class="para-list">
|
|
|
- <div class="para" v-for="(itemP,indexP) in itemW.definition_list" :key="indexP">
|
|
|
+ <div class="para" v-for="(itemP,indexP) in JSON.parse(itemW.explain)" :key="indexP">
|
|
|
<span class="cixing">{{itemP.cixing}}</span>
|
|
|
- <span class="shiyi">{{itemP.shiyi}}</span>
|
|
|
+ <span class="shiyi">{{itemP.para}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -79,7 +80,7 @@
|
|
|
<span>收藏于:{{itemW.create_time}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <svg-icon icon-class="like" className="icon-like"></svg-icon>
|
|
|
+ <svg-icon icon-class="like" className="icon-like" @click="cancleCollectWord(itemW.word)"></svg-icon>
|
|
|
<!-- <i class="el-icon-arrow-right"></i> -->
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -116,7 +117,7 @@
|
|
|
<span>收藏于:{{itemW.create_time}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <svg-icon icon-class="like" className="icon-like"></svg-icon>
|
|
|
+ <svg-icon icon-class="like" className="icon-like" @click="cancleCollectPhrase(itemW.phrase)"></svg-icon>
|
|
|
<!-- <i class="el-icon-arrow-right"></i> -->
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -150,7 +151,7 @@
|
|
|
<span>收藏于:{{itemW.create_time}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <svg-icon icon-class="like" className="icon-like"></svg-icon>
|
|
|
+ <svg-icon icon-class="like" className="icon-like" @click="cancleCollectSentence(itemW.sentence_id)"></svg-icon>
|
|
|
<!-- <i class="el-icon-arrow-right"></i> -->
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -176,13 +177,13 @@
|
|
|
<span class="xuhao">{{(pageNumberA-1)*pageNumberA+indexW+1+'.'}}</span>
|
|
|
<div class="word-info">
|
|
|
<h4>{{itemW.article_title}}</h4>
|
|
|
- <span class="sentence">{{itemW.article_content_section}}</span>
|
|
|
+ <span class="sentence sentence_article">{{itemW.article_content_section}}</span>
|
|
|
<div class="word-info-bottom">
|
|
|
<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>
|
|
|
+ <svg-icon icon-class="like" className="icon-like" @click="cancleCollectArticle(itemW.article_id)"></svg-icon>
|
|
|
<!-- <i class="el-icon-arrow-right"></i> -->
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -517,6 +518,80 @@ export default {
|
|
|
_this.activeIndex = index
|
|
|
}
|
|
|
},
|
|
|
+ // 取消收藏文章
|
|
|
+ cancleCollectArticle(id){
|
|
|
+ let MethodName = "/ShopServer/Client/CollectManager/CancelCollect_Article"
|
|
|
+ getLogin(MethodName, {
|
|
|
+ article_id: id
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ this.$message({
|
|
|
+ message: "取消收藏",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消句子收藏
|
|
|
+ cancleCollectSentence(id){
|
|
|
+ let MethodName = "/ShopServer/Client/CollectManager/CancelCollect_Sentence"
|
|
|
+ getLogin(MethodName, {
|
|
|
+ sentence_id: id
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ this.$message({
|
|
|
+ message: "取消收藏",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消单词收藏
|
|
|
+ cancleCollectWord(word){
|
|
|
+ let MethodName = "/ShopServer/Client/CollectManager/CancelCollect_Word";
|
|
|
+ let data = {
|
|
|
+ word: word,
|
|
|
+ }
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ this.$message({
|
|
|
+ message: "取消收藏",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消短语收藏
|
|
|
+ cancleCollectPhrase(word){
|
|
|
+ let MethodName = "/ShopServer/Client/CollectManager/CancelCollect_Phrase";
|
|
|
+ let data = {
|
|
|
+ phrase: word,
|
|
|
+ }
|
|
|
+ getLogin(MethodName, data)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.status===1){
|
|
|
+ this.$message({
|
|
|
+ message: "取消收藏",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
@@ -683,6 +758,14 @@ export default {
|
|
|
font-size: 14px;
|
|
|
line-height: 22px;
|
|
|
color: #2F3742;
|
|
|
+ &.sentence_article{
|
|
|
+ word-break: break-word;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
}
|
|
|
.icon-like{
|
|
|
color: #F2555A;
|