From f6bcb729c2f2a6467cdc352cc04b81ab17f35436 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Fri, 22 Nov 2024 11:29:34 +0800
Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=90=8E=E5=BC=B9=E5=87=BA?=
=?UTF-8?q?=E5=A1=AB=E5=86=99=E7=9C=9F=E5=AE=9E=E5=A7=93=E5=90=8D=E5=BC=B9?=
=?UTF-8?q?=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/index.js | 2 +
src/layouts/home/index.vue | 59 ++++++++++++++++++++++++++-
src/pages/ass/list/index.vue | 52 ++++++++++++-----------
src/pages/match/details/index.vue | 1 +
src/pages/match/list/index.vue | 1 +
src/pages/station/preview/index.vue | 2 +
src/pages/touristMatch/list/index.vue | 1 +
src/setting.js | 2 +-
8 files changed, 94 insertions(+), 26 deletions(-)
diff --git a/src/api/index.js b/src/api/index.js
index ae12e4c..30efd85 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -31,6 +31,8 @@ export default {
customerSettingsList: `nakadai/nakadai/customer/customerSettingsList`,
getSchoolIdByToken: `competition/competition/registration/getSchoolIdByToken`,
updateRealSchoolId: `competition/competition/registration/updateRealSchoolId`,
+ checkUserNameOrWorkNumber: `users/users/batchProcessing/checkUserNameOrWorkNumber`,
+ updateUserNameOrWorkNumber: `users/users/batchProcessing/updateUserNameOrWorkNumber`,
// 阿里云文件/视频管理
getPlayAuth: `nakadai/nakadai/oss/getPlayAuth`, // 获取播放凭证
diff --git a/src/layouts/home/index.vue b/src/layouts/home/index.vue
index d269e3a..9fa06d1 100644
--- a/src/layouts/home/index.vue
+++ b/src/layouts/home/index.vue
@@ -37,6 +37,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -70,7 +85,18 @@ export default {
icon: 'optimize'
}
],
- showHeader: true
+ showHeader: true,
+
+ realNameVisible: false,
+ realNameForm: {
+ userName: '',
+ workNumber: '',
+ },
+ realNameRules: {
+ userName: [
+ { required: true, message: '请输入真实姓名', trigger: 'blur' }
+ ],
+ },
};
},
components: {
@@ -97,6 +123,7 @@ export default {
this.autoLogout()
this.noticed || this.getMatchStatus() // 0才要调用
this.logView || this.getLogStatus() // logView为false才需要查询接口
+ this.handleRealName()
},
methods: {
...mapMutations("user", [
@@ -108,6 +135,14 @@ export default {
...mapActions("user", [
"logout"
]),
+ // 提示填写姓名(登录后调用一次)
+ async handleRealName () {
+ const res = await this.$post(this.api.checkUserNameOrWorkNumber)
+ // 如果没有真实姓名,则弹框提示填写
+ if (!res.hasName) {
+ this.realNameVisible = true
+ }
+ },
// 提示赛事状态(登录后调用一次)
getMatchStatus () {
util.local.get(Setting.tokenKey) && this.$post(this.api.promptRemoval).then(({ prompt }) => {
@@ -144,6 +179,18 @@ export default {
this.logVisible = false
this.SET_LOG() // 把查看日志状态设置为true
},
+ // 真实姓名提交
+ realNameSubmit () {
+ this.$refs.realNameForm.validate(async (valid) => {
+ if (valid) {
+ const form = this.realNameForm
+ await this.$post(`${this.api.updateUserNameOrWorkNumber}?userName=${form.userName}&workNumber=${form.workNumber}`)
+ this.realNameVisible = false
+ } else {
+ return false
+ }
+ })
+ },
// 长时间未操作,自动退出登录
autoLogout () {
let lastTime = new Date().getTime();
@@ -282,4 +329,14 @@ export default {
}
}
}
+
+/deep/.name-dia {
+ .el-dialog__header {
+ display: none;
+ }
+
+ .el-dialog__body {
+ padding-bottom: 10px;
+ }
+}
\ No newline at end of file
diff --git a/src/pages/ass/list/index.vue b/src/pages/ass/list/index.vue
index 7c40fa2..5990f91 100644
--- a/src/pages/ass/list/index.vue
+++ b/src/pages/ass/list/index.vue
@@ -112,7 +112,7 @@