natasha hace 1 año
padre
commit
e5c4201771

+ 2 - 1
src/views/bookShelf/articleDetail.vue

@@ -21,7 +21,7 @@
             <!-- 文章 -->
             <div class="atricle-data">
                 <normal-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='original'" :articleInfo="articleInfo"></normal-model>
-                <phrase-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='newWord'" :articleInfo="articleInfo"></phrase-model>
+                <phrase-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='newWord'" :articleInfo="articleInfo" :likePhraseList="likePhraseList" :likeWord="likeWordList"></phrase-model>
                 <div class="article-btn" v-if="this.$route.query.iss_id">
                     <div class="left">
                         <span :class="['support colloct-article',!noRead?'active':'']" @click="changeStatus('noRead')"><svg-icon icon-class="like-line"></svg-icon>2847</span>
@@ -1213,6 +1213,7 @@ export default {
     position: fixed;
     top: 50%;
     left: 50%;
+    z-index: 999;
     margin-top: -351px;
     margin-left: -214px;
     border-radius: 8px;

+ 136 - 106
src/views/bookShelf/articleShareDetail.vue

@@ -6,17 +6,17 @@
         </div>
         <div class="navBar-right">
             <el-image
-                :src="require('../../assets/avatar.png')"
+                :src="personTouxiang"
                 fit="cover" style="width:24px;height:24px;margin:0 8px;border-radius:50%">
             </el-image>
-            <span class="name">某某分享的文章</span>
+            <span class="name">{{personName}}分享的文章</span>
         </div>
     </div>
     <div class="article-box">
         <div class="artricle-inner" :style="{background:bgColorList[activeIndex].contentInnerBg}">
             <!-- 文章 -->
             <div class="atricle-data">
-                <normal-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='original'"></normal-model>
+                <normal-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}" v-if="menuType==='original'" :articleInfo="articleInfo"></normal-model>
             </div>
             <!-- 词汇表 -->
             <div class="glossary-box" :style="{borderTopColor:bgColorList[activeIndex].contentBg}">
@@ -26,34 +26,56 @@
                 </div>
                 <el-collapse-transition >
                     <div v-if="showGlossary">
-                        <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">生词</h4>
-                        <new-word-list class="newWord-list" :list="articleInfo.art_voc_data" :style="{background:bgColorList[activeIndex].glossaryBg}" :colorObj="bgColorList[activeIndex]" :likeWordList="likeWordList" @changeLike="changeLike" :noLike="true"></new-word-list>
-                        <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">短语</h4>
-                        <phrase-list class="newWord-list" :list="articleInfo.art_phrase_data" :style="{background:bgColorList[activeIndex].glossaryBg}" :colorObj="bgColorList[activeIndex]" :likePhraseList="likePhraseList" @changeLike="changeLike" :noLike="true"></phrase-list>
-                        <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">注释</h4>
-                        <annotation-list class="newWord-list" :list="articleInfo.art_explain_data" :style="{background:bgColorList[activeIndex].glossaryBg}" :colorObj="bgColorList[activeIndex]"></annotation-list>
+                        <template v-if="articleInfo.art_voc_data.length>0">
+                            <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">生词</h4>
+                            <new-word-list class="newWord-list" :list="articleInfo.art_voc_data" :style="{background:bgColorList[activeIndex].glossaryBg}" :colorObj="bgColorList[activeIndex]" :likeWordList="likeWordList" @changeLike="changeLike"></new-word-list>
+                        </template>
+                        <template v-if="articleInfo.art_phrase_data.length>0">
+                            <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">短语</h4>
+                            <phrase-list class="newWord-list" :list="articleInfo.art_phrase_data" :style="{background:bgColorList[activeIndex].glossaryBg}" :colorObj="bgColorList[activeIndex]" :likePhraseList="likePhraseList" @changeLike="changeLike"></phrase-list>
+                        </template>
+                        <template v-if="articleInfo.art_explain_data.length>0">
+                            <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">注释</h4>
+                            <annotation-list class="newWord-list" :list="articleInfo.art_explain_data" :style="{background:bgColorList[activeIndex].glossaryBg}" :colorObj="bgColorList[activeIndex]"></annotation-list>
+                        </template>
                     </div>
                 </el-collapse-transition>
                 <div class="title" :style="{color:bgColorList[activeIndex].glossaryTitle,marginTop:'40px'}">
                     <h2>详细统计</h2>
                 </div>
                 <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">词汇信息</h4>
