diff --git a/app.js b/app.js index f200905..5069dbf 100644 --- a/app.js +++ b/app.js @@ -2,19 +2,20 @@ var restAjax = require('utils/restAjax.js'); var dialog = require('utils/dialog.js'); App({ - loginUrl: 'https://www.wgink.ink/usercenter', - usercenterUrl: 'https://www.wgink.ink/usercenter', - newsUrl: 'https://www.wgink.ink/news', - newsContentUrl: 'https://www.wgink.ink', - libraryUrl: 'https://www.wgink.ink/library', - venueUrl: 'https://www.wgink.ink/venuebooking', - activityUrl: 'https://www.wgink.ink/culturalactivity', - volunteerUrl: 'https://www.wgink.ink/volunteer', - activityUrl: 'https://www.wgink.ink/culturalactivity', - volunteerUrl: 'https://www.wgink.ink/volunteer', - liveUrl: 'https://www.wgink.ink/live', - liveRecordUrl: 'https://www.wgink.ink', - socialUrl: 'https://www.wgink.ink/social', + loginUrl: 'https://www.xzszwhy.cn/usercenter', + usercenterUrl: 'https://www.xzszwhy.cn/usercenter', + newsUrl: 'https://www.xzszwhy.cn/news', + newsContentUrl: 'https://www.xzszwhy.cn', + libraryUrl: 'https://www.xzszwhy.cn/library', + venueUrl: 'https://www.xzszwhy.cn/venuebooking', + activityUrl: 'https://www.xzszwhy.cn/culturalactivity', + volunteerUrl: 'https://www.xzszwhy.cn/volunteer', + activityUrl: 'https://www.xzszwhy.cn/culturalactivity', + volunteerUrl: 'https://www.xzszwhy.cn/volunteer', + liveUrl: 'https://www.xzszwhy.cn/live', + liveRecordUrl: 'https://www.xzszwhy.cn.ink', + socialUrl: 'https://www.xzszwhy.cn/social', + settingUrl: 'https://www.xzszwhy.cn/miniapp', restAjax: restAjax, dialog: dialog, onLaunch: function () { diff --git a/app.json b/app.json index 6ec8c36..02cd417 100644 --- a/app.json +++ b/app.json @@ -9,7 +9,6 @@ "pages/order/order", "pages/venue/venue", "pages/center/center", - "pages/myFriendCircle/myFriendCircle", "pages/friendCircle/friendCircle", "pages/orderDetail/orderDetail", "pages/broadcastList/broadcastList", diff --git a/images/center-bg.jpg b/images/center-bg.jpg new file mode 100644 index 0000000..2871c4a Binary files /dev/null and b/images/center-bg.jpg differ diff --git a/images/center-bg.png b/images/center-bg.png deleted file mode 100644 index 81171ec..0000000 Binary files a/images/center-bg.png and /dev/null differ diff --git a/images/venue-detail-top.png b/images/venue-detail-top.png new file mode 100644 index 0000000..1b51f1b Binary files /dev/null and b/images/venue-detail-top.png differ diff --git a/images/volunteer-top.png b/images/volunteer-top.png new file mode 100644 index 0000000..35d8504 Binary files /dev/null and b/images/volunteer-top.png differ diff --git a/pages/activity/activity.wxss b/pages/activity/activity.wxss index a496ac3..0e9e5ff 100644 --- a/pages/activity/activity.wxss +++ b/pages/activity/activity.wxss @@ -76,6 +76,8 @@ height: 80rpx; white-space: nowrap; overflow-x: auto; + background: #FFF; + z-index: 100; } .area-box{ display: inline-block; diff --git a/pages/broadcastList/broadcastList.js b/pages/broadcastList/broadcastList.js index 75190f2..a92bfa2 100644 --- a/pages/broadcastList/broadcastList.js +++ b/pages/broadcastList/broadcastList.js @@ -13,7 +13,8 @@ Page({ page: 1, rows: 20, liveRecordList: [], - videoPath: '' + videoPath: '', + curTime: '' }, getLivePlanRecordList: function () { var self = this @@ -50,8 +51,10 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { + var time = new Date().getTime() this.setData({ - livePlanId: options.livePlanId + livePlanId: options.livePlanId, + curTime: time }) this.getLivePlanRecordList(); }, diff --git a/pages/broadcastList/broadcastList.wxml b/pages/broadcastList/broadcastList.wxml index 6cc484a..ebfe454 100644 --- a/pages/broadcastList/broadcastList.wxml +++ b/pages/broadcastList/broadcastList.wxml @@ -4,4 +4,4 @@ {{index+1}}.{{item.recordFileName}} --> - \ No newline at end of file + \ No newline at end of file diff --git a/pages/center/center.wxml b/pages/center/center.wxml index 6f9900d..bf7274a 100644 --- a/pages/center/center.wxml +++ b/pages/center/center.wxml @@ -1,5 +1,5 @@ - + diff --git a/pages/index/index.js b/pages/index/index.js index 1618d1a..858816f 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -4,6 +4,8 @@ Page({ * 页面的初始数据 */ data: { + showLive: false, + navList: [], randomName: true, showPhone: true, gotCode: false, @@ -32,6 +34,35 @@ Page({ usercenterUrl: app.usercenterUrl, isConfirm: false }, + getSetting: function () { + var self = this + var num = Math.random() + app.restAjax.get(app.restAjax.path('{settingUrl}/nav-setting.json?v=' + num, [app.settingUrl]), {}, null, function(code, data) { + self.setData({ + navList: data.nav, + showLive: data.showLive + }) + }, function(code, data) { + app.dialog.msg(data.msg); + }); + }, + goNav: function (e) { + var type = e.currentTarget.dataset.type + var url = e.currentTarget.dataset.url + if (type == '0') { + wx.navigateTo({ + url: '../' + url + '/' + url, + }) + } else if (type == '1' || type == '2') { + wx.navigateTo({ + url: '../newsList/newsList?type=' + type, + }) + } else { + wx.switchTab({ + url: '../' + url + '/' + url, + }) + } + }, doLogin: function () { var self = this; wx.login({ @@ -131,9 +162,15 @@ Page({ }); }, goNewsDetail: function (event) { - wx.navigateTo({ - url: '../newsDetail/newsDetail?templateRecordUrl='+ event.currentTarget.dataset.templateRecordUrl, - }) + if (event.currentTarget.dataset.type == '6') { + wx.navigateTo({ + url: '../newsDetail/newsDetail?content='+ event.currentTarget.dataset.content, + }) + } else { + wx.navigateTo({ + url: '../newsDetail/newsDetail?templateRecordUrl='+ event.currentTarget.dataset.templateRecordUrl, + }) + } }, goNewsList: function(event) { wx.navigateTo({ @@ -226,6 +263,7 @@ Page({ self.doGetLiveList(); self.doGetVenueList(); self.doGetActivityList(); + self.getSetting() }, /** diff --git a/pages/index/index.wxml b/pages/index/index.wxml index dcbadff..3d339eb 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,12 +1,16 @@ - + - + + + {{item.title}}123 + + @@ -73,7 +77,7 @@ - + {{item.newsContentTitle}} @@ -83,7 +87,7 @@ {{item.newsContentPublishTime}} - + @@ -95,7 +99,7 @@ - + {{item.newsContentTitle}} @@ -107,7 +111,7 @@ - + {{item.newsContentTitle}} @@ -117,14 +121,14 @@ {{item.newsContentPublishTime}} - + {{item.newsContentTitle}} 来源:{{item.newsContentResource}} {{item.newsContentPublishTime}} - + {{item.newsContentTitle}} @@ -135,7 +139,7 @@ {{item.newsContentPublishTime}} - + {{item.newsContentTitle}} 来源:{{item.newsContentResource}} @@ -145,7 +149,7 @@ - + diff --git a/pages/myFriendCircle/myFriendCircle.js b/pages/myFriendCircle/myFriendCircle.js deleted file mode 100644 index bba010c..0000000 --- a/pages/myFriendCircle/myFriendCircle.js +++ /dev/null @@ -1,116 +0,0 @@ -// pages/friendCircle/friendCircle.js -var app = getApp(); -Page({ - - /** - * 页面的初始数据 - */ - data: { - usercenterUrl: app.usercenterUrl, - socialUrl: app.socialUrl, - momentsList: [], - currentPage: 1, - rows: 20 - }, - doGetMomentsList: function(page) { - var self = this; - app.dialog.loading('正在加载'); - app.restAjax.get(app.restAjax.path('{socialUrl}/app/moments/listpagemomentsofpublicrelease', [self.data.socialUrl]), { - page: page, - rows: self.data.rows - }, null, function(code, data) { - if(data.rows.length == 0) { - app.dialog.msg('暂无数据'); - return; - } - for(var i = 0, item; item = data.rows[i++];) { - if(item.type === 'photo') { - var photos = item.photos.split(','); - var photoArray = []; - for(var j = 0, jItem; jItem = photos[j++];) { - if(jItem.length != 0) { - photoArray.push(jItem); - } - } - item.photoArray = photoArray; - } - } - var momentsArray; - if(page <= 1) { - momentsArray = data.rows; - } else { - momentsArray = self.data.news.newsList; - momentsArray = momentsArray.concat(data.rows); - } - self.setData({ - currentPage: page, - momentsList: momentsArray - }) - }, function(code, data) { - app.dialog.msg(data.msg); - }, function() { - wx.stopPullDownRefresh(); - wx.hideLoading(); - }); - }, - newFriendCircle: function () { - wx.navigateTo({ - url: '../newFriendCircle/newFriendCircle', - }) - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - this.doGetMomentsList(1); - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - this.doGetMomentsList(1); - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - this.doGetMomentsList(this.data.currentPage + 1); - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - } -}) \ No newline at end of file diff --git a/pages/myFriendCircle/myFriendCircle.json b/pages/myFriendCircle/myFriendCircle.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/myFriendCircle/myFriendCircle.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/myFriendCircle/myFriendCircle.wxml b/pages/myFriendCircle/myFriendCircle.wxml deleted file mode 100644 index 15dfbad..0000000 --- a/pages/myFriendCircle/myFriendCircle.wxml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - {{item.creatorName}} - {{item.content}} - {{item.gmtCreate}} - - - - - - - - {{item.creatorName}} - {{item.content}} - - - - {{item.gmtCreate}} - - - - - - - - {{item.creatorName}} - {{item.content}} - - - - {{item.gmtCreate}} - - - - - - - - {{item.creatorName}} - {{item.content}} - - - - {{item.gmtCreate}} - - - - - 发布 - \ No newline at end of file diff --git a/pages/myFriendCircle/myFriendCircle.wxss b/pages/myFriendCircle/myFriendCircle.wxss deleted file mode 100644 index 5b9cd19..0000000 --- a/pages/myFriendCircle/myFriendCircle.wxss +++ /dev/null @@ -1,68 +0,0 @@ -.friend-circle{ - padding: 15rpx 30rpx; - border-bottom: 1px solid #DEDEDE; -} -.friend-circle:last-child { - border-bottom: none; -} -.friend-circle-box{ - display: flex; - justify-content: space-between; - padding-bottom: 10rpx; -} - -.avatar{ - width: 8%; -} -.avatar image{ - width: 100%; - height: 50rpx; - border-radius: 50rpx; -} -.content{ - width: 90%; -} -.name{ - font-size: 30rpx; - color: #949494; -} -.text{ - font-size: 32rpx; - color: #000; - margin: 10rpx 0; -} -.date{ - font-size: 28rpx; - color: #949494; -} -.photo-one image{ - width: 100%; -} -.photo-more image{ - width: 32%; - height: 150rpx; - margin-right: 2%; - margin-bottom: 10rpx; -} -.photo-more image:nth-child(3n){ - margin-right: 0; -} -.video video{ - width: 100%; -} -.new-friend-circle{ - position: fixed; - right: 30rpx; - bottom: 30rpx; -} -.box{ - width: 100rpx; - height: 100rpx; - display: flex; - justify-content: center; - align-items: center; - background: #9F1512; - color: #fff; - font-size: 32rpx; - border-radius: 50%; -} \ No newline at end of file diff --git a/pages/newsDetail/newsDetail.js b/pages/newsDetail/newsDetail.js index 9ab6664..5cb6afa 100644 --- a/pages/newsDetail/newsDetail.js +++ b/pages/newsDetail/newsDetail.js @@ -7,16 +7,25 @@ Page({ */ data: { newsContentUrl: app.newsContentUrl, - templateRecordUrl: null + templateRecordUrl: null, + content: '', + pageUrl: '' }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - this.setData({ - templateRecordUrl: options.templateRecordUrl - }) + if (options.content) { + this.setData({ + pageUrl: options.content + }) + } else { + this.setData({ + pageUrl: this.data.newsContentUrl + '/' + options.templateRecordUrl + }) + } + }, /** diff --git a/pages/newsDetail/newsDetail.wxml b/pages/newsDetail/newsDetail.wxml index ff79424..1a043fa 100644 --- a/pages/newsDetail/newsDetail.wxml +++ b/pages/newsDetail/newsDetail.wxml @@ -1,4 +1,13 @@ - + + + + + + + + + +