xuqiang 4 år sedan
förälder
incheckning
e9cd2e10ab

+ 20 - 45
src/main/pc-space/src/components/RegisterInfo.vue

@@ -56,11 +56,11 @@
                     ></el-input>
                 </el-form-item>
             </el-form>
-            <template>
+            <!-- <template>
                 <el-checkbox v-model="checked" v-if="isShow2">
                     <el-link style="margin-bottom: 2px">点击同意注册协议</el-link>
                 </el-checkbox>
-            </template>
+            </template> -->
             <div class="sub-btn" style="width: 300px" v-if="isShow2">
                 <div class="btn1" @click="doRegister">立即注册</div>
                 <el-button style="background: #f2f3f5; color: #292c33" type="info" class="btn-block" @click="Login"
@@ -164,49 +164,23 @@ export default {
         },
         // 修改密码
         passwordFn2() {
-            this.verifyMsg(this.form.phone, this.form.code).then(() => {
-                return (
-                    this.$http
-                        .post(`/user/changePassword?password=${this.form.password}&code=${this.form.code}`)
-                        // })
-                        .then(res => {
-                            this.$message.success('修改成功');
-                            setTimeout(() => {
-                                this.$emit('init');
-                            }, 1000);
-                        })
-                        .catch(e => {
-                            if (e) {
-                                this.$message.error(e.error);
-                            }
-                        })
-                );
-            });
-            // this.verifyMsg(this.form.phone, this.form.code)
-            //     .then(res => {
-            //         this.$http
-            //             .post('/user/changePassword', {
-            //                 password: this.form.password,
-            //                 // phone: this.form.phone,
-            //                 code: this.form.code
-            //             })
-            //             .then(res => {
-            //                 this.$message.success('修改成功');
-            //                 setTimeout(() => {
-            //                     this.$emit('init');
-            //                 }, 1000);
-            //             })
-            //             .catch(e => {
-            //                 if (e) {
-            //                     this.$message(e.error);
-            //                 }
-            //             });
-            //     })
-            //     .catch(e => {
-            //         if (e) {
-            //             this.$message.error(e.error);
-            //         }
-            //     });
+            this.$http
+                .post('/user/forgotPassword', {
+                    password: this.form.password,
+                    phone: this.form.phone,
+                    code: this.form.code
+                })
+                .then(res => {
+                    this.$message.success('修改成功');
+                    setTimeout(() => {
+                        this.$emit('init');
+                    }, 1000);
+                })
+                .catch(e => {
+                    if (e) {
+                        this.$message(e.error);
+                    }
+                });
         },
         closeDialog() {
             this.$emit('close1');
@@ -318,6 +292,7 @@ export default {
             border-radius: 4px;
             font-size: 13px;
             color: #fff;
+            cursor: pointer;
             text-align: center;
         }
         .el-button {

+ 2 - 30
src/main/pc-space/src/views/user/AccountData.vue

@@ -257,33 +257,10 @@ export default {
                 return item.userId === this.userInfo.id;
             });
             this.org = this.lists[0].org;
-            console.log(this.lists);
-            // if(list)
+            // console.log(this.lists);
+            console.log(this.org);
         },
         Auths() {
-            // if (this.type) {
-            //     if (this.type.name == 'ROLE_INSTITUTION') {
-            //         this.$nextTick(() => {
-            //             // if (this.institutionInfo.status == 'PASS') {
-            //             this.$router.push('/enterpriseauthentication');
-            //             // }
-            //         });
-            //     } else if (this.type.name == 'ROLE_PERSONAL') {
-            //         this.$nextTick(() => {
-            //             if (this.userInfo.authStatus == 'PENDING') {
-            //                 this.$router.push('/userauthentication');
-            //             }
-            //         });
-            //     }
-            // } else {
-            //     this.$router.push('/authentication');
-            // }
-            // if (this.userInfo.authStatus === 'PENDING') {
-            //     this.$router.push('/authentication');
-            // } else if (this.userInfo.authStatus === 'NOT_AUTH') {
-            //     this.$router.push('/authentication');
-            // }
-            // if (!this.org) {
             if (this.userInfo.authStatus === 'NOT_AUTH') {
                 this.$router.push('/authentication');
             } else {
@@ -293,11 +270,6 @@ export default {
                     this.$router.push('/enterpriseauthentication');
                 }
             }
-
-            //     this.$router.push('/authentication');
-            //     console.log(111);
-            // }
-            // this.$router.push('/authentication');
             // ROLE_INSTITUTION 企业
             // ROLE_PERSONAL 个人
         },

