Commit 237aec35 authored by 罗超's avatar 罗超

修復線上問題

parent 05b3171c
......@@ -26,7 +26,7 @@
"quasar": "^2.10.1",
"quasar-tiptap-branch": "^1.8.1",
"vue": "^3.0.0",
"vue-i18n": "^9.0.0",
"vue-i18n": "^9.2.2",
"vue-inline-svg": "next",
"vue-router": "^4.0.0",
"vuex": "^4.0.1",
......
......@@ -14,14 +14,14 @@ const path = require('path')
module.exports = configure(function (ctx) {
return {
// https://v2.quasar.dev/quasar-cli/supporting-ts
supportTS: {
tsCheckerConfig: {
eslint: {
enabled: true,
files: './src/**/*.{ts,tsx,js,jsx,vue}'
}
}
},
// supportTS: {
// tsCheckerConfig: {
// eslint: {
// enabled: true,
// files: './src/**/*.{ts,tsx,js,jsx,vue}'
// }
// }
// },
// https://v2.quasar.dev/quasar-cli/prefetch-feature
// preFetch: true,
......@@ -50,9 +50,9 @@ module.exports = configure(function (ctx) {
// Full list of options: https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
build: {
vueRouterMode: 'history', // available values: 'hash', 'history'
vueRouterMode: 'hash', // available values: 'hash', 'history'
target: {
browser: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
node: 'node16'
},
// transpile: false,
......@@ -61,14 +61,14 @@ module.exports = configure(function (ctx) {
// (from node_modules, which are by default not transpiled).
// Applies only if "transpile" is set to true.
// transpileDependencies: [],
publicPath: ctx.dev ? '/' : './',
env: ctx.dev
? {
BASE_APP_API: 'http://192.168.10.11:8083/api/common/post'
}
BASE_APP_API: 'http://192.168.10.11:8083/api/common/post'
}
: {
BASE_APP_API: 'https://reborn.oytour.com/api/common/post'
},
BASE_APP_API: 'https://reborn.oytour.com/api/common/post'
},
// extendWebpack(cfg, { isServer, isClient }) {
// cfg.resolve.alias = {
......@@ -76,18 +76,18 @@ module.exports = configure(function (ctx) {
// '@': path.resolve(__dirname, './src')
// }
// },
vitePlugins: [
[
'@intlify/vite-plugin-vue-i18n',
{
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
// compositionOnly: false,
compositionOnly: false,
// you need to set i18n resource including paths !
include: path.resolve(__dirname, './src/i18n/**'),
},
],
],
include: path.resolve(__dirname, './src/i18n/**')
}
]
]
// alias:[{
// '@': path.resolve(__dirname, './src')
// }],
......@@ -129,7 +129,7 @@ module.exports = configure(function (ctx) {
directives: ['ClosePopup'],
// Quasar plugins
plugins: ['Notify','SessionStorage','Dialog']
plugins: ['Notify', 'SessionStorage', 'Dialog', 'LoadingBar']
},
animations: 'all', // --- includes all animations
......@@ -210,7 +210,7 @@ module.exports = configure(function (ctx) {
injectPwaMetaTags: true,
swFilename: 'sw.js',
manifestFilename: 'manifest.json',
useCredentialsForManifestTag: false,
useCredentialsForManifestTag: false
// useFilenameHashes: true,
// extendGenerateSWOptions (cfg) {}
// extendInjectManifestOptions (cfg) {},
......@@ -239,13 +239,11 @@ module.exports = configure(function (ctx) {
packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
// OS X / Mac App Store
// appBundleId: '',
// appCategoryType: '',
// osxSign: '',
// protocol: 'myapp://path',
// Windows only
// win32metadata: { ... }
},
......@@ -259,9 +257,7 @@ module.exports = configure(function (ctx) {
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
bex: {
contentScripts: [
'JVS'
],
contentScripts: ['JVS']
// extendBexScriptsConf (esbuildConf) {}
// extendBexManifestJson (json) {}
......
import Axios, { AxiosResponse, AxiosRequestConfig, AxiosError } from 'axios'
import router from '../router/index'
import message from '../utils/message'
import { i18n } from '../boot/i18n'
import router from '../router'
// import { message } from 'ant-design-vue'
// import Store from '../store'
// import { Notify } from 'quasar'
......@@ -140,19 +141,19 @@ service.interceptors.response.use(
}
//TODO: 结合接口实际情况进行权限判断
if (error?.response?.status === 401) {
if (router.currentRoute.value.path !== '/auth/login') {
// Notify.create({
// message: '登录凭证已过期,请重新登录',
// color: 'warning',
// textColor: 'dark',
// icon: 'announcement'
// })
message.errorMsg(t('loginout'));
router.push('/auth/login')
}
return Promise.reject(new Error('401'))
}
// if (error?.response?.status === 401) {
// if (router.currentRoute.value.path !== '/auth/login') {
// // Notify.create({
// // message: '登录凭证已过期,请重新登录',
// // color: 'warning',
// // textColor: 'dark',
// // icon: 'announcement'
// // })
// message.errorMsg(t('loginout'));
// router.push('/auth/login')
// }
// return Promise.reject(new Error('401'))
// }
return Promise.reject(new Error(__emsg))
}
)
......
// import { boot } from 'quasar/wrappers'
// import { createI18n } from 'vue-i18n'
// import messages from 'src/i18n'
import { boot } from 'quasar/wrappers'
import { createI18n } from 'vue-i18n'
// const i18n = createI18n({
// locale: localStorage.getItem("lanuage")??'zh-TW',
// messages
// })
// export default boot(({ app }) => {
// // Set i18n instance on app
// app.use(i18n)
// })
// export { i18n }
import { boot } from 'quasar/wrappers';
import { createI18n } from 'vue-i18n';
import messages from 'src/i18n';
import messages from 'src/i18n'
export type MessageLanguages = keyof typeof messages;
// Type-define 'en-US' as the master schema for the resource
export type MessageSchema = typeof messages['en-US'];
export type MessageSchema = typeof messages['enUS'];
// See https://vue-i18n.intlify.dev/guide/advanced/typescript.html#global-resource-schema-type-definition
/* eslint-disable @typescript-eslint/no-empty-interface */
......@@ -35,17 +20,15 @@ declare module 'vue-i18n' {
// define the number format schema
export interface DefineNumberFormat {}
}
/* eslint-enable @typescript-eslint/no-empty-interface */
const i18n = createI18n({
locale: localStorage.getItem("lanuage")??'zh-TW',
legacy: false,
globalInjection:true,
messages,
});
locale: localStorage.getItem('lanuage') ?? 'zhTW',
legacy: false,
globalInjection: true,
messages
})
export default boot(({ app }) => {
// Set i18n instance on app
app.use(i18n);
});
export { i18n }
\ No newline at end of file
console.log(app,i18n,messages)
app.use(i18n)
})
export { i18n }
......@@ -23,7 +23,7 @@ export default boot(({ router, store }) => {
//debugger;
if (to.path === '/auth/login' || to.path === '/') {
next('/index')
LoadingBar.stop()
//LoadingBar.stop()
} else {
if (!loadAsyncRouter) {
// 判断当前用户是否获取权限
......@@ -52,7 +52,6 @@ export default boot(({ router, store }) => {
console.log(x.menuUrl,to.path)
return x.menuUrl == to.path
})
console.log(authMenu)
if (authMenu != -1) {
next({
...to,
......@@ -61,10 +60,10 @@ export default boot(({ router, store }) => {
} else {
next('/404')
}
LoadingBar.stop()
//LoadingBar.stop()
} else {
next('/404')
LoadingBar.stop()
//LoadingBar.stop()
}
}
} else {
......@@ -79,24 +78,26 @@ export default boot(({ router, store }) => {
next()
} else {
next(`/auth/login?redirect=${decodeURIComponent(to.path)}`) // 否则全部重定向到登录页
LoadingBar.stop()
//LoadingBar.stop()
}
}
})
router.afterEach(() => {
LoadingBar.stop() // 结束Progress
console.log('LoadingBar.stop',LoadingBar.isActive)
if(LoadingBar.isActive) LoadingBar.stop() // 结束Progress
console.log('LoadingBar.stop',LoadingBar.isActive)
})
router.onError(error => {
// router.onError(error => {
const pattern = /Loading chunk (\d)+ failed/g
const isChunkLoadFailed = error.message.match(pattern)
const targetPath = error.to
console.log('異常:',error,targetPath)
if (isChunkLoadFailed) {
router.replace(targetPath)
}
})
// // const pattern = /Loading chunk (\d)+ failed/g
// // const isChunkLoadFailed = error.message.match(pattern)
// // const targetPath = error.to
// console.log('異常:',error)
// // if (isChunkLoadFailed) {
// // router.replace(targetPath)
// // }
// })
})
......@@ -43,7 +43,6 @@ export default {
const svgIcon = computed(() => {
return new URL(`../../assets/svg/${props.icon}`,import.meta.url).href
})
console.log(svgIcon.value)
return { svgSize, svgColor,svgIcon }
}
}
......
......@@ -3,7 +3,7 @@ import zhTW from './zh-TW'
import zhSW from './zh-SW'
export default {
'en-US': enUS,
'zh-TW': zhTW,
'zh-SW': zhSW,
enUS,
zhTW,
zhSW,
}
import { OrderType } from './../../@types/index';
// This is just an example,
// so you can safely delete all default props below
export default {
failed: '執行失敗',
success: '執行成功',
......
<template>
<div class="fix-height-subpage column no-wrap q-pa-md">
<list-header @update:model-value="validateSendStatus"></list-header>
<list-header></list-header>
<div class="col q-mt-md" :class="{'light-shadow q-pa-md bg-white rounded-border':$q.platform.is.desktop}">
<list-table></list-table>
</div>
......@@ -39,11 +39,12 @@ export default defineComponent({
MaxPrice:'',
MinPrice:''
})
provide(DirtionmaryHelper.HOTEL_QUERY_PARAM, search)
const HotelCarList = ref([])
provide(DirtionmaryHelper.HOTEL_CAR_LIST, HotelCarList)
const methods = {
}
return {
...toRefs(data),
......
......@@ -2,9 +2,7 @@
const files = import.meta.globEager("./**/*.ts") //require.context('.', true, /\.ts$/)
const modules: any = {}
console.log(files)
Object.keys(files).forEach((key: string) => {
console.log(key)
if (key === './index.ts') return
const path = key.replace(/(\.\/|\.ts)/g, '')
......
......@@ -48,6 +48,5 @@ export function dispatchAction<T>(module: ModuleNameType, key: keyof T, value?:
* @example 使用方法如下 const result = getStoreGetter<ConsoleGetterType>('console','list')
*/
export function getStoreGetter<T>(module: ModuleNameType, key: keyof T) {
console.log(store)
return store.getters[`${module}/${String(key)}`]
}
......@@ -7,7 +7,6 @@ import { ResultType } from '../@types/enumHelper'
*/
export function getAuth() {
const token = getStoreGetter<UserGetter>('user', 'getUserToken') ?? ResultType.Empty
console.log(token)
return token != ResultType.Empty
}
......@@ -17,6 +16,5 @@ export function getAuth() {
*/
export function getUserAllMenu() {
const auths = getStoreGetter<UserGetter>('user', 'getUserAllAuth')??[]
console.log(auths)
return auths.length > 0 ? auths : ResultType.EmptyArray
}
......@@ -58,7 +58,7 @@ export function getHotelOrderStatus():Array<StandardStatus>{
Color:`text-${color[i]}`
})
})
return status
}
......@@ -143,15 +143,15 @@ export function getHotelOrderType(getNormal:boolean = false):Array<OrderType>{
export function getLangs() {
const zhTw:SitLang={
langLocale:"zh-TW",
langLocale:"zhTW",
langName:"中文繁体"
}
const zhSw:SitLang={
langLocale:"zh-SW",
langLocale:"zhSW",
langName:"中文简体"
}
const enUs:SitLang={
langLocale:"en-US",
langLocale:"enUS",
langName:"English"
}
let langs:SitLang[]=[]
......
<div id="#kt_app_body_content" style="background-color:#D5D9E2; font-family:Arial,Helvetica,sans-serif; line-height: 1.5; min-height: 100%; font-weight: normal; font-size: 15px; color: #2F3044; margin:0; padding:0; width:100%;">
<div style="background-color:#ffffff; padding: 45px 0 34px 0; border-radius: 24px; margin:40px auto; max-width: 600px;">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" height="auto" style="border-collapse:collapse">
<tbody>
<tr>
<td align="center" valign="center" style="text-align:center; padding-bottom: 10px">
<!--begin:Email content-->
<div style="text-align:center; margin:0 60px 34px 60px">
<!--begin:Logo-->
<div style="margin-bottom: 10px">
<a href="http://b2b.jvs.oytour.com" rel="noopener" target="_blank">
<img alt="Logo" src="https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/mochat/202210261124201.png" style="height: 35px">
</a>
</div>
<!--end:Logo-->
<!--begin:Media-->
<div style="margin-bottom: 15px">
<img alt="Logo" src="https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/mochat/icon-positive-vote-2.svg">
</div>
<!--end:Media-->
<!--begin:Text-->
<div style="font-size: 14px; font-weight: 500; margin-bottom: 27px; font-family:Arial,Helvetica,sans-serif;">
<p style="margin-bottom:9px; color:#181C32; font-size: 22px; font-weight:700">It’s almost set!</p>
<p style="margin-bottom:2px; color:#7E8299">Please click the "Change Pass" button below</p>
<p style="margin-bottom:2px; color:#7E8299">Please do not send the link to other people</p>
<p style="margin-bottom:2px; color:#7E8299">and do not forward the email to other people</p>
</div>
<!--end:Text-->
<!--begin:Action-->
<a href="http://b2b.jvs.oytour.com/auth/newpassword" target="_blank" style="background-color:#50cd89; border-radius:6px;display:inline-block; padding:11px 19px; color: #FFFFFF; font-size: 14px; font-weight:500; font-family:Arial,Helvetica,sans-serif;">Change Password</a>
<!--end:Action-->
</div>
<!--end:Email content-->
</td>
</tr>
<tr>
<td align="center" valign="center" style="font-size: 13px; text-align:center; padding: 0 10px 10px 10px; font-weight: 500; color: #A1A5B7; font-family:Arial,Helvetica,sans-serif">
<p style="color:#181C32; font-size: 16px; font-weight: 600; margin-bottom:9px">It’s all about customers!</p>
<p style="margin-bottom:2px">Call our customer care number: +31 6 3344 55 56</p>
<p style="margin-bottom:4px">You may reach us at
<a rel="noopener" target="_blank" style="font-weight: 600">b2b.jvs.oytour.com</a>.</p>
<p>We serve Mon-Fri, 9AM-18AM</p>
</td>
</tr>
<tr>
<td align="center" valign="center" style="font-size: 13px; padding:0 15px; text-align:center; font-weight: 500; color: #A1A5B7;font-family:Arial,Helvetica,sans-serif">
<p>© Copyright JVS.
<a href="http://b2b.jvs.oytour.com" rel="noopener" target="_blank" style="font-weight: 600;font-family:Arial,Helvetica,sans-serif">Unsubscribe</a>&nbsp; from newsletter.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
\ No newline at end of file
{
"extends": "@quasar/app-vite/tsconfig-preset",
"compilerOptions": {
"target": "es2015",
"lib": ["es2017","DOM"],
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
"types": [
"node"
]
"baseUrl": "."
}
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment