diff --git a/app.json b/app.json
index 0b259bb..0a0e48a 100644
--- a/app.json
+++ b/app.json
@@ -1,7 +1,9 @@
{
"pages": [
- "pages/center/center",
"pages/index/index",
+ "pages/activityDialog/activityDialog",
+ "pages/teamDetail/teamDetail",
+ "pages/center/center",
"pages/volunteerRegister/volunteerRegister",
"pages/volunteer/volunteer",
"pages/heritage/heritage",
diff --git a/images/delete.png b/images/delete.png
new file mode 100644
index 0000000..63f7d52
Binary files /dev/null and b/images/delete.png differ
diff --git a/pages/activityDialog/activityDialog.js b/pages/activityDialog/activityDialog.js
new file mode 100644
index 0000000..3c20d34
--- /dev/null
+++ b/pages/activityDialog/activityDialog.js
@@ -0,0 +1,66 @@
+// pages/activityDialog/activityDialog.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/activityDialog/activityDialog.json b/pages/activityDialog/activityDialog.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/activityDialog/activityDialog.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/activityDialog/activityDialog.wxml b/pages/activityDialog/activityDialog.wxml
new file mode 100644
index 0000000..57a02dd
--- /dev/null
+++ b/pages/activityDialog/activityDialog.wxml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ 姓名
+ 哈哈哈哈哈
+
+ 2020-02-02 00:00:00
+
+
+
+
+
+
+
+
+
+
+
+ 姓名
+ 哈哈哈哈哈
+
+ 2020-02-02 00:00:00
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/activityDialog/activityDialog.wxss b/pages/activityDialog/activityDialog.wxss
new file mode 100644
index 0000000..b01a43d
--- /dev/null
+++ b/pages/activityDialog/activityDialog.wxss
@@ -0,0 +1,42 @@
+.dialog{
+ padding: 30rpx;
+}
+.dialog-box{
+ margin-bottom: 15rpx;
+ display: flex;
+ justify-content: space-between;
+}
+.avatar{
+ width: 15%;
+}
+.avatar image{
+ width: 100%;
+ height: 90rpx;
+}
+.user-info{
+ width: 83%;
+ border-bottom: 1px solid #DEDEDE;
+ padding-bottom: 10rpx;
+}
+.name{
+ font-size: 34rpx;
+ color: #949494;
+ margin: 15rpx 0;
+}
+.content{
+ font-size: 30rpx;
+ color: #000;
+ margin-bottom: 15rpx;
+}
+.public-time{
+ display: flex;
+ justify-content: space-between;
+}
+.time{
+ font-size: 28rpx;
+ color: #949494;
+}
+.delete, .delete image{
+ width: 40rpx;
+ height: 40rpx;
+}
\ No newline at end of file
diff --git a/pages/center/center.js b/pages/center/center.js
index 343da48..3f7528a 100644
--- a/pages/center/center.js
+++ b/pages/center/center.js
@@ -7,8 +7,19 @@ Page({
*/
data: {
userAvatar: '',
- token: ''
+ token: '',
+ userInfo: {},
+ usercenterUrl: app.usercenterUrl,
+ sourcePath: '/route/file/downloadfile/true/',
+ randomName: '',
+ showPhone: true,
+ phone: '',
+ code: '',
+ gotCode: false,
+ restTime: 120,
+ timer: ''
},
+ // 选择头像来源
changeAvatar: function () {
var self = this
wx.showActionSheet({
@@ -24,6 +35,7 @@ Page({
}
})
},
+ // 选择图片
chooseAvatar: function (type) {
var self = this
wx.chooseImage({
@@ -32,14 +44,13 @@ Page({
sourceType: [type],
success: function (res) {
var avatar = res.tempFilePaths[0];
- console.log(avatar)
app.restAjax.file(app.restAjax.path('{usercenterUrl}/app/file/uploadimage', [app.usercenterUrl]), avatar, 'image', {
headers: {
token: self.data.token
}
}, function (code, data) {
- console.log(data);
-
+ var id = JSON.parse(data).data
+ self.uploadAvatar(id)
}, function (code, data) {
console.log(data)
})
@@ -49,6 +60,38 @@ Page({
}
})
},
+ // 上传
+ uploadAvatar: function (avatarId) {
+ var self = this
+ app.restAjax.put(app.restAjax.path('{usercenterUrl}/app/user/updateuseravatar', [app.usercenterUrl]), {
+ avatar: avatarId
+ }, {
+ headers: {
+ token: self.data.token
+ }
+ }, function (code, data) {
+ wx.setStorageSync('token', data.data);
+ self.getUserInfo()
+ }, function (code, data) {
+ console.log(data)
+ })
+ },
+ // 获取用户信息
+ 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)
+ })
+ },
+ // 获取token
getToken: function () {
var self = this
wx.getStorage({
@@ -57,6 +100,7 @@ Page({
self.setData({
token: res.data
})
+ self.getUserInfo()
},
})
},
@@ -76,11 +120,126 @@ 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/center/center.wxml b/pages/center/center.wxml
index 82ae944..22f06d1 100644
--- a/pages/center/center.wxml
+++ b/pages/center/center.wxml
@@ -3,10 +3,10 @@
-
-
+
+
- 杜若无心
+ {{userInfo.name}}
常用功能
@@ -41,4 +41,21 @@
+
+
+
+ 您还没有绑定手机号,请先绑定手机号
+
+
+
+
+
+ 获取验证码
+ {{restTime}}
+
+
+ 确认
+ 取消
+
+
\ No newline at end of file
diff --git a/pages/center/center.wxss b/pages/center/center.wxss
index 6307e32..c4d5a4a 100644
--- a/pages/center/center.wxss
+++ b/pages/center/center.wxss
@@ -63,4 +63,83 @@
.title{
font-size: 28rpx;
color: #242424;
+}
+.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: 49%;
+ 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/teamDetail/teamDetail.js b/pages/teamDetail/teamDetail.js
new file mode 100644
index 0000000..aaf2ecc
--- /dev/null
+++ b/pages/teamDetail/teamDetail.js
@@ -0,0 +1,66 @@
+// pages/teamDetail/teamDetail.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/teamDetail/teamDetail.json b/pages/teamDetail/teamDetail.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/teamDetail/teamDetail.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/teamDetail/teamDetail.wxml b/pages/teamDetail/teamDetail.wxml
new file mode 100644
index 0000000..7f28701
--- /dev/null
+++ b/pages/teamDetail/teamDetail.wxml
@@ -0,0 +1,68 @@
+
+
+
+ 团队名称:
+ 团队名称
+
+
+ 团队人数:
+ 1
+
+
+ 所属区域:
+ 所属区域
+
+
+ 团队介绍:
+ 团队介绍
+
+
+
+ 团队成员
+
+
+
+
+
+ 名字队长
+ 加入时间:2020-02-02
+
+
+
+
+
+
+
+ 名字队长
+ 加入时间:2020-02-02
+
+
+
+
+
+
+
+ 名字队长
+ 加入时间:2020-02-02
+
+
+
+
+ 申请人员
+
+
+
+
+
+
+ 名字
+
+ 通过
+ 拒绝
+
+
+ 加入时间:2020-02-02
+
+
+
+
\ No newline at end of file
diff --git a/pages/teamDetail/teamDetail.wxss b/pages/teamDetail/teamDetail.wxss
new file mode 100644
index 0000000..0443cd1
--- /dev/null
+++ b/pages/teamDetail/teamDetail.wxss
@@ -0,0 +1,83 @@
+.team{
+ padding: 30rpx;
+}
+.team-info{
+ margin-bottom: 20rpx;
+}
+.row{
+ display: flex;
+ justify-content: space-between;
+}
+.title{
+ width: 23%;
+ font-size: 28rpx;
+ line-height: 65rpx;
+}
+.content{
+ width: 75%;
+ line-height: 65rpx;
+ font-size: 28rpx;
+ border-bottom: 1px solid #DEDEDE;
+}
+.intro{
+ min-height: 200rpx;
+}
+.team-member{
+ margin-top: 20rpx;
+}
+.member-title{
+ font-size: 30rpx;
+ color: #000;
+ padding-left: 25rpx;
+ border-left: 10rpx solid #9F1512;
+ margin-bottom: 20rpx;
+}
+.member-box{
+ display: flex;
+ justify-content: space-between;
+ padding: 10rpx 0;
+ border-bottom: 1px solid #DEDEDE;
+}
+.member-avatar{
+ width: 15%;
+}
+.member-avatar image{
+ width: 100%;
+ height: 90rpx;
+}
+.member-info{
+ width: 83%;
+}
+.name{
+ font-size: 30rpx;
+ margin: 20rpx 0;
+}
+.post{
+ display: inline-block;
+ background: rgba(159,21,18,.1);
+ color: #9F1512;
+ padding: 0 10rpx;
+ margin-left: 15rpx;
+}
+.join-time{
+ font-size: 28rpx;
+ color: #949494;
+}
+.apply-member, .btn{
+ display: flex;
+ justify-content: space-between;
+}
+.agree, .refuse{
+ padding: 0 10rpx;
+ background: rgba(159,21,18,.1);
+ color: #9F1512;
+}
+.refuse{
+ margin-left: 15rpx;
+}
+.name-box{
+ width: 60%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
\ No newline at end of file
diff --git a/pages/venue/venue.wxss b/pages/venue/venue.wxss
index d692850..aa6ecd2 100644
--- a/pages/venue/venue.wxss
+++ b/pages/venue/venue.wxss
@@ -4,6 +4,7 @@
left: 0;
right: 0;
padding: 0 30rpx;
+ background: #fff;
}
.fixed-tab{
padding: 30rpx 0;