From 6f01f7b5eed925146d848c7b287fdaddd4ff986b Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Sat, 27 Jun 2020 15:57:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + app.js | 2 +- app.json | 6 +- pages/activity/activity.js | 4 +- pages/activityDetail/activityDetail.js | 4 +- pages/book/book.wxml | 20 ++++ pages/book/book.wxss | 2 + pages/index/index.wxml | 1 + pages/index/index.wxss | 10 ++ pages/myVenueOrder/myVenueOrder.js | 66 +++++++++++ pages/myVenueOrder/myVenueOrder.json | 3 + pages/myVenueOrder/myVenueOrder.wxml | 44 ++++++++ pages/myVenueOrder/myVenueOrder.wxss | 51 +++++++++ .../myVolunteerActivity.js | 12 +- pages/myVolunteerTeam/myVolunteerTeam.js | 13 ++- pages/myVolunteerTeam/myVolunteerTeam.wxml | 2 +- pages/newTeam/newTeam.js | 6 +- .../newVolunteerActivity.js | 4 +- pages/orderDetail/orderDetail.js | 66 +++++++++++ pages/orderDetail/orderDetail.json | 3 + pages/orderDetail/orderDetail.wxml | 67 +++++++++++ pages/orderDetail/orderDetail.wxss | 85 ++++++++++++++ .../serviceActivityDetail.js | 12 +- pages/teamDetail/teamDetail.js | 106 +++++++++++++++++- pages/teamDetail/teamDetail.wxml | 49 ++++---- pages/venue/venue.wxss | 2 +- pages/volunteer/volunteer.js | 4 +- pages/volunteerRegister/volunteerRegister.js | 4 +- pages/volunteerTeam/volunteerTeam.js | 10 +- project.config.json | 61 ---------- 30 files changed, 589 insertions(+), 131 deletions(-) create mode 100644 .gitignore 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 delete mode 100644 project.config.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a60a8c6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/project.config.json 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/app.json b/app.json index b5ad692..c96c74b 100644 --- a/app.json +++ b/app.json @@ -1,10 +1,14 @@ { "pages": [ +<<<<<<< HEAD +======= + "pages/center/center", + "pages/book/book", +>>>>>>> master "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/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/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 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/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 840cbc1..cc5261b 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', @@ -63,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 = '退出成功!' } @@ -98,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/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/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/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 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 aaf2ecc..6f911e8 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}} 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; 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'); }) }, diff --git a/project.config.json b/project.config.json deleted file mode 100644 index 61ce167..0000000 --- a/project.config.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "description": "项目配置文件", - "packOptions": { - "ignore": [] - }, - "setting": { - "urlCheck": false, - "es6": true, - "enhance": false, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": true, - "coverView": true, - "nodeModules": false, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "useCompilerModule": true, - "userConfirmedUseCompilerModuleSwitch": false, - "compileHotReLoad": false, - "useIsolateContext": true - }, - "compileType": "miniprogram", - "libVersion": "2.11.1", - "appid": "wxe17874894f7ff27b", - "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