-                <div class="word-info">
-                    <div v-for="(itemI,indexI) in wordInfo" :key="indexI" :style="{background:bgColorList[activeIndex].glossaryBg}">
-                        <label :style="{color:bgColorList[activeIndex].statisticTitle}">{{itemI.label}}</label>
-                        <span :style="{color:bgColorList[activeIndex].statisticValue}">{{itemI.value}}</span>
+                <div class="word-info" v-if="articleInfo.art_corpus_data&&articleInfo.art_corpus_data.artStatInfo">
+                    <div :style="{background:bgColorList[activeIndex].glossaryBg}">
+                        <label :style="{color:bgColorList[activeIndex].statisticTitle}">文章长度</label>
+                        <span :style="{color:bgColorList[activeIndex].statisticValue}">{{articleInfo.art_corpus_data.artStatInfo.wc}}</span>
+                    </div>
+                    <div :style="{background:bgColorList[activeIndex].glossaryBg}">
+                        <label :style="{color:bgColorList[activeIndex].statisticTitle}">词汇数量</label>
+                        <span :style="{color:bgColorList[activeIndex].statisticValue}">{{articleInfo.art_corpus_data.artStatInfo.wdc}}</span>
+                    </div>
+                    <div :style="{background:bgColorList[activeIndex].glossaryBg}">
+                        <label :style="{color:bgColorList[activeIndex].statisticTitle}">平均词长</label>
+                        <span :style="{color:bgColorList[activeIndex].statisticValue}">{{articleInfo.art_corpus_data.artStatInfo.avgWordLen}}</span>
+                    </div>
+                    <div :style="{background:bgColorList[activeIndex].glossaryBg}">
+                        <label :style="{color:bgColorList[activeIndex].statisticTitle}">词汇密度</label>
+                        <span :style="{color:bgColorList[activeIndex].statisticValue}">{{articleInfo.art_corpus_data.artStatInfo.vocabDensity}}</span>
+                    </div>
+                    <div :style="{background:bgColorList[activeIndex].glossaryBg}">
+                        <label :style="{color:bgColorList[activeIndex].statisticTitle}">词汇难度</label>
+                        <span :style="{color:bgColorList[activeIndex].statisticValue}">{{articleInfo.art_corpus_data.artStatInfo.vocabHardLevel}}</span>
                     </div>
                 </div>
                 <h4 :style="{color:bgColorList[activeIndex].glossarySubtitle}">词汇分布</h4>
-                <div class="echarts-box">
+                <div class="echarts-box" v-if="articleInfo&&articleInfo.art_corpus_data&&articleInfo.art_corpus_data.artStatInfo&&articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems">
                     <ul class="echarts-type">
-                        <li v-for="(itemE,indexE) in vocabularyType" :key="indexE"
+                        <li v-for="(itemE,indexE) in articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems" :key="indexE"
                             @mouseover="gaolangbzt(indexE, 'shanxing_main')"
                             @mouseout="closegaolangbzt(indexE, 'shanxing_main')"
                             :style="{background:bgColorList[activeIndex].type==='white'?itemE.bg:bgColorList[activeIndex].type==='darkGreen'?itemE.darkGreenBg:itemE.darkBg,color:bgColorList[activeIndex].type==='white'?itemE.color:bgColorList[activeIndex].type==='darkGreen'?itemE.darkGreenColor:itemE.darkColor,borderColor:bgColorList[activeIndex].type==='white'?itemE.border:bgColorList[activeIndex].type==='darkGreen'?itemE.darkGreenBorder:itemE.darkBorder}">
-                            <span class="name">{{itemE.name}}</span>
+                            <span class="name">{{itemE.vlCnName}}</span>
                             <span class="number">{{itemE.value}}</span>
-                            <span class="percent">{{itemE.percent}}</span>
+                            <span class="percent">{{itemE.vocabPercentStr}}</span>
                         </li>
                     </ul>
                     <div id="shanxing_main" style="height: 360px"></div>
