From a4f739375e8d1e0b399e3493bd4364cc7b9e8719 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Thu, 2 Jul 2020 18:41:45 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=8A=A5=E5=90=8D=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=9B=A2=E9=98=9F=E6=97=B6=E5=A4=B4=E5=83=8F=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/activity/activity.js | 1 + pages/activityDetail/activityDetail.js | 6 +++++- pages/activityDetail/activityDetail.wxml | 4 ++-- pages/activitySign/activitySign.js | 10 ++++++---- pages/newTeam/newTeam.wxml | 5 ++--- pages/newTeam/newTeam.wxss | 12 ++++++++++++ 6 files changed, 28 insertions(+), 10 deletions(-) diff --git a/pages/activity/activity.js b/pages/activity/activity.js index f5ce8cc..f66230b 100644 --- a/pages/activity/activity.js +++ b/pages/activity/activity.js @@ -23,6 +23,7 @@ Page({ app.restAjax.get(app.restAjax.path(app.activityUrl + '/wxminiapp/activitylibrary/listpageactivitylibraryfornetrelease', []), self.data.pages, null, function(code, data) { if('200' == code) { + console.log(data.rows) for(var item of data.rows) { if('' != item.activityImage) { item.activityImage = app.activityUrl + '/route/file/downloadfile/true/' + item.activityImage; diff --git a/pages/activityDetail/activityDetail.js b/pages/activityDetail/activityDetail.js index 1f67409..c610f84 100644 --- a/pages/activityDetail/activityDetail.js +++ b/pages/activityDetail/activityDetail.js @@ -54,13 +54,16 @@ Page({ onLoad: function (options) { var self = this; this.getToken().then(result => { - console.log(self.data.token) var url; var id = options.id; if(!self.data.token) { url = '/wxminiapp/activitylibrary/getactivitylibrarybyidrelease/' + id; + self.setData({ + token: null + }) }else { url = '/wxminiapp/activitylibrary/getactivitylibrarybyid/' + id + self.getToken() } app.restAjax.get(app.restAjax.path(app.activityUrl + url, []), {}, { @@ -73,6 +76,7 @@ Page({ self.setData({ dataMap: data }) + console.log(self.data.dataMap) } }, function() { diff --git a/pages/activityDetail/activityDetail.wxml b/pages/activityDetail/activityDetail.wxml index b06f942..b636b25 100644 --- a/pages/activityDetail/activityDetail.wxml +++ b/pages/activityDetail/activityDetail.wxml @@ -41,9 +41,9 @@ - + 报名 - + 取消报名 diff --git a/pages/activitySign/activitySign.js b/pages/activitySign/activitySign.js index 6935898..81536c2 100644 --- a/pages/activitySign/activitySign.js +++ b/pages/activitySign/activitySign.js @@ -41,8 +41,8 @@ Page({ if('200' == code) { } - }, function() { - + }, function(code, data) { + app.dialog.msg(data.msg) }, function() { }) @@ -68,7 +68,7 @@ Page({ userName: self.data.name, userPhone: self.data.phone } - app.restAjax.post(app.restAjax.path(app.activityUrl + '/app/activityuserapply/saveactivityuserapplyrelease', []), + app.restAjax.post(app.restAjax.path(app.activityUrl + '/app/activityuserapply/saveactivityuserapply', []), activityUserApplyVO, { headers: { token: self.data.token @@ -76,7 +76,9 @@ Page({ }, function(code, data) { console.log(data) if('200' == code) { - + wx.navigateTo({ + url: '../activitySign/activitySign?id=' + self.data.activityId + }) } }, function() { diff --git a/pages/newTeam/newTeam.wxml b/pages/newTeam/newTeam.wxml index 844a71f..0ef715f 100644 --- a/pages/newTeam/newTeam.wxml +++ b/pages/newTeam/newTeam.wxml @@ -1,12 +1,11 @@ - + 团队头像: - + 点击上传 - diff --git a/pages/newTeam/newTeam.wxss b/pages/newTeam/newTeam.wxss index 0b4573b..ceb514f 100644 --- a/pages/newTeam/newTeam.wxss +++ b/pages/newTeam/newTeam.wxss @@ -11,6 +11,8 @@ color: #242424; font-size: 32rpx; width: 24%; + display: flex; + align-items: center; } .row-text{ width: 75%; @@ -73,4 +75,14 @@ label{ width: 77%; font-size: 26rpx; height: 55rpx; +} +.avatar{ + height: 150rpx; +} +.avatar image{ + width: 150rpx; + height: 150rpx; +} +.avatar-row{ + height: 150rpx; } \ No newline at end of file From f1150528fae9c49ea51ae55753d64675c48400c1 Mon Sep 17 00:00:00 2001 From: dong_bo0602 <358256383@qq.com> Date: Thu, 2 Jul 2020 18:46:07 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=9C=8B=E5=8F=8B=E5=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 8 +++- pages/friendCircle/friendCircle.js | 66 ++++++++++++++++++++++++++++ pages/friendCircle/friendCircle.json | 3 ++ pages/friendCircle/friendCircle.wxml | 59 +++++++++++++++++++++++++ pages/friendCircle/friendCircle.wxss | 48 ++++++++++++++++++++ 5 files changed, 182 insertions(+), 2 deletions(-) create mode 100644 pages/friendCircle/friendCircle.js create mode 100644 pages/friendCircle/friendCircle.json create mode 100644 pages/friendCircle/friendCircle.wxml create mode 100644 pages/friendCircle/friendCircle.wxss diff --git a/app.json b/app.json index d4c96db..e1f57e6 100644 --- a/app.json +++ b/app.json @@ -1,7 +1,12 @@ { "pages": [ - "pages/venue/venue", + "pages/friendCircle/friendCircle", "pages/index/index", + "pages/venue/venue", + "pages/broadcastList/broadcastList", + "pages/orderDetail/orderDetail", + "pages/myVenueOrder/myVenueOrder", + "pages/book/book", "pages/broadcast/broadcast", "pages/activityDialog/activityDialog", "pages/teamDetail/teamDetail", @@ -11,7 +16,6 @@ "pages/heritage/heritage", "pages/broadcastDetail/broadcastDetail", "pages/venueDetail/venueDetail", - "pages/book/book", "pages/register/register", "pages/login/login", "pages/newVolunteerActivity/newVolunteerActivity", diff --git a/pages/friendCircle/friendCircle.js b/pages/friendCircle/friendCircle.js new file mode 100644 index 0000000..dd7887d --- /dev/null +++ b/pages/friendCircle/friendCircle.js @@ -0,0 +1,66 @@ +// pages/friendCircle/friendCircle.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/friendCircle/friendCircle.json b/pages/friendCircle/friendCircle.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/friendCircle/friendCircle.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/friendCircle/friendCircle.wxml b/pages/friendCircle/friendCircle.wxml new file mode 100644 index 0000000..0005b82 --- /dev/null +++ b/pages/friendCircle/friendCircle.wxml @@ -0,0 +1,59 @@ + + + + + + + 张三 + 内容内容内容内容内容 + 2020-01-01 00:00:00 + + + + + + + + 张三 + 内容内容内容内容内容 + + + + 2020-01-01 00:00:00 + + + + + + + + 张三 + 内容内容内容内容内容 + + + + + + + + + + + + 2020-01-01 00:00:00 + + + + + + + + 张三 + 内容内容内容内容内容 + + + + 2020-01-01 00:00:00 + + + \ No newline at end of file diff --git a/pages/friendCircle/friendCircle.wxss b/pages/friendCircle/friendCircle.wxss new file mode 100644 index 0000000..b8dc371 --- /dev/null +++ b/pages/friendCircle/friendCircle.wxss @@ -0,0 +1,48 @@ +.friend-circle{ + padding: 30rpx; +} +.friend-circle-box{ + margin-bottom: 20rpx; + display: flex; + justify-content: space-between; + border-bottom: 1px solid #DEDEDE; + padding-bottom: 10rpx; +} +.avatar{ + width: 8%; +} +.avatar image{ + width: 100%; + height: 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: 80%; +} +.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: 80%; +} \ No newline at end of file From de4dd4652a3683c9a0b0072569b306249dd5ad11 Mon Sep 17 00:00:00 2001 From: dong_bo0602 <358256383@qq.com> Date: Thu, 2 Jul 2020 19:03:29 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E9=A6=96=E9=A1=B5-=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=89=8B=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/center/center.js | 116 ------------------------------------ pages/index/index.js | 132 ++++++++++++++++++++++++++++++++++++++++- pages/index/index.wxml | 16 +++++ pages/index/index.wxss | 79 ++++++++++++++++++++++++ 4 files changed, 226 insertions(+), 117 deletions(-) diff --git a/pages/center/center.js b/pages/center/center.js index de7bca9..98033a9 100644 --- a/pages/center/center.js +++ b/pages/center/center.js @@ -120,126 +120,10 @@ Page({ url: '../myVolunteerActivity/myVolunteerActivity', }) }, - // 判断用户是否为随机名称 - isRandomName: function () { - var self = this - wx.getStorage({ - key: 'isRandomUsername', - success: function (res) { - if (res.data == 1) { - wx.hideTabBar() - self.setData({ - randomName: true - }) - } - } - }) - }, - // 取消绑定手机 - cancelPhone: function () { - this.setData({ - showPhone: false - }) - wx.showTabBar() - }, - // 获取输入的手机号 - phoneNum: function (res) { - this.setData({ - phone: res.detail.value - }) - console.log(this.data.phone) - }, - // 校验手机号 - testPhone: function () { - var self = this - if (self.data.phone) { - if (!/^1(3|4|5|6|7|8|9)\d{9}$/.test(self.data.phone)) { - wx.showToast({ - title: '请输入正确的手机号', - icon: 'none', - duration: 1500 - }) - } else { - self.getCode() - } - } else { - wx.showToast({ - title: '手机号不能为空', - icon: 'none', - duration: 1500 - }) - } - }, - // 获取验证码 - getCode: function () { - var self = this - app.restAjax.get(app.restAjax.path('{usercenterUrl}/api/sms/getverificationcode/' + self.data.phone, [app.usercenterUrl]), {}, null, - function (code, data) { - if (code == 200) { - console.log(data) - self.setData({ - gotCode: true - }) - self.data.timer = setInterval(function () { - var cur = self.data.restTime - 1 - console.log(cur) - if (cur == 0) { - clearInterval(self.data.timer) - self.setData({ - restTime: 120, - gotCode: false - }) - } - self.setData({ - restTime: cur - }) - }, 1000) - } - }, - function (code, data) { - console.log(data) - wx.showToast({ - title: data.msg, - icon: 'none', - duration: 1500 - }) - } ) - }, - // 提交绑定手机 - submitPhone: function () { - var self = this - app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/updateminiappdefaultusername', [app.usercenterUrl]), { - phone: self.data.phone, - verificationCode: self.data.code - }, { - headers: { - token: self.data.token - } - }, function (code, data) { - console.log(data) - wx.setStorageSync('token', data.data); - wx.setStorageSync('isRandomUsername', 0) - clearInterval(self.data.timer) - self.setData({ - showPhone: false, - restTime: 120 - }) - self.getUserInfo() - }, function (code, data) { - console.log(data) - }) - }, - // 验证码 - inputCode: function (e) { - this.setData({ - code: e.detail.value - }) - }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - this.isRandomName() this.getToken() }, diff --git a/pages/index/index.js b/pages/index/index.js index c3a68b2..cb3b660 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -4,6 +4,11 @@ Page({ * 页面的初始数据 */ data: { + randomName: '', + showPhone: true, + gotCode: false, + restTime: 120, + timer: '', indicatorDots: true, autoplay: true, token: '', @@ -26,7 +31,8 @@ Page({ live: { liveUrl: app.liveUrl, liveList: [] - } + }, + usercenterUrl: app.usercenterUrl }, doLogin: function () { var self = this; @@ -158,6 +164,129 @@ Page({ url: '../heritage/heritage', }) }, + // 获取输入的手机号 + phoneNum: function (res) { + this.setData({ + phone: res.detail.value + }) + console.log(this.data.phone) + }, + // 校验手机号 + testPhone: function () { + var self = this + if (self.data.phone) { + if (!/^1(3|4|5|6|7|8|9)\d{9}$/.test(self.data.phone)) { + wx.showToast({ + title: '请输入正确的手机号', + icon: 'none', + duration: 1500 + }) + } else { + self.getCode() + } + } else { + wx.showToast({ + title: '手机号不能为空', + icon: 'none', + duration: 1500 + }) + } + }, + // 获取验证码 + getCode: function () { + var self = this + app.restAjax.get(app.restAjax.path('{usercenterUrl}/api/sms/getverificationcode/' + self.data.phone, [app.usercenterUrl]), {}, null, + function (code, data) { + if (code == 200) { + console.log(data) + self.setData({ + gotCode: true + }) + self.data.timer = setInterval(function () { + var cur = self.data.restTime - 1 + console.log(cur) + if (cur == 0) { + clearInterval(self.data.timer) + self.setData({ + restTime: 120, + gotCode: false + }) + } + self.setData({ + restTime: cur + }) + }, 1000) + } + }, + function (code, data) { + console.log(data) + wx.showToast({ + title: data.msg, + icon: 'none', + duration: 1500 + }) + } ) + }, + // 提交绑定手机 + submitPhone: function () { + var self = this + app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/updateminiappdefaultusername', [app.usercenterUrl]), { + phone: self.data.phone, + verificationCode: self.data.code + }, { + headers: { + token: self.data.token + } + }, function (code, data) { + console.log(data) + wx.setStorageSync('token', data.data); + wx.setStorageSync('isRandomUsername', 0) + clearInterval(self.data.timer) + self.setData({ + showPhone: false, + restTime: 120 + }) + self.getUserInfo() + }, function (code, data) { + console.log(data) + }) + }, + // 验证码 + inputCode: function (e) { + this.setData({ + code: e.detail.value + }) + }, + // 判断用户是否为随机名称 + isRandomName: function () { + var self = this + wx.getStorage({ + key: 'isRandomUsername', + success: function (res) { + if (res.data == 1) { + wx.hideTabBar() + self.setData({ + randomName: true + }) + } + } + }) + }, + // 获取用户信息 + getUserInfo: function () { + var self = this + app.restAjax.get(app.restAjax.path('{usercenterUrl}/app/user/getappuser', [app.usercenterUrl]), {}, { + headers: { + token: self.data.token + } + }, function (code, data) { + self.setData({ + userInfo: data + }) + }, function (code, data) { + console.log(data) + }) + }, /** * 生命周期函数--监听页面加载 */ @@ -169,6 +298,7 @@ Page({ self.doGetLiveList(); self.doGetVenueList(); self.doGetActivityList(); + self.isRandomName(); }, /** diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 456d041..763dda0 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -125,4 +125,20 @@ 错误 + + + + 您还没有绑定手机号,请先绑定手机号 + + + + + + 获取验证码 + {{restTime}} + + + 确认 + + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss index b0993d1..b51d0d4 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -156,4 +156,83 @@ color: #fff; font-size: 26rpx; border-radius: 10rpx; +} +.set-phone{ + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, .6); + z-index: 100; +} +.set-phone-box{ + width: 96%; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background: #fff; + border-radius: 10rpx; + padding: 30rpx; + box-sizing: border-box; +} +.tips{ + font-size: 28rpx; + color: #000; +} +.phone-input{ + margin: 25rpx 0; +} +.code-input{ + display: flex; + justify-content: space-between; + margin-bottom: 25rpx; +} +.code-input input{ + width: 70%; + height: 55rpx; + border: 1px solid #dedede; + border-radius: 10rpx; + padding: 0 10rpx; + box-sizing: border-box; + font-size: 28rpx; +} +.phone-input input{ + width: 100%; + height: 55rpx; + border: 1px solid #dedede; + border-radius: 10rpx; + padding: 0 10rpx; + box-sizing: border-box; + font-size: 28rpx; +} +.get-code, .got-code{ + font-size: 28rpx; + background: rgba(159,21,18,.1); + color: #9F1512; + width: 28%; + line-height: 55rpx; + text-align: center; + border-radius: 10rpx; +} +.got-code{ + background: #fff; + color: #4a4d52; + border: 1px solid #eaeaea; +} +.set-phone-btn-box{ + display: flex; + justify-content: space-between; +} +.set-phone-btn{ + width: 100%; + height: 65rpx; + display: flex; + align-items: center; + justify-content: center; + font-size: 28rpx; + color: #fff; + background: #9F1512; + border-radius: 10rpx; } \ No newline at end of file From d7e913f90db3daf9fc7f20f21a83ab711caa222b Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Thu, 2 Jul 2020 20:08:23 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E9=9D=9E=E9=81=97=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=92=8C=E8=AF=A6=E6=83=85=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 2 +- pages/cultureDetail/cultureDetail.js | 33 +++++++++++++---- pages/cultureDetail/cultureDetail.wxml | 27 +++++++------- pages/heritage/heritage.js | 49 ++++++++++++++++++++++---- pages/heritage/heritage.json | 5 ++- pages/heritage/heritage.wxml | 36 ++++--------------- pages/index/index.js | 8 +++++ pages/index/index.wxml | 4 +-- 8 files changed, 102 insertions(+), 62 deletions(-) diff --git a/app.json b/app.json index e1f57e6..9df5009 100644 --- a/app.json +++ b/app.json @@ -1,7 +1,7 @@ { "pages": [ - "pages/friendCircle/friendCircle", "pages/index/index", + "pages/friendCircle/friendCircle", "pages/venue/venue", "pages/broadcastList/broadcastList", "pages/orderDetail/orderDetail", diff --git a/pages/cultureDetail/cultureDetail.js b/pages/cultureDetail/cultureDetail.js index c9444ea..e32b2f2 100644 --- a/pages/cultureDetail/cultureDetail.js +++ b/pages/cultureDetail/cultureDetail.js @@ -1,20 +1,19 @@ // pages/cultureDetail/cultureDetail.js +var app = getApp(); Page({ /** * 页面的初始数据 */ data: { + libraryUrl: app.libraryUrl, swiper: { - imgUrl: [ - '../../images/culture-slide.png', - '../../images/culture-slide.png', - '../../images/culture-slide.png' - ], + imgUrl: [], indicatorDots: false, autoplay: true, current: 0 - } + }, + library: null }, prevImg: function () { var swiper = this.data.swiper; @@ -33,11 +32,31 @@ Page({ swiper: swiper, }) }, + doGetLibrary: function(libraryId) { + var self = this; + app.dialog.loading('正在加载'); + app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibrary/getintangiblelibrarybyidrelease/{libraryId}', [self.data.libraryUrl, libraryId]), {}, null, function(code, data) { + var covers = data.libraryCover.split(','); + var imageArray = []; + for(var i = 0, item; item = covers[i++];) { + imageArray.push(app.restAjax.path('{libraryUrl}/route/file/downloadfile/true/{cover}', [self.data.libraryUrl, item])); + } + self.setData({ + library: data, + 'swiper.imgUrl': imageArray + }) + }, function(code, data) { + app.dialog.msg(data.msg); + }, function() { + wx.stopPullDownRefresh(); + wx.hideLoading(); + }) + }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + this.doGetLibrary(options.libraryId); }, /** diff --git a/pages/cultureDetail/cultureDetail.wxml b/pages/cultureDetail/cultureDetail.wxml index ceab619..8dae8cb 100644 --- a/pages/cultureDetail/cultureDetail.wxml +++ b/pages/cultureDetail/cultureDetail.wxml @@ -12,55 +12,55 @@ - 民间舞蹈 + {{library.libraryTitle}} 项目编号: - EKLAJNKAS09 + {{library.libraryNumber}} 数据来源: - EKLAJNKAS09 + {{library.librarySource}} 公布时间: - 2020-02-03 + {{library.libraryOpenDateValue}} 非遗级别: - 三级 + {{library.libraryLevel}}级 所属地区: - 西藏林芝市 + {{library.libraryArea}} 类  型: - 新增项目 + {{library.libraryTypeValue}} 申报地区或单位: - 测试 + {{library.libraryAddress}} 保护单位: - 测试 + {{library.libraryAuthor}} 相关描述 - 光拉便半运县写员二到院细天县见运命运感知争公着解全得律号深共权发市以家情军少先意单理样好族权达保很具你住红许气已第白知题候其然知王公众我头务族观经市指或七比生。适基历然题和低是局着先重信知议过说心龙素标安放大支入完二种设力果每角解收美约声里历美节办约管运但然新分活们心毛手过共点家或。革解快和特技县应精术被心走小器风育相条际北些有品同自群素革拉林积张严求选马打书。力问业光者最论快决装争每保时造何历入越日劳经干好东此金区法思设断这层压很决给地确思引光各年与队太习面方加族社种斗表越划快。 + {{library.librarySummary}} @@ -68,11 +68,11 @@ 编  号: - EKLAJNKAS09 + {{library.libraryNumber}} 姓  名: - Ruby Pope + {{library.libraryAuthor}} @@ -93,6 +93,3 @@ - - 报名 - diff --git a/pages/heritage/heritage.js b/pages/heritage/heritage.js index 281ba87..5839247 100644 --- a/pages/heritage/heritage.js +++ b/pages/heritage/heritage.js @@ -1,22 +1,57 @@ // pages/heritage/heritage.js +var app = getApp(); Page({ - /** * 页面的初始数据 */ data: { - + libraryUrl: app.libraryUrl, + libraryList: [], + currentPage: 1, + rows: 20 }, - goDetail: function () { + goDetail: function (event) { wx.navigateTo({ - url: '../cultureDetail/cultureDetail', + url: '../cultureDetail/cultureDetail?libraryId='+ event.currentTarget.dataset.libraryId, }) }, + doGetLibraryList: function(page) { + var self = this; + app.dialog.loading('正在加载'); + app.restAjax.get(app.restAjax.path('{libraryUrl}/app/intangiblelibrary/listpageintangiblelibraryrelease', [self.data.libraryUrl]), { + 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++];) { + item.libraryApplyTime = item.libraryApplyTime.substring(0, item.libraryApplyTime.length - 10); + } + var libraryArray; + if(page <= 1) { + libraryArray = data.rows; + } else { + libraryArray = self.data.news.newsList; + libraryArray = libraryArray.concat(data.rows); + } + self.setData({ + currentPage: page, + libraryList: libraryArray + }) + }, function(code, data) { + app.dialog.msg(data.msg); + }, function() { + wx.stopPullDownRefresh(); + wx.hideLoading(); + }); + }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + this.doGetLibraryList(1); }, /** @@ -51,14 +86,14 @@ Page({ * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { - + this.doGetLibraryList(1); }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { - + this.doGetLibraryList(this.data.currentPage + 1); }, /** diff --git a/pages/heritage/heritage.json b/pages/heritage/heritage.json index 8835af0..8275159 100644 --- a/pages/heritage/heritage.json +++ b/pages/heritage/heritage.json @@ -1,3 +1,6 @@ { - "usingComponents": {} + "usingComponents": {}, + "enablePullDownRefresh": true, + "backgroundTextStyle": "dark", + "onReachBottomDistance": 50 } \ No newline at end of file diff --git a/pages/heritage/heritage.wxml b/pages/heritage/heritage.wxml index 3321cbd..624f1f7 100644 --- a/pages/heritage/heritage.wxml +++ b/pages/heritage/heritage.wxml @@ -1,49 +1,27 @@ - 非遗数据库 + 非物质文化遗产数据库 - 非遗数据库 + 文化直播 - 非遗数据库 + 文化分享 - + - + - 银保监会印发《关于加快推进意外险改… + {{item.libraryTitle}} - 2020-02-02 14:00:00至2020-02-03 14:00:00 - - - - - - - - - 银保监会印发《关于加快推进意外险改… - - 2020-02-02 14:00:00至2020-02-03 14:00:00 - - - - - - - - - 银保监会印发《关于加快推进意外险改… - - 2020-02-02 14:00:00至2020-02-03 14:00:00 + {{item.libraryApplyTime}} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index cb3b660..4c9248a 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -65,6 +65,9 @@ Page({ page: 1, rows: 5 }, null, function(code, data) { + for(var i = 0, item; item = data.rows[i++];) { + item.cover = item.libraryCover.split(',')[0]; + } self.setData({ 'library.bannerLibrary': data.rows }); @@ -124,6 +127,11 @@ Page({ app.dialog.msg(data.msg); }); }, + goCultureDetail: function(event) { + wx.navigateTo({ + url: '../cultureDetail/cultureDetail?libraryId='+ event.currentTarget.dataset.libraryId, + }) + }, goNewsDetail: function (event) { wx.navigateTo({ url: '../newsDetail/newsDetail?templateRecordUrl='+ event.currentTarget.dataset.templateRecordUrl, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 763dda0..df5b0ff 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,7 +1,7 @@ - - + + From 3a1c6005506894990428aff3258393d24d0fbb9c Mon Sep 17 00:00:00 2001 From: dong_bo0602 <358256383@qq.com> Date: Fri, 3 Jul 2020 11:02:04 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E8=AE=A1=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 2 +- pages/index/index.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app.json b/app.json index 9df5009..4673537 100644 --- a/app.json +++ b/app.json @@ -1,6 +1,7 @@ { "pages": [ "pages/index/index", + "pages/center/center", "pages/friendCircle/friendCircle", "pages/venue/venue", "pages/broadcastList/broadcastList", @@ -10,7 +11,6 @@ "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/index/index.js b/pages/index/index.js index 4c9248a..f1f0e99 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -7,7 +7,7 @@ Page({ randomName: '', showPhone: true, gotCode: false, - restTime: 120, + restTime: 10, timer: '', indicatorDots: true, autoplay: true, @@ -219,10 +219,11 @@ Page({ restTime: 120, gotCode: false }) + } else { + self.setData({ + restTime: cur + }) } - self.setData({ - restTime: cur - }) }, 1000) } }, From 0bac46e527c8ae8d5bd4fcc133b6195c1ef71890 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Fri, 3 Jul 2020 16:32:32 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 3 +- pages/newTeam/newTeam.js | 20 +++- pages/newTeam/newTeam.wxml | 4 +- .../newVolunteerActivity.js | 8 +- .../serviceActivityDetail.js | 4 +- pages/userAgree/userAgree.js | 104 ++++++++++++++++++ pages/userAgree/userAgree.json | 3 + pages/userAgree/userAgree.wxml | 4 + pages/userAgree/userAgree.wxss | 1 + pages/volunteerRegister/volunteerRegister.js | 13 ++- .../volunteerRegister/volunteerRegister.wxml | 6 +- 11 files changed, 156 insertions(+), 14 deletions(-) create mode 100644 pages/userAgree/userAgree.js create mode 100644 pages/userAgree/userAgree.json create mode 100644 pages/userAgree/userAgree.wxml create mode 100644 pages/userAgree/userAgree.wxss diff --git a/app.json b/app.json index 4673537..f364ef9 100644 --- a/app.json +++ b/app.json @@ -26,7 +26,8 @@ "pages/activityDetail/activityDetail", "pages/activity/activity", "pages/newsDetail/newsDetail", - "pages/newsList/newsList" + "pages/newsList/newsList", + "pages/userAgree/userAgree" ], "window": { "backgroundTextStyle": "light", diff --git a/pages/newTeam/newTeam.js b/pages/newTeam/newTeam.js index 8177f13..3c05d8c 100644 --- a/pages/newTeam/newTeam.js +++ b/pages/newTeam/newTeam.js @@ -9,7 +9,8 @@ Page({ isAgree: false, // 是否同意志愿者注册协议 index: 0, array: ['区域1','区域2','区域3','区域4'], - photo: '', + photo: '', // 用于页面显示的photo链接 + uploadPhoto: '', // 用于传到后台的photoId teamName: '', count:'', teamWatchword: '', @@ -74,7 +75,8 @@ Page({ var data = data.substr(9, data.length); data = data.substr(0, data.length - 2); self.setData({ - photo: app.volunteerUrl + '/route/file/downloadfile/true/' + data + photo: app.volunteerUrl + '/route/file/downloadfile/true/' + data, + uploadPhoto: data }) } }, function(code, data) { @@ -140,6 +142,18 @@ Page({ } }) }, + areaChange: function(e) { + var self = this; + self.setData({ + teamAreaIndex: e.detail.value + }) + }, + userAgree: function(e) { + var type = e.currentTarget.dataset.type; + wx.navigateTo({ + url: '../userAgree/userAgree?type=' + type, + }) + }, changeAgree: function (e) { if(e.detail.value == ''){ this.setData({ @@ -162,7 +176,7 @@ Page({ return false; } var teamVO = { - photo: self.data.photo, + photo: self.data.uploadPhoto, teamName: self.data.teamName, count:self.data.count, teamWatchword: self.data.teamWatchword, diff --git a/pages/newTeam/newTeam.wxml b/pages/newTeam/newTeam.wxml index 0ef715f..9c0f06d 100644 --- a/pages/newTeam/newTeam.wxml +++ b/pages/newTeam/newTeam.wxml @@ -49,7 +49,7 @@