Browse Source

优化;

release
ZhaoTongYao 4 years ago
parent
commit
0e64e84270
  1. 3
      app.js
  2. 44
      pages/complete/components/personalInfo/personalInfo.js
  3. 4
      pages/gridLeaderRegister/gridLeaderRegister.js
  4. 30
      pages/heartNew/heartNew.js
  5. 11
      pages/indexNew/indexNew.js
  6. 4
      pages/mine/mine.wxml
  7. 4
      pages/mine/mine.wxss
  8. 2
      pages/toRegister/toRegister.js
  9. 2
      subpages/associationNew/pages/addTopic/addTopic.js
  10. 2
      subpages/associationNew/pages/eventlist/eventlist.js
  11. 2
      subpages/discussion/pages/addIssue/addIssue.js
  12. 2
      subpages/discussion/pages/discussionDetail/components/detailClassify/detailClassify.wxss
  13. 2
      subpages/discussion/pages/publishEvaluation/publishEvaluation.js
  14. 6
      subpages/discussion/pages/remarkOrReply/remarkOrReply.js
  15. 8
      subpages/heart/pages/dropByPublish/dropByPublish.js
  16. 6
      subpages/heart/pages/groupBuyPublish/groupBuyPublish.js
  17. 34
      subpages/heart/pages/heartDetail/heartDetail.js
  18. 12
      subpages/heart/pages/myApply/myApply.js
  19. 23
      subpages/heart/pages/volunteer/volunteer.js
  20. 4
      subpages/integralCentre/pages/index/index.wxml
  21. 6
      subpages/oneKeyService/pages/archives/archives.js
  22. 10
      subpages/oneKeyService/pages/archivesDept/archivesDept.js
  23. 10
      utils/activity.js
  24. 11
      utils/api.js

3
app.js

@ -50,6 +50,7 @@ App({
screen: { screen: {
width: 375, width: 375,
height: 667 height: 667
} },
volunteerChange: false, // 志愿者信息是否有更新
} }
}) })

44
pages/complete/components/personalInfo/personalInfo.js

