修改活动相关
This commit is contained in:
commit
5e7ef3bf1f
BIN
images/tab6.png
Normal file
BIN
images/tab6.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
images/tab7.png
Normal file
BIN
images/tab7.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
@ -6,6 +6,7 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
activityUrl: app.activityUrl,
|
||||
dataMap: {},
|
||||
token: ''
|
||||
},
|
||||
@ -65,32 +66,18 @@ Page({
|
||||
url = '/wxminiapp/activitylibrary/getactivitylibrarybyid/' + id
|
||||
self.getToken()
|
||||
}
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []),
|
||||
{}, {
|
||||
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []), {}, {
|
||||
headers: {
|
||||
token: self.data.token
|
||||
}
|
||||
}, function(code, data) {
|
||||
if('200' == code) {
|
||||
var imageArr = data.activityImage.split(',')
|
||||
if(imageArr.length > 1) {
|
||||
for(var item of data.activityImage.split(',')) {
|
||||
item = app.activityUrl + '/route/file/downloadfile/true/' + item
|
||||
}
|
||||
}else {
|
||||
data.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + data.activityImage
|
||||
}
|
||||
|
||||
data.activityImageArray = data.activityImage.split(',');
|
||||
self.setData({
|
||||
dataMap: data
|
||||
})
|
||||
console.log(self.data.dataMap)
|
||||
}
|
||||
}, function() {
|
||||
|
||||
}, function() {
|
||||
|
||||
})
|
||||
}, function(code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,5 +1,9 @@
|
||||
<view class="activity-img">
|
||||
<image src="{{dataMap.activityImage}}"></image>
|
||||
<swiper indicator-dots="false" autoplay="true" >
|
||||
<swiper-item class="swiper-item" wx:for="{{dataMap.activityImageArray}}" wx:for-index="idx" wx:for-item="item" wx:key="activityImageArray">
|
||||
<image src="{{activityUrl}}/route/file/downloadfile/true/{{item}}"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class="activity-detail">
|
||||
<view class="activity-title">{{dataMap.activityTitle}}</view>
|
||||
|
@ -2,6 +2,9 @@
|
||||
width: 100%;
|
||||
height: 480rpx;
|
||||
}
|
||||
swiper {
|
||||
height: 100%;
|
||||
}
|
||||
.activity-detail{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
@ -70,6 +70,9 @@ Page({
|
||||
page: 1,
|
||||
rows: 3
|
||||
}, null, function(code, data) {
|
||||
for(var i = 0, item; item = data.rows[i++];) {
|
||||
item.venuePanoramaArray = item.venuePanorama.split(',');
|
||||
}
|
||||
self.setData({
|
||||
'venue.venueList': data.rows
|
||||
});
|
||||
@ -83,6 +86,9 @@ Page({
|
||||
page: 1,
|
||||
rows: 3
|
||||
}, null, function(code, data) {
|
||||
for(var i = 0, item; item = data.rows[i++];) {
|
||||
item.activityImageArray = item.activityImage.split(',');
|
||||
}
|
||||
self.setData({
|
||||
'activity.activityList': data.rows
|
||||
});
|
||||
@ -122,9 +128,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 () {
|
||||
@ -142,6 +148,11 @@ Page({
|
||||
url: '../venue/venue',
|
||||
})
|
||||
},
|
||||
goVenueDetail: function(event) {
|
||||
wx.navigateTo({
|
||||
url: '../venueDetail/venueDetail?venuesInfoId=' + event.currentTarget.dataset.venuesInfoId,
|
||||
})
|
||||
},
|
||||
goBroadcastDetail: function (event) {
|
||||
wx.navigateTo({
|
||||
url: '../broadcastDetail/broadcastDetail?livePlanId='+ event.currentTarget.dataset.livePlanId,
|
||||
@ -152,6 +163,11 @@ Page({
|
||||
url: '../activity/activity',
|
||||
})
|
||||
},
|
||||
goActivityDetail: function(event) {
|
||||
wx.navigateTo({
|
||||
url: '../activityDetail/activityDetail?id=' + event.currentTarget.dataset.activityLibraryId
|
||||
})
|
||||
},
|
||||
goHeritage: function () {
|
||||
wx.switchTab({
|
||||
url: '../heritage/heritage',
|
||||
|
@ -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>
|
||||
@ -36,17 +44,17 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="recommend-container">
|
||||
<view class="recommend-box" wx:for="{{venue.venueList}}" wx:for-index="index" wx:for-item="item" wx:key="venueList">
|
||||
<image src="{{venue.venueUrl}}/route/file/downloadfile/true/{{item.venuePanorama}}"></image>
|
||||
<view class="recommend-box" wx:for="{{venue.venueList}}" bindtap="goVenueDetail" data-venues-info-Id="{{item.venuesInfoId}}" wx:for-index="index" wx:for-item="item" wx:key="venueList">
|
||||
<image src="{{venue.venueUrl}}/route/file/downloadfile/true/{{item.venuePanoramaArray[0]}}"></image>
|
||||
</view>
|
||||
<view class="recommend-box" wx:for="{{activity.activityList}}" wx:for-index="index" wx:for-item="item" wx:key="activityList">
|
||||
<image src="{{activity.activityUrl}}/route/file/downloadfile/true/{{item.activityImage}}"></image>
|
||||
<view class="recommend-box" wx:for="{{activity.activityList}}" bindtap="goActivityDetail" data-activity-library-id="{{item.activityLibraryId}}" wx:for-index="index" wx:for-item="item" wx:key="activityList">
|
||||
<image src="{{activity.activityUrl}}/route/file/downloadfile/true/{{item.activityImageArray[0]}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
</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>
|
||||
|
@ -52,10 +52,6 @@ Page({
|
||||
page: page,
|
||||
rows: self.data.rows
|
||||
}, null, function(code, data) {
|
||||
if(data.rows.length == 0) {
|
||||
app.dialog.msg('暂无数据');
|
||||
return;
|
||||
}
|
||||
var newsArray;
|
||||
if(page <= 1) {
|
||||
newsArray = data.rows;
|
||||
@ -67,6 +63,10 @@ Page({
|
||||
currentPage: page,
|
||||
'news.newsList': newsArray
|
||||
})
|
||||
if(data.rows.length == 0) {
|
||||
app.dialog.msg('暂无数据');
|
||||
return;
|
||||
}
|
||||
}, function(code, data) {
|
||||
app.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -84,6 +84,15 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var self = this;
|
||||
if(options.type == 1) {
|
||||
self.setData({
|
||||
directoriesParentId: 'f497904b-7727-4832-891c-604c36ae4167'
|
||||
});
|
||||
} else {
|
||||
self.setData({
|
||||
directoriesParentId: 'f1d5d313-f728-4dda-9843-1116d97e17b0'
|
||||
});
|
||||
}
|
||||
self.doGetNewsDictionariesList();
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user