liuyg
2022-02-22 c6bc487ee4bda719081c46a3b1e66acf17ea9c13
Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
2 files modified
106 ■■■■ changed files
pages/registerUser/idphoto.nvue 10 ●●●● patch | view | raw | blame | history
pages/registerUser/registerUser.vue 96 ●●●● patch | view | raw | blame | history
pages/registerUser/idphoto.nvue
@@ -166,7 +166,9 @@
            //人脸验证
            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,
@@ -227,7 +229,8 @@
                        deptid:d.objId,
                        parentId:d.jsid,
                        jurisdiction:d.xqobjId,
                        cardid:d.carId
                        cardid: d.carId,
                        address: d.address
                    }
                uni.request({
                    url: url,
@@ -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
@@ -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;
                        that.$refs.uForm.validate(valid => {
                            if (valid) {
                        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
                                });
                                setTimeout(function() {
                                    uni.navigateTo({
                                        url: '/pages/loging/loging'
                                    })
                                }, 2000);
                                    url: '/pages/registerUser/idphoto?data= ' +
                                        encodeURIComponent(JSON.stringify(
                                            d))
                                });
                            }
                        });
@@ -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) {