Browse Source

feat:开发一户一码

release
123456 3 years ago
parent
commit
b2365155d4
  1. 2
      epdc-resident-mp-yushan/pages/index/index.js
  2. 2
      epdc-resident-mp-yushan/pages/index/index.wxml
  3. 2
      epdc-resident-mp-yushan/pages/toRegister/toRegister.js
  4. 73
      epdc-resident-mp-yushan/subpages/family/pages/bindFamily/bindFamily.js
  5. 151
      epdc-resident-mp-yushan/subpages/family/pages/bindFamily/bindFamily.wxml
  6. 11
      epdc-resident-mp-yushan/subpages/family/pages/bindFamily/bindFamily.wxss

2
epdc-resident-mp-yushan/pages/index/index.js

@ -412,7 +412,7 @@ Page({
// 绑定家庭入口
toFamily() {
wx.navigateTo({
url: '/subpages/family/pages/index/index',
url: '/subpages/family/pages/bindFamily/bindFamily',
})
},
// 获取最新社区资讯

2
epdc-resident-mp-yushan/pages/index/index.wxml

@ -159,7 +159,7 @@
<move-btn wx:if="{{vaccinationSwitch}}" button-width="142" button-height="164" button-left="620" area-top="120" area-height="80%" img-url="../../images/vaccines.png" bindmovebtnCallBack="toVaccines"></move-btn>
<!-- 测试使用 -->
<!-- <move-btn wx:if="{{vaccinationSwitch}}" button-width="100" button-height="80" button-left="620" area-top="-100" area-height="80%" img-url="../../images/logo.png" bindmovebtnCallBack="toFamily"></move-btn> -->
<move-btn wx:if="{{vaccinationSwitch}}" button-width="100" button-height="80" button-left="620" area-top="-100" area-height="80%" img-url="../../images/logo.png" bindmovebtnCallBack="toFamily"></move-btn>
<!-- 拨打电话 -->

2
epdc-resident-mp-yushan/pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
}
})
let that = this
const versionNum = '1.2.31'
const versionNum = '1.2.32'
api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data)
let state = res.data ? res.data.scanFlag : '1'

73
epdc-resident-mp-yushan/subpages/family/pages/bindFamily/bindFamily.js

