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> <block wx:else>
<swiper-item> <swiper-item>
<view> <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> </view>
</swiper-item> </swiper-item>
</block> </block>

28
pages/indexNew/indexNew.js

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

2
pages/start/start.js

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

16
pages/toRegister/toRegister.js

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

2
pages/toRegister/toRegister.wxml

@ -1,6 +1,6 @@
<view class="container"> <view class="container">
<view class="pagelayout"> <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>
<view class="footer"> <view class="footer">
<view class="buttons" wx:if="{{experience=='1'}}"> <view class="buttons" wx:if="{{experience=='1'}}">

1
pages/toRegister/toRegister.wxss

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

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

@ -201,10 +201,17 @@ Page({
this.showToast('姓名不能超过20个字') this.showToast('姓名不能超过20个字')
return false return false
} }
if (!this.data.identityNo) { if (!this.data.identityNo) {
this.showToast('请输入身份证号') this.showToast('请输入身份证号')
return false 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.getMobileType === 'wx') {
if (!this.data.mobile) { if (!this.data.mobile) {
this.showToast('请获取手机号') this.showToast('请获取手机号')

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

@ -18,7 +18,7 @@
<view class="title">姓名</view> <view class="title">姓名</view>
</view> </view>
<view class="right"> <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> </view>
<view class="list-item identity-no"> <view class="list-item identity-no">

Loading…
Cancel
Save