@ -57,14 +57,14 @@ Component({
// 身份证号 双向绑定 // 身份证号 双向绑定
bindIdentityNoInput (e) { bindIdentityNoInput (e) {
this.setData({ this.setData({
"personalInfo.identityNo": e.detail.value "personalInfo.identityNo": e.detail.value.trim('')
}) })
console.log(this.data.personalInfo) console.log(this.data.personalInfo)
}, },
// 姓名 双向绑定 // 姓名 双向绑定
bindRealNameInput (e) { bindRealNameInput (e) {
this.setData({ this.setData({
"personalInfo.realName": e.detail.value "personalInfo.realName": e.detail.value.trim('')
}) })
console.log(this.data.personalInfo) console.log(this.data.personalInfo)
}, },
@ -92,7 +92,7 @@ Component({
// 路 双向绑定 // 路 双向绑定
bindRoadInput (e) { bindRoadInput (e) {
this.setData({ this.setData({
"personalInfo.road": e.detail.value "personalInfo.road": e.detail.value.trim(' ')
}) })
console.log(this.data.personalInfo) console.log(this.data.personalInfo)
}, },
@ -112,14 +112,14 @@ Component({
}, },
// 获取验证码 // 获取验证码
getSmsCode () { getSmsCode () {
if (!this.data.personalInfo.mobile) { if (!this.data.personalInfo.mobile.trim('')) {
this.showToast("请先输入手机号") this.showToast("请先输入手机号")
return false return false
} }
this.setData({ this.setData({
smsCodeText: "获取中..." smsCodeText: "获取中..."
}) })
const mobile = this.data.personalInfo.mobile const mobile = this.data.personalInfo.mobile.trim('')
api.sendSms(mobile).then(() => { api.sendSms(mobile).then(() => {
this.showToast("验证码发送成功") this.showToast("验证码发送成功")
let num = 60 let num = 60
@ -268,7 +268,7 @@ Component({
return false return false
} }
} }
if (!this.data.personalInfo.realName) { if (!this.data.personalInfo.realName.trim('')) {
this.showToast("请填写姓名") this.showToast("请填写姓名")
return false return false
} }
@ -276,7 +276,7 @@ Component({
this.showToast("请选择性别") this.showToast("请选择性别")
return false return false
} }
if (!this.data.personalInfo.mobile) { if (!this.data.personalInfo.mobile.trim('')) {
this.showToast("请填写手机号") this.showToast("请填写手机号")
return false return false
} }
@ -284,7 +284,7 @@ Component({
// this.showToast('请填写验证码') // this.showToast('请填写验证码')
// return false // return false
// } // }
if (!this.data.personalInfo.road) { if (!this.data.personalInfo.road.trim('')) {
this.showToast("请填写所在小区或所在道路") this.showToast("请填写所在小区或所在道路")
return false return false
} }
@ -298,11 +298,11 @@ Component({
const para = { const para = {
partyFlag: this.data.type === "partyMember" ? "1" : "0", partyFlag: this.data.type === "partyMember" ? "1" : "0",
identityNo: this.data.personalInfo.identityNo, identityNo: this.data.personalInfo.identityNo,
mobile: this.data.personalInfo.mobile, mobile: this.data.personalInfo.mobile.trim(''),
smsCode: this.data.personalInfo.smsCode, smsCode: this.data.personalInfo.smsCode,
realName: this.data.personalInfo.realName, realName: this.data.personalInfo.realName.trim(''),
sex: this.data.personalInfo.sex, sex: this.data.personalInfo.sex,
road: this.data.personalInfo.road, road: this.data.personalInfo.road.trim(''),
villageName: this.data.personalInfo.villageName, villageName: this.data.personalInfo.villageName,
dwellingPlace: this.data.personalInfo.dwellingPlace, dwellingPlace: this.data.personalInfo.dwellingPlace,
gridId: this.data.gridInfo.gridId, gridId: this.data.gridInfo.gridId,
@ -401,6 +401,11 @@ Component({
} }
}) })
} }
}).catch(err => {
wx.hideLoading()
this.setData({
lock: false
})
}) })
} else if (this.data.type === "resident") { } else if (this.data.type === "resident") {
api.completeResidentInfoV2(para).then(res => { api.completeResidentInfoV2(para).then(res => {
@ -433,6 +438,11 @@ Component({
} }
}) })
} }
}).catch(err => {
console.log(err)
this.setData({
lock: false
})
}) })
} }
} }
@ -445,7 +455,7 @@ Component({
return false return false
} }
} }
if (!this.data.personalInfo.realName) { if (!this.data.personalInfo.realName.trim('')) {
this.showToast("请填写姓名") this.showToast("请填写姓名")
return false return false
} }
@ -453,7 +463,7 @@ Component({
this.showToast("请选择性别") this.showToast("请选择性别")
return false return false
} }
if (!this.data.personalInfo.mobile) { if (!this.data.personalInfo.mobile.trim('')) {
this.showToast("请填写手机号") this.showToast("请填写手机号")
return false return false
} }
@ -461,7 +471,7 @@ Component({
this.showToast("请填写验证码") this.showToast("请填写验证码")
return false return false
} }
if (!this.data.personalInfo.road) { if (!this.data.personalInfo.road.trim('')) {
this.showToast("请填写所在街道") this.showToast("请填写所在街道")
return false return false
} }
@ -471,11 +481,11 @@ Component({
const para = { const para = {
partyFlag: this.data.type === "partyMember" ? "1" : "0", partyFlag: this.data.type === "partyMember" ? "1" : "0",
identityNo: this.data.personalInfo.identityNo, identityNo: this.data.personalInfo.identityNo,
mobile: this.data.personalInfo.mobile, mobile: this.data.personalInfo.mobile.trim(''),
smsCode: this.data.personalInfo.smsCode, smsCode: this.data.personalInfo.smsCode,
realName: this.data.personalInfo.realName, realName: this.data.personalInfo.realName.trim(''),
sex: this.data.personalInfo.sex, sex: this.data.personalInfo.sex,
road: this.data.personalInfo.road, road: this.data.personalInfo.road.trim(''),
villageName: this.data.personalInfo.villageName, villageName: this.data.personalInfo.villageName,
dwellingPlace: this.data.personalInfo.dwellingPlace, dwellingPlace: this.data.personalInfo.dwellingPlace,
gridId: this.data.gridInfo.gridId, gridId: this.data.gridInfo.gridId,

4
pages/gridLeaderRegister/gridLeaderRegister.js

@ -8,12 +8,12 @@ Page({
}, },
adInputMobile: function (e) { adInputMobile: function (e) {
this.setData({ this.setData({
mobile: e.detail.value mobile: e.detail.value.trim('')
}) })
}, },
adInputSmsCode: function (e) { adInputSmsCode: function (e) {
this.setData({ this.setData({
smsCode: e.detail.value smsCode: e.detail.value.trim('')
}) })
}, },
outtime () { outtime () {

30
pages/heartNew/heartNew.js

@ -91,6 +91,11 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
if (app.globalData.volunteerChange) {
app.globalData.volunteerChange = false
this.getUserState()
return
}
if(this.data.selectedTab == "tab1"){//刷新志友 if(this.data.selectedTab == "tab1"){//刷新志友
if(this.data.ifClickImage){//如果为true就不可以刷新,判断完成以后重新置为false if(this.data.ifClickImage){//如果为true就不可以刷新,判断完成以后重新置为false
this.setData({ this.setData({
@ -285,7 +290,7 @@ Page({
bindInputValue (e) { bindInputValue (e) {
this.setData({ this.setData({
searchName: e.detail.value searchName: e.detail.value.trim('')
}) })
}, },
@ -559,4 +564,27 @@ Page({
} }
}); });
}, },
// 志愿者信息变更,更新用户当前状态
getUserState: function () {
let that = this
wx.login({
success (res) {
if (res.code) {
api.getToken(res.code).then((res) => {
let state = res.data.userState
app.globalData.infoCompleted = state
wx.removeStorageSync("topGridName")
wx.setStorageSync("topGridName", res.data.grid)
wx.removeStorageSync("token")
wx.setStorageSync("token", res.data.token)
that.setData({
infoCompleted: app.globalData.infoCompleted
})
})
} else {
console.log("登录失败" + res.errMsg)
}
}
})
},
}) })

11
pages/indexNew/indexNew.js

@ -472,6 +472,9 @@ Page({
}) })
}, },
changeGrid () { changeGrid () {
this.setData({
departmentId: ''
})
wx.navigateTo({ wx.navigateTo({
url: "/subpages/changegrid/pages/changeGrid/changeGrid" url: "/subpages/changegrid/pages/changeGrid/changeGrid"
}) })
@ -555,7 +558,13 @@ Page({
}, },
// 我有事说 // 我有事说
wyss () { wyss () {
if(this.data.departmentId == this.data.defaultGridId){//特殊网格处理 if (this.data.departmentId == '') {
return
} else if(this.data.departmentId == this.data.leaderGridId){
this.wysy()
} else if(this.data.departmentId == this.data.workGridId){
this.wysz()
} else if(this.data.departmentId == this.data.defaultGridId){ //特殊网格处理
wx.showToast({ wx.showToast({
title: "该板块只针对辖区内居民使用,请联系您所属网格的负责人索取二维码扫码进入", title: "该板块只针对辖区内居民使用,请联系您所属网格的负责人索取二维码扫码进入",
icon: "none", icon: "none",

4
pages/mine/mine.wxml

@ -39,7 +39,7 @@
<view class="bottom"> <view class="bottom">
<text class="text1">等级:{{userInfo.grade}}</text> <text class="text1">等级:{{userInfo.grade}}</text>
<text class="text2" bindtap="navigateToIntegralCentre" data-points="{{userInfo.points}}">积分:{{userInfo.points}}</text> <text class="text2" bindtap="navigateToIntegralCentre" data-points="{{userInfo.points}}">可用积分:{{userInfo.points}}</text>
<text class="text3"></text> <text class="text3"></text>
<!-- <text class="text3" bindtap="jqqd">积分兑换</text> --> <!-- <text class="text3" bindtap="jqqd">积分兑换</text> -->
@ -80,7 +80,7 @@
</issue-item> </issue-item>
</block> </block>
<view class="issue-nodata" wx:if="{{issueList.length === 0 && !preloadVisible}}"> <view class="issue-nodata" wx:if="{{issueList.length === 0 && !preloadVisible}}">
<image class="no-data" src="../../images/mine/topic-nodata.png" /> <image class="no-data" src="../../images/mine/project-nodata.png" />
<view class="tip">您还未发布议题,快点击我有事说发布吧</view> <view class="tip">您还未发布议题,快点击我有事说发布吧</view>
<view class="add-issue"> <view class="add-issue">
<image class="issue-trigger" src="../../images/mine/issue-trigger.png" /> <image class="issue-trigger" src="../../images/mine/issue-trigger.png" />

4
pages/mine/mine.wxss

@ -375,8 +375,8 @@ button text {
margin-top: 70rpx; margin-top: 70rpx;
} }
.topic-list .topic-nodata .no-data { .topic-list .topic-nodata .no-data {
width: 258rpx; width: 278rpx;
height: 244rpx; height: 400rpx;
object-fit: cover; object-fit: cover;
} }
.topic-list .topic-nodata .tip { .topic-list .topic-nodata .tip {

2
pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
// } // }
// }) // })
let that = this let that = this
const versionNum = "1.6.31" const versionNum = "1.6.32"
api.getScanSwitch(versionNum).then(function (res) { api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data) console.log(res.data)
let state = res.data.scanFlag let state = res.data.scanFlag

2
subpages/associationNew/pages/addTopic/addTopic.js

@ -54,7 +54,7 @@ Page({
// 地址框 值双向绑定 // 地址框 值双向绑定
bindAddressValue (e) { bindAddressValue (e) {
this.setData({ this.setData({
addressValue: e.detail.value addressValue: e.detail.value.trim('')
}) })
console.log(this.data.addressValue) console.log(this.data.addressValue)
}, },

2
subpages/associationNew/pages/eventlist/eventlist.js

@ -255,7 +255,7 @@ Page({
// 双向绑定 // 双向绑定
bindIdentity (e) { bindIdentity (e) {
this.setData({ this.setData({
commentContent: e.detail.value commentContent: e.detail.value.trim('')
}) })
}, },
// 评论按钮点击事件 // 评论按钮点击事件

2
subpages/discussion/pages/addIssue/addIssue.js

@ -43,7 +43,7 @@ Page({
isBlock: true isBlock: true
}) })
this.setData({ this.setData({
addressContent: e.detail.value addressContent: e.detail.value.trim('')
}) })
}, },
//获取事件标签列表 //获取事件标签列表

2
subpages/discussion/pages/discussionDetail/components/detailClassify/detailClassify.wxss

@ -17,7 +17,7 @@
width: 70%; width: 70%;
} }
.detail-classify .right { .detail-classify .right {
width:30%; width:40%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;

2
subpages/discussion/pages/publishEvaluation/publishEvaluation.js

@ -40,7 +40,7 @@ Page({
duration: 1000 duration: 1000
}) })
return false return false
} else if (!this.data.textareaValue) { } else if (!this.data.textareaValue.trim('')) {
wx.showToast({ wx.showToast({
title: "请填写评价内容", title: "请填写评价内容",
icon: "none", icon: "none",

6
subpages/discussion/pages/remarkOrReply/remarkOrReply.js

@ -35,11 +35,11 @@ Page({
// textarea 双向绑定 // textarea 双向绑定
bindTextareaValue (e) { bindTextareaValue (e) {
this.setData({ this.setData({
textareaValue: e.detail.value.trim(' ') textareaValue: e.detail.value
}) })
}, },
remarkOrReply () { remarkOrReply () {
if (!this.data.textareaValue) { if (!this.data.textareaValue.trim('')) {
wx.showToast({ wx.showToast({
title: "请输入回复内容", title: "请输入回复内容",
icon: "none" icon: "none"
@ -49,7 +49,7 @@ Page({
const para = { const para = {
issueId: this.data.detailType === "issue" ? this.data.issueId : "", issueId: this.data.detailType === "issue" ? this.data.issueId : "",
faCommentId: this.data.faCommentId, faCommentId: this.data.faCommentId,
content: this.data.textareaValue, content: this.data.textareaValue.trim(''),
itemId: this.data.detailType === "project" ? this.data.projectId : "", itemId: this.data.detailType === "project" ? this.data.projectId : "",
isConReview: this.data.isConReview isConReview: this.data.isConReview
} }

8
subpages/heart/pages/dropByPublish/dropByPublish.js

@ -138,7 +138,7 @@ Page({
if (this.data.lock) { if (this.data.lock) {
return false return false
} }
if (!this.data.dataForm.departure) { if (!this.data.dataForm.departure.trim('')) {
this.showToast("请填出发地") this.showToast("请填出发地")
return false return false
} }
@ -146,7 +146,7 @@ Page({
this.showToast("出发地请在100字以内") this.showToast("出发地请在100字以内")
return false return false
} }
if (!this.data.dataForm.destination) { if (!this.data.dataForm.destination.trim('')) {
this.showToast("请填写目的地") this.showToast("请填写目的地")
return false return false
} }
@ -158,7 +158,7 @@ Page({
this.showToast("请填写出发时间") this.showToast("请填写出发时间")
return false return false
} }
if (!this.data.dataForm.mobile) { if (!this.data.dataForm.mobile.trim('')) {
this.showToast("请填写联系电话") this.showToast("请填写联系电话")
return false return false
} }
@ -166,7 +166,7 @@ Page({
this.showToast("联系电话请在20字以内") this.showToast("联系电话请在20字以内")
return false return false
} }
if (!this.data.dataForm.carryContent) { if (!this.data.dataForm.carryContent.trim('')) {
this.showToast("请填写携带内容") this.showToast("请填写携带内容")
return false return false
} }

6
subpages/heart/pages/groupBuyPublish/groupBuyPublish.js

@ -179,7 +179,7 @@ Page({
return false return false
} }
console.log(this.data.dataForm.pickupMethod) console.log(this.data.dataForm.pickupMethod)
if (!this.data.dataForm.groupBuyTitle) { if (!this.data.dataForm.groupBuyTitle.trim('')) {
this.showToast("请填标题") this.showToast("请填标题")
return false return false
} }
@ -195,7 +195,7 @@ Page({
this.showToast("请填写截止时间") this.showToast("请填写截止时间")
return false return false
} }
if (!this.data.dataForm.groupBuyContent) { if (!this.data.dataForm.groupBuyContent.trim('')) {
this.showToast("请填写团购内容") this.showToast("请填写团购内容")
return false return false
} }
@ -207,7 +207,7 @@ Page({
this.showToast("至少填写一条价格说明") this.showToast("至少填写一条价格说明")
return false return false
} }
if (!this.data.dataForm.groupBuyMobile) { if (!this.data.dataForm.groupBuyMobile.trim('')) {
this.showToast("请填写联系电话") this.showToast("请填写联系电话")
return false return false
} }

34
subpages/heart/pages/heartDetail/heartDetail.js

@ -26,7 +26,11 @@ Page({
preloadVisible: true, preloadVisible: true,
timeJudge: false,//根据当前时间比较活动结束时间,判断活动是否已经结束,用以判断显示订单多多里面的志愿者 timeJudge: false,//根据当前时间比较活动结束时间,判断活动是否已经结束,用以判断显示订单多多里面的志愿者
defaultGridId:"",//默认网格 defaultGridId:"",//默认网格
actType: "" actType: "",
pageIndex: 1,
pageSize: 10,
curSize: 0, // 当前页码获取的活动条数
isPreviewImage: false //是否从图片预览返回
}, },
onLoad: function (options) { onLoad: function (options) {
console.log("当前时间" + getTimestamp()) console.log("当前时间" + getTimestamp())
@ -45,6 +49,12 @@ Page({
// 获取默认网格 // 获取默认网格
this.getDefaultGridInfo() this.getDefaultGridInfo()
}, },
onReachBottom () {
if (this.data.curSize == this.data.pageSize) {
this.data.pageIndex++
this.clockList()
}
},
// 获取详情信息 // 获取详情信息
getDetail () { getDetail () {
// let id = this.data.id // let id = this.data.id
@ -71,13 +81,18 @@ Page({
}, },
//打卡列表 //打卡列表
clockList () { clockList () {
let id = this.data.id let param = {
api.clockList(id).then(res => { actId: this.data.id,
pageIndex: this.data.pageIndex,
pageSize: this.data.pageSize
}
api.clockListV2(param).then(res => {
// console.log("打卡列表:" + JSON.stringify(res.data)) // console.log("打卡列表:" + JSON.stringify(res.data))
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
this.setData({ this.setData({
clockNum: res.data.clockNum, clockNum: res.data.clockNum,
clocks: res.data.clocks clocks: this.data.clocks.concat(res.data.clocks),
curSize: res.data.clocks.length
}) })
} }
}).catch(err => { }).catch(err => {
@ -170,6 +185,14 @@ Page({
} }
}, },
onShow: function () { onShow: function () {
if (this.data.isPreviewImage) {
this.data.isPreviewImage = false
return
}
this.setData({
pageIndex: 1,
clocks: []
})
this.getDetail(); //活动详情 this.getDetail(); //活动详情
this.clockList(); //打卡列表 this.clockList(); //打卡列表
// if (this.data.actCurrentState == 2 || this.data.actCurrentState == 3 || this.data.actCurrentState == 4) { // if (this.data.actCurrentState == 2 || this.data.actCurrentState == 3 || this.data.actCurrentState == 4) {
@ -224,6 +247,9 @@ Page({
}) })
}, },
preViewImage (e) { preViewImage (e) {
this.setData({
isPreviewImage: true
})
wx.previewImage({ wx.previewImage({
urls: e.currentTarget.dataset.list, urls: e.currentTarget.dataset.list,
current: e.currentTarget.dataset.src current: e.currentTarget.dataset.src

12
subpages/heart/pages/myApply/myApply.js

@ -155,15 +155,15 @@ Page({
if (this.data.lock) { if (this.data.lock) {
return false return false
} }
if (!this.data.dataForm.actTitle) { if (!this.data.dataForm.actTitle.trim('')) {
this.showToast("请填写活动标题") this.showToast("请填写活动标题")
return false return false
} }
if (!this.data.dataForm.actContent) { if (!this.data.dataForm.actContent.trim('')) {
this.showToast("请填写活动内容") this.showToast("请填写活动内容")
return false return false
} }
if (!this.data.dataForm.actAddress) { if (!this.data.dataForm.actAddress.trim('')) {
this.showToast("请填写活动地址") this.showToast("请填写活动地址")
return false return false
} }
@ -183,7 +183,7 @@ Page({
this.showToast('结束时间应该大于起始时间') this.showToast('结束时间应该大于起始时间')
return false return false
} }
if (!this.data.dataForm.actPeopleNum) { if (!this.data.dataForm.actPeopleNum.trim('')) {
this.showToast("请填写需要人数") this.showToast("请填写需要人数")
return false return false
} }
@ -191,11 +191,11 @@ Page({
this.showToast("请填写正确的人数") this.showToast("请填写正确的人数")
return false return false
} }
if (!this.data.dataForm.actContacts) { if (!this.data.dataForm.actContacts.trim('')) {
this.showToast("请填写联系人") this.showToast("请填写联系人")
return false return false
} }
if (!this.data.dataForm.actTel) { if (!this.data.dataForm.actTel.trim('')) {
this.showToast("请填写联系人电话") this.showToast("请填写联系人电话")
return false return false
} }

23
subpages/heart/pages/volunteer/volunteer.js

@ -242,7 +242,7 @@ Page({
}, },
// 志愿者认证提交 // 志愿者认证提交
submission () { submission () {
if (!this.data.realName) { if (!this.data.realName.trim('')) {
this.showToast("请输入姓名") this.showToast("请输入姓名")
return false return false
} }
@ -251,7 +251,7 @@ Page({
return false return false
} }
if (!this.data.identityNo) { if (!this.data.identityNo.trim('')) {
this.showToast("请输入身份证号") this.showToast("请输入身份证号")
return false return false
} }
@ -262,12 +262,12 @@ Page({
} }
if (this.data.getMobileType === "wx") { if (this.data.getMobileType === "wx") {
if (!this.data.mobile) { if (!this.data.mobile.trim('')) {
this.showToast("请获取手机号") this.showToast("请获取手机号")
return false return false
} }
} else if (this.data.getMobileType === "self") { } else if (this.data.getMobileType === "self") {
if (!this.data.mobile) { if (!this.data.mobile.trim('')) {
this.showToast("请输入手机号") this.showToast("请输入手机号")
return false return false
} }
@ -280,7 +280,7 @@ Page({
this.showToast("请上传头像") this.showToast("请上传头像")
return false return false
} }
if(!this.data.volunteerNickname){ if(!this.data.volunteerNickname.trim('')){
this.showToast("请输入昵称") this.showToast("请输入昵称")
return false return false
} }
@ -292,7 +292,7 @@ Page({
// this.showToast("请输入格言") // this.showToast("请输入格言")
// return false // return false
// } // }
if (!this.data.road) { if (!this.data.road.trim('')) {
this.showToast("请填写所在小区或所在道路") this.showToast("请填写所在小区或所在道路")
return false return false
} }
@ -311,16 +311,16 @@ Page({
// } // }
const params = { const params = {
smsCode: this.data.smsCode, smsCode: this.data.smsCode,
realName: this.data.realName, realName: this.data.realName.trim(''),
mobile: this.data.mobile, mobile: this.data.mobile.trim(''),
identityNo: this.data.identityNo, identityNo: this.data.identityNo,
road: this.data.road, road: this.data.road.trim(''),
villageName: this.data.villageName, villageName: this.data.villageName,
dwellingPlace: this.data.dwellingPlace, dwellingPlace: this.data.dwellingPlace,
gridId: this.data.gridId, gridId: this.data.gridId,
// introduce: this.data.introduce, // introduce: this.data.introduce,
volunteerFaceImg:this.data.volunteerFaceImg, volunteerFaceImg:this.data.volunteerFaceImg,
volunteerNickname:this.data.volunteerNickname, volunteerNickname:this.data.volunteerNickname.trim(''),
volunteerSignature:this.data.volunteerSignature, volunteerSignature:this.data.volunteerSignature,
volunteerTagId: this.data.volunteerTag.id, volunteerTagId: this.data.volunteerTag.id,
wxCode: this.data.unionIdStatus === "1" ? "" : this.data.wxCode, wxCode: this.data.unionIdStatus === "1" ? "" : this.data.wxCode,
@ -357,6 +357,7 @@ Page({
}) })
}, },
confirmDialog () { confirmDialog () {
app.globalData.volunteerChange = true
wx.navigateBack({ wx.navigateBack({
delta: 1 delta: 1
}) })
@ -374,7 +375,7 @@ Page({
}, },
// 获取验证码 // 获取验证码
getSmsCode () { getSmsCode () {
if (!this.data.mobile) { if (!this.data.mobile.trim('')) {
this.showToast("请先输入手机号") this.showToast("请先输入手机号")
return false return false
} }

4
subpages/integralCentre/pages/index/index.wxml

@ -1,7 +1,7 @@
<view class="home"> <view class="home">
<view class='title'> <view class='title'>
<text class="number">{{points}}</text> <text class="number">{{points}}</text>
<text class="name">积分</text> <text class="name">可用积分</text>
<view class="rule"> <view class="rule">
<view class="exchange-box"> <view class="exchange-box">
<image src='../../images/exchange.png' class="exchange" bind:tap="goExchangeIndex" /> <image src='../../images/exchange.png' class="exchange" bind:tap="goExchangeIndex" />
@ -13,7 +13,7 @@
<!-- tabbar --> <!-- tabbar -->
<view class="tab-bar"> <view class="tab-bar">
<view class="tab tab1 {{selectTab === 'tab1' ? 'select-tab' : ''}}" data-tab="tab1" bindtap="onTabChange"> <view class="tab tab1 {{selectTab === 'tab1' ? 'select-tab' : ''}}" data-tab="tab1" bindtap="onTabChange">
积分排行 累计积分排行
</view> </view>
<view class="tab tab2 {{selectTab === 'tab2' ? 'select-tab' : ''}}" data-tab="tab2" bindtap="onTabChange"> <view class="tab tab2 {{selectTab === 'tab2' ? 'select-tab' : ''}}" data-tab="tab2" bindtap="onTabChange">
积分记录 积分记录

6
subpages/oneKeyService/pages/archives/archives.js

@ -55,17 +55,17 @@ Page({
searchFile () { searchFile () {
console.log(this.data.searchContent) console.log(this.data.searchContent)
if(!this.data.searchContent.length) { if(!this.data.searchContent.trim('')) {
wx.showToast({ wx.showToast({
title: '不能为空', title: '不能为空',
icon: 'loading', icon: 'none',
duration: 2000 duration: 2000
}) })
return; return;
} }
let that = this let that = this
wx.navigateTo({ wx.navigateTo({
url: `../archivesDept/archivesDept?dept=锦水档案&deptId=&searchContent=${that.data.searchContent}` url: `../archivesDept/archivesDept?dept=锦水档案&deptId=&searchContent=${that.data.searchContent.trim('')}`
}) })
}, },

10
subpages/oneKeyService/pages/archivesDept/archivesDept.js

@ -41,8 +41,16 @@ Page({
}, },
searchFile () { searchFile () {
if(!this.data.searchContent.trim('')) {
wx.showToast({
title: '不能为空',
icon: 'none',
duration: 2000
})
return;
}
this.data.archivesList = [] this.data.archivesList = []
this.search(this.data.deptId, this.data.searchContent) this.search(this.data.deptId, this.data.searchContent.trim(''))
}, },
search(deptId, keywords) { search(deptId, keywords) {

10
utils/activity.js

@ -7,7 +7,8 @@ module.exports = {
volunteerV2list, volunteerV2list,
getImgUrl, getImgUrl,
getBannerDetail, getBannerDetail,
getVolunteerTags getVolunteerTags,
getToken
} }
function getActivityList (params) { function getActivityList (params) {
@ -42,3 +43,10 @@ function getBannerDetail (id) {
function getVolunteerTags () { function getVolunteerTags () {
return fly.get(`app-user/volunteer/tags`) return fly.get(`app-user/volunteer/tags`)
} }
//
function getToken (wxCode) {
return fly.get("app-user/user/ma/getToken", {
wxCode: wxCode
})
}

11
utils/api.js

@ -37,6 +37,7 @@ module.exports = {
cancelDetail: cancelDetail, cancelDetail: cancelDetail,
clockAddressDetail: clockAddressDetail, clockAddressDetail: clockAddressDetail,
clockList: clockList, clockList: clockList,
clockListV2: clockListV2,
getPhraseList: getPhraseList, getPhraseList: getPhraseList,
sagenumAddOne: sagenumAddOne, sagenumAddOne: sagenumAddOne,
clock: clock, clock: clock,
@ -377,6 +378,16 @@ function clockList (actId) {
actId: actId actId: actId
}) })
} }
/**
* 打卡列表
*/
function clockListV2 ({ actId, pageIndex, pageSize}) {
return fly.get("heart/act/V2/clockList", {
actId,
pageIndex,
pageSize
})
}
/** /**
* 常用语列表 * 常用语列表
*/ */

Loading…
Cancel
Save