处理问题
This commit is contained in:
parent
42ba6dd036
commit
36b60563b6
@ -6,6 +6,7 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
activityUrl: app.activityUrl,
|
||||
dataMap: {},
|
||||
token: ''
|
||||
},
|
||||
@ -65,24 +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) {
|
||||
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
|
||||
});
|
||||
@ -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',
|
||||
|
@ -44,11 +44,11 @@
|
||||
</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>
|
||||
|
@ -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,7 +84,6 @@ Page({
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
var self = this;
|
||||
console.log(options);
|
||||
if(options.type == 1) {
|
||||
self.setData({
|
||||
directoriesParentId: 'f497904b-7727-4832-891c-604c36ae4167'
|
||||
|
Loading…
Reference in New Issue
Block a user