diff --git a/src/router/index.js b/src/router/index.js index 57ae84f..fd28cfa 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -123,6 +123,12 @@ const routes = [ component: () => import("../views/Login/index.vue"), }, + { + path: "/actlogin", + name: "ActLogin", + component: () => + import("../views/Login/actLogin.vue"), + }, { path: "/test", name: "Test", @@ -138,9 +144,10 @@ const router = createRouter({ router.beforeEach((to, from, next) => { NProgress.start(); - if (to.path !== "/" && to.path !== "/login" && to.path !== "/register") { + if (to.path !== "/" && to.path !== "/login" && to.path !== "/actlogin" && to.path !== "/register") { if (!sessionStorage.getItem("token")) { - next("/"); + sessionStorage.setItem("redirect", to.fullPath); + return next("/actlogin"); } // if(!store.state.user.userInfo){ @@ -148,7 +155,7 @@ router.beforeEach((to, from, next) => { // } } - next(); + return next(); }); router.afterEach(() => { diff --git a/src/utils/card/card0.js b/src/utils/card/card0.js index 2fe468e..0b6d7b4 100644 --- a/src/utils/card/card0.js +++ b/src/utils/card/card0.js @@ -241,8 +241,6 @@ function genCard(vcard) { "uri": "${vcard.nfcurl}&cardid=1" } }, - - { "type": "box", "layout": "vertical", diff --git a/src/utils/card/card1.js b/src/utils/card/card1.js index f8fc699..e88a3ae 100644 --- a/src/utils/card/card1.js +++ b/src/utils/card/card1.js @@ -367,15 +367,10 @@ function genCard(vcard) { "contents": [ { "type": "text", - "text": "前端布魯", + "text": "${vcard.title}", "size": "md", "weight": "bold", - "color": "#888888", - "action": { - "type": "uri", - "label": "action", - "uri": "https://utel.zltest.com.tw/card/?params=TE%2BoyUn0Yl7Vj76pKdp9VaL0LtXOVTpMx5BbbOvd1yM%3D&cardid=1" - } + "color": "#888888" } ] }, @@ -439,7 +434,12 @@ function genCard(vcard) { ], "paddingAll": "0px", "justifyContent": "center", - "alignItems": "center" + "alignItems": "center", + "action": { + "type": "uri", + "label": "action", + "uri": "${vcard.nfcurl}&cardid=2" + } } } } diff --git a/src/utils/card/card2.js b/src/utils/card/card2.js index 947739e..70b6a4a 100644 --- a/src/utils/card/card2.js +++ b/src/utils/card/card2.js @@ -337,13 +337,13 @@ function genCard(vcard) { } ], "paddingAll": "0px", + "justifyContent": "center", + "alignItems": "center", "action": { "type": "uri", "label": "action", - "uri": "https://utel.zltest.com.tw/card/?params=i7Kq7O59hPX1MJ%2Bqd8zQKBwuyc%2F%2BZ%2BZs%2BZXtXBy4zvg%3D&cardid=1" - }, - "justifyContent": "center", - "alignItems": "center" + "uri": "${vcard.nfcurl}&cardid=3" + } } } } diff --git a/src/views/Login/actLogin.vue b/src/views/Login/actLogin.vue new file mode 100644 index 0000000..f246a20 --- /dev/null +++ b/src/views/Login/actLogin.vue @@ -0,0 +1,92 @@ +