natasha vor 1 Jahr
Ursprung
Commit
0c28eedf54

+ 3 - 2
src/components/common/BookCard.vue

@@ -40,7 +40,7 @@ export default {
   name: "BookCard",
   //import引入的组件需要注入到对象中才能使用
   components: {},
-  props: ["item", "height","type","LoginNavIndex","userBg","headerBorder","headerBg","previousPage"],
+  props: ["item", "height","type","LoginNavIndex","userBg","headerBorder","headerBg","previousPage","cardType"],
   filters:{
     cutMoneyFiter
   },
@@ -103,7 +103,8 @@ export default {
         this.$router.push({
             path: "/bookItem",
             query: {
-                headerConfig: encodeURIComponent(url)
+                headerConfig: encodeURIComponent(url),
+                cardType:this.cardType
             },
         });
     }

+ 1 - 0
src/components/common/BookListModule.vue

@@ -37,6 +37,7 @@
             :userBg="userBg"
             :LoginNavIndex="LoginNavIndex"
             :previousPage="previousPage"
+            :cardType="name"
           />
         </div>
       </div>

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

@@ -20,7 +20,7 @@
         <div class="artricle-inner" :style="{background:bgColorList[activeIndex].contentInnerBg}">
             <!-- 文章 -->
             <div class="atricle-data">
-                <normal-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :style="{'padding':'0 40px'}"></normal-model>
+                <normal-model :titleFontsize="wordFontsize+30" :wordFontsize="wordFontsize" :colorObj="bgColorList[activeIndex]" :articleType="articleType" :style="{'padding':'0 40px'}"></normal-model>
                 <div class="article-btn">
                     <el-button type="text" class="btn-left" @click="handlePage('-')"><svg-icon icon-class="arrow-left-line"></svg-icon>上一页</el-button>
                     <el-button class="explain-video"><svg-icon icon-class="check-double-line"></svg-icon>已读</el-button>
@@ -476,6 +476,7 @@ export default {
                 darkGreenBorder:'#C1C5CD'
             }
         ],
