完善首页

This commit is contained in:
wenc000 2020-06-26 19:32:52 +08:00
parent 3cb1681230
commit 96f941052c
3 changed files with 31 additions and 22 deletions

2
app.js
View File

@ -7,7 +7,7 @@ App({
newsUrl: 'http://192.168.0.113:8082/news',
libraryUrl: 'http://192.168.0.113:8081/library',
venueUrl: 'http://192.168.0.109:8082/venuebooking',
activityUrl: 'http://192.168.0.111:8080/culturalactivity/',
activityUrl: 'http://192.168.0.111:8080/culturalactivity',
volunteerUrl: 'http://192.168.0.111:8888/volunteer/',
liveUrl: 'http://192.168.0.113:8084/live',
restAjax: restAjax,

View File

@ -16,10 +16,12 @@ Page({
newsList: []
},
venue: {
venueUrl: app.venueUrl
venueUrl: app.venueUrl,
venueList: []
},
activity: {
activityUrl: app.activityUrl
activityUrl: app.activityUrl,
activityList: []
},
live: {
liveUrl: app.liveUrl,
@ -64,17 +66,31 @@ Page({
app.dialog.msg(data.msg);
});
},
doGetVenue: function() {
app.restAjax.get(app.restAjax.path('', []), {
doGetVenueList: function() {
var self = this;
app.restAjax.get(app.restAjax.path('{venueUrl}/app/venuesinfo/listpagevenuesinforelease', [self.data.venue.venueUrl]), {
page: 1,
rows: 3
}, null, function(code, data) {
self.setData({
'venue.venueList': data.rows
});
}, function(code, data) {
app.dialog.msg(data.msg);
});
},
doGetActivity: function() {
doGetActivityList: function() {
var self = this;
app.restAjax.get(app.restAjax.path('{activityUrl}/app/activitylibrary/listpageactivitylibraryrelease', [self.data.activity.activityUrl]), {
page: 1,
rows: 3
}, null, function(code, data) {
self.setData({
'activity.activityList': data.rows
});
}, function(code, data) {
app.dialog.msg(data.msg);
});
},
doGetNewsList: function() {
var self = this;
@ -151,6 +167,8 @@ Page({
self.doGetLibrary();
self.doGetNewsList();
self.doGetLiveList();
self.doGetVenueList();
self.doGetActivityList();
},
/**

View File

@ -36,20 +36,11 @@
</view>
</view>
<view class="recommend-container">
<view class="recommend-box">
<image src="../../images/center-bg.png"></image>
<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>
<view class="recommend-box">
<image src="../../images/center-bg.png"></image>
</view>
<view class="recommend-box">
<image src="../../images/center-bg.png"></image>
</view>
<view class="recommend-box">
<image src="../../images/center-bg.png"></image>
</view>
<view class="recommend-box">
<image src="../../images/center-bg.png"></image>
<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>
</view>
</view>