Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
| | |
| | | <cover-image class="outline-img" src="/static/live-camera/outline/portrait.png" style=""></cover-image> |
| | | </cover-view> |
| | | </view> |
| | | |
| | | |
| | | <view class="menu"> |
| | | <!--底部菜单区域背景--> |
| | | <cover-image class="menu-mask" src="/static/live-camera/bar.png"></cover-image> |
| | | <button v-if="buttonShow" class="submit" style="background: #14b9c8;"; @click="again"> |
| | | <button v-if="buttonShow" class="submit" style="background: #14b9c8;" ; @click="again"> |
| | | <text style='color: #FFF'>重新识别</text> |
| | | </button> |
| | | </button> |
| | | <!--返回键--> |
| | | <!-- <cover-image class="menu-back" @tap="back" src="/static/live-camera/back.png"></cover-image> --> |
| | | <!--快门键--> |
| | |
| | | //倒计时 |
| | | second: 0, |
| | | ifPhoto: false, |
| | | faceNext:false, |
| | | buttonShow:false, |
| | | dataForm:"", |
| | | faceNext: false, |
| | | buttonShow: false, |
| | | dataForm: "", |
| | | }; |
| | | }, |
| | | onLoad(e) { |
| | |
| | | } |
| | | }, 1000); |
| | | }, |
| | | again(){ |
| | | again() { |
| | | this.getCount(); |
| | | }, |
| | | //人脸验证 |
| | | FaceVerification(res){ |
| | | FaceVerification(res) { |
| | | var that = this; |
| | | uni.showLoading({title: '人脸验证中'}); |
| | | uni.showLoading({ |
| | | title: '人脸验证中' |
| | | }); |
| | | var url = that.$store.state.piAPI + 'blade-user/faceCompare', |
| | | data = { |
| | | "name": that.dataForm.name, |
| | |
| | | }); |
| | | }, |
| | | //帐号注册 |
| | | insterAccounts(d){ |
| | | insterAccounts(d) { |
| | | var that = this; |
| | | var url = that.$store.state.piAPI + '/zc/inster', |
| | | data = { |
| | |
| | | sex: d.sex == '男' ? 1 : 2, |
| | | sname: d.name, |
| | | username: d.user, |
| | | deptid:d.objId, |
| | | parentId:d.jsid, |
| | | jurisdiction:d.xqobjId, |
| | | cardid:d.carId |
| | | deptid: d.objId, |
| | | parentId: d.jsid, |
| | | jurisdiction: d.xqobjId, |
| | | cardid: d.carId, |
| | | address: d.address |
| | | } |
| | | uni.request({ |
| | | url: url, |
| | |
| | | success: (res) => { |
| | | uni.showToast({ |
| | | title: '注册成功,请等待审核', |
| | | icon:'none', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | setTimeout(function(){ |
| | | setTimeout(function() { |
| | | uni.navigateTo({ |
| | | url: '/pages/loging/loging' |
| | | }) |
| | | },2000); |
| | | }, 2000); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | |
| | | .submit { |
| | | margin: 30rpx 50rpx 0; |
| | | border: none; |
| | |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx; |
| | | } |
| | | |
| | | .live-camera { |
| | | .preview { |
| | | justify-content: center; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .title { |
| | | font-size: 35rpx; |
| | | background-color: #0BB9C8; |
| | |
| | | <template> |
| | | <view class="registerUser"> |
| | | <u-form :model="form" ref="uForm"> |
| | | <u-form-item :label="item.title" :prop="item.froms" label-width="200" :left-icon="item.img" |
| | | <u-form-item :label="item.title" :prop="item.froms" label-width="200" :left-icon="item.img" |
| | | :required="item.requireds" v-for="(item, index) in list" :key="index"> |
| | | <u-input v-model="form[item.froms]" :placeholder="item.placeholder" :type="item.type" /> |
| | | </u-form-item> |
| | |
| | | <u-select v-model="show" mode="mutil-column-auto" :list="roleList" @confirm="radioGroupChange"> |
| | | </u-select> |
| | | </u-form-item> |
| | | <u-form-item label="工作单位" prop="obj" left-icon="account-fill" label-width="200" :required="true" |
| | | v-if="xqShow"> |
| | | <u-form-item label="工作单位" prop="obj" left-icon="home-fill" label-width="200" :required="true"> |
| | | <u-input v-model="form.obj" placeholder="请输入工作单位" /> |
| | | </u-form-item> |
| | | <u-form-item label="辖区" prop="xq" left-icon="account-fill" label-width="200" :required="true"> |
| | | <u-form-item label="辖区" prop="xq" left-icon="map-fill" label-width="200" :required="true"> |
| | | <u-input v-model="form.xq" type="select" placeholder="请选择辖区" :border="true" @click="regionClick" /> |
| | | <u-select v-model="regionShow" mode="mutil-column-auto" :list="regionList" @confirm="regionSelect"> |
| | | </u-select> |
| | | </u-form-item> |
| | | <u-form-item label="详细地址" prop="address" left-icon="map" label-width="200" :required="true"> |
| | | <u-input v-model="form.address" placeholder="详细地址" /> |
| | | </u-form-item> |
| | | <u-form-item label="性别" label-width="200" left-icon="man"> |
| | | <u-radio-group v-model="form.sex"> |
| | |
| | | marker: [], |
| | | show: false, |
| | | showxq: false, |
| | | xqShow: true, |
| | | listbm: [], |
| | | listxq: [], |
| | | deptXb: "", |
| | |
| | | objId: '', |
| | | xq: '', |
| | | xqobjId: '', |
| | | jsid: '' |
| | | jsid: '', |
| | | address: '' |
| | | }, |
| | | rules: { |
| | | user: [{ |
| | |
| | | obj: [{ |
| | | required: true, |
| | | message: '请输入工作单位', |
| | | // 可以单个或者同时写两个触发验证方式 |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | address: [{ |
| | | required: true, |
| | | message: '请输入详细地址', |
| | | // 可以单个或者同时写两个触发验证方式 |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | |
| | | regionClick() { |
| | | this.regionShow = true; |
| | | }, |
| | | regionSelect() { |
| | | regionSelect(e) { |
| | | this.form.xq = e[0].label |
| | | this.form.xqobjId = e[0].value |
| | | |
| | | |
| | | this.regionShow = false; |
| | | }, |
| | | handleMessage(name) { |
| | | if (name.indexOf('区') != -1) { |
| | | that.regionName = name.replace('区', '派出所'); |
| | | } else if (name.indexOf('县') != -1) { |
| | | that.regionName = name.replace('县', '派出所'); |
| | | } else if (name.indexOf('市') != -1) { |
| | | that.regionName = name.replace('市', '市派出所'); |
| | | } |
| | | }, |
| | | zc() { |
| | | var that = this; |
| | |
| | | |
| | | } |
| | | |
| | | var that = this; |
| | | var d = that.form; |
| | | var url = that.$store.state.piAPI + '/zc/inster', |
| | | data = { |
| | | // deptid: , |
| | | password: d.pass, |
| | | password2: d.passTwo, |
| | | phone: d.phone, |
| | | sex: d.sex == '男' ? 1 : 2, |
| | | sname: d.name, |
| | | username: d.user, |
| | | deptid: d.objId, |
| | | parentId: d.jsid, |
| | | jurisdiction: d.xqobjId, |
| | | cardid: d.carId |
| | | } |
| | | uni.request({ |
| | | url: url, |
| | | method: 'POST', |
| | | data: data, |
| | | success: (res) => { |
| | | uni.showToast({ |
| | | title: '注册成功,请等待审核', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | that.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | var d = that.form; |
| | | uni.navigateTo({ |
| | | url: '/pages/registerUser/idphoto?data= ' + |
| | | encodeURIComponent(JSON.stringify( |
| | | d)) |
| | | }); |
| | | setTimeout(function() { |
| | | uni.navigateTo({ |
| | | url: '/pages/loging/loging' |
| | | }) |
| | | }, 2000); |
| | | } |
| | | }); |
| | | |
| | |
| | | }, |
| | | depl() { |
| | | this.show = true; |
| | | }, |
| | | formatRoutes(routerArr) { |
| | | var that = this; |
| | | const arr = []; |
| | | let obj = {}; |
| | | routerArr.forEach(router => { |
| | | const tmp = { |
| | | ...router |
| | | }; |
| | | if (tmp.hasChildren == true) { |
| | | tmp.children = that.formatRoutes(tmp.children); |
| | | |
| | | const { |
| | | id, |
| | | title |
| | | } = router; |
| | | |
| | | obj = { |
| | | label: tmp.title, |
| | | value: tmp.id, |
| | | children: tmp.children |
| | | } |
| | | } else if (tmp.hasChildren == false || typeof(tmp.hasChildren) == 'undefined') { |
| | | obj = { |
| | | label: tmp.title, |
| | | value: tmp.id, |
| | | children: [] |
| | | } |
| | | } |
| | | arr.push(obj); |
| | | }) |
| | | return arr; |
| | | }, |
| | | // 选中任一radio时,由radio-group触发 |
| | | radioGroupChange(e) { |