瀏覽代碼

修改token 信息

zs 3 月之前
父節點
當前提交
7beb01363d

+ 1 - 1
src/router/index.js

@@ -322,7 +322,7 @@ router.beforeEach(async (to, from, next) => {
   document.title = get(to, 'meta.title', '产学研用协同创新数字化平台')
   const routeCheck = isInCenter(to)
   // 进入个人中心,检查是否有token,没有token直接返回login
-  const token = localStorage.getItem('token')
+  const token = localStorage.getItem('webToken')
   if (token) {
     const res = await axios.request({
       method: 'get',

+ 1 - 1
src/store/user.js

@@ -15,7 +15,7 @@ export const UserStore = defineStore('user', () => {
   const logOut = () => {
     user.value = {}
     menus.value = null
-    localStorage.removeItem('token')
+    localStorage.removeItem('webToken')
   }
   const setMenus = (payload) => {
     menus.value = payload

+ 1 - 1
src/utils/axios-wrapper.js

@@ -108,7 +108,7 @@ export class AxiosWrapper {
         withCredentials: true
       })
       // if (util.token && util.token !== null) axios.defaults.headers.common.Authorization = util.token;
-      const token = localStorage.getItem('token')
+      const token = localStorage.getItem('webToken')
       const apiToken = localStorage.getItem('apiToken')
       if (token) axios.defaults.headers.common['token'] = token
       if (apiToken) axios.defaults.headers.common['api-token'] = apiToken

+ 1 - 1
src/utils/file.js

@@ -11,7 +11,7 @@ export async function uploadFileApi(file) {
     baseURL: '/files',
     withCredentials: true
   })
-  const token = localStorage.getItem('token')
+  const token = localStorage.getItem('webToken')
   const apiToken = localStorage.getItem('apiToken')
   if (token) axios.defaults.headers.common['token'] = token
   if (apiToken) axios.defaults.headers.common['api-token'] = apiToken

+ 3 - 3
src/views/center/match.vue

@@ -91,7 +91,7 @@
                   <el-input size="large" v-model="form.work" placeholder="请输入组织单位" />
                 </el-form-item>
                 <el-form-item label="行业" prop="industry">
-                  <el-select v-model="form.type" placeholder="请选择行业" size="large" style="width: 100%">
+                  <el-select v-model="form.industry" placeholder="请选择行业" size="large" style="width: 100%">
                     <el-option v-for="item in industryList" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
@@ -561,7 +561,7 @@ const toSave = async (formEl) => {
       if (get(data, 'id')) res = await store.update({ ...data, ...other })
       else res = await store.create({ ...data, ...other })
       if (res.errcode == 0) {
-        ElMessageBox.alert('赛事发布成功,请在中查看赛事发布信息', '赛事发布', {
+        ElMessageBox.alert('赛事发布成功', '赛事发布', {
           confirmButtonText: '确定',
           callback: async () => {
             if (res.data && res.data.id) match_id.value = res.data.id
@@ -595,7 +595,7 @@ const toDraftSave = async (formEl) => {
       if (get(data, 'id')) res = await store.update({ ...data, ...other })
       else res = await store.create({ ...data, ...other })
       if (res.errcode == 0) {
-        ElMessageBox.alert('赛事发布成功,请在历史发布中选择赛事管理查看发布赛事信息', '赛事发布', {
+        ElMessageBox.alert('赛事发布成功', '赛事发布', {
           confirmButtonText: '确定',
           callback: async () => {
             if (res.data && res.data.id) match_id.value = res.data.id

+ 6 - 0
src/views/center/parts/preliminaryMatch.vue

@@ -12,6 +12,12 @@
         <el-table-column prop="no" align="center" label="编号" width="100"> </el-table-column>
         <el-table-column prop="user_name" align="center" label="用户"> </el-table-column>
         <el-table-column prop="time" align="center" label="报名时间" />
+        <el-table-column prop="start_time" align="center" label="初审时间"> </el-table-column>
+        <el-table-column prop="score" align="center" label="初审分数"> </el-table-column>
+        <el-table-column prop="final_confirm" align="center" label="是否进入决赛"> </el-table-column>
+        <el-table-column prop="final_start_time" align="center" label="决赛时间"> </el-table-column>
+        <el-table-column prop="final_score" align="center" label="决赛分数"> </el-table-column>
+        <el-table-column prop="ext_status" align="center" label="流程状态" width="100"> </el-table-column>
         <el-table-column prop="status" align="center" label="状态" width="100">
           <template #default="scope">
             <el-tag v-if="scope.row.status == '0'" type="primary">待审核</el-tag>

+ 9 - 2
src/views/center/parts/preliminaryUser.vue

@@ -6,11 +6,18 @@
           <el-empty description="暂无数据" />
         </template>
         <el-table-column prop="no" align="center" label="编号" width="100"> </el-table-column>
-        <el-table-column prop="match_name" align="center" label="赛事名称" />
+        <el-table-column prop="user_name" align="center" label="用户"> </el-table-column>
         <el-table-column prop="time" align="center" label="报名时间" />
+        <el-table-column prop="start_time" align="center" label="初审时间"> </el-table-column>
+        <el-table-column prop="score" align="center" label="初审分数"> </el-table-column>
+        <el-table-column prop="final_confirm" align="center" label="是否进入决赛"> </el-table-column>
+        <el-table-column prop="final_start_time" align="center" label="决赛时间"> </el-table-column>
+        <el-table-column prop="final_score" align="center" label="决赛分数"> </el-table-column>
+        <el-table-column prop="ext_status" align="center" label="流程状态" width="100"> </el-table-column>
         <el-table-column prop="status" align="center" label="状态" width="100">
           <template #default="scope">
-            <el-tag v-if="scope.row.status == '0'" type="success">符合要求</el-tag>
+            <el-tag v-if="scope.row.status == '0'" type="primary">待审核</el-tag>
+            <el-tag v-else-if="scope.row.status == '1'" type="success">已通过</el-tag>
             <el-tag v-else type="info">已退回</el-tag>
           </template>
         </el-table-column>

+ 1 - 1
src/views/login/parts/login.vue

@@ -146,7 +146,7 @@ const submitForm = async (formEl) => {
       } else res = await loginStore.loginBySms(data)
       if (res.errcode == '0') {
         ElMessage({ message: `登录成功`, type: 'success' })
-        localStorage.setItem('token', res.data)
+        localStorage.setItem('webToken', res.data)
         // 路由
         router.push({ path: '/' })
       } else {

+ 2 - 2
src/views/two/add/match.vue

@@ -43,7 +43,7 @@
                 <el-input size="large" v-model="form.work" placeholder="请输入组织单位" />
               </el-form-item>
               <el-form-item label="行业" prop="industry">
-                <el-select v-model="form.type" placeholder="请选择行业" size="large" style="width: 100%">
+                <el-select v-model="form.industry" placeholder="请选择行业" size="large" style="width: 100%">
                   <el-option v-for="item in industryList" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
@@ -387,7 +387,7 @@ const toSave = async (formEl) => {
       if (get(data, 'id')) res = await store.update({ ...data, ...other })
       else res = await store.create({ ...data, ...other })
       if (res.errcode == 0) {
-        ElMessageBox.alert('赛事发布成功,请在中查看赛事发布信息', '赛事发布', {
+        ElMessageBox.alert('赛事发布成功,请在历史发布中选择赛事管理查看发布赛事信息', '赛事发布', {
           confirmButtonText: '确定',
           callback: async () => {
             if (res.data && res.data.id) match_id.value = res.data.id