|
@@ -13,8 +13,38 @@
|
|
|
<span class="tuijTitle">推荐文章</span>
|
|
|
</view>
|
|
|
<swiper class="swiper" :autoplay="false" :circular="true" :current="swpIndex">
|
|
|
- <swiper-item v-for="(item,index) in recommendList" v-if="(index+1)%2!=0">
|
|
|
- <view class="swpCont">
|
|
|
+ <swiper-item v-for="(item,index) in recommendList" v-if="(index+1)%4!=0">
|
|
|
+ <view class="mainwzbox" >
|
|
|
+ <view class="mainwzline" @click="goDetailswp(recommendList[index])" >
|
|
|
+ <view class="mainwzImgBox">
|
|
|
+ <img :src="item.logoImg" alt="" class="mainwzImg">
|
|
|
+ </view>
|
|
|
+ <view class="wztitle">{{item.name}}</view>
|
|
|
+ <view class="wztime"></view>
|
|
|
+ </view>
|
|
|
+ <view class="mainwzline" v-if="recommendList[index+1]" @click="goDetail3(recommendList[index+1])" >
|
|
|
+ <view class="mainwzImgBox">
|
|
|
+ <img :src="recommendList[index+1].logoImg" alt="" class="mainwzImg">
|
|
|
+ </view>
|
|
|
+ <view class="wztitle">{{recommendList[index+1].name}}</view>
|
|
|
+ <view class="wztime"></view>
|
|
|
+ </view>
|
|
|
+ <view class="mainwzline" v-if="recommendList[index+2]" @click="goDetail3(recommendList[index+2])" >
|
|
|
+ <view class="mainwzImgBox">
|
|
|
+ <img :src="recommendList[index+2].logoImg" alt="" class="mainwzImg">
|
|
|
+ </view>
|
|
|
+ <view class="wztitle">{{recommendList[index+2].name}}</view>
|
|
|
+ <view class="wztime"></view>
|
|
|
+ </view>
|
|
|
+ <view class="mainwzline mainwzlineR" v-if="recommendList[index+3]" @click="goDetail3(recommendList[index+3])" >
|
|
|
+ <view class="mainwzImgBox">
|
|
|
+ <img :src="recommendList[index+3].logoImg" alt="" class="mainwzImg">
|
|
|
+ </view>
|
|
|
+ <view class="wztitle">{{recommendList[index+3].name}}</view>
|
|
|
+ <view class="wztime"></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- <view class="swpCont">
|
|
|
<view class="swiper-item" @click="goDetail(item)">
|
|
|
<view class="swpimgBox swpBr">
|
|
|
<image :src="item.logoImg" mode="" class="swpimg"></image>
|
|
@@ -34,7 +64,7 @@
|
|
|
<view class="categoryName">{{recommendList[index+1].categoryName.substring(0,5)}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
|
|
|
</swiper-item>
|
|
|
|
|
@@ -128,8 +158,6 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
-
|
|
|
- <!-- -->
|
|
|
<view class="pageView" v-show="TotalSize">
|
|
|
<page-pagination :pageSize="pageSize" :size="'small'" :total="TotalSize" :numAround="true" @change="pageChange"></page-pagination>
|
|
|
</view>
|
|
@@ -233,6 +261,7 @@
|
|
|
this.comment=item.comment;
|
|
|
this.topCode=item.code;
|
|
|
this.parentCode=item.code;
|
|
|
+ //this.parentCode='';
|
|
|
this.getcategoryPageData();
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: this.topName
|
|
@@ -359,6 +388,22 @@
|
|
|
this.newsearchShow=false;
|
|
|
this.newgroupingdata=newgroupingdata
|
|
|
},
|
|
|
+ goDetailswp(item){
|
|
|
+
|
|
|
+ this.indexShow=false;
|
|
|
+ this.listShow=false;
|
|
|
+ this.newDetailShow=true;
|
|
|
+ this.newgroupingListShow=false;
|
|
|
+ this.newsearchShow=false;
|
|
|
+ this.newDetailID=item.id;
|
|
|
+ var item={
|
|
|
+ categoryName:item.categoryName,
|
|
|
+ twoName:'',
|
|
|
+ comment:item.comment,
|
|
|
+ code:item.code
|
|
|
+ }
|
|
|
+ this.newDetailItem=item;
|
|
|
+ },
|
|
|
gotoTop(){
|
|
|
uni.pageScrollTo({
|
|
|
scrollTop: 0, duration: 300
|
|
@@ -367,7 +412,7 @@
|
|
|
|
|
|
swpBtnRight(){
|
|
|
var length=this.recommendList.length;
|
|
|
- var num=Math.ceil(length/2)-1
|
|
|
+ var num=Math.ceil(length/4)-1
|
|
|
console.log(num+'---'+this.swpIndex)
|
|
|
if(this.swpIndex<num){
|
|
|
this.swpIndex++
|
|
@@ -401,7 +446,6 @@
|
|
|
}) */
|
|
|
},
|
|
|
|
|
|
-
|
|
|
gotoTop(){
|
|
|
uni.pageScrollTo({
|
|
|
scrollTop: 0, duration: 300
|
|
@@ -409,7 +453,7 @@
|
|
|
},
|
|
|
tabBtn(index,item){
|
|
|
this.tabIndex=index;
|
|
|
- //console.log(item)
|
|
|
+ console.log(item)
|
|
|
this.parentCode=item.code;
|
|
|
this.getcategoryPageData()
|
|
|
},
|
|
@@ -420,27 +464,47 @@
|
|
|
|
|
|
},
|
|
|
getcategoryPageData(){
|
|
|
- var params={
|
|
|
- parentCode:this.parentCode,
|
|
|
- topCode:this.topCode,
|
|
|
- limit:this.pageSize,
|
|
|
- page:this.page,
|
|
|
+ console.log(this.parentCode)
|
|
|
+ if(this.parentCode){
|
|
|
+ var params={
|
|
|
+ parentCode:this.parentCode,
|
|
|
+ topCode:this.topCode,
|
|
|
+ limit:this.pageSize,
|
|
|
+ page:this.page,
|
|
|
+ }
|
|
|
+ var url='trainingOpenApi/categoryPageDataNew'
|
|
|
+ this.$http(url, params, 'GET').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ this.list=res.data.Items;
|
|
|
+ this.TotalSize=res.data.TotalSize;
|
|
|
+ var arr=[
|
|
|
+ {
|
|
|
+ 'name':'全部','code':'',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ this.dynamicCol=arr.concat(res.data.dynamicCol);
|
|
|
+
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ var params = {
|
|
|
+ page: this.page,
|
|
|
+ limit: 10,
|
|
|
+ parentCode: this.topCode,
|
|
|
+ }
|
|
|
+ var url='trainingOpenApi/groupPageData'
|
|
|
+ this.$http(url, params, 'GET').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ this.list=res.data.Items;
|
|
|
+ this.TotalSize=res.data.TotalSize;
|
|
|
+
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
|
})
|
|
|
- this.$http('/trainingOpenApi/categoryPageData', params, 'GET').then(res => {
|
|
|
- uni.hideLoading();
|
|
|
- this.list=res.data.Items;
|
|
|
- this.TotalSize=res.data.TotalSize;
|
|
|
- var arr=[
|
|
|
- {
|
|
|
- 'name':'全部','code':'',
|
|
|
- }
|
|
|
- ]
|
|
|
- this.dynamicCol=arr.concat(res.data.dynamicCol);
|
|
|
-
|
|
|
- })
|
|
|
+ //trainingOpenApi/categoryPageData
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -452,6 +516,7 @@
|
|
|
background: #F4F5F7;
|
|
|
min-height: 100vh;
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
+ min-width: 1200px;
|
|
|
}
|
|
|
.swiperBox{
|
|
|
/* height: 280px; */
|
|
@@ -533,7 +598,7 @@
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.swiper{
|
|
|
- height: 190px;
|
|
|
+ height: 290px;
|
|
|
}
|
|
|
.swpTitleBox{
|
|
|
padding-left: 304px;
|