|
@@ -103,13 +103,24 @@
|
|
|
<el-pagination
|
|
|
background
|
|
|
:current-page="currentPage"
|
|
|
- :page-size="10"
|
|
|
- :page-sizes="[1, 10, 20, 30, 40, 50]"
|
|
|
+ :page-size="page_capacity"
|
|
|
+ :page-sizes="[10, 20, 30, 40, 50]"
|
|
|
:total="Bookinfo.number"
|
|
|
layout="total, prev, pager, next, sizes, jumper"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- @size-change="handleSizeChange"
|
|
|
- v-if="Bookinfo.number>0"
|
|
|
+ @size-change="(val)=>handleSizeChange(val,'page_capacity','currentPage')"
|
|
|
+ @current-change="(val)=>handleCurrentChange(val,'currentPage')"
|
|
|
+ v-if="Bookinfo.number>0&&Bookinfo.bookType!=='ZB'"
|
|
|
+ />
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ :current-page="currentPages"
|
|
|
+ :page-size="page_capacitys"
|
|
|
+ :page-sizes="[8, 16, 24, 32, 40]"
|
|
|
+ :total="Bookinfo.number"
|
|
|
+ layout="total, prev, pager, next, sizes, jumper"
|
|
|
+ @size-change="(val)=>handleSizeChange(val,'page_capacitys','currentPages')"
|
|
|
+ @current-change="(val)=>handleCurrentChange(val,'currentPages')"
|
|
|
+ v-else-if="Bookinfo.number>0&&Bookinfo.bookType==='ZB'"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -165,6 +176,7 @@ export default {
|
|
|
name: '',
|
|
|
number: 0,
|
|
|
numberstr: '',
|
|
|
+ bookType: null
|
|
|
},
|
|
|
nameTypeCn: this.$route.query.name?decodeURIComponent(this.$route.query.name):'画刊',
|
|
|
itemType:this.$route.query.type?this.$route.query.type:'huakan',
|
|
@@ -203,7 +215,7 @@ export default {
|
|
|
],
|
|
|
courseForm:{
|
|
|
studyValue: window.localStorage.getItem("courseFormstudyValue")?window.localStorage.getItem("courseFormstudyValue")*1:-1,
|
|
|
- categoryValue: window.localStorage.getItem("courseFormcategoryValue")?window.localStorage.getItem("courseFormcategoryValue"):'LB'
|
|
|
+ categoryValue: this.$route.query.type&&this.$route.query.type==='kecheng'?window.localStorage.getItem("courseFormcategoryValue")?window.localStorage.getItem("courseFormcategoryValue"):'LB':'LB'
|
|
|
},
|
|
|
baozhiForm:{
|
|
|
yearValue: window.localStorage.getItem("baozhiFormyearValue")?window.localStorage.getItem("baozhiFormyearValue")*1:-1,
|
|
@@ -212,6 +224,8 @@ export default {
|
|
|
},
|
|
|
currentPage: 1, // 当前页码
|
|
|
page_capacity: 10, // 每页条数
|
|
|
+ currentPages: 1,
|
|
|
+ page_capacitys: 8, // 每页条数
|
|
|
searchValue: '',
|
|
|
titleName:window.localStorage.getItem("baozhiFormstudyValueName")?window.localStorage.getItem("baozhiFormstudyValueName"):''
|
|
|
}
|
|
@@ -238,13 +252,14 @@ export default {
|
|
|
}
|
|
|
this[form][file] = value
|
|
|
this.currentPage = 1;
|
|
|
+ this.currentPages = 1
|
|
|
this.handleData()
|
|
|
},
|
|
|
handleData(){
|
|
|
let MethodName = "/ShopServer/Client/ShopHomeQuery/PageQueryCourseList"
|
|
|
let data = {
|
|
|
- page_capacity: this.page_capacity,
|
|
|
- cur_page: this.currentPage,
|
|
|
+ page_capacity: this.courseForm.categoryValue==='ZB'?this.page_capacitys:this.page_capacity,
|
|
|
+ cur_page: this.courseForm.categoryValue==='ZB'?this.currentPages:this.currentPage,
|
|
|
search_content: this.searchValue.trim(),
|
|
|
}
|
|
|
if(this.itemType==='kecheng'){
|
|
@@ -258,7 +273,8 @@ export default {
|
|
|
number: res.total_count,
|
|
|
numberstr: '共' + res.total_count + '期',
|
|
|
study: this.courseForm.studyValue,
|
|
|
- BookList: res.course_list
|
|
|
+ BookList: res.course_list,
|
|
|
+ bookType: this.courseForm.categoryValue
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -278,7 +294,8 @@ export default {
|
|
|
number: res.total_count,
|
|
|
numberstr: '共' + res.total_count + '期',
|
|
|
study: this.baozhiForm.studyValue,
|
|
|
- BookList: res.issue_list
|
|
|
+ BookList: res.issue_list,
|
|
|
+ bookType: 'baozhi'
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -287,19 +304,18 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- // 切换每页条数
|
|
|
- handleSizeChange(val) {
|
|
|
- this.currentPage = 1;
|
|
|
- this.page_capacity = val;
|
|
|
- this.handleData()
|
|
|
+ handleSizeChange(val,type,page) {
|
|
|
+ this[type] = val
|
|
|
+ this[page] = 1;
|
|
|
+ this.handleData()
|
|
|
},
|
|
|
- // 切换页码
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.currentPage = val;
|
|
|
- this.handleData()
|
|
|
+ handleCurrentChange(val,type) {
|
|
|
+ this[type] = val
|
|
|
+ this.handleData()
|
|
|
},
|
|
|
changeStudy(form,value){
|
|
|
this.currentPage = 1;
|
|
|
+ this.currentPages = 1
|
|
|
this[form].studyValue = value
|
|
|
this.handleData()
|
|
|
},
|