|
|
@@ -151,6 +151,7 @@
|
|
|
errCodeMsg: "",
|
|
|
passwordLevel: 'sick',
|
|
|
password: '',
|
|
|
+ education:'',
|
|
|
educationList: window.baseConfig.educationList,
|
|
|
confirmPassword: '',
|
|
|
phone: '',
|
|
|
@@ -209,24 +210,30 @@
|
|
|
cardId: this.cardId,
|
|
|
password: md5(this.password)
|
|
|
}
|
|
|
+ const loadingInstance = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '用户注册中,请耐心等待...',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(240, 242, 245, 0.8)',
|
|
|
+ customClass: 'gray-bg-loading' // 自定义类名,避免全局污染
|
|
|
+ })
|
|
|
httpServer("Auth.register", param).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$msgbox({
|
|
|
- title: "注册成功",
|
|
|
- message: "恭喜你-注册成功",
|
|
|
- showCancelButton: false,
|
|
|
- confirmButtonText: "回到登入页面",
|
|
|
- beforeClose: (action, instance, done) => {
|
|
|
- that.$router.push('/');
|
|
|
- done();
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.err = res.msg;
|
|
|
- }
|
|
|
-
|
|
|
+ loadingInstance.close()
|
|
|
+ if (res.code != 200) {
|
|
|
+ this.err = res.msg;
|
|
|
+ return;
|
|
|
+ };
|
|
|
+ this.$msgbox({
|
|
|
+ title: "注册成功",
|
|
|
+ message: "恭喜你-注册成功",
|
|
|
+ showCancelButton: false,
|
|
|
+ confirmButtonText: "回到登入页面",
|
|
|
+ beforeClose: (action, instance, done) => {
|
|
|
+ that.$router.push('/');
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
checkPhone() {
|
|
|
let phone = this.phone;
|
|
|
@@ -294,3 +301,14 @@
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style>
|
|
|
+
|
|
|
+/* 文本用深灰色,图标同步 */
|
|
|
+.gray-bg-loading .el-loading-text {
|
|
|
+ color: #303133; /* 深灰色,与浅灰背景对比清晰 */
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+.gray-bg-loading .el-loading-spinner .path {
|
|
|
+ stroke: #303133; /* 图标与文本同色,协调统一 */
|
|
|
+}
|
|
|
+</style>
|