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/book/book.js b/pages/book/book.js
index cc6d72d..514ef5c 100644
--- a/pages/book/book.js
+++ b/pages/book/book.js
@@ -250,6 +250,11 @@ Page({
})
},
+ //获取验证码
+ getSmsCoce:function (){
+
+ },
+
doCheckOrder: function () {
if(this.data.mySelectItem.length == 0){
return false;
diff --git a/pages/book/book.wxml b/pages/book/book.wxml
index 4c52742..d4b1bee 100644
--- a/pages/book/book.wxml
+++ b/pages/book/book.wxml
@@ -42,7 +42,7 @@
验证码:
-
+
获取验证码
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/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/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
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 c3a68b2..f1f0e99 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -4,6 +4,11 @@ Page({
* 页面的初始数据
*/
data: {
+ randomName: '',
+ showPhone: true,
+ gotCode: false,
+ restTime: 10,
+ timer: '',
indicatorDots: true,
autoplay: true,
token: '',
@@ -26,7 +31,8 @@ Page({
live: {
liveUrl: app.liveUrl,
liveList: []
- }
+ },
+ usercenterUrl: app.usercenterUrl
},
doLogin: function () {
var self = this;
@@ -59,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
});
@@ -118,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,
@@ -158,6 +172,130 @@ 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
+ })
+ } else {
+ 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 +307,7 @@ Page({
self.doGetLiveList();
self.doGetVenueList();
self.doGetActivityList();
+ self.isRandomName();
},
/**
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 456d041..df5b0ff 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,7 +1,7 @@
-
-
+
+
@@ -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
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 844a71f..9c0f06d 100644
--- a/pages/newTeam/newTeam.wxml
+++ b/pages/newTeam/newTeam.wxml
@@ -1,12 +1,11 @@
-
+
团队头像:
-
+
点击上传
-
@@ -50,7 +49,7 @@
乡镇村:
-
+
{{teamAreaArray[teamAreaIndex]}}
@@ -68,7 +67,7 @@
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
diff --git a/pages/newVolunteerActivity/newVolunteerActivity.js b/pages/newVolunteerActivity/newVolunteerActivity.js
index 5f2bebc..051d5d2 100644
--- a/pages/newVolunteerActivity/newVolunteerActivity.js
+++ b/pages/newVolunteerActivity/newVolunteerActivity.js
@@ -20,7 +20,8 @@ Page({
introduce: '', // 活动介绍
voluntaryType: 1, // 类型
tempFilePaths: '', // 宣传图片
- photo: '', // 宣传图片
+ photo: '', // 用于页面显示的宣传图片链接
+ uploadPhoto: '', // 用于传到后台的宣传图片Id
serviceRequirement: '', // 服务要求
},
getToken: function() {
@@ -99,7 +100,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) {
@@ -172,7 +174,7 @@ Page({
introduce: self.data.introduce,
startTime: self.data.startDate,
endTime: self.data.endDate,
- photo: self.data.photo,
+ photo: self.data.uploadPhoto,
serviceRequirement: self.data.serviceRequirement
};
app.restAjax.post(app.restAjax.path(app.volunteerUrl + '/wxminiapp/volunteerservice/savevolunteerservice', []),
diff --git a/pages/serviceActivityDetail/serviceActivityDetail.js b/pages/serviceActivityDetail/serviceActivityDetail.js
index 31dd13d..55b32b6 100644
--- a/pages/serviceActivityDetail/serviceActivityDetail.js
+++ b/pages/serviceActivityDetail/serviceActivityDetail.js
@@ -138,7 +138,7 @@ Page({
}, function(code, data) {
if('200' == code) {
app.dialog.msg('注册成功!');
- wx.navigateTo({
+ wx.redirectTo({
url: '../volunteer/volunteer',
})
}
@@ -167,7 +167,7 @@ Page({
}, function(code, data) {
if('200' == code) {
app.dialog.msg('取消报名成功!');
- wx.navigateTo({
+ wx.redirectTo({
url: '../volunteer/volunteer',
})
}
diff --git a/pages/userAgree/userAgree.js b/pages/userAgree/userAgree.js
new file mode 100644
index 0000000..81c2d27
--- /dev/null
+++ b/pages/userAgree/userAgree.js
@@ -0,0 +1,104 @@
+// pages/userAgree/userAgree.js
+var app = getApp();
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ agreeContent: '',
+ token: ''
+ },
+ getToken: function() {
+ var self = this;
+ return new Promise(resolve =>{
+ wx.getStorage({
+ key: 'token',
+ success(res) {
+ self.setData({
+ token: res.data
+ })
+ return resolve();
+ }
+ })
+ })
+ },
+ getUserAgree: function(type) {
+ var self = this;
+ app.restAjax.get(app.restAjax.path(app.volunteerUrl + '/wxminiapp/agreecontent/getagreecontentbyid/' + type, []),
+ {}, {
+ headers: {
+ token: self.data.token
+ }
+ }, function(code, data) {
+ if('200' == code) {
+ self.setData({
+ agreeContent: data.content
+ })
+ }
+ }, function(code, data) {
+ app.dialog.msg(data.msg)
+ }, function() {
+
+ })
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ var type = options.type;
+ var self = this;
+ this.getToken().then(result => {
+ this.getUserAgree(type);
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/userAgree/userAgree.json b/pages/userAgree/userAgree.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/userAgree/userAgree.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/userAgree/userAgree.wxml b/pages/userAgree/userAgree.wxml
new file mode 100644
index 0000000..f32a380
--- /dev/null
+++ b/pages/userAgree/userAgree.wxml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/pages/userAgree/userAgree.wxss b/pages/userAgree/userAgree.wxss
new file mode 100644
index 0000000..b534855
--- /dev/null
+++ b/pages/userAgree/userAgree.wxss
@@ -0,0 +1 @@
+/* pages/userAgree/userAgree.wxss */
\ No newline at end of file
diff --git a/pages/volunteerRegister/volunteerRegister.js b/pages/volunteerRegister/volunteerRegister.js
index 661383c..6d61ce0 100644
--- a/pages/volunteerRegister/volunteerRegister.js
+++ b/pages/volunteerRegister/volunteerRegister.js
@@ -122,6 +122,7 @@ Page({
}
},
changeAgree: function (e) {
+ console.log(e)
if(e.detail.value == ''){
this.setData({
isAgree: false
@@ -132,6 +133,12 @@ Page({
})
}
},
+ userAgree: function(e) {
+ var type = e.currentTarget.dataset.type;
+ wx.navigateTo({
+ url: '../userAgree/userAgree?type=' + type,
+ })
+ },
/**
* 服务类别选择
* @param {}} e
@@ -205,12 +212,15 @@ Page({
openExperience : self.data.openExperience
};
var url;
+ var requ;
if(!self.data.volunteerMsg) {
url = '/wxminiapp/volunteer/savevolunteer';
+ requ = app.restAjax.post;
}else {
url = '/wxminiapp/volunteer/updatevolunteer/' + self.data.volunteerMsg.volunteerId;
+ requ = app.restAjax.put;
}
- app.restAjax.post(app.restAjax.path(app.volunteerUrl + url, []),
+ requ(app.restAjax.path(app.volunteerUrl + url, []),
volunteerVO, {
headers: {
'token': self.data.token
@@ -280,6 +290,7 @@ Page({
}
}, function(code, data) {
if('200' == code) {
+ console.log(data)
self.setData({
volunteerMsg: data
})
diff --git a/pages/volunteerRegister/volunteerRegister.wxml b/pages/volunteerRegister/volunteerRegister.wxml
index 7597413..eb1dfaf 100644
--- a/pages/volunteerRegister/volunteerRegister.wxml
+++ b/pages/volunteerRegister/volunteerRegister.wxml
@@ -1,4 +1,5 @@
+ 您已经是志愿者,可修改以下信息!
公开经历:
@@ -77,9 +78,10 @@
- 立即注册
+ 立即注册
+ 立即修改
\ No newline at end of file