@@ -84,6 +106,8 @@ export default {
   },
   data(){
     return{
+        personTouxiang:localStorage.getItem('share_person_touxiang')?localStorage.getItem('share_person_touxiang'):require('../../assets/avatar.png'),
+        personName:localStorage.getItem('share_person_name')?localStorage.getItem('share_person_name'):'',
         LoginNavIndex: 0,
         wordFontsize: 18, // 文章文字大小
         bgColorList:[
@@ -107,15 +131,37 @@ export default {
                 newWordOtherColor:'#667180',
                 newWordStar:'#FFB224',
                 newWordType:{
-                    'daochu':{
-                        text:'导出',
-                        color:'#F5319D',
-                        bg:'#FFE8F1'
+                    'L0':{
+                        color:'#5B7217',
+                        bg:'#F1FCE3'
+                    },
+                    'L1':{
+                        color:'#3D9A50',
+                        bg:'#EFFCEF'
+                    },
+                    'L2':{
+                        color:'#0081F1',
+                        bg:'#E7F3FF'
+                    },
+                    'L3':{
+                        color:'#3459D2',
+                        bg:'#EEF3FF'
+                    },
+                    'LA':{
+                        color:'#E03177',
+                        bg:'#FFECF5'
+                    },
+                    'LB':{
+                        color:'#CD2B31',
+                        bg:'#FFE8E8'
                     },
-                    'xuanbi':{
-                        text:'选必',
-                        color:'#175DFF',
-                        bg:'#D9E2FC'
+                    'LC':{
+                        color:'#4A524E',
+                        bg:'#DFE4E2'
+                    },
+                    'LD':{
+                        color:'#504F57',
+                        bg:'#C1C5CD'
                     }
                 },
                 phraseColor:'#ED5F00',
@@ -153,11 +199,8 @@ export default {
                         value:2.05
                     },
         },
-        vocabularyType:[
-            {
-                name:'小学',
-                percent:30.51,
-                value: 72,
+        vocabularyType:{
+            L0:{
                 bg:'#F2FCE3',
                 color:'#5B7217',
                 darkBg:'#5B7217',
@@ -168,10 +211,7 @@ export default {
                 darkGreenColor:'#5B7217',
                 darkGreenBorder:'#F2FCE3'
             },
-            {
-                name:'初中',
-                percent:26.27,
-                value: 62,
+            L1:{
                 bg:'#EFFCEF',
                 color:'#3D9A50',
                 darkBg:'#2F6E3B',
@@ -181,10 +221,7 @@ export default {
                 darkGreenColor:'#3D9A50',
                 darkGreenBorder:'#EFFCEF'
             },
-            {
-                name:'高中必修',
-                percent:2.97,
-                value: 7,
+            L2:{
                 bg:'#E7EEFF',
                 color:'#175DFF',
                 darkBg:'#006793',
@@ -194,10 +231,7 @@ export default {
                 darkGreenColor:'#0081F1',
                 darkGreenBorder:'#E7F3FF'
             },
-            {
-                name:'高中选必',
-                percent:6.78,
-                value: 16,
+            L3:{
                 bg:'#EEF3FF',
                 color:'#3459D2',
                 darkBg:'#2C49AA',
@@ -207,10 +241,7 @@ export default {
                 darkGreenColor:'#3459D2',
                 darkGreenBorder:'#EEF3FF'
             },
-            {
-                name:'导出词',
-                percent:16.95,
-                value: 40,
+            LA:{
                 bg:'#FFECF5',
                 color:'#E03177',
                 darkBg:'#AE1955',
@@ -220,10 +251,7 @@ export default {
                 darkGreenColor:'#E03177',
                 darkGreenBorder:'#FFECF5'
             },
-            {
-                name:'超纲词',
-                percent:0.00,
-                value: 0,
+            LB:{
                 bg:'#FFE8E8',
                 color:'#CD2B31',
                 darkBg:'#8F2025',
@@ -233,10 +261,7 @@ export default {
                 darkGreenColor:'#CD2B31',
                 darkGreenBorder:'#FFE8E8'
             },
-            {
-                name:'专有',
-                percent:10.17,
-                value: 24,
+            LC:{
                 bg:'#DFE4E2',
                 color:'#4A524E',
                 border:'rgba(0, 0, 0, 0.08)',
@@ -247,10 +272,7 @@ export default {
                 darkGreenColor:'#4A524E',
                 darkGreenBorder:'rgba(0, 0, 0, 0.08)'
             },
-            {
-                name:'其他',
-                percent:6.36,
-                value: 15,
+            LD:{
                 bg:'#C1C5CD',
                 color:'#504F57',
                 darkBg:'#2F3742',
@@ -260,7 +282,7 @@ export default {
                 darkGreenColor:'#504F57',
                 darkGreenBorder:'#C1C5CD'
             }
-        ],
+        },
         articleType:this.$route.query.type?this.$route.query.type*1:1,
         articleId:this.$route.query.id?this.$route.query.id:'',
         noRead: true, // 未读
@@ -282,54 +304,56 @@ export default {
   },
   methods: {
     inityuan() {
-      var chartDom = document.getElementById("shanxing_main");
-      var myChart = echarts.init(chartDom);
-      var option;
-      let newdata = JSON.parse(JSON.stringify(this.vocabularyType));
-      newdata.forEach((item) => {
-        let percent = item.percent;
-        if (percent % 1 == 0) {
-          item.name = item.name + " " + percent + "%";
-        } else {
-          item.name = item.name + " " + percent.toFixed(2) + "%";
+        if(this.articleInfo&&this.articleInfo.art_corpus_data&&this.articleInfo.art_corpus_data.artStatInfo&&this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems){
+            var chartDom = document.getElementById("shanxing_main");
+            var myChart = echarts.init(chartDom);
+            var option;
+            let newdata = JSON.parse(JSON.stringify(this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems));
+            newdata.forEach((item) => {
+                let percent = item.vocabPercent / 100;
+                if (percent % 1 == 0) {
+                    item.name = item.vlCnName + " " + percent + "%";
+                } else {
+                    item.name = item.vlCnName + " " + percent.toFixed(2) + "%";
+                }
+            });
+            option = {
+                color:this.bgColorList[this.activeIndex].type==='white'?this.articleInfo.vl_id==='VL26'?['#90C62F','#55B467','#F04F88','#F2555A','#D7DCDA','#99A29E']:['#90C62F','#55B467','#5FD4F4','#5373E7','#F04F88','#F2555A','#D7DCDA','#99A29E']:this.bgColorList[this.activeIndex].type==='darkGreen'?this.articleInfo.vl_id==='VL26'?['#90C62F','#55B467','#5FD4F4','#5373E7','#F04F88','#F2555A','#D7DCDA','#99A29E']:['#90C62F','#55B467','#F04F88','#F2555A','#D7DCDA','#99A29E']:this.articleInfo.vl_id==='VL26'?['#5B7217','#2F6E3B','#006793','#2C49AA','#AE1955','#F2555A','#4A524E','#2F3742']:['#5B7217','#2F6E3B','#AE1955','#F2555A','#4A524E','#2F3742'],
+                series: [
+                {
+                    name: "Access From",
+                    type: "pie",
+                    radius: ["50%", "90%"],
+                    data: newdata,
+                    itemStyle: {
+                    borderColor: "rgba(255, 255, 255, 0.24)",
+                    borderWidth: 1,
+                    },
+                    top: 50,
+                    emphasis: {
+                    itemStyle: {
+                        shadowBlur: 10,
+                        shadowOffsetX: 0,
+                        shadowColor: "rgba(0, 0, 0, 0.5)",
+                    },
+                    },
+                },
+                ],
+                xAxis: {
+                show: false, //不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
+                axisTick: {
+                    show: false, //不显示坐标轴刻度线
+                },
+                axisLine: {
+                    show: false, //不显示坐标轴线
+                },
+                axisLabel: {
+                    show: false, //不显示坐标轴上的文字
+                },
+                },
+            };
+            option && myChart.setOption(option);
         }
-      });
-      option = {
-        color:this.bgColorList[this.activeIndex].type==='white'?['#90C62F','#55B467','#5FD4F4','#5373E7','#F04F88','#F2555A','#D7DCDA','#99A29E']:this.bgColorList[this.activeIndex].type==='darkGreen'?['#90C62F','#55B467','#5FD4F4','#5373E7','#F04F88','#F2555A','#D7DCDA','#99A29E']:['#5B7217','#2F6E3B','#006793','#2C49AA','#AE1955','#F2555A','#4A524E','#2F3742'],
-        series: [
-          {
-            name: "Access From",
-            type: "pie",
-            radius: ["50%", "90%"],
-            data: newdata,
-            itemStyle: {
-            borderColor: "rgba(255, 255, 255, 0.24)",
-            borderWidth: 1,
-            },
-            top: 50,
-            emphasis: {
-              itemStyle: {
-                shadowBlur: 10,
-                shadowOffsetX: 0,
-                shadowColor: "rgba(0, 0, 0, 0.5)",
-              },
-            },
-          },
-        ],
-        xAxis: {
-          show: false, //不显示坐标轴线、坐标轴刻度线和坐标轴上的文字
-          axisTick: {
-            show: false, //不显示坐标轴刻度线
-          },
-          axisLine: {
-            show: false, //不显示坐标轴线
-          },
-          axisLabel: {
-            show: false, //不显示坐标轴上的文字
-          },
-        },
-      };
-      option && myChart.setOption(option);
     },
     // 鼠标进入
     gaolangbzt(index, id) {
@@ -361,6 +385,12 @@ export default {
             this.loading = false
             if(res.status===1){
                 this_.articleInfo = res.data
+                if(this.articleInfo&&this.articleInfo.art_corpus_data&&this.articleInfo.art_corpus_data.artStatInfo&&this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems){
+                    this.articleInfo.art_corpus_data.artStatInfo.vocabVlLevelItems.forEach(item=>{
+                        item.value = item.vocabCount
+                        item = Object.assign(item, this.vocabularyType[item.vlId])
+                    })
+                }
                 setTimeout(() => {
                     this_.inityuan()
                 }, 100);

+ 61 - 6
src/views/bookShelf/components/PhraseCard.vue

@@ -1,11 +1,15 @@
 <template>
   <div class="word-card" v-loading="loading">
     <div class="word-card-top">
-        <span class="progress">1 / 10</span>
+        <span class="progress" v-if="wordList&&wordList.length>0">{{(activeObjIndex+1)+' / '+wordList.length}}</span>
+        <template v-else>
+            
+        </template>
         <div class="btn-box">
-            <svg-icon icon-class="arrow-left-line"></svg-icon>
-            <svg-icon icon-class="arrow-right-line"></svg-icon>
-            <svg-icon icon-class="like-line"></svg-icon>
+            <svg-icon icon-class="arrow-left-line" v-if="wordList&&wordList.length>0"></svg-icon>
+            <svg-icon icon-class="arrow-right-line" v-if="wordList&&wordList.length>0"></svg-icon>
+            <svg-icon icon-class="like-line" className="icon-like" v-if="!data.collect" @click="handleCollect(data)"></svg-icon>
+            <svg-icon icon-class="like" className="icon-like active" v-else @click="handleCollect(data)"></svg-icon>
             <i class="el-icon-close" @click="closeWord"></i>
         </div>
     </div>
@@ -111,7 +115,7 @@ import { getLogin } from "@/api/ajax";
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: { },
-  props: ["data"],
+  props: ["data","wordList","activeObjIndex"],
   data() {
     //这里存放数据
     return {
@@ -187,7 +191,53 @@ export default {
         .catch(() => {
             this.loading = false
         });
-    }
+    },
+    handleCollect(item){
+        if(item.collect){
+            let MethodName = "/ShopServer/Client/CollectManager/CancelCollect_Phrase";
+            let data = {
+                phrase: item.exp_title,
+            }
+            getLogin(MethodName, data)
+            .then((res) => {
+                this.loading = false
+                if(res.status===1){
+                    item.collect = false
+                    this.$message({
+                        message: "取消收藏",
+                        type: "success",
+                    });
+                    this.likePhrase.splice(this.likePhrase.indexOf(item.exp_title),1)
+                    this.$emit('changeLike','likePhraseList',this.likePhrase)
+                }
+            })
+            .catch(() => {
+            });
+        }else{
+            let MethodName = "/ShopServer/Client/CollectManager/AddCollect_Phrase";
+            let data = {
+                phrase: item.exp_title,
+                explain: item.exp_content,
+                article_id: this.$route.query.id,
+                phrase_id: item.id
+            }
+            getLogin(MethodName, data)
+            .then((res) => {
+                this.loading = false
+                if(res.status===1){
+                    item.collect = true
+                    this.$message({
+                        message: "收藏成功",
+                        type: "success",
+                    });
+                    this.likePhrase.push(item.exp_title)
+                    this.$emit('changeLike','likePhraseList',this.likePhrase)
+                }
+            })
+            .catch(() => {
+            }); 
+        }
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
@@ -251,6 +301,11 @@ export default {
                 width: 32px;
                 height: 16px;
             }
+            .icon-like{
+                &.active{
+                    color: #F2555A;  
+                }
+            }
         }
     }
     &-center{

+ 8 - 3
src/views/bookShelf/components/PhraseModel.vue

@@ -140,7 +140,7 @@
         :modal="false"
         class="login-dialog phrase-box"
         v-if="showPhraseFlag&&showObj">
-        <phrase-card :data="showObj" @closeWord="closeExplain"></phrase-card>
+        <phrase-card :data="showObj" @closeWord="closeExplain" :wordList="phraseList" :activeObjIndex="activeObjIndex"></phrase-card>
     </el-dialog>
   </div>
 </template>
@@ -150,7 +150,7 @@ import AudioLine from "@/components/common/AudioLine.vue"
 import PhraseCard from "./PhraseCard.vue"
 export default {
   name: "ArticleView",
-  props: [ "titleFontsize", "wordFontsize", "colorObj","articleType","articleInfo"],
+  props: [ "titleFontsize", "wordFontsize", "colorObj","articleType","articleInfo","likePhraseList","likeWord"],
   components: {
     AudioLine,
     PhraseCard
@@ -206,6 +206,7 @@ export default {
       annotationList: [],
       phraseList: [],
       showObj:null,
+      activeObjIndex: null,
       showWordFlag: false,
       showPhraseFlag: false,
       showExplainFlag: false,
@@ -244,9 +245,11 @@ export default {
                 })
             }
             item.exp_content = paraStr
+            item.collect = this.likeWord.indexOf(item.word_name)>-1?true:false
         })
         this.phraseList.forEach(item=>{
             item.type='phrase'
+            item.collect = this.likePhraseList.indexOf(item.exp_title)>-1?true:false
         })
         this.annotationList.forEach(item=>{
             item.type='explain'
@@ -321,9 +324,11 @@ export default {
                 })
                 this.showExplainFlag = true
             }else if(item.type==='phrase'){
-                this.phraseList.forEach(itemi=>{
+                this.phraseList.forEach((itemi,indexi)=>{
                     if(item.word_id===itemi.id){
                         this.showObj = itemi
+                        this.activeObjIndex = indexi
+                        console.log(itemi)
                     }
                 })
                 this.showPhraseFlag = true

+ 2 - 4
src/views/bookShelf/share.vue

@@ -39,10 +39,8 @@ export default {
                 this.$message.error('链接已过期')
                 return
             }
-            if(res.share_record.share_count_cur>=res.share_record.share_count_max){
-                this.$message.error('分享次数已达上限')
-                return
-            }
+            localStorage.setItem('share_person_name',res.share_record.person_name)
+            localStorage.setItem('share_person_touxiang',require('../../assets/avatar.png'))
             this.$router.replace({
                 path: "/articleShareDetail",
                 query: {

+ 2 - 2
src/views/personalCenter/components/MyShare.vue

@@ -64,12 +64,12 @@
         <el-table-column
             prop="share_time_end"
             label="到期时间"
-            width="160">
+            width="170">
         </el-table-column>
         <el-table-column
             prop="status"
             label="状态"
-            width="160">
+            width="100">
             <template slot-scope="scope">
                 <div class="status-box">
                     <span :style="{background:statusList[scope.row.share_status].bg}"></span>