natasha vor 1 Jahr
Ursprung
Commit
33fe13d856
2 geänderte Dateien mit 101 neuen und 19 gelöschten Zeilen
  1. 68 2
      src/views/bookStore/all.vue
  2. 33 17
      src/views/bookStore/index.vue

+ 68 - 2
src/views/bookStore/all.vue

@@ -81,6 +81,35 @@
                     </ul>
                 </div>
             </template>
+            <template v-else-if="itemType==='huakan'">
+                <div class="filt-item">
+                    <label>年份</label>
+                    <ul>
+                        <li :class="[itemy.value===huakanForm.yearValue?'active':'']" v-for="(itemy,indexy) in yearList" :key="indexy" @click="handleClick('huakanForm','yearValue',itemy.value)">
+                            <i v-if="itemy.value===huakanForm.yearValue" class="el-icon-success"></i>
+                            {{itemy.label}}
+                        </li>
+                    </ul>
+                </div>
+                <!-- <div class="filt-item">
+                    <label>学段</label>
+                    <ul>
+                        <li :class="[items.study_phase===huakanForm.studyValue?'active':'']" v-for="(items,indexs) in baozhiStudyList" :key="indexs" @click="handleClick('huakanForm','studyValue',items.study_phase,items.study_phase_name)">
+                            <i v-if="items.study_phase===huakanForm.studyValue" class="el-icon-success"></i>
+                            {{items.study_phase_name}}
+                        </li>
+                    </ul>
+                </div> -->
+                <div class="filt-item">
+                    <label>类型</label>
+                    <ul>
+                        <li :class="[itemt.value===huakanForm.typeValue?'active':'']" v-for="(itemt,indext) in typeList" :key="indext" @click="handleClick('huakanForm','typeValue',itemt.value)">
+                            <i v-if="itemt.value===huakanForm.typeValue" class="el-icon-success"></i>
+                            {{itemt.label}}
+                        </li>
+                    </ul>
+                </div>
+            </template>
             <template v-if="itemType==='jingdu'">
                 <div class="filt-item">
                     <label>主题</label>
@@ -241,6 +270,11 @@ export default {
         studyValue: window.localStorage.getItem("baozhiFormstudyValue")?window.localStorage.getItem("baozhiFormstudyValue")*1:-1,
         typeValue: window.localStorage.getItem("baozhiFormtypeValue")?window.localStorage.getItem("baozhiFormtypeValue")*1:0,
       },
