新增新闻分类

This commit is contained in:
wenc000 2020-07-15 14:07:26 +08:00
parent 6d7a054d66
commit 42ba6dd036
5 changed files with 22 additions and 4 deletions

BIN
images/tab6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
images/tab7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -122,9 +122,9 @@ Page({
url: '../newsDetail/newsDetail?templateRecordUrl='+ event.currentTarget.dataset.templateRecordUrl,
})
},
goNewsList: function() {
goNewsList: function(event) {
wx.navigateTo({
url: '../newsList/newsList',
url: '../newsList/newsList?type='+ event.currentTarget.dataset.type,
})
},
goVolunteer: function () {

View File

@ -6,13 +6,21 @@
</swiper>
</view>
<view class="tab">
<view class="tab-box" bindtap="goNewsList" data-type="2">
<image src="../../images/tab6.png"></image>
<view class="tab-title">展览展示</view>
</view>
<view class="tab-box" bindtap="goNewsList" data-type="1">
<image src="../../images/tab7.png"></image>
<view class="tab-title">文化动态</view>
</view>
<view class="tab-box" bindtap="goVolunteer">
<image src="../../images/tab1.png"></image>
<view class="tab-title">志愿者服务</view>
</view>
<view class="tab-box" bindtap="goActivity">
<image src="../../images/tab2.png"></image>
<view class="tab-title">精品活动</view>
<view class="tab-title">精活动</view>
</view>
<view class="tab-box" bindtap="goVenue">
<image src="../../images/tab3.png"></image>
@ -46,7 +54,7 @@
</view>
<view class="news">
<view class="public-title">
<view class="title-text" bindtap="goNewsList">
<view class="title-text">
<image src="../../images/selected-l.png" class="selected-l"></image>
文化动态
<image src="../../images/selected-r.png" class="selected-r"></image>

View File

@ -84,6 +84,16 @@ Page({
*/
onLoad: function (options) {
var self = this;
console.log(options);
if(options.type == 1) {
self.setData({
directoriesParentId: 'f497904b-7727-4832-891c-604c36ae4167'
});
} else {
self.setData({
directoriesParentId: 'f1d5d313-f728-4dda-9843-1116d97e17b0'
});
}
self.doGetNewsDictionariesList();
},