From 3186dafffba1dc2a3ec71008a16b4394a9cbb612 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Wed, 6 Dec 2023 17:14:02 +0800
Subject: [PATCH] fix
---
src/api/index.js | 3 +-
src/layouts/home/index.vue | 2 +-
src/libs/util.js | 19 ------------
src/pages/course/preview/index.vue | 1 -
src/pages/match/add/step1.vue | 7 ++---
src/pages/match/add/step2.vue | 4 +--
src/pages/match/add/step3.vue | 38 +++++++++++++++++++-----
src/pages/match/manage/matchArchList.vue | 4 +--
src/pages/match/manage/matchRank.vue | 35 ++++++++++++++++++++--
src/pages/station/preview/index.vue | 1 -
src/plugins/requests/index.js | 1 -
src/setting.js | 2 +-
12 files changed, 73 insertions(+), 44 deletions(-)
diff --git a/src/api/index.js b/src/api/index.js
index 1e26727..6de14de 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -4,8 +4,6 @@ const uploadURL = Setting.upload.apiURL;
const host2 = 'http://121.37.12.51/'
export default {
- queryToken: `liuwanr/userInfo/queryToken`,
-
logins: `users/users/user/login`, //登录
verification: `${host}users/users/user/captcha`,// 验证码图片
isClient: `users/users/user/isClient`,// 是否为客户
@@ -13,6 +11,7 @@ export default {
getSchoolIdByToken : `users/users/data/user/getSchoolIdByToken`,
deleteProfile : `users/users/userInfo/deleteProfile`,
refreshPageNotification : `nakadai/message/refreshPageNotification`,
+ getCurrentTime : `competition/competition/management/getCurrentTime`,
getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证
diff --git a/src/layouts/home/index.vue b/src/layouts/home/index.vue
index 0c3886b..baaecbf 100644
--- a/src/layouts/home/index.vue
+++ b/src/layouts/home/index.vue
@@ -144,7 +144,7 @@ export default {
setInterval(() => {
if (util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > Setting.autoLogoutTime) {
- util.errorMsg("由于您已经有一个小时没有操作,系统自动登出,请重新登录。页面刷新到登录页。");
+ util.errorMsg("由于您已经有三个小时没有操作,系统自动登出,请重新登录。页面刷新到登录页。");
setTimeout(this.logout, 1500);
}
}, 1000);
diff --git a/src/libs/util.js b/src/libs/util.js
index 05cbc69..d2f4b33 100644
--- a/src/libs/util.js
+++ b/src/libs/util.js
@@ -172,25 +172,6 @@ const util = {
Message.closeAll();
return Message.error({ message, showClose: true, offset: (document.documentElement.clientHeight - 40) / 2, duration });
},
- // 登录互踢
- getToken() {
- if (process.env.NODE_ENV != "production") {
- if (store.state.user.dataTime && !logout) {
- axios.get(`${api.queryToken}?token=${_local.get(Setting.tokenKey)}`).then(res => {
- if (store.state.user.dataTime && (res.data.message != store.state.user.dataTime)) {
- logout || Message.error("您已在另一台设备登录,本次登录已下线!");
- logout = true;
- setTimeout(() => {
- _local.remove(Setting.storeKey);
- _local.remove(Setting.tokenKey);
- location.reload();
- }, 1500);
- }
- }).catch(err => {
- });
- }
- }
- },
debounce(fn, delay) { // 防抖
let timeout = null;
return function() {
diff --git a/src/pages/course/preview/index.vue b/src/pages/course/preview/index.vue
index 38c9905..90f7ef8 100644
--- a/src/pages/course/preview/index.vue
+++ b/src/pages/course/preview/index.vue
@@ -121,7 +121,6 @@ export default {
data () {
return {
id: this.$route.query.id,
- video: "http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4",
videoSrc: "",
videoList: [],
courseName: "",
diff --git a/src/pages/match/add/step1.vue b/src/pages/match/add/step1.vue
index 0e77f9d..fa18321 100644
--- a/src/pages/match/add/step1.vue
+++ b/src/pages/match/add/step1.vue
@@ -659,7 +659,7 @@ export default {
* releaseType 发布类型(0发布信息,1完整比赛)
* */
save (status, next = 0, releaseType = 0, cb) {
- const { form } = this
+ const form = JSON.parse(JSON.stringify(this.form))
form.sponsor = this.sponsorList.filter(d => d).join();
form.undertaker = this.undertakerList.filter(d => d).join();
if (!form.name) return util.warningMsg("请填写竞赛名称");
@@ -700,12 +700,11 @@ export default {
form.releaseType = releaseType
form.id = this.$route.query.id
- this.updateTime = 0
if (form.id) {
this.$post(this.api.editCompetition, form).then(res => {
- this.updateTime = 0
this.$parent.hideLoad()
- util.successMsg("修改成功");
+ this.updateTime && util.successMsg("修改成功");
+ this.updateTime = 0
this.$emit('next', next, cb)
}).catch(err => {
this.$parent.hideLoad()
diff --git a/src/pages/match/add/step2.vue b/src/pages/match/add/step2.vue
index 1f41212..113a76d 100644
--- a/src/pages/match/add/step2.vue
+++ b/src/pages/match/add/step2.vue
@@ -458,12 +458,12 @@ export default {
if (!e.teamNumLimitOpt) e.teamNumLimit = 0
}
this.$parent.showLoad()
- this.updateTime = 0
this.pass = 1
if (form.ruleId) {
this.$post(this.api.editCompetitionRule, form).then(res => {
this.$parent.hideLoad()
- util.successMsg("修改成功");
+ this.updateTime && util.successMsg("修改成功");
+ this.updateTime = 0
this.$emit('next', next, cb)
}).catch(err => {
this.$parent.hideLoad()
diff --git a/src/pages/match/add/step3.vue b/src/pages/match/add/step3.vue
index 8bd8e18..b703a38 100644
--- a/src/pages/match/add/step3.vue
+++ b/src/pages/match/add/step3.vue
@@ -60,22 +60,27 @@
:label="1">是
-