diff --git a/images/delete-photo.png b/images/delete-photo.png new file mode 100644 index 0000000..db02a2f Binary files /dev/null and b/images/delete-photo.png differ diff --git a/images/friend.png b/images/friend.png new file mode 100644 index 0000000..7e05fbb Binary files /dev/null and b/images/friend.png differ diff --git a/images/new.png b/images/new.png new file mode 100644 index 0000000..540f1d7 Binary files /dev/null and b/images/new.png differ diff --git a/images/order.png b/images/order.png new file mode 100644 index 0000000..3298720 Binary files /dev/null and b/images/order.png differ diff --git a/pages/center/center.js b/pages/center/center.js index 98033a9..e2b777a 100644 --- a/pages/center/center.js +++ b/pages/center/center.js @@ -120,6 +120,22 @@ Page({ url: '../myVolunteerActivity/myVolunteerActivity', }) }, + /** + * 跳转到我发布的朋友圈页面 + */ + toMyFirend: function () { + wx.navigateTo({ + url: '../myFriendCircle/myFriendCircle', + }) + }, + /** + * 跳转到我预定的场馆页面 + */ + toMyOrder: function () { + wx.navigateTo({ + url: '../order/order', + }) + }, /** * 生命周期函数--监听页面加载 */ diff --git a/pages/center/center.wxml b/pages/center/center.wxml index 6f06c29..0832a94 100644 --- a/pages/center/center.wxml +++ b/pages/center/center.wxml @@ -11,6 +11,14 @@ 常用功能 + + + 我的发布 + + + + 我的订单 + 我的报名 diff --git a/pages/center/center.wxss b/pages/center/center.wxss index c4d5a4a..db089b3 100644 --- a/pages/center/center.wxss +++ b/pages/center/center.wxss @@ -55,6 +55,7 @@ text-align: center; padding: 0 15rpx; box-sizing: border-box; + margin-bottom: 15rpx; } .main-box image{ width: 65rpx; diff --git a/pages/friendCircle/friendCircle.js b/pages/friendCircle/friendCircle.js index 7dbc9e1..3232d7a 100644 --- a/pages/friendCircle/friendCircle.js +++ b/pages/friendCircle/friendCircle.js @@ -53,6 +53,16 @@ Page({ wx.hideLoading(); }); }, + newFriendCircle: function () { + wx.navigateTo({ + url: '../newFriendCircle/newFriendCircle', + }) + }, + toMyFriendCircle: function () { + wx.navigateTo({ + url: '../myFriendCircle/myFriendCircle', + }) + }, /** * 生命周期函数--监听页面加载 */ diff --git a/pages/friendCircle/friendCircle.wxml b/pages/friendCircle/friendCircle.wxml index a193577..f2c197e 100644 --- a/pages/friendCircle/friendCircle.wxml +++ b/pages/friendCircle/friendCircle.wxml @@ -48,4 +48,8 @@ {{item.gmtCreate}} + + + 发布 + 我的 \ No newline at end of file diff --git a/pages/friendCircle/friendCircle.wxss b/pages/friendCircle/friendCircle.wxss index 00bff95..d41c2c7 100644 --- a/pages/friendCircle/friendCircle.wxss +++ b/pages/friendCircle/friendCircle.wxss @@ -49,4 +49,23 @@ } .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%; +} +.new{ + margin-bottom: 10rpx; } \ No newline at end of file diff --git a/pages/myFriendCircle/myFriendCircle.js b/pages/myFriendCircle/myFriendCircle.js new file mode 100644 index 0000000..bba010c --- /dev/null +++ b/pages/myFriendCircle/myFriendCircle.js @@ -0,0 +1,116 @@ +// 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 new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/myFriendCircle/myFriendCircle.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/myFriendCircle/myFriendCircle.wxml b/pages/myFriendCircle/myFriendCircle.wxml new file mode 100644 index 0000000..15dfbad --- /dev/null +++ b/pages/myFriendCircle/myFriendCircle.wxml @@ -0,0 +1,54 @@ + + + + + + + {{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 new file mode 100644 index 0000000..5b9cd19 --- /dev/null +++ b/pages/myFriendCircle/myFriendCircle.wxss @@ -0,0 +1,68 @@ +.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/newFriendCircle/newFriendCircle.js b/pages/newFriendCircle/newFriendCircle.js new file mode 100644 index 0000000..743ed1c --- /dev/null +++ b/pages/newFriendCircle/newFriendCircle.js @@ -0,0 +1,130 @@ +// pages/newFriendCircle/newFriendCircle.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + showAdd: true, + selectedType: '', + selectedList: [], + isPublic: '' //朋友圈是否公开 + }, + changepublic: function (e) { + this.setData({ + isPublic: e.detail.value + }) + }, + selectContent: function () { + var self = this + wx.chooseMedia({ + count: 9 - self.data.selectedList.length, + mediaType: ['image','video'], + sourceType: ['album', 'camera'], + success: function (res) { + console.log(res) + if (res.type == 'image') { + self.setData({ + selectedType: res.type, + selectedList: self.data.selectedList.concat(res.tempFiles) + }) + } else { + self.setData({ + selectedType: res.type, + selectedList: self.data.selectedList.concat(res.tempFiles) + }) + } + self.isShowAdd() + console.log(self.data.selectedList) + } + }) + }, + deletePhoto: function (e) { + var self = this + var now = e.currentTarget.dataset.idx + var result = self.data.selectedList + result.splice(now, 1) + this.setData({ + selectedList: result + }) + self.isShowAdd('delete') + }, + isShowAdd: function (from) { + if (this.data.selectedType == 'image') { + if (this.data.selectedList.length < 9) { + this.setData({ + showAdd: true + }) + } else { + this.setData({ + showAdd: false + }) + } + } else { + if (from) { + this.setData({ + showAdd: true + }) + } else { + this.setData({ + showAdd: false + }) + } + } + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/newFriendCircle/newFriendCircle.json b/pages/newFriendCircle/newFriendCircle.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/newFriendCircle/newFriendCircle.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/newFriendCircle/newFriendCircle.wxml b/pages/newFriendCircle/newFriendCircle.wxml new file mode 100644 index 0000000..154553e --- /dev/null +++ b/pages/newFriendCircle/newFriendCircle.wxml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + 是否公开: + + 公开 + 不公开 + + + + + 发布 + \ No newline at end of file diff --git a/pages/newFriendCircle/newFriendCircle.wxss b/pages/newFriendCircle/newFriendCircle.wxss new file mode 100644 index 0000000..18d657f --- /dev/null +++ b/pages/newFriendCircle/newFriendCircle.wxss @@ -0,0 +1,79 @@ +.new-friend-circle{ + padding: 30rpx; + margin-bottom: 100rpx; +} +.text{ + width: 100%; + height: 250rpx; + margin-bottom: 30rpx; +} +.text textarea{ + width: 100%; + height: 100%; + border: 1px solid #DEDEDE; + padding: 15rpx; + box-sizing: border-box; + font-size: 32rpx; +} +.add{ + width: 32%; + height: 200rpx; + background: #DEDEDE; + display: inline-flex; + justify-content: center; + align-items: center; + vertical-align: top; +} +.add image{ + width: 100rpx; + height: 100rpx; +} +.is-public{ + margin-top: 20rpx; + font-size: 30rpx; +} +.is-public radio-group{ + display: inline-block; +} +.is-public radio-group radio{ + margin-right: 20rpx; +} +.photo{ + display: inline-block; + width: 32%; + height: 200rpx; + margin-right: 2%; + position: relative; + margin-bottom: 20rpx; +} +.photo:nth-child(3n){ + margin-right: 0; +} +.photo image{ + width: 100%; + height: 100%; +} +.photo image.delete{ + width: 30rpx; + height: 30rpx; + position: absolute; + top: -15rpx; + right: -15rpx; +} +.type-box, .type-box video{ + width: 100%; + height: 100%; +} +.submit{ + position: fixed; + left: 0; + right: 0; + bottom: 0; + background: #9F1512; + height: 100rpx; + display: flex; + align-items: center; + justify-content: center; + color: #fff; + font-size: 32rpx; +} \ No newline at end of file