diff --git a/components/activity/activity.wxss b/components/activity/activity.wxss
index 4f5284b..497826d 100644
--- a/components/activity/activity.wxss
+++ b/components/activity/activity.wxss
@@ -89,7 +89,7 @@
.infos .infos_times {
font-size: 24rpx;
- height: 100rpx;
+ height: 90rpx;
overflow: hidden;
color: #a8a8a8;
}
diff --git a/pages/heartNew/heartNew.wxml b/pages/heartNew/heartNew.wxml
index ebdeabb..dd1a206 100644
--- a/pages/heartNew/heartNew.wxml
+++ b/pages/heartNew/heartNew.wxml
@@ -65,7 +65,7 @@
精彩说说
- 志愿积分榜
+ 志愿排行
@@ -80,7 +80,7 @@
- *按姓氏拼音排序
+
diff --git a/subpages/discussion/pages/addIssue/addIssue.wxml b/subpages/discussion/pages/addIssue/addIssue.wxml
index 83aede9..c1c0b8b 100644
--- a/subpages/discussion/pages/addIssue/addIssue.wxml
+++ b/subpages/discussion/pages/addIssue/addIssue.wxml
@@ -3,7 +3,7 @@
diff --git a/subpages/heart/images/ic_jinruxiayiye@2x.png b/subpages/heart/images/ic_jinruxiayiye@2x.png
new file mode 100644
index 0000000..52c9d01
Binary files /dev/null and b/subpages/heart/images/ic_jinruxiayiye@2x.png differ
diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.js b/subpages/heart/pages/leaderboardNew/leaderboardNew.js
index 26a0ff4..1c7599a 100644
--- a/subpages/heart/pages/leaderboardNew/leaderboardNew.js
+++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.js
@@ -30,7 +30,7 @@ Page({
}
],
// 积分排行榜相关
- datalenght: 0,
+ datalenght: null,
loveRankingList: [],
preloadVisible: true,
// 列表相关
@@ -90,6 +90,7 @@ Page({
})
}).catch(() => {
this.setData({
+ datalenght:0,
loveRankingList: [],
preloadVisible: false
})
diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.json b/subpages/heart/pages/leaderboardNew/leaderboardNew.json
index 236a2d0..2898aff 100644
--- a/subpages/heart/pages/leaderboardNew/leaderboardNew.json
+++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.json
@@ -1,5 +1,5 @@
{
- "navigationBarTitleText": "志愿积分榜",
+ "navigationBarTitleText": "志愿排行",
"usingComponents": {
"preload-loveranking-item": "./components/preloadLoverankingItem/preloadLoverankingItem",
"activity-item": "./components/activityItem/activityItem",
diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml
index e051ef8..c7f7256 100644
--- a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml
+++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxml
@@ -1,6 +1,6 @@
- 志愿排行
+ 排行榜
参与纪录
diff --git a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxss b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxss
index 56b7be3..06b04c3 100644
--- a/subpages/heart/pages/leaderboardNew/leaderboardNew.wxss
+++ b/subpages/heart/pages/leaderboardNew/leaderboardNew.wxss
@@ -101,7 +101,7 @@ button::after {
box-sizing: border-box;
background: #fff;
margin-top: 17rpx;
- /* padding: 0 30rpx; */
+ padding: 0 30rpx;
}
diff --git a/subpages/heart/pages/volunteer/volunteer.js b/subpages/heart/pages/volunteer/volunteer.js
index 40fd742..c5da343 100644
--- a/subpages/heart/pages/volunteer/volunteer.js
+++ b/subpages/heart/pages/volunteer/volunteer.js
@@ -3,6 +3,8 @@ import {
$wuxDialog
} from '../../../../dist/index'
const app = getApp()
+import { $wuxActionSheet } from '../../../../dist/index'
+const config = require('../../../../utils/config')
Page({
/**
@@ -21,6 +23,9 @@ Page({
encryptedData: '', //用户unionId为空时 传入
iv: '', //用户unionId为空时 传入
introduce: '', //自我介绍
+ volunteerNickname:'',//昵称
+ volunteerSignature:'',//签名
+ volunteerFaceImg:'',//头像
unionIdStatus: '0',
wait: 60,
smsCode: '',
@@ -30,7 +35,8 @@ Page({
dialogConfirmText: '',
dialogCancelText: '',
getMobileType: 'wx',
- smsCodeText: '获取验证码'
+ smsCodeText: '获取验证码',
+ uploadImageList: [],
},
onLoad: function(options) {
this.getPrepareComplete().then(res => {
@@ -49,6 +55,11 @@ Page({
mobile: e.detail.value
})
},
+ nickname(e){
+ this.setData({
+ volunteerNickname: e.detail.value
+ })
+ },
bindSmsCodeInput(e) {
this.setData({
smsCode: e.detail.value
@@ -83,6 +94,11 @@ Page({
introduce: e.detail.value
})
},
+ volunteerSignature(e) {
+ this.setData({
+ volunteerSignature: e.detail.value
+ })
+ },
// 查看用户是否完善个人信息
checkWxUnionId() {
api.checkWxUnionId().then(res => {
@@ -138,7 +154,11 @@ Page({
dwellingPlace: res.data.dwellingPlace,
state: res.data.state,
gridId: res.data.gridId,
- gridName: res.data.gridName
+ gridName: res.data.gridName,
+ volunteerNickname:res.data.volunteerNickname,
+ volunteerSignature:res.data.volunteerSignature,
+ volunteerFaceImg:res.data.volunteerFaceImg,
+ introduce:res.data.introduce
})
resolve(true)
}).catch(err => {
@@ -199,6 +219,18 @@ Page({
return false
}
}
+ if(!this.data.volunteerFaceImg){
+ this.showToast('请上传头像')
+ return false
+ }
+ if(!this.data.volunteerNickname){
+ this.showToast('请输入昵称')
+ return false
+ }
+ if(!this.data.volunteerSignature){
+ this.showToast('请输入签名')
+ return false
+ }
if (!this.data.road) {
this.showToast('请填写所在小区或所在道路')
return false
@@ -226,6 +258,9 @@ Page({
dwellingPlace: this.data.dwellingPlace,
gridId: this.data.gridId,
introduce: this.data.introduce,
+ volunteerFaceImg:this.data.volunteerFaceImg,
+ volunteerNickname:this.data.volunteerNickname,
+ volunteerSignature:this.data.volunteerSignature,
wxCode: this.data.unionIdStatus === '1' ? '' : this.data.wxCode,
encryptedData: this.data.unionIdStatus === '1' ? '' : this.data.encryptedData,
iv: this.data.unionIdStatus === '1' ? '' : this.data.iv
@@ -334,4 +369,116 @@ Page({
duration: 2000
})
},
+
+ // 上传头像
+ // 选择图片 上传弹窗 - 上传图片方式 - 选择图片 - 上传图片 - 回调赋值
+ chooseImage () {
+ const _this = this
+
+ _this.setData({
+ uploadImageList: [],
+ })
+ $wuxActionSheet().showSheet({
+ buttons: [
+ { text: '拍照' },
+ { text: '从相册中获取' },
+ ],
+ className: 'dialog-class',
+ buttonClicked(index) {
+ console.log(':::::::::::::'+index)
+ if (index === 0) {
+ wx.chooseImage({
+ count: 1,
+ sizeType: ['original', 'compressed'],
+ sourceType: ['camera'],
+ success (res) {
+ const uploadImageList = [..._this.data.uploadImageList]
+ uploadImageList.push({
+ uploaded: false,
+ ossUrl: '',
+ imgUrl: res.tempFilePaths[0],
+ imageId: ++_this.data.imageId
+ })
+ _this.setData({
+ uploadImageList
+ })
+ wx.uploadFile({
+ url: `${config.BASEURL()}group/topic/upload`,
+ filePath: res.tempFilePaths[0],
+ name: 'file',
+ header: {
+ 'Content-type': 'multipart/form-data'
+ },
+ success (fileRes){
+ uploadImageList[uploadImageList.length - 1].uploaded = true
+ uploadImageList[uploadImageList.length - 1].ossUrl = JSON.parse(fileRes.data).data
+ _this.setData({
+ uploadImageList
+ })
+
+ _this.setData({
+ volunteerFaceImg:uploadImageList[0].ossUrl
+ })
+ console.log('>>>>>>>>>>>'+_this.data.volunteerFaceImg)
+ }
+ })
+
+ }
+ })
+ } else if (index === 1) {
+ wx.chooseImage({
+ count: 3 - _this.data.uploadImageList.length,
+ sizeType: ['original', 'compressed'],
+ sourceType: ['album'],
+ success (res) {
+ const uploadImageList = []
+ const endIndex = _this.data.uploadImageList.length
+ res.tempFilePaths.forEach(item => {
+ uploadImageList.push({
+ uploaded: false,
+ ossUrl: '',
+ imgUrl: item,
+ imageId: ++_this.data.imageId
+ })
+ })
+ _this.setData({
+ uploadImageList: [..._this.data.uploadImageList,...uploadImageList]
+ })
+ uploadImageList.forEach((item, index) => {
+ return (function (index) {
+ wx.uploadFile({
+ url: `${config.BASEURL()}group/topic/upload`,
+ filePath: res.tempFilePaths[index],
+ name: 'file',
+ header: {
+ 'Content-type': 'multipart/form-data'
+ },
+ success (fileRes){
+ uploadImageList[index].uploaded = true
+ uploadImageList[index].ossUrl = JSON.parse(fileRes.data).data
+ _this.data.uploadImageList = _this.data.uploadImageList.slice(0, endIndex)
+ _this.setData({
+ uploadImageList: [..._this.data.uploadImageList, ...uploadImageList]
+ })
+ // _this.data.setData({
+ // volunteerFaceImg:uploadImageList[0].ossUrl
+ // })
+
+ _this.setData({
+ volunteerFaceImg:uploadImageList[0].ossUrl
+ })
+ }
+ })
+ })(index)
+ })
+ }
+ })
+ }
+ return true
+ },
+ cancelText: '取消',
+ cancel() {},
+ destructiveButtonClicked() {},
+ })
+ },
})
\ No newline at end of file
diff --git a/subpages/heart/pages/volunteer/volunteer.json b/subpages/heart/pages/volunteer/volunteer.json
index 2bbd9ca..c001ecc 100644
--- a/subpages/heart/pages/volunteer/volunteer.json
+++ b/subpages/heart/pages/volunteer/volunteer.json
@@ -2,6 +2,7 @@
"navigationBarTitleText": "志愿者认证",
"usingComponents": {
"wux-dialog": "../../../../dist/dialog/index",
- "coverview-dialog": "../../components/coverViewDialog/coverViewDialog"
+ "coverview-dialog": "../../components/coverViewDialog/coverViewDialog",
+ "wux-actionsheet": "../../../../dist/actionsheet/index"
}
}
\ No newline at end of file
diff --git a/subpages/heart/pages/volunteer/volunteer.wxml b/subpages/heart/pages/volunteer/volunteer.wxml
index 52e7cb3..d969f34 100644
--- a/subpages/heart/pages/volunteer/volunteer.wxml
+++ b/subpages/heart/pages/volunteer/volunteer.wxml
@@ -62,6 +62,34 @@
{{getMobileType === 'wx' ? '*如若获取手机号异常,请点击切换至手机号/验证码注册方式' : '*点击可切回至从微信获取手机号注册方式'}}
+
+
+
+ 头像
+
+
+
+
+
+
+ 昵称
+
+
+
+
+
+
+ 签名
+
+
+
+
+
+
+
+
+
+
@@ -71,11 +99,11 @@
-
+
@@ -110,7 +138,7 @@
-
+
@@ -127,4 +155,5 @@
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/subpages/heart/pages/volunteer/volunteer.wxss b/subpages/heart/pages/volunteer/volunteer.wxss
index 70d2793..e2a287a 100644
--- a/subpages/heart/pages/volunteer/volunteer.wxss
+++ b/subpages/heart/pages/volunteer/volunteer.wxss
@@ -1,24 +1,33 @@
-.container{
+page {
+ background: #f7f7f7;
+}
+
+.container {
width: 100%;
}
-.top-bg{
+
+.top-bg {
width: 100%;
height: 354rpx;
}
-.top-bg image{
+
+.top-bg image {
width: 100%;
height: 290rpx;
}
-.position-absolute{
+
+.position-absolute {
position: absolute;
top: 225rpx;
left: 20rpx;
right: 20rpx;
}
-.info{
+
+.info {
background-color: #fff;
border-radius: 20rpx;
}
+
.info-box {
width: 100wh;
height: auto;
@@ -33,70 +42,84 @@
padding: 35rpx 0rpx;
margin: 0rpx 20rpx;
}
+.info-box-last-v2 {
+ width: 100wh;
+ height: auto;
+ /* padding: 35rpx 0rpx; */
+ margin: 0rpx 20rpx;
+}
-.info-left{
+.info-left {
width: 40%;
float: left;
- word-wrap:break-word;
+ word-wrap: break-word;
}
-.name{
- font-size:34rpx;
- font-family:PingFang SC;
- font-weight:500;
- color:rgba(51,51,51,1);
+
+.name {
+ font-size: 34rpx;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: rgba(51, 51, 51, 1);
}
-.info-right{
+.info-right {
width: 60%;
float: left;
text-align: right;
- word-wrap:break-word;
+ word-wrap: break-word;
}
-.address{
+
+.address {
text-align: right;
- word-wrap:break-word;
+ word-wrap: break-word;
}
-.introduce{
+
+.introduce {
text-align: left;
- font-size:34rpx;
- color:rgba(51,51,51,1);
+ font-size: 34rpx;
+ color: rgba(51, 51, 51, 1);
}
-.clear{
+
+.clear {
clear: both;
}
-.red-button{
+
+.red-button {
width: 144rpx;
height: 44rpx;
- background-color: rgba(250,47,47);
+ background-color: rgba(250, 47, 47);
text-align: center;
line-height: 44rpx;
- font-size:24rpx;
- font-family:PingFang SC;
- font-weight:500;
- color:rgba(255,255,255,1);
+ font-size: 24rpx;
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: rgba(255, 255, 255, 1);
border-radius: 15rpx;
margin-top: 5rpx;
float: right;
}
-.yzm{
+
+.yzm {
float: right;
margin-right: 36rpx;
width: 190rpx;
}
-.magin-top{
+
+.magin-top {
margin-top: 15rpx;
}
textarea {
-width: auto;
+ width: auto;
}
-.button{
- background:linear-gradient(90deg,rgba(244,12,12,1),rgba(255,78,78,1));
+
+.button {
+ background: linear-gradient(90deg, rgba(244, 12, 12, 1), rgba(255, 78, 78, 1));
width: 560rpx;
height: 84rpx;
- font-size:36rpx;
- font-weight:500;
- color:rgba(255,255,255,1);
+ font-size: 36rpx;
+ font-weight: 500;
+ color: rgba(255, 255, 255, 1);
text-align: center;
line-height: 84rpx;
border-radius: 20rpx;
@@ -109,11 +132,12 @@ width: auto;
height: 85rpx;
display: flex;
justify-content: center;
- align-items:center;
+ align-items: center;
margin-top: 40rpx;
margin-bottom: 40rpx;
}
+
.submit-btn button {
background: linear-gradient(to right, #f51010, #ff4c4c);
width: 560rpx;
@@ -127,6 +151,7 @@ width: auto;
padding: 0;
outline: 0;
}
+
.submit-btn .hover-button {
background: red;
}
@@ -140,6 +165,7 @@ width: auto;
padding: 0 20rpx;
margin-top: 20rpx;
}
+
.basic-info .list-item {
width: 100%;
height: 100rpx;
@@ -147,36 +173,44 @@ width: auto;
align-items: center;
justify-content: space-between;
}
-.basic-info .list-item + .list-item {
+
+.basic-info .list-item+.list-item {
border-top: 1rpx solid #eaeaea;
}
+
.basic-info .list-item .left {
display: flex;
align-items: center;
height: 100rpx;
}
+
.basic-info .list-item .left .must {
color: #F61616;
font-size: 30rpx;
}
+
.basic-info .list-item .left .title {
color: #333;
font-size: 34rpx;
}
+
.basic-info .list-item .right {
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
+
.basic-info .list-item .right.code {
width: calc(100% - 120rpx);
overflow: hidden;
}
+
.basic-info .list-item .right .placeholder-style {
font-size: 28rpx;
color: #999;
}
+
.basic-info .list-item .right input {
text-align: right;
font-size: 34rpx;
@@ -184,9 +218,11 @@ width: auto;
height: 100%;
width: 100%;
}
+
.basic-info .list-item .right.code input {
width: calc(100% - 300rpx);
}
+
.basic-info .list-item .right .get-code {
padding: 0 15rpx;
height: 60rpx;
@@ -198,6 +234,7 @@ width: auto;
margin: 0;
margin-left: 25rpx;
}
+
.basic-info .list-item .right .button-hover {
background: rgb(175, 1, 1);
}
@@ -205,27 +242,35 @@ width: auto;
.basic-info .list-item.identity-no .left {
width: 160rpx;
}
+
.basic-info .list-item.identity-no .right {
width: calc(100% - 160rpx);
}
+
.basic-info .list-item.real-name .left {
width: 140rpx;
}
+
.basic-info .list-item.real-name .right {
width: calc(100% - 140rpx);
}
+
.basic-info .list-item.mobile .left {
width: 140rpx;
}
+
.basic-info .list-item.mobile .right {
width: calc(100% - 140rpx);
}
+
.basic-info .list-item.mobile .right input {
width: calc(100% - 25rpx - 200rpx);
}
+
.basic-info .list-item.sms-code .left {
width: 140rpx;
}
+
.basic-info .list-item.sms-code .right {
width: calc(100% - 140rpx);
}
@@ -235,8 +280,91 @@ width: auto;
color: #999;
line-height: 62rpx;
}
+
.header {
color: #333;
- font-size:34rpx;
+ font-size: 34rpx;
font-weight: bold;
-}
\ No newline at end of file
+}
+
+.my-info {
+ background-color: #fff;
+ border-radius: 20rpx;
+}
+
+.head-portrait {
+ width: 100wh;
+ height: auto;
+ border-bottom: 1rpx solid #e7eeee;
+ height: 100rpx;
+ /* padding: 35rpx 0rpx; */
+ margin: 0rpx 20rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.head-portrait .head-portrait-name {
+ font-size: 34rpx;
+ font-weight: 500;
+ color: rgba(51, 51, 51, 1);
+}
+
+.head-portrait .head-portrait-image {
+ width: 95rpx;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.head-portrait .head-portrait-image .photo {
+ border-radius: 50%;
+ width: 64rpx;
+ height: 64rpx;
+}
+
+.head-portrait .head-portrait-image .photo-right {
+ width: 24rpx;
+ height: 24rpx;
+}
+
+.nickname {
+ width: calc(100% - 120rpx);
+ height: 100%;
+}
+
+.nickname .nicknameinput {
+ text-align: right;
+ font-size: 34rpx;
+ color: #333;
+ height: 100%;
+ width: 100%;
+}
+
+.head-portrait-last {
+ width: 100wh;
+ height: 100rpx;
+ /* padding: 35rpx 0rpx; */
+ margin: 0rpx 20rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.head-portrait-last .head-portrait-name-last {
+ font-size: 34rpx;
+ font-weight: 500;
+ color: rgba(51, 51, 51, 1);
+}
+
+.wux-actionsheet__button {
+ font-size: 34rpx !important;
+ color: #333 !important;
+}
+.wux-actionsheet{
+ background: #999 !important;
+}
+/* .wux-actionsheet__group--options{
+ background: #fff !important;
+} */
\ No newline at end of file
diff --git a/utils/api.js b/utils/api.js
index 88c2b37..e600be3 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -133,7 +133,7 @@ function gridLeaderRegister(mobile, smsCode, wxCode) {
function prepareComplete() {
- return fly.get('app-user/user/prepareComplete', {})
+ return fly.get('app-user/user/getInfoById', {})
}
function sendSms(mobile) {
@@ -358,11 +358,18 @@ function clock(data) {
return fly.post('heart/act/clock', data)
}
+// /**
+// * 志愿者认证
+// */
+// function authenticate(data) {
+// return fly.post('app-user/volunteer/authenticate', data)
+// }
+
/**
- * 志愿者认证
+ * 志愿者认证 v2
*/
function authenticate(data) {
- return fly.post('app-user/volunteer/authenticate', data)
+ return fly.post('app-user/volunteer/v2/authenticate', data)
}
/**
* 活动报名