|
@@ -24,10 +24,10 @@
|
|
|
<view class="scrollBg">
|
|
|
<scroll-view scroll-x="true" @scroll="scroll">
|
|
|
<view class="itemBg">
|
|
|
- <view v-for="(item,index) in bannerArr" :key="index" class="item">
|
|
|
+ <view v-for="(item,index) in bannerArr" :key="index" class="item" @click="goDetail(item)">
|
|
|
<image :src="item.logoImg" mode="" class="swpImg"></image>
|
|
|
<view class="title">{{item.title}}</view>
|
|
|
- <view class="title2" @click="goTopTab(item)">{{item.categoryName}}</view>
|
|
|
+ <view class="title2" @click.stop="goTuijianTab(item)">{{item.categoryName}}</view>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
@@ -54,7 +54,7 @@
|
|
|
</view>
|
|
|
<!-- item -->
|
|
|
<view class="itemBg">
|
|
|
- <view v-for="(item2,index2) in item.children" :key="index2" v-if="index2<2" class="twoItem" @click="goList(item)">
|
|
|
+ <view v-for="(item2,index2) in item.children" :key="index2" v-if="index2<2" class="twoItem" @click="goList(item2)">
|
|
|
<image :src="item2.logoImg" mode="" class="img2"></image>
|
|
|
<view class="title">{{item2.title}}</view>
|
|
|
|
|
@@ -69,7 +69,7 @@
|
|
|
|
|
|
|
|
|
<!-- 下拉菜单 -->
|
|
|
- <view class="sift" v-show="showSift">
|
|
|
+ <view class="sift" v-show="showSift" @click="goHide()">
|
|
|
<view class="siftItemBg">
|
|
|
<view v-for="(item,index) in siftData" :key="index" class="siftItem">
|
|
|
<view @click="goTopTab(item)">{{item.name}}</view>
|
|
@@ -100,17 +100,31 @@
|
|
|
this.getSiftData()
|
|
|
},
|
|
|
methods: {
|
|
|
+ goHide(){
|
|
|
+ this.showSift = false
|
|
|
+ },
|
|
|
+ goDetail(item){
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'detail?id=' + item.id
|
|
|
+ })
|
|
|
+ },
|
|
|
+ goTuijianTab(item){
|
|
|
+
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'topTab?topCode=' + item.categoryCode + '&comment=' + item.comment + '&topName=' + item.categoryName
|
|
|
+ })
|
|
|
+ },
|
|
|
goList(item){
|
|
|
|
|
|
// 1分类2文章
|
|
|
if (item.type == 1) {
|
|
|
uni.navigateTo({
|
|
|
- url:'list?topCode=' + item.Code + '&comment=' + item.Comment + '&topName=' + item.Name
|
|
|
+ url:'list?topCode=' + item.code + '&comment=' + item.comment + '&topName=' + item.name
|
|
|
})
|
|
|
}
|
|
|
if (item.type == 2) {
|
|
|
uni.navigateTo({
|
|
|
- url:'detail?id=' + item.ID
|
|
|
+ url:'detail?id=' + item.id
|
|
|
})
|
|
|
}
|
|
|
},
|