+      huakanForm:{
+        yearValue: window.localStorage.getItem("huakanFormyearValue")?window.localStorage.getItem("huakanFormyearValue")*1:-1,
+        studyValue: -1,
+        typeValue: window.localStorage.getItem("huakanFormtypeValue")?window.localStorage.getItem("huakanFormtypeValue")*1:0,
+      },
       jingduForm:{
         studyValue: this.$route.query.from?this.$route.query.from*1:window.localStorage.getItem("jingduFormstudyValue")?window.localStorage.getItem("jingduFormstudyValue")*1:11,
         categoryValue: window.localStorage.getItem("jingduFormcategoryValue")?window.localStorage.getItem("jingduFormcategoryValue"):''
@@ -250,7 +284,7 @@ export default {
       currentPages: 1,
       page_capacitys: 8, // 每页条数
       searchValue: '',
-      titleName:this.itemType==='jingdu'?window.localStorage.getItem("jingduFormstudyValueName")?window.localStorage.getItem("jingduFormstudyValueName"):this.itemType==='baozhi'?window.localStorage.getItem("baozhiFormstudyValueName")?window.localStorage.getItem("baozhiFormstudyValueName"):'':'':'',
+      titleName:this.itemType==='jingdu'?window.localStorage.getItem("jingduFormstudyValueName")?window.localStorage.getItem("jingduFormstudyValueName"):this.itemType==='baozhi'?window.localStorage.getItem("baozhiFormstudyValueName"):this.itemType==='huakan'?window.localStorage.getItem("huakanFormstudyValueName")?window.localStorage.getItem("baozhiFormstudyValueName"):'':'':'',
       themeList:[],
       jingduStudyList: [
         {
@@ -337,6 +371,7 @@ export default {
             data.study_phase = this.baozhiForm.studyValue
             data.comb_flag = this.baozhiForm.typeValue==1?null:this.baozhiForm.typeValue
             data.album_flag = this.baozhiForm.typeValue==0?null:this.baozhiForm.typeValue
+            data.goods_type = 2
             getLogin(MethodName, data)
             .then((res) => {
                 if(res.status===1){
@@ -356,6 +391,32 @@ export default {
             .catch(() => {
                 
             }); 
+        }else if(this.itemType==='huakan'){
+            MethodName = "/ShopServer/Client/ShopHomeQuery/PageQueryIssueList"
+            data.year_label = this.huakanForm.yearValue
+            data.study_phase = -1
+            data.comb_flag = this.huakanForm.typeValue==1?null:this.huakanForm.typeValue
+            data.album_flag = this.huakanForm.typeValue==0?null:this.huakanForm.typeValue
+            data.goods_type = 4
+            getLogin(MethodName, data)
+            .then((res) => {
+                if(res.status===1){
+                    res.issue_list.forEach(item => {
+                        item.course_type="huakan"
+                    });
+                    this.Bookinfo = {
+                        name: '',
+                        number: res.total_count,
+                        numberstr: '共' + res.total_count + '期',
+                        study: this.huakanForm.studyValue,
+                        BookList: res.issue_list,
+                        bookType: 'huakan'
+                    }
+                }
+            })
+            .catch(() => {
+                
+            }); 
         }else if(this.itemType==='jingdu'){
             if(this.$route.query.form){
                 MethodName = "/ShopServer/Client/BookshelfQuery/PageQueryMyIreadArticleList_UsePeriod"
@@ -431,8 +492,11 @@ export default {
                 this.studyList = studyList.concat(res.study_phase_list)
                 this.baozhiStudyList = res.study_phase_list
                 this.baozhiForm.studyValue = window.localStorage.getItem("baozhiFormstudyValue")?window.localStorage.getItem("baozhiFormstudyValue")*1:res.study_phase_list[0]?res.study_phase_list[0].study_phase:-1
+                this.huakanForm.studyValue = window.localStorage.getItem("huakanFormstudyValue")?window.localStorage.getItem("huakanFormstudyValue")*1:res.study_phase_list[0]?res.study_phase_list[0].study_phase:-1
                 if(this.itemType==='baozhi'){
                     this.titleName = window.localStorage.getItem("baozhiFormstudyValueName")?window.localStorage.getItem("baozhiFormstudyValueName"):res.study_phase_list[0]?res.study_phase_list[0].study_phase_name:''
+                }else if(this.itemType==='huakan'){
+                    this.titleName = window.localStorage.getItem("huakanFormstudyValueName")?window.localStorage.getItem("huakanFormstudyValueName"):res.study_phase_list[0]?res.study_phase_list[0].study_phase_name:''
                 }else if(this.itemType==='jingdu'){
                     this.titleName = window.localStorage.getItem("jingduFormstudyValueName")?window.localStorage.getItem("jingduFormstudyValueName"):res.study_phase_list[0]?res.study_phase_list[0].study_phase_name:''
                 }else if(this.itemType==='kecheng'){
@@ -455,7 +519,9 @@ export default {
         ]
         let yearList = []
         let MethodName = "/ShopServer/Client/ShopHomeQuery/GetIssueYearLabelList"
-        getLogin(MethodName, {})
+        getLogin(MethodName, {
+            goods_type: this.itemType==='baozhi'?2:4
+        })
         .then((res) => {
             if(res.status===1){
                 res.year_label_list.forEach(nowYear => {

+ 33 - 17
src/views/bookStore/index.vue

@@ -157,28 +157,22 @@ export default {
       ], // 精读列表
       HuakanList:[
         {
-            cover_image_url: require('../../assets/huakan-1.png'),
-            name: '第101期',
-            shelve_date: '2023-09-15',
-            price: '10'
+            skeleton: true
+        },
+        {
+            skeleton: true
+        },
+        {
+            skeleton: true
         },
         {
-            cover_image_url: require('../../assets/huakan-2.png'),
-            name: '第100期',
-            shelve_date: '2023-07-15',
-            price: '10'
+            skeleton: true
         },
         {
-            cover_image_url: require('../../assets/huakan-3.png'),
-            name: '第99期',
-            shelve_date: '2023-06-15',
-            price: '10'
+            skeleton: true
         },
         {
-            cover_image_url: require('../../assets/huakan-4.png'),
-            name: '第98期',
-            shelve_date: '2023-05-15',
-            price: '10'
+            skeleton: true
         }
       ],
       bannerFlag: true // 是否展示广告
@@ -213,7 +207,8 @@ export default {
     getIssueList(){
         let MethodName = "/ShopServer/Client/ShopHomeQuery/QueryIssueList";
         let data = {
-            top_n: 4
+            top_n: 4,
+            goods_type: 2
         }
         getLogin(MethodName, data)
         .then((res) => {
@@ -228,6 +223,26 @@ export default {
             
         }); 
     },
+    // 画刊列表
+    getHuakanList(){
+        let MethodName = "/ShopServer/Client/ShopHomeQuery/QueryIssueList";
+        let data = {
+            top_n: 4,
+            goods_type: 4
+        }
+        getLogin(MethodName, data)
+        .then((res) => {
+            if(res.status===1){
+                res.issue_list.forEach(item => {
+                    item.course_type="huakan"
+                });
+                this.HuakanList = res.issue_list
+            }
+        })
+        .catch(() => {
+            
+        }); 
+    },
     // 精读列表
     getPeruseList(){
         let MethodName = "/ShopServer/Client/ShopHomeQuery/QueryIreadArticleList";
@@ -252,6 +267,7 @@ export default {
   created() {
     this.getLBCourseList()
     this.getIssueList()
+    this.getHuakanList()
     this.getPeruseList()
   },
   //生命周期 - 挂载完成(可以访问DOM元素)