@ -27,10 +27,42 @@ Page({
district: "",
buildingAddress: "",
idNum: "",
mobile: ''
mobile: '',
roadRelationName:'',
villageRelationName:'',
buildRelationName:'',
unitRelationName:'',
houseRelationName:'',
},
submitBtnIsAllowed: false,
loadingHidden:false,
roadRelationList:[
{
label:'111',
value:0
},
{
label:'222',
value:1
},
],
villageRelationList:[
{
label:'111',
value:0
},
{
label:'222',
value:1
},
],
villageDisable:true,
buildRelationList:[],
buildDisable:true,
unitRelationList:[],
unitDisable:true,
houseRelationList:[],
houseDisable:true,
},
/**
@ -61,6 +93,45 @@ Page({
}
})
},
getMember(){
getFamilyMember().then((res) => {
})
},
roadSyncPicker(e){
this.setData({
'fmData.roadRelationName' : this.data.roadRelationList[e.detail.value].label
})
},
syncPicker(e){
if(e.currentTarget.dataset.type ==='road' && !this.data.fmData.roadRelationName){
wx.showToast({
title: '请先选择路牌号',
icon: 'none',
duration: 1000//持续的时间
})
}
},
villageSyncPicker(e){
this.setData({
'fmData.villageRelationName' : this.data.villageRelationList[e.detail.value].label
})
},
buildSyncPicker(e){
this.setData({
'fmData.buildRelationName' : e.detail.label
})
},
unitSyncPicker(e){
this.setData({
'fmData.unitRelationName' : e.detail.label
})
},
houseSyncPicker(e){
this.setData({
'fmData.houseRelationName' : e.detail.label
})
},
submit(e){
let { nickname, surname,name,street,district,buildingAddress,idNum,mobile} = e.detail.value;
this.setDate({

151
epdc-resident-mp-yushan/subpages/family/pages/bindFamily/bindFamily.wxml

@ -1,55 +1,31 @@
<form wx:if="{{isApplied}}"
class="m-fm"
bindsubmit="submit"
report-submit="true">
<form wx:if="{{isApplied}}" class="m-fm" bindsubmit="submit" report-submit="true">
<view class="fm">
<view class="item-title">基础信息</view>
<view class="item">
<view class="field">
<text class="z-stress">*</text>
昵称
</view>
<view class="input">
<input type="text"
value="{{ fmData.nickname }}"
placeholder="请输入您的昵称"
placeholder-class="z-ph"
name="nickname"
cursor-spacing="14"
maxlength="100" />
<input type="text" value="{{ fmData.nickname }}" placeholder="请输入您的昵称" placeholder-class="z-ph" name="nickname" cursor-spacing="14" maxlength="100" />
</view>
</view>
<view class="item">
<view class="field">
<text class="z-stress">*</text>
</view>
<view class="input">
<input type="text"
value="{{ fmData.surname }}"
placeholder="请输入您的姓氏"
placeholder-class="z-ph"
name="surname"
cursor-spacing="14"
maxlength="100" />
<input type="text" value="{{ fmData.surname }}" placeholder="请输入您的姓氏" placeholder-class="z-ph" name="surname" cursor-spacing="14" maxlength="100" />
</view>
</view>
<view class="item">
<view class="field">
<text class="z-stress">*</text>
</view>
<view class="input">
<input type="text"
value="{{ fmData.name }}"
placeholder="请输入您的名字"
placeholder-class="z-ph"
name="name"
cursor-spacing="14"
maxlength="100" />
<input type="text" value="{{ fmData.name }}" placeholder="请输入您的名字" placeholder-class="z-ph" name="name" cursor-spacing="14" maxlength="100" />
</view>
</view>
<view class="item">
@ -58,49 +34,46 @@
手机号
</view>
<view class="input">
<input type="text"
value="{{ fmData.mobile }}"
placeholder="请输入您的手机号"
placeholder-class="z-ph"
name="mobile"
cursor-spacing="14"
maxlength="100" />
<input type="text" value="{{ fmData.mobile }}" placeholder="请输入您的手机号" placeholder-class="z-ph" name="mobile" cursor-spacing="14" maxlength="100" />
</view>
</view>
<view class="item">
<view class="field">
<text class="z-stress">*</text>
身份证号
</view>
<view class="input">
<input type="text"
value="{{ fmData.idNum }}"
placeholder="请输入您的身份证号码"
placeholder-class="z-ph"
name="idNum"
cursor-spacing="14"
maxlength="18" />
<input type="text" value="{{ fmData.idNum }}" placeholder="请输入您的身份证号码" placeholder-class="z-ph" name="idNum" cursor-spacing="14" maxlength="18" />
</view>
</view>
</view>
<view class="fm mt20">
<view class="item-title border-bot0">现居住地</view>
<!-- <view class="item-title border-bot0">现居住地</view> -->
<view class="item">
<view class="field">
<view class="field-text">所属网格</view>
</view>
<view class="value">
<view class="input">
{{fmData.sex}}
</view>
</view>
</view>
<view class="item">
<view class="field">
<text class="z-stress">*</text>
路牌号
</view>
<view class="input">
<input type="text"
value="{{ fmData.street }}"
placeholder="* 什么路(街、村)多少号"
placeholder-class="z-ph"
name="street"
cursor-spacing="14"
maxlength="100" />
<view class="value">
<picker class="picker" range="{{roadRelationList}}" range-key="label" bindchange="roadSyncPicker">
<view class="picker-text" wx:if="{{fmData.roadRelationName}}">
{{fmData.roadRelationName}}
</view>
<view class="picker-text z-weak" wx:else>请选择</view>
<image class="menu-arrow" src="/subpages/family/images/arrow.png" mode="aspectFit" />
</picker>
</view>
</view>
<view class="item">
@ -108,14 +81,14 @@
<text class="z-white">*</text>
小区名称
</view>
<view class="input">
<input type="text"
value="{{ fmData.district }}"
placeholder="小区名称"
placeholder-class="z-ph"
name="district"
cursor-spacing="14"
maxlength="100" />
<view class="value">
<picker class="picker" range="{{villageRelationList}}" range-key="label" bindchange="villageSyncPicker" disabled="{{!fmData.roadRelationName}}">
<view class="picker-text" wx:if="{{fmData.villageRelationName}}">
{{fmData.villageRelationName}}
</view>
<view class="picker-text z-weak" wx:else bind:tap="syncPicker" data-type='road'>请选择</view>
<image class="menu-arrow" src="/subpages/family/images/arrow.png" mode="aspectFit" />
</picker>
</view>
</view>
<view class="item">
@ -123,14 +96,14 @@
<text class="z-white">*</text>
楼栋
</view>
<view class="input">
<input type="text"
value="{{ fmData.buildingAddress }}"
placeholder="楼栋号-单元室(如8号楼602)"
placeholder-class="z-ph"
name="buildingAddress"
cursor-spacing="14"
maxlength="100" />
<view class="value">
<picker class="picker" range="{{buildRelationList}}" range-key="label" bindchange="buildSyncPicker">
<view class="picker-text" wx:if="{{fmData.buildRelationName}}">
{{fmData.buildRelationName}}
</view>
<view class="picker-text z-weak" wx:else>请选择</view>
<image class="menu-arrow" src="/subpages/family/images/arrow.png" mode="aspectFit" />
</picker>
</view>
</view>
<view class="item">
@ -138,14 +111,14 @@
<text class="z-white">*</text>
单元
</view>
<view class="input">
<input type="text"
value="{{ fmData.buildingAddress }}"
placeholder="楼栋号-单元室(如8号楼602)"
placeholder-class="z-ph"
name="buildingAddress"
cursor-spacing="14"
maxlength="100" />
<view class="value">
<picker class="picker" range="{{unitRelationList}}" range-key="label" bindchange="unitSyncPicker">
<view class="picker-text" wx:if="{{fmData.unitRelationName}}">
{{fmData.unitRelationName}}
</view>
<view class="picker-text z-weak" wx:else>请选择</view>
<image class="menu-arrow" src="/subpages/family/images/arrow.png" mode="aspectFit" />
</picker>
</view>
</view>
<view class="item">
@ -153,20 +126,18 @@
<text class="z-stress">*</text>
房屋
</view>
<view class="input">
<input type="text"
value="{{ fmData.buildingAddress }}"
placeholder="楼栋号-单元室(如8号楼602)"
placeholder-class="z-ph"
name="buildingAddress"
cursor-spacing="14"
maxlength="100" />
<view class="value">
<picker class="picker" range="{{houseRelationList}}" range-key="label" bindchange="houseSyncPicker">
<view class="picker-text" wx:if="{{fmData.houseRelationName}}">
{{fmData.houseRelationName}}
</view>
<view class="picker-text z-weak" wx:else>请选择</view>
<image class="menu-arrow" src="/subpages/family/images/arrow.png" mode="aspectFit" />
</picker>
</view>
</view>
</view>
<button formType="submit"
class="submit-btn {{ submitBtnIsAllowed ? '' : 'z-disabled'}}"
plain="true">提交</button>
<button formType="submit" class="submit-btn {{ submitBtnIsAllowed ? '' : 'z-disabled'}}" plain="true">
提交
</button>
</form>

11
epdc-resident-mp-yushan/subpages/family/pages/bindFamily/bindFamily.wxss

@ -53,3 +53,14 @@
.m-fm .submit-btn:active{
background-color:#ff1921
}
.menu-arrow{
position:absolute;
top:20rpx;
right:0;
width:16rpx;
height:23rpx;
}
.item{
position: relative;
}
.value{position:absolute;right:0;width:410rpx;display:flex;font-size:32rpx;font-family:Source Han Serif SC;font-weight:400;color:#333;line-height:60rpx}.value .picker{position:relative;width:100%;padding-right:40rpx;text-align:right}.value .picker .z-weak{color:#999}.value .picker .menu-arrow{position:absolute;top:20rpx;right:0;width:16rpx;height:23rpx}
Loading…
Cancel
Save