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 @@