feat:修改投票

This commit is contained in:
lixg
2023-03-06 21:22:35 +08:00
parent 089b8ab195
commit ef66995ad0
5 changed files with 29 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-02-08 09:50:10
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-19 10:36:48
* @LastEditTime: 2023-03-06 18:36:53
* @FilePath: /stu_h5/src/router/index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -23,6 +23,7 @@ const router = createRouter({
routes
})
router.beforeEach((to, from, next) => {
console.log('toooooooo', to)
if (!getCookie('token')) {
if (import.meta.env.MODE === "development" || import.meta.env.MODE === "test") {
to.path.includes('/login') ? next() : next({ path: '/login', query: { returnUrl: to.fullPath } })