修改活动相关
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: {
|
data: {
|
||||||
|
activityUrl: app.activityUrl,
|
||||||
dataMap: {},
|
dataMap: {},
|
||||||
token: ''
|
token: ''
|
||||||
},
|
},
|
||||||
@ -65,32 +66,18 @@ Page({
|
|||||||
url = '/wxminiapp/activitylibrary/getactivitylibrarybyid/' + id
|
url = '/wxminiapp/activitylibrary/getactivitylibrarybyid/' + id
|
||||||
self.getToken()
|
self.getToken()
|
||||||
}
|
}
|
||||||
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []),
|
app.restAjax.get(app.restAjax.path(app.activityUrl + url, []), {}, {
|
||||||
{}, {
|
|
||||||
headers: {
|
headers: {
|
||||||
token: self.data.token
|
token: self.data.token
|
||||||
}
|
}
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
if('200' == code) {
|
data.activityImageArray = data.activityImage.split(',');
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
self.setData({
|
self.setData({
|
||||||
dataMap: data
|
dataMap: data
|
||||||
})
|
})
|
||||||
console.log(self.data.dataMap)
|
}, function(code, data) {
|
||||||
}
|
app.dialog.msg(data.msg);
|
||||||
}, function() {
|
});
|
||||||
|
|
||||||
}, function() {
|
|
||||||
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {},
|
"usingComponents": {}
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
}
|
@ -1,5 +1,9 @@
|
|||||||
<view class="activity-img">
|
<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>
|
||||||
<view class="activity-detail">
|
<view class="activity-detail">
|
||||||
<view class="activity-title">{{dataMap.activityTitle}}</view>
|
<view class="activity-title">{{dataMap.activityTitle}}</view>
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 480rpx;
|
height: 480rpx;
|
||||||
}
|
}
|
||||||
|
swiper {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
.activity-detail{
|
.activity-detail{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -70,6 +70,9 @@ Page({
|
|||||||
page: 1,
|
page: 1,
|
||||||
rows: 3
|
rows: 3
|
||||||
}, null, function(code, data) {
|
}, null, function(code, data) {
|
||||||
|
for(var i = 0, item; item = data.rows[i++];) {
|
||||||
|
item.venuePanoramaArray = item.venuePanorama.split(',');
|
||||||
|
}
|
||||||
self.setData({
|
self.setData({
|
||||||
'venue.venueList': data.rows
|
'venue.venueList': data.rows
|
||||||
});
|
});
|
||||||
@ -83,6 +86,9 @@ Page({
|
|||||||
page: 1,
|
page: 1,
|
||||||
rows: 3
|
rows: 3
|
||||||
}, null, function(code, data) {
|
}, null, function(code, data) {
|
||||||
|
for(var i = 0, item; item = data.rows[i++];) {
|
||||||
|
item.activityImageArray = item.activityImage.split(',');
|
||||||
|
}
|
||||||
self.setData({
|
self.setData({
|
||||||
'activity.activityList': data.rows
|
'activity.activityList': data.rows
|
||||||
});
|
});
|
||||||
@ -122,9 +128,9 @@ Page({
|
|||||||
url: '../newsDetail/newsDetail?templateRecordUrl='+ event.currentTarget.dataset.templateRecordUrl,
|
url: '../newsDetail/newsDetail?templateRecordUrl='+ event.currentTarget.dataset.templateRecordUrl,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goNewsList: function() {
|
goNewsList: function(event) {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../newsList/newsList',
|
url: '../newsList/newsList?type='+ event.currentTarget.dataset.type,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goVolunteer: function () {
|
goVolunteer: function () {
|
||||||
@ -142,6 +148,11 @@ Page({
|
|||||||
url: '../venue/venue',
|
url: '../venue/venue',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
goVenueDetail: function(event) {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '../venueDetail/venueDetail?venuesInfoId=' + event.currentTarget.dataset.venuesInfoId,
|
||||||
|
})
|
||||||
|
},
|
||||||
goBroadcastDetail: function (event) {
|
goBroadcastDetail: function (event) {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../broadcastDetail/broadcastDetail?livePlanId='+ event.currentTarget.dataset.livePlanId,
|
url: '../broadcastDetail/broadcastDetail?livePlanId='+ event.currentTarget.dataset.livePlanId,
|
||||||
@ -152,6 +163,11 @@ Page({
|
|||||||
url: '../activity/activity',
|
url: '../activity/activity',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
goActivityDetail: function(event) {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '../activityDetail/activityDetail?id=' + event.currentTarget.dataset.activityLibraryId
|
||||||
|
})
|
||||||
|
},
|
||||||
goHeritage: function () {
|
goHeritage: function () {
|
||||||
wx.switchTab({
|
wx.switchTab({
|
||||||
url: '../heritage/heritage',
|
url: '../heritage/heritage',
|
||||||
|
@ -6,13 +6,21 @@
|
|||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
<view class="tab">
|
<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">
|
<view class="tab-box" bindtap="goVolunteer">
|
||||||
<image src="../../images/tab1.png"></image>
|
<image src="../../images/tab1.png"></image>
|
||||||
<view class="tab-title">志愿者服务</view>
|
<view class="tab-title">志愿者服务</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tab-box" bindtap="goActivity">
|
<view class="tab-box" bindtap="goActivity">
|
||||||
<image src="../../images/tab2.png"></image>
|
<image src="../../images/tab2.png"></image>
|
||||||
<view class="tab-title">精品活动</view>
|
<view class="tab-title">精彩活动</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tab-box" bindtap="goVenue">
|
<view class="tab-box" bindtap="goVenue">
|
||||||
<image src="../../images/tab3.png"></image>
|
<image src="../../images/tab3.png"></image>
|
||||||
@ -36,17 +44,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="recommend-container">
|
<view class="recommend-container">
|
||||||
<view class="recommend-box" wx:for="{{venue.venueList}}" wx:for-index="index" wx:for-item="item" wx:key="venueList">
|
<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.venuePanorama}}"></image>
|
<image src="{{venue.venueUrl}}/route/file/downloadfile/true/{{item.venuePanoramaArray[0]}}"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="recommend-box" wx:for="{{activity.activityList}}" wx:for-index="index" wx:for-item="item" wx:key="activityList">
|
<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.activityImage}}"></image>
|
<image src="{{activity.activityUrl}}/route/file/downloadfile/true/{{item.activityImageArray[0]}}"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="news">
|
<view class="news">
|
||||||
<view class="public-title">
|
<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-l.png" class="selected-l"></image>
|
||||||
文化动态
|
文化动态
|
||||||
<image src="../../images/selected-r.png" class="selected-r"></image>
|
<image src="../../images/selected-r.png" class="selected-r"></image>
|
||||||
|
@ -52,10 +52,6 @@ Page({
|
|||||||
page: page,
|
page: page,
|
||||||
rows: self.data.rows
|
rows: self.data.rows
|
||||||
}, null, function(code, data) {
|
}, null, function(code, data) {
|
||||||
if(data.rows.length == 0) {
|
|
||||||
app.dialog.msg('暂无数据');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var newsArray;
|
var newsArray;
|
||||||
if(page <= 1) {
|
if(page <= 1) {
|
||||||
newsArray = data.rows;
|
newsArray = data.rows;
|
||||||
@ -67,6 +63,10 @@ Page({
|
|||||||
currentPage: page,
|
currentPage: page,
|
||||||
'news.newsList': newsArray
|
'news.newsList': newsArray
|
||||||
})
|
})
|
||||||
|
if(data.rows.length == 0) {
|
||||||
|
app.dialog.msg('暂无数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
app.dialog.msg(data.msg);
|
app.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
@ -84,6 +84,15 @@ Page({
|
|||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
var self = this;
|
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();
|
self.doGetNewsDictionariesList();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user