zengh
2022-02-25 b0d4215d843dbe3c31f8bd6577e3421427806ec9
注册调整
1 files modified
52 ■■■■ changed files
pages/registerUser/registerUser.vue 52 ●●●● patch | view | raw | blame | history
pages/registerUser/registerUser.vue
@@ -58,7 +58,7 @@
        </div>
        <u-button class="submit" @click="zc">
            下一步</u-button>
            注册</u-button>
        <!-- <u-button class="submit" @click="submit">提交</u-button> -->
    </view>
@@ -420,18 +420,52 @@
                            return
                        }
                        that.$refs.uForm.validate(valid => {
                            if (valid) {
                                var d = that.form;
                                uni.navigateTo({
                                    url: '/pages/registerUser/idphoto?data= ' +
                                        encodeURIComponent(JSON.stringify(
                                            d))
                        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,
                                address: d.address,
                                workunit: d.obj
                            }
                        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);
                            }
                        });
                        // that.$refs.uForm.validate(valid => {
                        //     if (valid) {
                        //         var d = that.form;
                        //         uni.navigateTo({
                        //             url: '/pages/registerUser/idphoto?data= ' +
                        //                 encodeURIComponent(JSON.stringify(
                        //                     d))
                        //         });
                        //     }
                        // });
                    }
                });