From a814040995b47ce19dcfcc3f66ad08988d853ef6 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 24 Sep 2021 14:51:13 +0800 Subject: [PATCH] fix.warnings --- src/config/index.ts | 1 - src/router/index.ts | 3 +-- src/store/index.ts | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 src/config/index.ts diff --git a/src/config/index.ts b/src/config/index.ts deleted file mode 100644 index 28f8055..0000000 --- a/src/config/index.ts +++ /dev/null @@ -1 +0,0 @@ -export const ACCESS_TOKEN = 'Access-Token' diff --git a/src/router/index.ts b/src/router/index.ts index 88e1f2f..5435b5c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -68,8 +68,7 @@ router.beforeEach((to, from, next) => { function setDocumentTitle(meta: MyRouteMeta) { document.title = meta?.title const ua = navigator.userAgent - // eslint-disable-next-line - const regex = /\bMicroMessenger\/([\d\.]+)/ + const regex = /\bMicroMessenger\/([\d.]+)/ if (regex.test(ua) && /ip(hone|od|ad)/i.test(ua)) { const i = document.createElement('iframe') i.src = '/favicon.ico' diff --git a/src/store/index.ts b/src/store/index.ts index c694838..f38c0a8 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -69,6 +69,9 @@ export default createStore({ actions: { setUserInfo: ({ commit }, info: BaseInfo): void => { commit('setUserInfo', info) + }, + setOpenId: ({ commit }, openId: string): void => { + commit('setOpenId', openId) } }, modules: {