fix: #306. At MainContainer, use cookie to determine instead of using pinia state
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
:data-max="tUnits[unit].max"
|
:data-max="tUnits[unit].max"
|
||||||
:data-min="tUnits[unit].min"
|
:data-min="tUnits[unit].min"
|
||||||
:maxlength="tUnits[unit].dsp === 'd' ? 3 : 2"
|
:maxlength="tUnits[unit].dsp === 'd' ? 3 : 2"
|
||||||
:value="tUnits[unit].val.toString().padStart(2, '0')"
|
|
||||||
@focus="onFocus"
|
@focus="onFocus"
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
@keyup="onKeyUp"
|
@keyup="onKeyUp"
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
//:value="tUnits[unit].val.toString().padStart(2, '0')"
|
||||||
import { mapActions, } from 'pinia';
|
import { mapActions, } from 'pinia';
|
||||||
import ConformanceInputStore from '@/stores/conformanceInput';
|
import ConformanceInputStore from '@/stores/conformanceInput';
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { createApp, markRaw } from "vue";
|
|||||||
|
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import router from "./router";
|
import router from "./router";
|
||||||
import pinia from '@/stores/main.js'
|
import pinia from '@/stores/main.js';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import VueAxios from 'vue-axios';
|
import VueAxios from 'vue-axios';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|||||||
@@ -48,17 +48,17 @@ const routes = [
|
|||||||
name: "Files",
|
name: "Files",
|
||||||
component: Files,
|
component: Files,
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: "/account",
|
path: "/account",
|
||||||
// name: "Account Management",
|
name: "Account Management",
|
||||||
// children: [
|
children: [
|
||||||
// {
|
{
|
||||||
// path: "/account/account-admin",
|
path: "/account/account-admin",
|
||||||
// name: "AcctAdmin",
|
name: "AcctAdmin",
|
||||||
// component: AccountAdmin,
|
component: AccountAdmin,
|
||||||
// },
|
},
|
||||||
// ]
|
]
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
path: "/upload", // router.push({ replace: true }) 路徑不添進歷史紀錄
|
path: "/upload", // router.push({ replace: true }) 路徑不添進歷史紀錄
|
||||||
name: "Upload",
|
name: "Upload",
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export default {
|
|||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
const loginStore = LoginStore();
|
const loginStore = LoginStore();
|
||||||
|
|
||||||
if (!loginStore.isLoggedIn) {
|
if (!getCookie("isLuciaLoggedIn")) {
|
||||||
if (getCookie('luciaRefreshToken')) {
|
if (getCookie('luciaRefreshToken')) {
|
||||||
await loginStore.refreshToken();
|
await loginStore.refreshToken();
|
||||||
loginStore.setIsLoggedIn(true);
|
loginStore.setIsLoggedIn(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user