Browse Source

Merge refs/remotes/origin/feature/association into refs/heads/feature/v2.0

master
zhaoyongnian 5 years ago
parent
commit
9cbe5246ab
  1. 2
      pages/heart/heart.wxml
  2. 28
      pages/indexNew/indexNew.js
  3. 2
      pages/start/start.js
  4. 16
      pages/toRegister/toRegister.js
  5. 2
      pages/toRegister/toRegister.wxml
  6. 1
      pages/toRegister/toRegister.wxss
  7. 7
      subpages/heart/pages/volunteer/volunteer.js
  8. 2
      subpages/heart/pages/volunteer/volunteer.wxml

2
pages/heart/heart.wxml

@ -14,7 +14,7 @@
<block wx:else>
<swiper-item>
<view>
<image class="banner" src="https://epdc-shibei.elinkservice.cn/epdcFile/M00/02/B2/rBAAM16W7SqAY1XjAAMWUuGo2D4654.jpg" mode="aspectFill" />
<image class="banner" src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/09/rBAB717MxROAWjyBAAJZd_4ygpQ188.jpg" mode="aspectFill" />
</view>
</swiper-item>
</block>

28
pages/indexNew/indexNew.js

@ -11,6 +11,7 @@ Page({
first: true,
nomorenews: true,
departmentName: '',
departmentId: '',
options: {
autoplay: false,
circular: true,
@ -79,6 +80,7 @@ Page({
this.getNoticeList()
this.getIssueList()
this.getProjectList()
this.loadGridList()
this.setData({
pageNo: 1,
newsList: []
@ -113,6 +115,22 @@ Page({
// 检查版本更新
checkoutVersion()
},
//获取当前网格的id
loadGridList () {
let that = this
api.getGridList().then(res => {
if (res.code === 0 && res.msg === 'success') {
// console.log('::::::::::::'+res.data[0].gridId +'????'+res.data.length)
if (res.data.length > 0) {
that.setData({
departmentId: res.data[0].gridId
})
}
}
}).catch(err => {
console.log(err)
})
},
getBannerList: function() {
let that = this
api.bannerList('0').then(function(res) {
@ -265,6 +283,7 @@ Page({
that.getNewsList()
that.getIssueList()
that.getProjectList()
that.loadGridList()
}
} else if (state == '4') { //未注册,跳到我要注册页面
if (that.data.gid !== '') { //扫码进来的
@ -313,6 +332,7 @@ Page({
that.getNewsList()
that.getIssueList()
that.getProjectList()
that.loadGridList()
}
}
})
@ -381,9 +401,17 @@ Page({
},
// 我有事说
wyss() {
if(this.data.departmentId == '1264168301160857601'){//特殊网格处理
wx.showToast({
title: '该板块只针对辖区内居民使用,请联系您所属网格的负责人索取二维码扫码进入',
icon: 'none',
duration: 3000
})
}else{
wx.navigateTo({
url: `../discussion/discussion`
})
}
},
dqhd() {
wx.navigateTo({

2
pages/start/start.js

@ -41,7 +41,7 @@ Page({
allTime: this.data.allTime
})
clearInterval(this.data.timer)
if (this.data.datalength != this.data.datanum) {
if (this.data.datalength > this.data.datanum) {
this.getloop()
} else {
if (this.data.scene) {

16
pages/toRegister/toRegister.js

@ -12,14 +12,14 @@ Page({
height: app.globalData.height * 2 + 20,
},
onLoad: function (options) {
wx.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#FC383B',
animation: {
duration: 400,
timingFunc: 'easeIn'
}
})
// wx.setNavigationBarColor({
// frontColor: '#ffffff',
// backgroundColor: '#FC383B',
// animation: {
// duration: 400,
// timingFunc: 'easeIn'
// }
// })
let that = this
const versionNum = '1.2.0'
api.getScanSwitch(versionNum).then(function (res) {

2
pages/toRegister/toRegister.wxml

@ -1,6 +1,6 @@
<view class="container">
<view class="pagelayout">
<image class="bgimg" src="../../images/agreement.png" mode="widthFix"/>
<image class="bgimg" src="https://epdc-kongcun.elinkit.com.cn/epdcFile/M00/00/0A/rBAB717PlYSAdi-BAAoknIRDFRQ209.png" mode="widthFix"/>
</view>
<view class="footer">
<view class="buttons" wx:if="{{experience=='1'}}">

1
pages/toRegister/toRegister.wxss

@ -11,6 +11,7 @@
flex-direction: column;
}
.bgimg{
margin-top: 217rpx;
width: 100%;
height: auto;
position: absolute;

7
subpages/heart/pages/volunteer/volunteer.js

@ -201,10 +201,17 @@ Page({
this.showToast('姓名不能超过20个字')
return false
}
if (!this.data.identityNo) {
this.showToast('请输入身份证号')
return false
}
var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if (reg.test(this.data.identityNo) === false) {
this.showToast('请输入正确的身份证号')
return false
}
if (this.data.getMobileType === 'wx') {
if (!this.data.mobile) {
this.showToast('请获取手机号')

2
subpages/heart/pages/volunteer/volunteer.wxml

@ -18,7 +18,7 @@
<view class="title">姓名</view>
</view>
<view class="right">
<input confirm-type="next" bindblur="bindRealNameInput" bindinput="bindRealNameInput" value="{{realName}}" placeholder-class="placeholder-style" placeholder="请输入姓名" />
<input maxlength="20" confirm-type="next" bindblur="bindRealNameInput" bindinput="bindRealNameInput" value="{{realName}}" placeholder-class="placeholder-style" placeholder="请输入姓名" />
</view>
</view>
<view class="list-item identity-no">

Loading…
Cancel
Save