+        articleType:this.$route.query.type?this.$route.query.type*1:1
     }
   },
   methods: {

+ 71 - 8
src/views/bookShelf/bookItem.vue

@@ -102,18 +102,19 @@
             <!-- <el-tab-pane :label="bookType==='course'?'课程简介':'简介'">
                 
             </el-tab-pane> -->
-            <el-tab-pane label="目录" v-if="bookType==='news'">
+            <el-tab-pane label="目录" v-if="bookType==='baozhi'">
                 <tree-list 
                     :data="data.treeList" 
                     :isBuy="data.isBuy"
                     :headerBg="headerBg"
                     :headerBorder="headerBorder"
                     :userBg="userBg"
-                    :LoginNavIndex="LoginNavIndex">
+                    :LoginNavIndex="LoginNavIndex"
+                    :cardType="cardType">
                 </tree-list>
             </el-tab-pane>
-            <el-tab-pane label="合刊" v-if="bookType==='joint'">
-                <div class="list">
+            <el-tab-pane label="目录" v-if="bookType==='huakan'">
+                <!-- <div class="list">
                     <div
                         v-for="(item,index) in guessList"
                         :key="index+'todayNew'"
@@ -130,16 +131,26 @@
                             :previousPage="previousPage"
                         />
                     </div>
-                </div>
+                </div> -->
+                <tree-list 
+                    :data="data.treeLists" 
+                    :isBuy="data.isBuy"
+                    :headerBg="headerBg"
+                    :headerBorder="headerBorder"
+                    :userBg="userBg"
+                    :LoginNavIndex="LoginNavIndex"
+                    :cardType="cardType">
+                </tree-list>
             </el-tab-pane>
-            <el-tab-pane label="课节" v-if="bookType==='course'">
+            <el-tab-pane label="课节" v-if="bookType==='kecheng'">
                 <course-list 
                     :data="data.courseList" 
                     :isBuy="data.isBuy" 
                     :headerBg="headerBg"
                     :headerBorder="headerBorder"
                     :userBg="userBg"
-                    :LoginNavIndex="LoginNavIndex">
+                    :LoginNavIndex="LoginNavIndex"
+                    :cardType="cardType">
                 </course-list>
             </el-tab-pane>
         </el-tabs>
@@ -210,6 +221,16 @@ export default {
             isBuy: true,
             treeList: [
                 {
+                    number: '1',
+                    title: 'FRONTPAGE',
+                    children:[
+                        {
+                            number:'1.1',
+                            title:'Meeting Foreigners at an Airport'
+                        }
+                    ]
+                },
+                {
                     number: '2',
                     title: 'OUR WORLD',
                     children:[
@@ -268,6 +289,48 @@ export default {
                     ]
                 }
             ],
+            treeLists: [
+                {
+                    number: '1',
+                    title: 'Nature',
+                    children:[
+                        {
+                            number:'1.1',
+                            title:'‘King’ of the desert'
+                        }
+                    ]
+                },
+                {
+                    number: '2',
+                    title: 'My works',
+                    children:[
+                        {
+                            number:'2.1',
+                            title:'I love summer'
+                        }
+                    ]
+                },
+                {
+                    number: '3',
+                    title: 'Front page',
+                    children: [
+                        {
+                            number: '3.1',
+                            title:'2023年3月画刊完整音频'
+                        }
+                    ]
+                },
+                {
+                    number: '4',
+                    title: 'Art zone',
+                    children: [
+                        {
+                            number: '4.1',
+                            title:'Art zone'
+                        }
+                    ]
+                }
+            ],
             courseList:[
                 {
                     number:'1',
@@ -353,7 +416,7 @@ export default {
       tagColor:['#006DAA','#AA8500','#7849C4'], // 标签字体颜色
       paymentShow: false, // 支付弹窗
       payWay:'dui',
-      bookType: 'news', // 书籍类型
+      bookType: this.$route.query.cardType?this.$route.query.cardType:'baozhi', // 书籍类型
       bannerFlag: true // 是否展示广告
     }
   },

+ 17 - 10
src/views/bookShelf/components/NormalModel.vue

@@ -1,12 +1,12 @@
 <!--  -->
 <template>
   <div class="NNPE-ArticleView" v-if="curQue">
-    <!-- <template v-if="resArr[0]&&resArr[0].isTitle">
-        <h2><span v-for="(itemR,indexR) in resArr[0].wordsList" :key="indexR" :style="{color:colorObj.titleColor,fontSize:(wordFontsize+30)+'px',lineHeight:(wordFontsize+38)+'px',marginRight:'8px',fontWeight:'700'}">{{itemR.en.word_bt}}</span></h2>
-    </template> -->
-    <h2><span :style="{color:colorObj.titleColor,fontSize:(wordFontsize+30)+'px',lineHeight:(wordFontsize+38)+'px',marginRight:'8px',fontWeight:'700'}">Out in the fields</span></h2>
-    <h6 class="nnpe-article-author" :style="{color:colorObj.sourceColor,fontSize:(wordFontsize-4)+'px',lineHeight:(wordFontsize+4)+'px',fontWeight:'400'}" v-html="articleAuthor"></h6>
-    <div class="audio-box">
+    <template v-if="articleType===1">
+        <template v-if="resArr[0]&&resArr[0].isTitle">
+            <h2><span v-for="(itemR,indexR) in resArr[0].wordsList" :key="indexR" :style="{color:colorObj.titleColor,fontSize:(wordFontsize+30)+'px',lineHeight:(wordFontsize+38)+'px',marginRight:'8px',fontWeight:'700'}">{{itemR.en.word_bt}}</span></h2>
+        </template>
+        <h6 class="nnpe-article-author" :style="{color:colorObj.sourceColor,fontSize:(wordFontsize-4)+'px',lineHeight:(wordFontsize+4)+'px',fontWeight:'400'}" v-html="articleAuthor"></h6>
+        <div class="audio-box">
         <div
             class="aduioLine-content aduioLine-box"
             v-if="
@@ -311,9 +311,16 @@
         </div>
       </div>
     </template>
-    <div v-for="(item,index) in newData" :key="index" class="NNPE-detail" :style="{padding:' 6px 0 12px 0'}">
-        <span class="NNPE-chs" :style="{fontSize: wordFontsize + 'px',color: colorObj.contentColor,wordSpacing:'2px',lineHeight:wordFontsize+8+'px'}">{{item}}</span>
-    </div>
+    </template>
+    <template v-else>
+        <h2><span :style="{color:colorObj.titleColor,fontSize:(wordFontsize+30)+'px',lineHeight:(wordFontsize+38)+'px',marginRight:'8px',fontWeight:'700'}">Out in the fields</span></h2>
+        <h6 class="nnpe-article-author" :style="{color:colorObj.sourceColor,fontSize:(wordFontsize-4)+'px',lineHeight:(wordFontsize+4)+'px',fontWeight:'400'}" v-html="articleAuthor"></h6>
+        
+        <div v-for="(item,index) in newData" :key="index" class="NNPE-detail" :style="{padding:' 6px 0 12px 0'}">
+            <span class="NNPE-chs" :style="{fontSize: wordFontsize + 'px',color: colorObj.contentColor,wordSpacing:'2px',lineHeight:wordFontsize+8+'px'}">{{item}}</span>
+        </div>
+    </template>
+    
     <img src="../../../assets/article-img.png" style="max-width:100%;margin:24px 0;" />
   </div>
 </template>
@@ -323,7 +330,7 @@ import AudioLine from "@/components/common/AudioLine.vue"
 import MagazineVideo from "./MagazineVideo.vue"
 export default {
   name: "ArticleView",
-  props: [ "titleFontsize", "wordFontsize", "colorObj"],
+  props: [ "titleFontsize", "wordFontsize", "colorObj","articleType"],
   components: {
     AudioLine,
     MagazineVideo

+ 33 - 18
src/views/bookShelf/components/TreeList.vue

@@ -3,7 +3,7 @@
     <li v-for="(item,index) in data" :key="index">
         <p class="parent-node"><span class="number">{{item.number}}</span><b class="title">{{item.title}}</b></p>
         <ul v-if="item.children&&item.children.length>0">
-            <li :class="[isBuy||index===0?'children-buy':'children-no','children']" v-for="(items,indexs) in item.children" :key="indexs" @click="handleLink(items,isBuy||index===0,indexs)">
+            <li :class="[isBuy||index===0?'children-buy':'children-no','children']" v-for="(items,indexs) in item.children" :key="indexs" @click="handleLink(items,isBuy||index===0,index)">
                 <p class="children-node"><span class="number">{{items.number}}</span><b class="title">{{items.title}}</b><i class="el-icon-lock" v-if="!(isBuy||index===0)"></i></p>
             </li>
         </ul>
@@ -18,7 +18,7 @@
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: { },
-  props: ["data", "isBuy","LoginNavIndex","userBg","headerBorder","headerBg"],
+  props: ["data", "isBuy","LoginNavIndex","userBg","headerBorder","headerBg","cardType"],
   data() {
     //这里存放数据
     return {
@@ -36,29 +36,44 @@ export default {
     // 跳转
     handleLink(item,flag,index){
         let url  = this.LoginNavIndex +'&&&'+ this.userBg +'&&&'+ this.headerBorder +'&&&'+ this.headerBg
-        if(index===0){
+        if(this.cardType==='baozhi'){
             this.$router.push({
                 path: "/articleDetail",
-            });
-        }else if(index===1){
-            this.$router.push({
-                path: "/magazineDetail",
-            });
-        }else if(index===2){
-            this.$router.push({
-                path: "/videoDetail",
                 query: {
-                    headerConfig: encodeURIComponent(url)
-                },
+                        type:index+1
+                    },
+                
             });
-        }else if(index===3){
+        }else{
             this.$router.push({
-                path: "/courseDetail",
-                query: {
-                    headerConfig: encodeURIComponent(url)
-                },
+                path: "/magazineDetail",
             });
         }
+        
+        // if(index===0){
+        //     this.$router.push({
+        //         path: "/articleDetail",
+        //         type:index
+        //     });
+        // }else if(index===1){
+        //     this.$router.push({
+        //         path: "/magazineDetail",
+        //     });
+        // }else if(index===2){
+        //     this.$router.push({
+        //         path: "/videoDetail",
+        //         query: {
+        //             headerConfig: encodeURIComponent(url)
+        //         },
+        //     });
+        // }else if(index===3){
+        //     this.$router.push({
+        //         path: "/courseDetail",
+        //         query: {
+        //             headerConfig: encodeURIComponent(url)
+        //         },
+        //     });
+        // }
         // if(flag){
         //     let url  = this.LoginNavIndex +'&&&'+ this.userBg +'&&&'+ this.headerBorder +'&&&'+ this.headerBg
         //     this.$router.push({

+ 2 - 2
src/views/bookStore/index.vue

@@ -45,7 +45,7 @@
         :LoginNavIndex="0"
         :previousPage="'报纸'"
       />
-      <BookListModule
+      <!-- <BookListModule
         name="xiti"
         :list="BookList"
         :headerBg="'#1F1F1F'"
@@ -53,7 +53,7 @@
         :userBg="'rgba(0, 0, 0, 0.24)'"
         :LoginNavIndex="0"
         :previousPage="'练习册'"
-      />
+      /> -->
       <BookListModule
         name="kecheng"
         :list="BookList"