From e3c8bcf8f0e8de103a85d15a527e0ddc912b41e3 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Sat, 27 Jun 2020 13:34:38 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.config.json | 61 --------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 project.config.json diff --git a/project.config.json b/project.config.json deleted file mode 100644 index c0536ba..0000000 --- a/project.config.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "description": "项目配置文件", - "packOptions": { - "ignore": [] - }, - "setting": { - "urlCheck": false, - "es6": true, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": true, - "autoAudits": false, - "coverView": true, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "enhance": false, - "nodeModules": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "useIsolateContext": true, - "useCompilerModule": true, - "userConfirmedUseCompilerModuleSwitch": false - }, - "compileType": "miniprogram", - "libVersion": "2.11.1", - "appid": "wxb9c87f3dcf05852f", - "projectname": "xz_mini", - "debugOptions": { - "hidedInDevtools": [] - }, - "isGameTourist": false, - "simulatorType": "wechat", - "simulatorPluginLibVersion": {}, - "condition": { - "search": { - "current": -1, - "list": [] - }, - "conversation": { - "current": -1, - "list": [] - }, - "game": { - "currentL": -1, - "list": [] - }, - "miniprogram": { - "current": -1, - "list": [] - } - } -} \ No newline at end of file From 1d33e61c0b394857e8988b36f1de0ab99a1e4307 Mon Sep 17 00:00:00 2001 From: dong_bo0602 <358256383@qq.com> Date: Sat, 27 Jun 2020 13:36:12 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E3=80=81=E5=9C=BA=E9=A6=86=E9=A2=84=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/book/book.wxml | 20 ++++++++++++++++++++ pages/book/book.wxss | 2 ++ pages/index/index.wxml | 1 + pages/index/index.wxss | 10 ++++++++++ 4 files changed, 33 insertions(+) diff --git a/pages/book/book.wxml b/pages/book/book.wxml index 0cbad2e..bc786fa 100644 --- a/pages/book/book.wxml +++ b/pages/book/book.wxml @@ -70,6 +70,26 @@ 12:00-13:00 15元 + + 2020-01-01 + 12:00-13:00 + 15元 + + + 2020-01-01 + 12:00-13:00 + 15元 + + + 2020-01-01 + 12:00-13:00 + 15元 + + + 2020-01-01 + 12:00-13:00 + 15元 + diff --git a/pages/book/book.wxss b/pages/book/book.wxss index 2332f35..88da7cc 100644 --- a/pages/book/book.wxss +++ b/pages/book/book.wxss @@ -97,6 +97,7 @@ } .time{ padding: 0 30rpx; + margin-bottom: 260rpx; } .time-box{ display: inline-block; @@ -123,6 +124,7 @@ left: 0; right: 0; padding: 15rpx 30rpx; + background: #fff; } .phone-code{ margin-bottom: 20rpx; diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 21fceed..1945aba 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -118,6 +118,7 @@ 文字 + 直播中 \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss index e60de93..b0993d1 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -146,4 +146,14 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; +} +.broadcast-status{ + position: absolute; + top: 10rpx; + right: 10rpx; + padding: 5rpx; + background: #9F1512; + color: #fff; + font-size: 26rpx; + border-radius: 10rpx; } \ No newline at end of file From 951ed48400cea58066fc3f02b8d321aa935c108e Mon Sep 17 00:00:00 2001 From: dong_bo0602 <358256383@qq.com> Date: Sat, 27 Jun 2020 14:04:03 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E5=9C=BA=E9=A6=86=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E3=80=81=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/myVenueOrder/myVenueOrder.js | 66 +++++++++++++++++++++ pages/myVenueOrder/myVenueOrder.json | 3 + pages/myVenueOrder/myVenueOrder.wxml | 44 ++++++++++++++ pages/myVenueOrder/myVenueOrder.wxss | 51 +++++++++++++++++ pages/orderDetail/orderDetail.js | 66 +++++++++++++++++++++ pages/orderDetail/orderDetail.json | 3 + pages/orderDetail/orderDetail.wxml | 67 ++++++++++++++++++++++ pages/orderDetail/orderDetail.wxss | 85 ++++++++++++++++++++++++++++ 8 files changed, 385 insertions(+) create mode 100644 pages/myVenueOrder/myVenueOrder.js create mode 100644 pages/myVenueOrder/myVenueOrder.json create mode 100644 pages/myVenueOrder/myVenueOrder.wxml create mode 100644 pages/myVenueOrder/myVenueOrder.wxss create mode 100644 pages/orderDetail/orderDetail.js create mode 100644 pages/orderDetail/orderDetail.json create mode 100644 pages/orderDetail/orderDetail.wxml create mode 100644 pages/orderDetail/orderDetail.wxss diff --git a/pages/myVenueOrder/myVenueOrder.js b/pages/myVenueOrder/myVenueOrder.js new file mode 100644 index 0000000..c263f75 --- /dev/null +++ b/pages/myVenueOrder/myVenueOrder.js @@ -0,0 +1,66 @@ +// pages/myVenueOrder/myVenueOrder.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + 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/myVenueOrder/myVenueOrder.json b/pages/myVenueOrder/myVenueOrder.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/myVenueOrder/myVenueOrder.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/myVenueOrder/myVenueOrder.wxml b/pages/myVenueOrder/myVenueOrder.wxml new file mode 100644 index 0000000..542582a --- /dev/null +++ b/pages/myVenueOrder/myVenueOrder.wxml @@ -0,0 +1,44 @@ + + + + + + + + 场馆 + 篮球 + + 订单编号:12456789 + 下单时间:2020-01-01 10:00:00 + ¥15元 + + + + + + + + + 场馆 + 篮球 + + 订单编号:12456789 + 下单时间:2020-01-01 10:00:00 + ¥15元 + + + + + + + + + 场馆 + 篮球 + + 订单编号:12456789 + 下单时间:2020-01-01 10:00:00 + ¥15元 + + + \ No newline at end of file diff --git a/pages/myVenueOrder/myVenueOrder.wxss b/pages/myVenueOrder/myVenueOrder.wxss new file mode 100644 index 0000000..214e7f4 --- /dev/null +++ b/pages/myVenueOrder/myVenueOrder.wxss @@ -0,0 +1,51 @@ +.venue{ + padding: 10rpx 30rpx; +} +.order-box{ + border-radius: 10rpx; + padding: 10rpx; + box-shadow:0px 0px 17rpx 0px rgba(0,0,0,0.1); + display: flex; + justify-content: space-between; + margin-bottom: 20rpx; +} +.venue-img{ + width: 35%; + height: 180rpx; +} +.venue-img image{ + width: 100%; + height: 100%; + border-radius: 10rpx; +} +.order-info{ + width: 62%; +} +.venue-title{ + font-size: 32rpx; + display: flex; + justify-content: space-between; +} +.title{ + width: 70%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.project{ + font-size: 28rpx; + background: rgba(159,21,18,.1); + color: #9F1512; + padding: 0 5rpx; + border-radius: 10rpx; +} +.number-time{ + font-size: 26rpx; + color: #949494; + margin-top: 10rpx; +} +.price{ + font-size: 30rpx; + color: #9F1512; + margin-top: 10rpx; +} \ No newline at end of file diff --git a/pages/orderDetail/orderDetail.js b/pages/orderDetail/orderDetail.js new file mode 100644 index 0000000..1fbd268 --- /dev/null +++ b/pages/orderDetail/orderDetail.js @@ -0,0 +1,66 @@ +// pages/orderDetail/orderDetail.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + 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/orderDetail/orderDetail.json b/pages/orderDetail/orderDetail.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/orderDetail/orderDetail.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/orderDetail/orderDetail.wxml b/pages/orderDetail/orderDetail.wxml new file mode 100644 index 0000000..4b3b415 --- /dev/null +++ b/pages/orderDetail/orderDetail.wxml @@ -0,0 +1,67 @@ + + + + + + 场馆 + + 订单编号:123456789 + + + 下单时间:10:10:10 + + + 价  格:15元 + + + + + 预定详情 + + + + 2020-01-01 + 12:00-13:00 + + + 场地1 + 15元 + 取消预定 + + + + + 2020-01-01 + 12:00-13:00 + + + 场地1 + 15元 + 取消预定 + + + + + 2020-01-01 + 12:00-13:00 + + + 场地1 + 15元 + 取消预定 + + + + + 2020-01-01 + 12:00-13:00 + + + 场地1 + 15元 + 取消预定 + + + + +全部取消 \ No newline at end of file diff --git a/pages/orderDetail/orderDetail.wxss b/pages/orderDetail/orderDetail.wxss new file mode 100644 index 0000000..bb039b6 --- /dev/null +++ b/pages/orderDetail/orderDetail.wxss @@ -0,0 +1,85 @@ +.venue{ + padding: 15rpx 30rpx; + display: flex; + justify-content: space-between; + border-bottom: 3px solid #DEDEDE; +} +.venue-img{ + width: 35%; + height: 180rpx; +} +.venue-img image{ + width: 100%; + height: 100%; +} +.venue-info{ + width: 63%; +} +.venue-title{ + font-size: 32rpx; + color: #000; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.time-number{ + font-size: 26rpx; + margin-top: 10rpx; +} +.time-number text{ + color: #949494; +} +.book{ + margin-top: 20rpx; + padding: 0 30rpx; + margin-bottom: 85rpx; +} +.book-title{ + font-size: 32rpx; + padding-left: 25rpx; + border-left: 5px solid #9F1512; +} +.order{ + margin-top: 20rpx; +} +.order-box{ + display: inline-block; + width: 32%; + margin-right: 1%; + border: 1px solid #9F1512; + border-radius: 10rpx; + text-align: center; + margin-bottom: 10rpx; +} +.order-box:nth-child(3n){ + margin-right: 0; +} +.top{ + background: #9F1512; + color: #fff; + font-size: 28rpx; +} +.bottom{ + font-size: 28rpx; +} +.cancel{ + width: 70%; + margin: 0 auto 10rpx; + background: #9F1512; + color: #fff; + padding: 5rpx 0; + border-radius: 10rpx; +} +.cancel-all{ + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: 80rpx; + display: flex; + justify-content: center; + align-items: center; + background: #9F1512; + color: #fff; + font-size: 32rpx; +} \ No newline at end of file From 9947500647f6618f0b5a88f26defef615c4c1cd3 Mon Sep 17 00:00:00 2001 From: dong_bo0602 <358256383@qq.com> Date: Sat, 27 Jun 2020 14:18:42 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E8=B7=9D=E7=A6=BB=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/venue/venue.wxss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/venue/venue.wxss b/pages/venue/venue.wxss index aa6ecd2..dbd18e8 100644 --- a/pages/venue/venue.wxss +++ b/pages/venue/venue.wxss @@ -68,7 +68,7 @@ } .name{ font-size: 30rpx; - width: 70%; + width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; From 09628b0ed8723b6f773c3a79228cbba71d222447 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Sat, 27 Jun 2020 15:37:07 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 2 +- pages/myVolunteerTeam/myVolunteerTeam.js | 7 +- pages/myVolunteerTeam/myVolunteerTeam.wxml | 2 +- pages/teamDetail/teamDetail.js | 106 ++++++++++++++++++++- pages/teamDetail/teamDetail.wxml | 49 ++++------ 5 files changed, 131 insertions(+), 35 deletions(-) diff --git a/app.json b/app.json index 397f712..a071b04 100644 --- a/app.json +++ b/app.json @@ -1,11 +1,11 @@ { "pages": [ + "pages/center/center", "pages/book/book", "pages/index/index", "pages/broadcast/broadcast", "pages/activityDialog/activityDialog", "pages/teamDetail/teamDetail", - "pages/center/center", "pages/volunteerRegister/volunteerRegister", "pages/volunteer/volunteer", "pages/heritage/heritage", diff --git a/pages/myVolunteerTeam/myVolunteerTeam.js b/pages/myVolunteerTeam/myVolunteerTeam.js index 840cbc1..94925b1 100644 --- a/pages/myVolunteerTeam/myVolunteerTeam.js +++ b/pages/myVolunteerTeam/myVolunteerTeam.js @@ -10,7 +10,6 @@ Page({ otherTeamMap: {}, type: '1', teamId: '', - }, getToken: function() { var self = this; @@ -26,6 +25,12 @@ Page({ }) }) }, + toTeamDetail: function(e) { + var teamId = e.currentTarget.dataset.teamid; + wx.navigateTo({ + url: '../teamDetail/teamDetail?teamId=' + teamId, + }) + }, newTeam: function () { wx.navigateTo({ url: '../newTeam/newTeam', diff --git a/pages/myVolunteerTeam/myVolunteerTeam.wxml b/pages/myVolunteerTeam/myVolunteerTeam.wxml index 38740fc..536dfcc 100644 --- a/pages/myVolunteerTeam/myVolunteerTeam.wxml +++ b/pages/myVolunteerTeam/myVolunteerTeam.wxml @@ -1,5 +1,5 @@ - + {{item.teamName}} 申请加入 diff --git a/pages/teamDetail/teamDetail.js b/pages/teamDetail/teamDetail.js index aaf2ecc..036ad0c 100644 --- a/pages/teamDetail/teamDetail.js +++ b/pages/teamDetail/teamDetail.js @@ -1,18 +1,120 @@ // pages/teamDetail/teamDetail.js +var app = getApp(); Page({ /** * 页面的初始数据 */ data: { + token: '', + teamId: '', + dataMap: [], + memberData: {}, + checkData: {} + }, + getToken: function() { + var self = this; + return new Promise(resolve =>{ + wx.getStorage({ + key: 'token', + success(res) { + self.setData({ + token: res.data + }) + return resolve(); + } + }) + }) + }, + getDetail(teamId) { + var self = this; + app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/team/getteambyid/' + teamId, []), + {}, { + headers: { + token: self.data.token + } + }, function(code, data) { + console.log(data) + if('200' == code) { + self.setData({ + dataMap: data + }) + } + }, function() { + + }, function() { + + }) + }, + getMember(teamId) { + var self = this; + app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/teammember/listteammember?teamId=' + teamId, []), + {}, { + headers: { + token: self.data.token + } + }, function(code, data) { + if('200' == code) { + var teamMember = []; + var checkMember = []; + for(var item of data) { + if('1' == item.status) { + teamMember.push(item); + }else { + checkMember.push(item); + } + } + self.setData({ + memberData: teamMember, + checkData: checkMember + }) + } + }, function() { + + }, function() { + + }) + }, + agree(e) { + var self = this; + console.log(e) + var id = e.currentTarget.dataset.teammemberid; + var type = e.currentTarget.dataset.type; + app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/teammember/checkmember/'+id+'/' + type + '?teamId=' + self.data.teamId, []), + {}, { + headers: { + token: self.data.token + } + }, function(code, data) { + if('200' == code) { + if('1' == type) { + app.dialog.msg('审核通过!'); + }else { + app.dialog.msg('审核驳回!'); + } + wx.navigateTo({ + url: '../myVolunteerTeam/myVolunteerTeam', + }) + } + }, function() { + + }, function() { + + }) }, - /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + var self = this; + self.setData({ + teamId: options.teamId + }) + this.getToken().then(result => { + this.getDetail(options.teamId); + this.getMember(options.teamId); + }) }, /** diff --git a/pages/teamDetail/teamDetail.wxml b/pages/teamDetail/teamDetail.wxml index 7f28701..5b09e1a 100644 --- a/pages/teamDetail/teamDetail.wxml +++ b/pages/teamDetail/teamDetail.wxml @@ -2,66 +2,55 @@ 团队名称: - 团队名称 + {{dataMap.teamName}} 团队人数: - 1 + {{dataMap.count}} 所属区域: - 所属区域 + {{dataMap.teamCityDictionaryName}} {{dataMap.teamCountyDictionaryName}} {{dataMap.teamAreaDictionaryName}} + + + 团队口号: + {{dataMap.teamWatchword}} 团队介绍: - 团队介绍 + {{dataMap.content}} 团队成员 - + - 名字队长 - 加入时间:2020-02-02 - - - - - - - - 名字队长 - 加入时间:2020-02-02 - - - - - - - - 名字队长 - 加入时间:2020-02-02 + {{item.memberName}} + 队长 + 成员 + + 加入时间:{{item.inputTime}} 申请人员 - + - 名字 + {{item.memberName}} - 通过 - 拒绝 + 通过 + 拒绝 - 加入时间:2020-02-02 + 加入时间:{{item.inputTime}} From 21145d88e0b57d0771624282eab303389a25725e Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Sat, 27 Jun 2020 15:47:58 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- pages/activity/activity.js | 4 ++-- pages/activityDetail/activityDetail.js | 4 ++-- pages/myVolunteerActivity/myVolunteerActivity.js | 12 ++++++------ pages/myVolunteerTeam/myVolunteerTeam.js | 6 +++--- pages/newTeam/newTeam.js | 6 +++--- pages/newVolunteerActivity/newVolunteerActivity.js | 4 ++-- pages/serviceActivityDetail/serviceActivityDetail.js | 12 ++++++------ pages/teamDetail/teamDetail.js | 6 +++--- pages/volunteer/volunteer.js | 4 ++-- pages/volunteerRegister/volunteerRegister.js | 4 ++-- pages/volunteerTeam/volunteerTeam.js | 10 +++++----- 12 files changed, 37 insertions(+), 37 deletions(-) diff --git a/app.js b/app.js index ce64a40..bf675e7 100644 --- a/app.js +++ b/app.js @@ -8,7 +8,7 @@ App({ libraryUrl: 'http://192.168.0.113:8081/library', venueUrl: 'http://192.168.0.109:8082/venuebooking', activityUrl: 'http://192.168.0.111:8080/culturalactivity', - volunteerUrl: 'http://192.168.0.111:8888/volunteer/', + volunteerUrl: 'http://192.168.0.111:8888/volunteer', liveUrl: 'http://192.168.0.113:8084/live', restAjax: restAjax, dialog: dialog, diff --git a/pages/activity/activity.js b/pages/activity/activity.js index 75d3736..530b1f2 100644 --- a/pages/activity/activity.js +++ b/pages/activity/activity.js @@ -19,12 +19,12 @@ Page({ */ onLoad: function (options) { var self = this; - app.restAjax.get(app.restAjax.path(app.activityUrl + 'wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease', []), + app.restAjax.get(app.restAjax.path(app.activityUrl + '/wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease', []), {}, null, function(code, data) { if('200' == code) { for(var item of data.rows) { if('' != item.activityImage) { - item.activityImage = app.activityUrl + 'route/file/downloadfile/true/' + item.activityImage; + item.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + item.activityImage; } } self.setData({ diff --git a/pages/activityDetail/activityDetail.js b/pages/activityDetail/activityDetail.js index 115d24b..fb366e4 100644 --- a/pages/activityDetail/activityDetail.js +++ b/pages/activityDetail/activityDetail.js @@ -19,10 +19,10 @@ Page({ onLoad: function (options) { var self = this; var id = options.id; - app.restAjax.get(app.restAjax.path(app.activityUrl + 'wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id, []), + app.restAjax.get(app.restAjax.path(app.activityUrl + '/wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id, []), {}, null, function(code, data) { if('200' == code) { - data.activityImage = app.activityUrl + 'route/file/downloadfile/true/' + data.activityImage; + data.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + data.activityImage; self.setData({ dataMap: data }) diff --git a/pages/myVolunteerActivity/myVolunteerActivity.js b/pages/myVolunteerActivity/myVolunteerActivity.js index 216845f..7387995 100644 --- a/pages/myVolunteerActivity/myVolunteerActivity.js +++ b/pages/myVolunteerActivity/myVolunteerActivity.js @@ -49,10 +49,10 @@ Page({ }) if(self.data.type === '1') { // 我发起的活动 - self.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservice'); + self.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservice'); }else { // 我参加的活动 - self.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagemyjoinservice'); + self.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagemyjoinservice'); } }, myActivity: function(url) { @@ -67,7 +67,7 @@ Page({ for(var item of data.rows) { if('' != item.photo) { var photoArr = item.photo.split(","); - item.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + photoArr[0]; + item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + photoArr[0]; } } self.setData({ @@ -93,14 +93,14 @@ Page({ var methodType; var title; if('1' == self.data.type) { - url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember' + url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember' teamMemberVO = { teamId: e.currentTarget.dataset.teamid } methodType = app.restAjax.post title = '申请成功!' }else { - url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId + url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId methodType = app.restAjax.get title = '退出成功!' } @@ -128,7 +128,7 @@ Page({ */ onLoad: function (options) { this.getToken().then(result => { - this.myActivity(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservice'); + this.myActivity(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservice'); }) }, diff --git a/pages/myVolunteerTeam/myVolunteerTeam.js b/pages/myVolunteerTeam/myVolunteerTeam.js index 94925b1..cc5261b 100644 --- a/pages/myVolunteerTeam/myVolunteerTeam.js +++ b/pages/myVolunteerTeam/myVolunteerTeam.js @@ -68,14 +68,14 @@ Page({ var methodType; var title; if('1' == self.data.type) { - url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember' + url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember' teamMemberVO = { teamId: e.currentTarget.dataset.teamid } methodType = app.restAjax.post title = '申请成功!' }else { - url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId + url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId methodType = app.restAjax.get title = '退出成功!' } @@ -103,7 +103,7 @@ Page({ */ onLoad: function (options) { this.getToken().then(result => { - this.otherTeam(app.volunteerUrl + 'wxminiapp/team/myteamm'); + this.otherTeam(app.volunteerUrl + '/wxminiapp/team/myteamm'); }) }, diff --git a/pages/newTeam/newTeam.js b/pages/newTeam/newTeam.js index 8cea636..881d966 100644 --- a/pages/newTeam/newTeam.js +++ b/pages/newTeam/newTeam.js @@ -64,7 +64,7 @@ Page({ success (res) { const tempFilePaths = res.tempFilePaths console.log(tempFilePaths) - app.restAjax.file(app.restAjax.path(app.volunteerUrl + 'app/file/uploadimage', []), tempFilePaths[0], + app.restAjax.file(app.restAjax.path(app.volunteerUrl + '/app/file/uploadimage', []), tempFilePaths[0], 'image', { headers: { token: self.data.token @@ -184,7 +184,7 @@ Page({ self.data.teamArea[self.data.teamAreaIndex].dictionaryId : '', }; - app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/team/saveteam', []), + app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/team/saveteam', []), teamVO, { headers: { 'token': self.data.token @@ -208,7 +208,7 @@ Page({ getDataFromDict: function(dictId, type) { var self = this; return new Promise(resolve => { - app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId, []), + app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/datadictionary/listdictionarybyparentid/' + dictId, []), {}, { headers: { token: self.data.token diff --git a/pages/newVolunteerActivity/newVolunteerActivity.js b/pages/newVolunteerActivity/newVolunteerActivity.js index 03915af..3b7aab7 100644 --- a/pages/newVolunteerActivity/newVolunteerActivity.js +++ b/pages/newVolunteerActivity/newVolunteerActivity.js @@ -89,7 +89,7 @@ Page({ wx.chooseImage({ success (res) { const tempFilePaths = res.tempFilePaths - app.restAjax.file(app.restAjax.path(app.volunteerUrl + 'app/file/uploadimage', []), tempFilePaths[0], + app.restAjax.file(app.restAjax.path(app.volunteerUrl + '/app/file/uploadimage', []), tempFilePaths[0], 'image', { headers: { token: self.data.token @@ -175,7 +175,7 @@ Page({ photo: self.data.photo, serviceRequirement: self.data.serviceRequirement }; - app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteerservice/savevolunteerservice', []), + app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/savevolunteerservice', []), volunteerServiceVO, { headers: { 'token': self.data.token diff --git a/pages/serviceActivityDetail/serviceActivityDetail.js b/pages/serviceActivityDetail/serviceActivityDetail.js index 15f8aa8..93857a4 100644 --- a/pages/serviceActivityDetail/serviceActivityDetail.js +++ b/pages/serviceActivityDetail/serviceActivityDetail.js @@ -32,14 +32,14 @@ Page({ }, getDetail: function(id) { var self = this; - app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteerservice/getvolunteerservicebyid/' + id, []), + app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/getvolunteerservicebyid/' + id, []), {}, { headers: { 'token': self.data.token } }, function(code, data) { if('200' == code) { - data.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + data.photo; + data.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + data.photo; self.setData({ dataMap: data }) @@ -130,7 +130,7 @@ Page({ */ sendEnrollRequest: function(serviceMemberVO) { var self = this; - app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/servicemember/saveservicemember', []), + app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/servicemember/saveservicemember', []), serviceMemberVO, { headers: { token: self.data.token @@ -155,9 +155,9 @@ Page({ var self = this; var url; if(self.data.teamArray.length > 0) { - url = app.volunteerUrl + 'wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId; + url = app.volunteerUrl + '/wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/' + self.data.team[self.data.teamIndex].teamId; }else { - url = app.volunteerUrl + 'wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null'; + url = app.volunteerUrl + '/wxminiapp/servicemember/cancelapply/'+ self.data.type +'/'+ self.data.serviceId +'/null'; } app.restAjax.get(app.restAjax.path(url, []), {}, { @@ -183,7 +183,7 @@ Page({ getMyTeam: function() { var self = this; console.log(self.data.token) - app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/team/myteamm', []), + app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/team/myteamm', []), {}, { headers: { token: self.data.token diff --git a/pages/teamDetail/teamDetail.js b/pages/teamDetail/teamDetail.js index 036ad0c..6f911e8 100644 --- a/pages/teamDetail/teamDetail.js +++ b/pages/teamDetail/teamDetail.js @@ -28,7 +28,7 @@ Page({ }, getDetail(teamId) { var self = this; - app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/team/getteambyid/' + teamId, []), + app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/team/getteambyid/' + teamId, []), {}, { headers: { token: self.data.token @@ -48,7 +48,7 @@ Page({ }, getMember(teamId) { var self = this; - app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/teammember/listteammember?teamId=' + teamId, []), + app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/teammember/listteammember?teamId=' + teamId, []), {}, { headers: { token: self.data.token @@ -80,7 +80,7 @@ Page({ console.log(e) var id = e.currentTarget.dataset.teammemberid; var type = e.currentTarget.dataset.type; - app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/teammember/checkmember/'+id+'/' + type + '?teamId=' + self.data.teamId, []), + app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/teammember/checkmember/'+id+'/' + type + '?teamId=' + self.data.teamId, []), {}, { headers: { token: self.data.token diff --git a/pages/volunteer/volunteer.js b/pages/volunteer/volunteer.js index 5821d54..3eb8f9c 100644 --- a/pages/volunteer/volunteer.js +++ b/pages/volunteer/volunteer.js @@ -36,14 +36,14 @@ Page({ */ activityList: function() { var self = this; - app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteerservice/listpagevolunteerservicerelease', []), + app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservicerelease', []), {}, null, function(code, data) { if('200' == code) { // 将活动照片,拼接为可访问地址 for(var item of data.rows) { if('' != item.photo) { var photoArr = item.photo.split(","); - item.photo = app.volunteerUrl + 'route/file/downloadfile/true/' + photoArr[0]; + item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + photoArr[0]; } } self.setData({ diff --git a/pages/volunteerRegister/volunteerRegister.js b/pages/volunteerRegister/volunteerRegister.js index beab318..7e5cc41 100644 --- a/pages/volunteerRegister/volunteerRegister.js +++ b/pages/volunteerRegister/volunteerRegister.js @@ -203,7 +203,7 @@ Page({ agree: self.data.isAgree, openExperience : self.data.openExperience }; - app.restAjax.post(app.restAjax.path(app.volunteerUrl + 'wxminiapp/volunteer/savevolunteer', []), + app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteer/savevolunteer', []), volunteerVO, { headers: { 'token': self.data.token @@ -227,7 +227,7 @@ Page({ getDataFromDict: function(dictId, type) { var self = this; return new Promise(resolve => { - app.restAjax.get(app.restAjax.path(app.volunteerUrl + 'app/datadictionary/listdictionarybyparentid/' + dictId, []), + app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/app/datadictionary/listdictionarybyparentid/' + dictId, []), {}, { headers: { 'token': self.data.token diff --git a/pages/volunteerTeam/volunteerTeam.js b/pages/volunteerTeam/volunteerTeam.js index 032dbc8..c01b99b 100644 --- a/pages/volunteerTeam/volunteerTeam.js +++ b/pages/volunteerTeam/volunteerTeam.js @@ -37,9 +37,9 @@ Page({ type: e.currentTarget.dataset.type }) if(self.data.type === '1') { - self.otherTeam(app.volunteerUrl + 'wxminiapp/team/otherteamm?otherTeam=true'); + self.otherTeam(app.volunteerUrl + '/wxminiapp/team/otherteamm?otherTeam=true'); }else { - self.otherTeam(app.volunteerUrl + 'wxminiapp/team/myjointeam?myTeam=true'); + self.otherTeam(app.volunteerUrl + '/wxminiapp/team/myjointeam?myTeam=true'); } }, otherTeam: function(url) { @@ -74,14 +74,14 @@ Page({ var methodType; var title; if('1' == self.data.type) { - url = app.volunteerUrl + 'wxminiapp/teammember/saveteammember' + url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember' teamMemberVO = { teamId: e.currentTarget.dataset.teamid } methodType = app.restAjax.post title = '申请成功!' }else { - url = app.volunteerUrl + 'wxminiapp/teammember/quitTeam/' + self.data.teamId + url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId methodType = app.restAjax.get title = '退出成功!' } @@ -109,7 +109,7 @@ Page({ */ onLoad: function (options) { this.getToken().then(result => { - this.otherTeam(app.volunteerUrl + 'wxminiapp/team/otherteamm?otherTeam=true'); + this.otherTeam(app.volunteerUrl + '/wxminiapp/team/otherteamm?otherTeam=true'); }) }, From 7e0eb907a03d441220420c4575392febc7b22397 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Sat, 27 Jun 2020 18:16:22 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E5=88=97=E8=A1=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/activityDialog/activityDialog.js | 42 +++++++++++- .../serviceActivityDetail.js | 10 +++ .../serviceActivityDetail.wxml | 5 +- .../serviceActivityDetail.wxss | 9 +++ pages/volunteerRegister/volunteerRegister.js | 67 ++++++++++++++----- 5 files changed, 112 insertions(+), 21 deletions(-) diff --git a/pages/activityDialog/activityDialog.js b/pages/activityDialog/activityDialog.js index 3c20d34..1146832 100644 --- a/pages/activityDialog/activityDialog.js +++ b/pages/activityDialog/activityDialog.js @@ -1,18 +1,56 @@ // pages/activityDialog/activityDialog.js +var app = getApp(); Page({ /** * 页面的初始数据 */ data: { - + token: '', + serviceId: '' }, + getToken: function() { + var self = this; + return new Promise(resolve =>{ + wx.getStorage({ + key: 'token', + success(res) { + self.setData({ + token: res.data + }) + return resolve(); + } + }) + }) + }, + getActivityHis: function() { + var self = this; + app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/teamactivityhis/listpageteamactivityhis?serviceId=' + self.data.serviceId, []), + {}, { + headers: { + token: self.data.token + } + }, function(code, data) { + if('200' == code) { + console.log(data) + } + }, function() { + }, function() { + + }) + }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + var self = this; + self.setData({ + serviceId: options.serviceId + }) + this.getToken().then(result => { + this.getActivityHis() + }) }, /** diff --git a/pages/serviceActivityDetail/serviceActivityDetail.js b/pages/serviceActivityDetail/serviceActivityDetail.js index 93857a4..31dd13d 100644 --- a/pages/serviceActivityDetail/serviceActivityDetail.js +++ b/pages/serviceActivityDetail/serviceActivityDetail.js @@ -224,11 +224,21 @@ Page({ }) }, + toActivityHis: function() { + var self = this; + wx.navigateTo({ + url: '../activityDialog/activityDialog?serviceId=' + self.data.serviceId, + }) + }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { var id = options.id; + var self = this; + self.setData({ + serviceId: id + }) this.getToken().then(result => { this.getDetail(id); this.getMyTeam(); diff --git a/pages/serviceActivityDetail/serviceActivityDetail.wxml b/pages/serviceActivityDetail/serviceActivityDetail.wxml index 9f8025f..9d86543 100644 --- a/pages/serviceActivityDetail/serviceActivityDetail.wxml +++ b/pages/serviceActivityDetail/serviceActivityDetail.wxml @@ -22,7 +22,10 @@ - 活动详情 + + 活动详情 + 评论列表 + diff --git a/pages/serviceActivityDetail/serviceActivityDetail.wxss b/pages/serviceActivityDetail/serviceActivityDetail.wxss index caed339..cb9f554 100644 --- a/pages/serviceActivityDetail/serviceActivityDetail.wxss +++ b/pages/serviceActivityDetail/serviceActivityDetail.wxss @@ -51,6 +51,15 @@ padding-left: 10rpx; font-size: 30rpx; margin-bottom: 10rpx; + display: flex; + justify-content: space-between; +} +.comment-btn{ + padding: 0 10rpx; + background: #9F1512; + color: #fff; + font-size: 28rpx; + border-radius: 10rpx; } .part-content{ font-size: 28rpx; diff --git a/pages/volunteerRegister/volunteerRegister.js b/pages/volunteerRegister/volunteerRegister.js index 7e5cc41..661383c 100644 --- a/pages/volunteerRegister/volunteerRegister.js +++ b/pages/volunteerRegister/volunteerRegister.js @@ -7,6 +7,7 @@ Page({ */ data: { token: '', + volunteerMsg: [], isAgree: false, // 是否同意志愿者注册协议 openExperience: 0, tempObj: {}, // 用于临时存储字典表返回的数据 @@ -180,7 +181,7 @@ Page({ icon: 'none', duration: 1500 }) - return false; + return false; } var volunteerVO = { serviceCity: self.data.teamCity[self.data.teamCityIndex] != '' @@ -203,7 +204,13 @@ Page({ agree: self.data.isAgree, openExperience : self.data.openExperience }; - app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteer/savevolunteer', []), + var url; + if(!self.data.volunteerMsg) { + url = '/wxminiapp/volunteer/savevolunteer'; + }else { + url = '/wxminiapp/volunteer/updatevolunteer/' + self.data.volunteerMsg.volunteerId; + } + app.restAjax.post(app.restAjax.path(app.volunteerUrl + url, []), volunteerVO, { headers: { 'token': self.data.token @@ -263,31 +270,55 @@ Page({ }) }) }, + getVolunteerMsg() { + var self = this; + return new Promise(resolve => { + app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteer/getvolunteerbyuserid', []), + {}, { + headers: { + 'token': self.data.token + } + }, function(code, data) { + if('200' == code) { + self.setData({ + volunteerMsg: data + }) + } + return resolve(); + }, function() { + + }, function() { + + }) + }) + }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { var self = this; this.getToken().then(result => { - this.getDataFromDict('a223b308-014a-4e89-93fa-035a564e7fda', 1).then(result => { - self.setData({ - serviceType: self.data.tempObj, - tempObj: {} - }) - }).then(result => { - this.getDataFromDict('7b213c37-8575-4db3-bda1-86c4e38589f7', 1).then(result => { + this.getVolunteerMsg().then(result => { + this.getDataFromDict('a223b308-014a-4e89-93fa-035a564e7fda', 1).then(result => { self.setData({ - serviceIndustry: self.data.tempObj, + serviceType: self.data.tempObj, tempObj: {} }) - }) - }).then(result => { - this.getDataFromDict('4a03e904-81e2-48e9-9006-e15ea4a6bc69', 2).then(result => { - self.setData({ - teamCity: self.data.tempObj, - teamCityArray: self.data.tempArray, - tempObj: {}, - tempArray: [] + }).then(result => { + this.getDataFromDict('7b213c37-8575-4db3-bda1-86c4e38589f7', 1).then(result => { + self.setData({ + serviceIndustry: self.data.tempObj, + tempObj: {} + }) + }) + }).then(result => { + this.getDataFromDict('4a03e904-81e2-48e9-9006-e15ea4a6bc69', 2).then(result => { + self.setData({ + teamCity: self.data.tempObj, + teamCityArray: self.data.tempArray, + tempObj: {}, + tempArray: [] + }) }) }) }) From b01171bab8947c3caa7287399d7d4e2d6fe0b2ea Mon Sep 17 00:00:00 2001 From: dong_bo0602 <358256383@qq.com> Date: Sat, 27 Jun 2020 19:21:38 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 7 +++ pages/broadcastList/broadcastList.js | 66 ++++++++++++++++++++++++++ pages/broadcastList/broadcastList.json | 3 ++ pages/broadcastList/broadcastList.wxml | 9 ++++ pages/broadcastList/broadcastList.wxss | 22 +++++++++ 5 files changed, 107 insertions(+) create mode 100644 pages/broadcastList/broadcastList.js create mode 100644 pages/broadcastList/broadcastList.json create mode 100644 pages/broadcastList/broadcastList.wxml create mode 100644 pages/broadcastList/broadcastList.wxss diff --git a/app.json b/app.json index a071b04..9dfcf50 100644 --- a/app.json +++ b/app.json @@ -1,8 +1,15 @@ { "pages": [ +<<<<<<< Updated upstream "pages/center/center", "pages/book/book", +======= + "pages/broadcastList/broadcastList", +>>>>>>> Stashed changes "pages/index/index", + "pages/orderDetail/orderDetail", + "pages/myVenueOrder/myVenueOrder", + "pages/book/book", "pages/broadcast/broadcast", "pages/activityDialog/activityDialog", "pages/teamDetail/teamDetail", diff --git a/pages/broadcastList/broadcastList.js b/pages/broadcastList/broadcastList.js new file mode 100644 index 0000000..fe01253 --- /dev/null +++ b/pages/broadcastList/broadcastList.js @@ -0,0 +1,66 @@ +// pages/broadcastList/broadcastList.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + 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/broadcastList/broadcastList.json b/pages/broadcastList/broadcastList.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/broadcastList/broadcastList.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/broadcastList/broadcastList.wxml b/pages/broadcastList/broadcastList.wxml new file mode 100644 index 0000000..084e104 --- /dev/null +++ b/pages/broadcastList/broadcastList.wxml @@ -0,0 +1,9 @@ + + + + + 标题 + 标题 + 标题 + 标题 + \ No newline at end of file diff --git a/pages/broadcastList/broadcastList.wxss b/pages/broadcastList/broadcastList.wxss new file mode 100644 index 0000000..2830aae --- /dev/null +++ b/pages/broadcastList/broadcastList.wxss @@ -0,0 +1,22 @@ +.broadcast{ + width: 100%; + height: 400rpx; + background: #D8D8D8; + position: fixed; + top: 0; + left: 0; + right: 0; +} +video{ + width: 100%; + height: 400rpx; +} +.broadcast-title{ + padding: 30rpx; + font-size: 34rpx; + color: #242424; + border-bottom: 5px solid #FBFBFB; +} +.broadcast-list{ + margin-top: 400rpx; +} \ No newline at end of file From b390b9bc7103f2c7bd36c2ac0b45f0e457eb732e Mon Sep 17 00:00:00 2001 From: dong_bo0602 <358256383@qq.com> Date: Sat, 27 Jun 2020 19:22:12 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app.json b/app.json index 9dfcf50..64d7f6e 100644 --- a/app.json +++ b/app.json @@ -1,12 +1,8 @@ { "pages": [ -<<<<<<< Updated upstream - "pages/center/center", - "pages/book/book", -======= - "pages/broadcastList/broadcastList", ->>>>>>> Stashed changes "pages/index/index", + "pages/center/center", + "pages/broadcastList/broadcastList", "pages/orderDetail/orderDetail", "pages/myVenueOrder/myVenueOrder", "pages/book/book", From 4330df4f113637d0286a92494a439d3b06268489 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Tue, 30 Jun 2020 17:27:58 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E9=A1=B5?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/activity/activity.js | 51 +++++++-- pages/activity/activity.json | 4 +- pages/activityDetail/activityDetail.js | 80 ++++++++++--- pages/activityDetail/activityDetail.json | 3 +- pages/activityDetail/activityDetail.wxml | 5 +- pages/activityDialog/activityDialog.js | 59 +++++++++- pages/activityDialog/activityDialog.json | 4 +- pages/activityDialog/activityDialog.wxml | 34 +++--- pages/activitySign/activitySign.js | 107 +++++++++++++++++- pages/activitySign/activitySign.json | 3 +- pages/activitySign/activitySign.wxml | 22 ++-- .../myVolunteerActivity.js | 51 +-------- .../myVolunteerActivity.json | 3 +- pages/myVolunteerTeam/myVolunteerTeam.json | 3 +- pages/newTeam/newTeam.js | 2 +- pages/newTeam/newTeam.json | 3 +- pages/newTeam/newTeam.wxml | 7 +- .../newVolunteerActivity.js | 2 +- .../newVolunteerActivity.json | 3 +- .../newVolunteerActivity.wxml | 8 +- .../serviceActivityDetail.json | 3 +- pages/volunteer/volunteer.js | 40 +++++-- pages/volunteer/volunteer.json | 4 +- .../volunteerRegister/volunteerRegister.json | 3 +- pages/volunteerTeam/volunteerTeam.json | 3 +- 25 files changed, 367 insertions(+), 140 deletions(-) diff --git a/pages/activity/activity.js b/pages/activity/activity.js index 530b1f2..f5ce8cc 100644 --- a/pages/activity/activity.js +++ b/pages/activity/activity.js @@ -6,7 +6,11 @@ Page({ * 页面的初始数据 */ data: { - dataList: [] + dataList: [], + pages: { + page: 1, + rows: 5 + } }, goDetail: function (e) { var id = e.currentTarget.dataset.id; @@ -14,29 +18,46 @@ Page({ url: '../activityDetail/activityDetail?id=' + id }) }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { + getActivityList: function() { var self = this; app.restAjax.get(app.restAjax.path(app.activityUrl + '/wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease', []), - {}, null, function(code, data) { + self.data.pages, null, function(code, data) { if('200' == code) { for(var item of data.rows) { if('' != item.activityImage) { item.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + item.activityImage; } } - self.setData({ - dataList: data.rows, - }) + if(1 === self.data.pages.page) { + self.setData({ + dataList: data.rows, + }) + }else { + if(data.rows.length == 0) { + self.setData({ + [`pages.page`] : self.data.pages.page - 1 + }) + app.dialog.msg('暂无更多') + return false; + } + self.setData({ + dataList: data.rows.concat(self.data.dataList), + }) + } } }, function() { }, function() { - + wx.hideNavigationBarLoading(); //完成停止加载图标 + wx.stopPullDownRefresh(); }) }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getActivityList(); + }, /** * 生命周期函数--监听页面初次渲染完成 @@ -70,14 +91,20 @@ Page({ * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { - + // 在标题栏中显示加载图标 + wx.showNavigationBarLoading(); + var self = this; + self.setData({ + [`pages.page`] : self.data.pages.page + 1 + }) + this.getActivityList(); }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { - + }, /** diff --git a/pages/activity/activity.json b/pages/activity/activity.json index 8835af0..09e623a 100644 --- a/pages/activity/activity.json +++ b/pages/activity/activity.json @@ -1,3 +1,5 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true, + "backgroundTextStyle": "dark" } \ No newline at end of file diff --git a/pages/activityDetail/activityDetail.js b/pages/activityDetail/activityDetail.js index fb366e4..1f67409 100644 --- a/pages/activityDetail/activityDetail.js +++ b/pages/activityDetail/activityDetail.js @@ -6,31 +6,79 @@ Page({ * 页面的初始数据 */ data: { - dataMap: {} + dataMap: {}, + token: '' }, - goSign: function () { - wx.navigateTo({ - url: '../activitySign/activitySign' + getToken: function() { + var self = this; + return new Promise(resolve =>{ + wx.getStorage({ + key: 'token', + success(res) { + self.setData({ + token: res.data + }) + return resolve(); + } + }) }) }, + goSign: function (e) { + var activityId = e.currentTarget.dataset.id; + wx.navigateTo({ + url: '../activitySign/activitySign?id=' + activityId + }) + }, + cancel: function(e) { + var activityId = e.currentTarget.dataset.id; + app.restAjax.get(app.restAjax.path(app.activityUrl + '/app/activityuserapply/cancelapply/' + activityId, []), + {}, { + headers: { + token: self.data.token + } + }, function(code, data) { + if('200' == code) { + wx.navigateTo({ + url: '../activityDetail/activityDetail?id=' + activityId + }) + } + }, function() { + + }, function() { + + }) + }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { var self = this; - var id = options.id; - app.restAjax.get(app.restAjax.path(app.activityUrl + '/wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id, []), - {}, null, function(code, data) { - if('200' == code) { - data.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + data.activityImage; - self.setData({ - dataMap: data - }) - } - }, function() { + this.getToken().then(result => { + console.log(self.data.token) + var url; + var id = options.id; + if(!self.data.token) { + url = '/wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id; + }else { + url = '/wxminiapp/activitylibrary/getactivitylibrarybyid/' + id + } + 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; + self.setData({ + dataMap: data + }) + } + }, function() { - }, function() { - + }, function() { + + }) }) }, diff --git a/pages/activityDetail/activityDetail.json b/pages/activityDetail/activityDetail.json index 8835af0..7360326 100644 --- a/pages/activityDetail/activityDetail.json +++ b/pages/activityDetail/activityDetail.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/activityDetail/activityDetail.wxml b/pages/activityDetail/activityDetail.wxml index 35dfeb2..b06f942 100644 --- a/pages/activityDetail/activityDetail.wxml +++ b/pages/activityDetail/activityDetail.wxml @@ -41,6 +41,9 @@ - + 报名 + + 取消报名 + diff --git a/pages/activityDialog/activityDialog.js b/pages/activityDialog/activityDialog.js index 1146832..915664e 100644 --- a/pages/activityDialog/activityDialog.js +++ b/pages/activityDialog/activityDialog.js @@ -7,7 +7,12 @@ Page({ */ data: { token: '', - serviceId: '' + serviceId: '', + pages: { + page: 1, + rows: 5 + }, + dataList: {} }, getToken: function() { var self = this; @@ -26,18 +31,55 @@ Page({ getActivityHis: function() { var self = this; app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/teamactivityhis/listpageteamactivityhis?serviceId=' + self.data.serviceId, []), - {}, { + self.data.pages, { headers: { token: self.data.token } }, function(code, data) { if('200' == code) { - console.log(data) + var photos = []; + for(var item of data.rows) { + if('' != item.photo) { + item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + item.photo; + } + if('' != item.photos) { + var photoArr = item.photos.split(","); + for(var i=0; i - + - + + - - - - - diff --git a/pages/activitySign/activitySign.js b/pages/activitySign/activitySign.js index 13e6be0..6935898 100644 --- a/pages/activitySign/activitySign.js +++ b/pages/activitySign/activitySign.js @@ -1,18 +1,123 @@ // pages/activitySign/activitySign.js +var app = getApp(); Page({ /** * 页面的初始数据 */ data: { - + token: '', + dataMap: {}, + phone: '', + code: '', + name: '', + idCard: '', + trueCode: '', + activityId: '' }, + getToken: function() { + var self = this; + return new Promise(resolve =>{ + wx.getStorage({ + key: 'token', + success(res) { + self.setData({ + token: res.data + }) + return resolve(); + } + }) + }) + }, + getCode: function() { + var self = this; + if(!self.data.phone) { + app.dialog.msg('请输入手机号'); + return false; + } + app.restAjax.get(app.restAjax.path(app.activityUrl + '/app/activityuserapply/saveSmsCoderelease/' + self.data.phone, []), + {}, null, function(code, data) { + console.log(data) + if('200' == code) { + + } + }, function() { + }, function() { + + }) + }, + commit: function() { + var self = this; + if(!self.data.phone) { + app.dialog.msg('请输入手机号'); + return false; + } + if(!self.data.name) { + app.dialog.msg('请输入姓名'); + return false; + } + if(!self.data.idCard) { + app.dialog.msg('请输入身份证号码'); + return false; + } + var activityUserApplyVO = { + activityId: self.data.activityId, + code: self.data.code, + userIdCard: self.data.idCard, + userName: self.data.name, + userPhone: self.data.phone + } + app.restAjax.post(app.restAjax.path(app.activityUrl + '/app/activityuserapply/saveactivityuserapplyrelease', []), + activityUserApplyVO, { + headers: { + token: self.data.token + } + }, function(code, data) { + console.log(data) + if('200' == code) { + + } + }, function() { + + }, function() { + + }) + }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { + var self = this; + this.getToken().then(result => { + var url; + var id = options.id; + if(!self.data.token) { + url = '/wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id; + }else { + url = '/wxminiapp/activitylibrary/getactivitylibrarybyid/' + id + } + self.setData({ + activityId: options.id + }) + 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; + self.setData({ + dataMap: data + }) + } + }, function() { + }, function() { + + }) + }) }, /** diff --git a/pages/activitySign/activitySign.json b/pages/activitySign/activitySign.json index 8835af0..7360326 100644 --- a/pages/activitySign/activitySign.json +++ b/pages/activitySign/activitySign.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/activitySign/activitySign.wxml b/pages/activitySign/activitySign.wxml index f4bcc14..fb4d4b1 100644 --- a/pages/activitySign/activitySign.wxml +++ b/pages/activitySign/activitySign.wxml @@ -1,29 +1,29 @@ - + - 银保监会印发《关于加快推进意外金融风险… + {{dataMap.activityTitle}} 活动人数: - 100人 + {{dataMap.activityUserNum }} 活动时间: - 2020-02-03至2020-02-04 + {{dataMap.activityStartTime}}至{{dataMap.activityEndTime}} 活动地址: - 活动地址 + {{dataMap.activityAddress }} @@ -32,23 +32,23 @@ 手机号: - + 验证码: - - 获取验证码 + + 获取验证码 姓 名: - + 身份证: - + - 立即报名 + 立即报名 \ No newline at end of file diff --git a/pages/myVolunteerActivity/myVolunteerActivity.js b/pages/myVolunteerActivity/myVolunteerActivity.js index 7387995..362e624 100644 --- a/pages/myVolunteerActivity/myVolunteerActivity.js +++ b/pages/myVolunteerActivity/myVolunteerActivity.js @@ -9,8 +9,7 @@ Page({ token: '', dataMap: {}, type: '1', - teamId: '', - + teamId: '' }, getToken: function() { var self = this; @@ -58,7 +57,7 @@ Page({ myActivity: function(url) { var self = this; app.restAjax.get(app.restAjax.path(url, []), - {}, { + self.data.pages, { headers: { token: self.data.token } @@ -77,50 +76,6 @@ Page({ }, function(code, data) { app.dialog.msg(data.msg); }, function() { - - }) - }, - /** - * 申请/退出加入团队 - */ - joinOrOutTeam: function(e) { - var self = this; - self.setData({ - teamId: e.currentTarget.dataset.teamid - }) - var teamMemberVO; - var url; - var methodType; - var title; - if('1' == self.data.type) { - url = app.volunteerUrl + '/wxminiapp/teammember/saveteammember' - teamMemberVO = { - teamId: e.currentTarget.dataset.teamid - } - methodType = app.restAjax.post - title = '申请成功!' - }else { - url = app.volunteerUrl + '/wxminiapp/teammember/quitTeam/' + self.data.teamId - methodType = app.restAjax.get - title = '退出成功!' - } - - methodType(app.restAjax.path(url, []), - teamMemberVO, { - headers: { - token: self.data.token - } - }, function(code, data) { - if('200' == code) { - app.dialog.msg(title); - wx.navigateTo({ - url: '../volunteer/volunteer', - }) - } - }, function(code, data) { - app.dialog.msg(data.msg); - }, function() { - }) }, /** @@ -164,7 +119,7 @@ Page({ * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { - + }, /** diff --git a/pages/myVolunteerActivity/myVolunteerActivity.json b/pages/myVolunteerActivity/myVolunteerActivity.json index 8835af0..7360326 100644 --- a/pages/myVolunteerActivity/myVolunteerActivity.json +++ b/pages/myVolunteerActivity/myVolunteerActivity.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/myVolunteerTeam/myVolunteerTeam.json b/pages/myVolunteerTeam/myVolunteerTeam.json index 8835af0..7360326 100644 --- a/pages/myVolunteerTeam/myVolunteerTeam.json +++ b/pages/myVolunteerTeam/myVolunteerTeam.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/newTeam/newTeam.js b/pages/newTeam/newTeam.js index 881d966..8177f13 100644 --- a/pages/newTeam/newTeam.js +++ b/pages/newTeam/newTeam.js @@ -74,7 +74,7 @@ Page({ var data = data.substr(9, data.length); data = data.substr(0, data.length - 2); self.setData({ - photo: data + photo: app.volunteerUrl + '/route/file/downloadfile/true/' + data }) } }, function(code, data) { diff --git a/pages/newTeam/newTeam.json b/pages/newTeam/newTeam.json index 8835af0..7360326 100644 --- a/pages/newTeam/newTeam.json +++ b/pages/newTeam/newTeam.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/newTeam/newTeam.wxml b/pages/newTeam/newTeam.wxml index 55fe14c..844a71f 100644 --- a/pages/newTeam/newTeam.wxml +++ b/pages/newTeam/newTeam.wxml @@ -1,10 +1,13 @@ 团队头像: - - + + + 点击上传 + + 团队名称: diff --git a/pages/newVolunteerActivity/newVolunteerActivity.js b/pages/newVolunteerActivity/newVolunteerActivity.js index 3b7aab7..5f2bebc 100644 --- a/pages/newVolunteerActivity/newVolunteerActivity.js +++ b/pages/newVolunteerActivity/newVolunteerActivity.js @@ -99,7 +99,7 @@ Page({ var data = data.substr(9, data.length); data = data.substr(0, data.length - 2); self.setData({ - photo: data + photo: app.volunteerUrl + '/route/file/downloadfile/true/' + data }) } }, function(code, data) { diff --git a/pages/newVolunteerActivity/newVolunteerActivity.json b/pages/newVolunteerActivity/newVolunteerActivity.json index 8835af0..7360326 100644 --- a/pages/newVolunteerActivity/newVolunteerActivity.json +++ b/pages/newVolunteerActivity/newVolunteerActivity.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/newVolunteerActivity/newVolunteerActivity.wxml b/pages/newVolunteerActivity/newVolunteerActivity.wxml index 1562072..1ee51e8 100644 --- a/pages/newVolunteerActivity/newVolunteerActivity.wxml +++ b/pages/newVolunteerActivity/newVolunteerActivity.wxml @@ -86,8 +86,12 @@ 宣传图片: - - + + + + + 点击上传 + diff --git a/pages/serviceActivityDetail/serviceActivityDetail.json b/pages/serviceActivityDetail/serviceActivityDetail.json index 8835af0..7360326 100644 --- a/pages/serviceActivityDetail/serviceActivityDetail.json +++ b/pages/serviceActivityDetail/serviceActivityDetail.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/volunteer/volunteer.js b/pages/volunteer/volunteer.js index 3eb8f9c..c5855e8 100644 --- a/pages/volunteer/volunteer.js +++ b/pages/volunteer/volunteer.js @@ -8,7 +8,11 @@ Page({ data: { indicatorDots: true, autoplay: true, - serviceMap: [] + serviceMap: [], + pages: { + page: 1, + rows: 5 + } }, goDetail: function (e) { var id = e.currentTarget.dataset.id; @@ -37,7 +41,7 @@ Page({ activityList: function() { var self = this; app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/listpagevolunteerservicerelease', []), - {}, null, function(code, data) { + self.data.pages, null, function(code, data) { if('200' == code) { // 将活动照片,拼接为可访问地址 for(var item of data.rows) { @@ -46,14 +50,30 @@ Page({ item.photo = app.volunteerUrl + '/route/file/downloadfile/true/' + photoArr[0]; } } - self.setData({ - serviceMap: data.rows - }) + if(1 === self.data.pages.page) { + self.setData({ + serviceMap: data.rows + }) + }else { + if(data.rows.length == 0) { + self.setData({ + [`pages.page`] : self.data.pages.page - 1 + }) + app.dialog.msg('暂无更多') + return false; + } + + self.setData({ + serviceMap: data.rows.concat(self.data.serviceMap), + }) + } + } }, function() { }, function() { - + wx.hideNavigationBarLoading(); //完成停止加载图标 + wx.stopPullDownRefresh(); }) }, /** @@ -95,7 +115,13 @@ Page({ * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { - + // 在标题栏中显示加载图标 + wx.showNavigationBarLoading(); + var self = this; + self.setData({ + [`pages.page`] : self.data.pages.page + 1 + }) + this.activityList(); }, /** diff --git a/pages/volunteer/volunteer.json b/pages/volunteer/volunteer.json index 8835af0..09e623a 100644 --- a/pages/volunteer/volunteer.json +++ b/pages/volunteer/volunteer.json @@ -1,3 +1,5 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true, + "backgroundTextStyle": "dark" } \ No newline at end of file diff --git a/pages/volunteerRegister/volunteerRegister.json b/pages/volunteerRegister/volunteerRegister.json index 8835af0..7360326 100644 --- a/pages/volunteerRegister/volunteerRegister.json +++ b/pages/volunteerRegister/volunteerRegister.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true } \ No newline at end of file diff --git a/pages/volunteerTeam/volunteerTeam.json b/pages/volunteerTeam/volunteerTeam.json index 8835af0..7360326 100644 --- a/pages/volunteerTeam/volunteerTeam.json +++ b/pages/volunteerTeam/volunteerTeam.json @@ -1,3 +1,4 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true } \ No newline at end of file