Browse Source

1、增加服务意向参数

2、增加注册是电话号码长度的校验
3、修复党员报道无法更新数据的问题;
shibei
luyan 1 year ago
parent
commit
c47a92481b
  1. 21
      miniprogram/pages/formid/formid.js
  2. 2
      miniprogram/pages/formid/formid.json
  3. 30
      miniprogram/pages/formid/formid.wxml
  4. 2
      miniprogram/pages/login/login.wxml
  5. 12
      miniprogram/subpages/checkIn/pages/checkIn/register/register.js
  6. 5
      miniprogram/utils/partApi.js

21
miniprogram/pages/formid/formid.js

@ -121,6 +121,9 @@ Page({
}, {
label: '法律服务',
value: '10'
}, {
label: '其他',
value: '11'
}],
workTypeInput: false,
workTypeText: '', //单位类型为其他的输入框值
@ -414,7 +417,6 @@ Page({
this.setData({
'form.identityNo': e.detail.value
})
console.log(this.data.form)
},
//工作单位
bindWorkUnitInput(e) {
@ -428,7 +430,6 @@ Page({
this.setData({
'form.workIndustry': e.detail.value
})
console.log(this.data.form)
},
//以防下拉
bindMultiPickerWorkIndustryChange(e) {
@ -446,7 +447,6 @@ Page({
this.setData({
'form.mobile': e.detail.value
})
console.log(this.data.form)
},
//居住小区名称
bindvillageNameInput(e) {
@ -583,8 +583,12 @@ Page({
this.showToast('请填写工作单位')
return false
}
if (!this.data.form.mobile) {
this.showToast('请填写手机号')
if (!this.data.form.workIndustry) {
this.showToast('请填写专业特长')
return false
}
if (!this.data.form.mobile || this.data.form.mobile.length < 11) {
this.showToast('请填写正确的手机号码')
return false
}
if (this.data.form.shibei == '1') {
@ -610,7 +614,6 @@ Page({
...this.data.form
}
para.userId = wx.getStorageSync('userId')
console.log(para);
delete para.couplingCommunityStr
delete para.couplingCommunity
if (this.data.workTypeText) {
@ -620,7 +623,6 @@ Page({
title: "提交中..."
})
let than = this
if (this.data.title) {
wx.login({
success: (res) => {
@ -687,7 +689,6 @@ Page({
this.setData({
'form.password': e.detail.value
})
console.log(this.data.form);
},
bindCheckPassWordInput(e) {
this.setData({
@ -705,8 +706,8 @@ Page({
} else {
this.data.form.identityNo = this.idNo
}
if (!this.data.form.workUnit) {
this.showToast('请填写工作单位')
if (!this.data.form.workIndustry) {
this.showToast('请填写专业特长')
return
}
if (!this.data.form.mobile) {

2
miniprogram/pages/formid/formid.json

@ -1,5 +1,5 @@
{
"navigationBarTitleText": "",
"navigationBarTitleText": "注册",
"usingComponents": {
"wux-picker": "../../dist/picker/index"
}

30
miniprogram/pages/formid/formid.wxml

@ -54,6 +54,15 @@
<input confirm-type="next" bindblur="bindWorkUnitInput" bindinput="bindWorkUnitInput" value="{{form.workUnit}}" placeholder-class="placeholder-style" placeholder="请输入" />
</view>
</view>
<view class="list-item gray">
<view class="left">
<text class="must">*</text>
<view class="title">专业特长</view>
</view>
<view class="right">
<input confirm-type="next" bindblur="bindWorkIndustryInput" bindinput="bindWorkIndustryInput" value="{{form.workIndustry}}" placeholder-class="placeholder-style" placeholder="请输入" />
</view>
</view>
<view class="list-item ">
<view class="left">
<!-- <text class="must">*</text> -->
@ -74,26 +83,7 @@
<input confirm-type="next" bindblur="bindWorkTypeTextInput" bindinput="bindWorkTypeTextInput" value="{{workTypeText}}" placeholder-class="placeholder-style" placeholder="请输入" />
</view>
</view>
<view class="list-item gray">
<view class="left">
<!-- <text class="must">*</text> -->
<view class="title">专业特长</view>
</view>
<view class="right">
<!-- <picker bindchange="bindMultiPickerWorkIndustryChange"
value="{{form.workIndustry}}" range="{{workIndustryArr}}" range-key="label">
<view class="picker">
<van-button type="primary" wx:if="{{form.workIndustry}}" >
{{workIndustryArr[form.workIndustry].label}}
</van-button>
<van-button wx:else class="gray-font">
请选择
</van-button>
</view>
</picker> -->
<input confirm-type="next" bindblur="bindWorkIndustryInput" bindinput="bindWorkIndustryInput" value="{{form.workIndustry}}" placeholder-class="placeholder-style" placeholder="请输入" />
</view>
</view>
<!-- <view class="list-item gray" wx:if="{{form.workIndustry=='5'}}">
<view class="left">
<text class="must">*</text>

2
miniprogram/pages/login/login.wxml

@ -6,7 +6,7 @@
<view class="info-bg">
<view class="name">
<view class="info-input">
<input bindinput="getmobile" placeholder="请输入用户名" value="{{mobile}}"></input>
<input bindinput="getmobile" placeholder="请输入手机号码或身份证号码" value="{{mobile}}"></input>
</view>
</view>
<view class="password">

12
miniprogram/subpages/checkIn/pages/checkIn/register/register.js

@ -44,6 +44,7 @@ Page({
],
selectedStatus: false,
form: {
id: '',
name: '',
idCard: '',
mobile: '',
@ -77,9 +78,10 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
onLoad() {
this.getDeptTree()
let {
id,
realName,
identityNo,
allDeptIds,
@ -337,7 +339,12 @@ Page({
api.getByIdCardAndName(parm).then(res => {
if (res.data) {
this.setData({
'form.couplingCommunity': res.data.couplingCommunity
'form.id': res.data.id,
'form.couplingCommunity': res.data.couplingCommunity,
'form.owners': res.data.owners,
'form.party': res.data.party,
'form.gridStaff': res.data.gridStaff,
'form.volunteer': res.data.volunteer,
})
}
}).catch(err => {
@ -541,6 +548,7 @@ Page({
para.party = parseInt(para.party)
para.volunteer = parseInt(para.volunteer)
para.gridStaff = parseInt(para.gridStaff)
para.owners = this.data.form.owners
// wx.showLoading({
// title: "提交中..."
// })

5
miniprogram/utils/partApi.js

@ -31,8 +31,13 @@ function submitKnightpionner(para) {
}
//在职党员提交接口
function submitReportparty(para) {
console.log(para);
if(para.id){
return fly.post("app-user/reportparty/update", para)
}else {
return fly.post("app-user/reportparty/save", para)
}
}
//街道tree
function getDeptTree() {
return fly.get(`admin/dept/getAllDeptTree`)

Loading…
Cancel
Save