调整文化动态
This commit is contained in:
parent
225a119a2c
commit
c03cc669b5
2
app.json
2
app.json
@ -34,7 +34,7 @@
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#9F1512",
|
||||
"navigationBarTitleText": "日喀则数字文化馆",
|
||||
"navigationBarTitleText": "日喀则市数字文化云",
|
||||
"navigationBarTextStyle": "white"
|
||||
},
|
||||
"tabBar": {
|
||||
|
@ -7,12 +7,9 @@ Page({
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
token: '',
|
||||
library: {
|
||||
libraryUrl: app.libraryUrl,
|
||||
bannerLibrary: [],
|
||||
},
|
||||
news: {
|
||||
newsUrl: app.newsUrl,
|
||||
bannerList: [],
|
||||
newsList: []
|
||||
},
|
||||
venue: {
|
||||
@ -53,16 +50,17 @@ Page({
|
||||
}
|
||||
})
|
||||
},
|
||||
doGetLibrary: function() {
|
||||
doGetBanner: function() {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibrary/listpageintangiblelibraryrelease', [self.data.library.libraryUrl]), {
|
||||
app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease', [self.data.news.newsUrl]), {
|
||||
newsDirectoriesId: 'eab0ca3c-d35d-4c02-9397-ace2bdd10fc1',
|
||||
page: 1,
|
||||
rows: 5
|
||||
}, null, function(code, data) {
|
||||
self.setData({
|
||||
'library.bannerLibrary': data.rows
|
||||
});
|
||||
}, function(code, data){
|
||||
'news.bannerList': data.rows
|
||||
})
|
||||
}, function(code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
});
|
||||
},
|
||||
@ -95,6 +93,7 @@ Page({
|
||||
doGetNewsList: function() {
|
||||
var self = this;
|
||||
app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease', [self.data.news.newsUrl]), {
|
||||
newsDirectoriesParentId: 'f497904b-7727-4832-891c-604c36ae4167',
|
||||
page: 1,
|
||||
rows: 5
|
||||
}, null, function(code, data) {
|
||||
@ -169,7 +168,7 @@ Page({
|
||||
onLoad: function (options) {
|
||||
var self = this;
|
||||
self.doLogin();
|
||||
self.doGetLibrary();
|
||||
self.doGetBanner();
|
||||
self.doGetNewsList();
|
||||
self.doGetLiveList();
|
||||
self.doGetVenueList();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<view class="swiper-box">
|
||||
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" >
|
||||
<swiper-item class="swiper-item" wx:for="{{library.bannerLibrary}}" bindtap="goCultureDetail" data-library-id="{{item.intangibleLibraryId}}" wx:for-index="idx" wx:for-item="item" wx:key="bannerLibrary">
|
||||
<image src="{{library.libraryUrl}}/route/file/downloadfile/true/{{item.cover}}" class="swiper-img"></image>
|
||||
<swiper-item class="swiper-item" wx:for="{{news.bannerList}}" bindtap="goNewsDetail" data-template-record-url="{{item.templateRecordUrl}}" wx:for-index="idx" wx:for-item="item" wx:key="bannerList">
|
||||
<image src="{{news.newsUrl}}/route/file/downloadfile/true/{{coverItem.contentCoverId}}" wx:for="{{item.newsContentCoverList}}" wx:for-item="coverItem" class="swiper-img" wx:key="swiperImg"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
@ -48,7 +48,7 @@
|
||||
<view class="public-title">
|
||||
<view class="title-text" bindtap="goNewsList">
|
||||
<image src="../../images/selected-l.png" class="selected-l"></image>
|
||||
新闻资讯
|
||||
文化动态
|
||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -7,15 +7,48 @@ Page({
|
||||
data: {
|
||||
news: {
|
||||
newsUrl: app.newsUrl,
|
||||
newsDictionaries: [],
|
||||
newsList: [],
|
||||
},
|
||||
directoriesParentId: 'f497904b-7727-4832-891c-604c36ae4167',
|
||||
currentNewsDictionariesId: '',
|
||||
currentPage: 1,
|
||||
rows: 10
|
||||
},
|
||||
doGetNewsDictionariesList: function() {
|
||||
var self = this;
|
||||
app.dialog.loading('正在加载');
|
||||
app.restAjax.get(app.restAjax.path('{newsUrl}/app/newsdirectories/listnewsdirectoriesrelease', [self.data.news.newsUrl]), {
|
||||
directoriesParentId: self.data.directoriesParentId,
|
||||
}, null, function(code, data) {
|
||||
self.setData({
|
||||
'news.newsDictionaries': data
|
||||
})
|
||||
self.doGetNewsList(1);
|
||||
}, function(code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
}, function() {});
|
||||
},
|
||||
doClickDictionaries: function(event) {
|
||||
var self = this;
|
||||
self.setData({
|
||||
currentNewsDictionariesId: event.currentTarget.dataset.newsDirectoriesId
|
||||
});
|
||||
self.doGetNewsList(1);
|
||||
},
|
||||
doClearCurrentNewsDictionariesId: function() {
|
||||
var self = this;
|
||||
self.setData({
|
||||
currentNewsDictionariesId: ''
|
||||
});
|
||||
self.doGetNewsList(1);
|
||||
},
|
||||
doGetNewsList: function(page) {
|
||||
var self = this;
|
||||
app.dialog.loading('正在加载');
|
||||
app.restAjax.get(app.restAjax.path('{newsUrl}/app/newscontent/listpagenewscontentrelease', [self.data.news.newsUrl]), {
|
||||
newsDirectoriesParentId: self.data.directoriesParentId,
|
||||
newsDirectoriesId: self.data.currentNewsDictionariesId ? self.data.currentNewsDictionariesId : '',
|
||||
page: page,
|
||||
rows: self.data.rows
|
||||
}, null, function(code, data) {
|
||||
@ -51,7 +84,7 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var self = this;
|
||||
self.doGetNewsList(1);
|
||||
self.doGetNewsDictionariesList();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1,22 +1,12 @@
|
||||
<view class="top-tab">
|
||||
<view class="tab-box active">
|
||||
<view class="tab-box {{!currentNewsDictionariesId ? 'active' : ''}}" bindtap="doClearCurrentNewsDictionariesId">
|
||||
<image src="../../images/selected-l.png" class="selected-l"></image>
|
||||
未参加
|
||||
全部
|
||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
||||
</view>
|
||||
<view class="tab-box">
|
||||
<view class="tab-box {{ item.newsDirectoriesId == currentNewsDictionariesId ? 'active' : ''}}" wx:for="{{news.newsDictionaries}}" wx:for-index="index" wx:for-item="item" wx:key="newsDictionaries" bindtap="doClickDictionaries" data-news-directories-id="{{item.newsDirectoriesId}}">
|
||||
<image src="../../images/selected-l.png" class="selected-l"></image>
|
||||
已参加
|
||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
||||
</view>
|
||||
<view class="tab-box">
|
||||
<image src="../../images/selected-l.png" class="selected-l"></image>
|
||||
已参加
|
||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
||||
</view>
|
||||
<view class="tab-box">
|
||||
<image src="../../images/selected-l.png" class="selected-l"></image>
|
||||
已参加
|
||||
{{item.directoriesName}}
|
||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
Loading…
Reference in New Issue
Block a user