Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
| | |
| | | (功能研发中) |
| | | </u-form-item> |
| | | </u-form> |
| | | <view class="agree"> |
| | | 注册即代表同意 |
| | | <text class="a">《用户协议》</text> |
| | | 和 |
| | | <text class="a">《隐私政策》</text> |
| | | </view> |
| | | <view class="agree"> |
| | | 注册即代表同意 |
| | | <text class="a">《用户协议》</text> |
| | | 和 |
| | | <text class="a">《隐私政策》</text> |
| | | </view> |
| | | <div v-show="mapShow"> |
| | | <div class="login-map-bc" @click="mapShow = false"> |
| | | |
| | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | var validateUser = (rule, value, callback) => { |
| | | var phone = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/; |
| | | var identity = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/; |
| | | |
| | | if (value.length <= 11) { |
| | | if (phone.test(value)) { |
| | | return true |
| | | } else { |
| | | return callback(new Error('手机号格式不正确')); |
| | | } |
| | | } |
| | | |
| | | if (value.length <= 18) { |
| | | if (identity.test(value)) { |
| | | return true |
| | | } else { |
| | | return callback(new Error('身份证号格式不正确')); |
| | | } |
| | | } |
| | | |
| | | }; |
| | | |
| | | return { |
| | | regionName: '', |
| | | loginMapUrl: "", |
| | |
| | | img: 'man-add-fill', |
| | | froms: 'user', |
| | | requireds: true, |
| | | placeholder: '请输入身份证号' |
| | | placeholder: '请输入身份证号或手机号' |
| | | }, |
| | | { |
| | | title: '密码', |
| | |
| | | jsid: '' |
| | | }, |
| | | rules: { |
| | | user: [{ |
| | | required: true, |
| | | message: '请输入身份证号', |
| | | // 可以单个或者同时写两个触发验证方式 |
| | | trigger: ['change', 'blur'], |
| | | |
| | | }, { |
| | | pattern: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/, |
| | | message: '证件号码格式有误!', |
| | | trigger: 'blur' |
| | | }], |
| | | user: [ |
| | | { |
| | | /* |
| | | u-form提供的可直接调用的js验证, |
| | | 具体有哪些可以观看官方文档,这里就不在赘述了。 |
| | | */ |
| | | validator: validateUser, |
| | | trigger: ['change', 'blur'], |
| | | }, |
| | | ], |
| | | pass: [{ |
| | | required: true, |
| | | message: '请输入6~16位密码', |
| | |
| | | |
| | | }, |
| | | zc() { |
| | | var that = this; |
| | | uni.request({ |
| | | url: that.$store.state.piAPI + '/zc/inster', |
| | | method: 'POST', |
| | | url: that.$store.state.piAPI + '/zc/inspect', |
| | | method: 'GET', |
| | | data: { |
| | | username: this.form.user |
| | | }, |
| | | success: (res) => { |
| | | uni.showToast({ |
| | | title: '注册成功,请等待审核', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | |
| | | if (res.data.code == 400) { |
| | | uni.showToast({ |
| | | title: res.data.msg, |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | |
| | | return |
| | | |
| | | } |
| | | |
| | | that.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | var d = that.form; |
| | | uni.navigateTo({ |
| | | url: '/pages/registerUser/idphoto?data= ' + |
| | | encodeURIComponent(JSON.stringify( |
| | | d)) |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | var that = this; |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | var d = this.form; |
| | | uni.navigateTo({ |
| | | url: '/pages/registerUser/idphoto?data= ' + encodeURIComponent(JSON.stringify( |
| | | d)) |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | |
| | | }, |
| | | depl() { |
| | |
| | | } else if (name.indexOf('市') != -1) { |
| | | that.regionName = name.replace('市', '市派出所'); |
| | | } |
| | | |
| | | |
| | | that.form.xq = that.regionName |
| | | that.mapShow = false |
| | | } |
| | |
| | | .registerUser { |
| | | padding: 0 1.2rem; |
| | | } |
| | | |
| | | |
| | | .agree { |
| | | margin: 27rpx 95rpx 0; |
| | | font-size: 22rpx; |
| | |
| | | font-weight: normal; |
| | | color: #cacaca; |
| | | line-height: 34rpx; |
| | | |
| | | |
| | | .a { |
| | | color: #000000; |
| | | } |
| | | } |
| | | |
| | | </style> |