liuyg
2022-02-22 c6bc487ee4bda719081c46a3b1e66acf17ea9c13
Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
2 files modified
142 ■■■■■ changed files
pages/registerUser/idphoto.nvue 40 ●●●●● patch | view | raw | blame | history
pages/registerUser/registerUser.vue 102 ●●●● patch | view | raw | blame | history
pages/registerUser/idphoto.nvue
@@ -21,13 +21,13 @@
                <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> -->
            <!--快门键-->
@@ -56,9 +56,9 @@
                //倒计时
                second: 0,
                ifPhoto: false,
                faceNext:false,
                buttonShow:false,
                dataForm:"",
                faceNext: false,
                buttonShow: false,
                dataForm: "",
            };
        },
        onLoad(e) {
@@ -160,13 +160,15 @@
                    }
                }, 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,
@@ -213,7 +215,7 @@
                });
            },
            //帐号注册
            insterAccounts(d){
            insterAccounts(d) {
                var that = this;
                var url = that.$store.state.piAPI + '/zc/inster',
                    data = {
@@ -224,10 +226,11 @@
                        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,
@@ -236,14 +239,14 @@
                    success: (res) => {
                        uni.showToast({
                            title: '注册成功,请等待审核',
                            icon:'none',
                            icon: 'none',
                            duration: 2000
                        });
                        setTimeout(function(){
                        setTimeout(function() {
                            uni.navigateTo({
                                url: '/pages/loging/loging'
                            })
                        },2000);
                        }, 2000);
                    }
                });
            },
@@ -252,7 +255,6 @@
</script>
<style lang="scss">
    .submit {
        margin: 30rpx 50rpx 0;
        border: none;
@@ -262,6 +264,7 @@
        box-sizing: border-box;
        border-radius: 15rpx;
    }
    .live-camera {
        .preview {
            justify-content: center;
@@ -296,6 +299,7 @@
                }
            }
        }
        .title {
            font-size: 35rpx;
            background-color: #0BB9C8;
pages/registerUser/registerUser.vue
@@ -1,7 +1,7 @@
<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>
@@ -10,14 +10,16 @@
                <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">
@@ -125,7 +127,6 @@
                marker: [],
                show: false,
                showxq: false,
                xqShow: true,
                listbm: [],
                listxq: [],
                deptXb: "",
@@ -196,7 +197,8 @@
                    objId: '',
                    xq: '',
                    xqobjId: '',
                    jsid: ''
                    jsid: '',
                    address: ''
                },
                rules: {
                    user: [{
@@ -248,6 +250,12 @@
                    obj: [{
                        required: true,
                        message: '请输入工作单位',
                        // 可以单个或者同时写两个触发验证方式
                        trigger: ['change', 'blur'],
                    }],
                    address: [{
                        required: true,
                        message: '请输入详细地址',
                        // 可以单个或者同时写两个触发验证方式 
                        trigger: ['change', 'blur'],
                    }],
@@ -379,20 +387,11 @@
            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;
@@ -415,37 +414,14 @@
                        }
                        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);
                            }
                        });
@@ -455,38 +431,6 @@
            },
            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) {