+ 22 - 22
src/main/pc-space/src/views/user/Modifypad.vue

@@ -36,7 +36,7 @@
                             <el-input style="width: 300px" v-model="ruleForm.code" placeholder="请输入短信验证码">
                                 <span
                                     @click="send"
-                                    style="color: #ff4f50; cursor: pointer; font-size: 13px"
+                                    style="color: #fdfb60; cursor: pointer; font-size: 13px"
                                     slot="suffix"
                                     >{{ time === 0 ? '发送验证码' : `重新发送${time}s` }}</span
                                 >
@@ -89,7 +89,6 @@ export default {
         return {
             labelPosition: 'right',
             ruleForm: {
-                // pass: '',
                 password: '',
                 phone: ''
             },
@@ -121,29 +120,30 @@ export default {
         ...mapMutations(['updateUserInfo']),
         // 验证码
         send() {
-            this.sendMsg(this.form.phone);
+            this.sendMsg(this.userInfo.phone);
         },
         codeSend() {
-            // ?password=${this.ruleForm.password}&code=${this.ruleForm.code}
             this.$refs.form.validate(valid => {
-                this.$http
-                    .post('/user/changePassword', {
-                        password: this.ruleForm.password,
-                        code: this.ruleForm.code
-                    })
-                    .then(res => {
-                        this.$message.success('修改成功');
-                        setTimeout(() => {
-                            localStorage.removeItem('webToken');
-                            this.updateUserInfo(null);
-                            this.$router.push('/');
-                        }, 1000);
-                    })
-                    .catch(e => {
-                        if (e) {
-                            this.$message(e.error);
-                        }
-                    });
+                if (valid) {
+                    this.$http
+                        .post('/user/changePassword', {
+                            password: this.ruleForm.password,
+                            code: this.ruleForm.code
+                        })
+                        .then(res => {
+                            this.$message.success('修改成功');
+                            setTimeout(() => {
+                                localStorage.removeItem('webToken');
+                                this.updateUserInfo(null);
+                                this.$router.push('/');
+                            }, 1000);
+                        })
+                        .catch(e => {
+                            if (e) {
+                                this.$message(e.error);
+                            }
+                        });
+                }
             });
         }
     }

+ 14 - 14
src/main/pc-space/src/views/user/Security.vue

@@ -79,20 +79,20 @@ export default {
             this.sendMsg(this.userInfo.phone);
         },
         codeSend() {
-            this.flag = false;
-            // this.$http
-            //     .get('/sms/verify', {
-            //         phone: this.userInfo.phone,
-            //         code: this.ruleForm.code
-            //     })
-            //     .then(res => {
-            //         this.ruleForm.code = '';
-            //         this.token = res;
-            //         this.flag = false;
-            //     })
-            //     .catch(e => {
-            //         this.$message.error(e.error);
-            //     });
+            // this.flag = false;
+            this.$http
+                .get('/sms/verify', {
+                    phone: this.userInfo.phone,
+                    code: this.ruleForm.code
+                })
+                .then(res => {
+                    this.ruleForm.code = '';
+                    this.token = res;
+                    this.flag = false;
+                })
+                .catch(e => {
+                    this.$message.error(e.error);
+                });
         },
         Jump() {
             this.flag = true;