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

修復線上問題

parent 05b3171c
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"quasar": "^2.10.1", "quasar": "^2.10.1",
"quasar-tiptap-branch": "^1.8.1", "quasar-tiptap-branch": "^1.8.1",
"vue": "^3.0.0", "vue": "^3.0.0",
"vue-i18n": "^9.0.0", "vue-i18n": "^9.2.2",
"vue-inline-svg": "next", "vue-inline-svg": "next",
"vue-router": "^4.0.0", "vue-router": "^4.0.0",
"vuex": "^4.0.1", "vuex": "^4.0.1",
......
...@@ -14,14 +14,14 @@ const path = require('path') ...@@ -14,14 +14,14 @@ const path = require('path')
module.exports = configure(function (ctx) { module.exports = configure(function (ctx) {
return { return {
// https://v2.quasar.dev/quasar-cli/supporting-ts // https://v2.quasar.dev/quasar-cli/supporting-ts
supportTS: { // supportTS: {
tsCheckerConfig: { // tsCheckerConfig: {
eslint: { // eslint: {
enabled: true, // enabled: true,
files: './src/**/*.{ts,tsx,js,jsx,vue}' // files: './src/**/*.{ts,tsx,js,jsx,vue}'
} // }
} // }
}, // },
// https://v2.quasar.dev/quasar-cli/prefetch-feature // https://v2.quasar.dev/quasar-cli/prefetch-feature
// preFetch: true, // preFetch: true,
...@@ -50,9 +50,9 @@ module.exports = configure(function (ctx) { ...@@ -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 // Full list of options: https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
build: { build: {
vueRouterMode: 'history', // available values: 'hash', 'history' vueRouterMode: 'hash', // available values: 'hash', 'history'
target: { target: {
browser: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ], browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
node: 'node16' node: 'node16'
}, },
// transpile: false, // transpile: false,
...@@ -61,14 +61,14 @@ module.exports = configure(function (ctx) { ...@@ -61,14 +61,14 @@ module.exports = configure(function (ctx) {
// (from node_modules, which are by default not transpiled). // (from node_modules, which are by default not transpiled).
// Applies only if "transpile" is set to true. // Applies only if "transpile" is set to true.
// transpileDependencies: [], // transpileDependencies: [],
publicPath: ctx.dev ? '/' : './',
env: 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 }) { // extendWebpack(cfg, { isServer, isClient }) {
// cfg.resolve.alias = { // cfg.resolve.alias = {
...@@ -76,18 +76,18 @@ module.exports = configure(function (ctx) { ...@@ -76,18 +76,18 @@ module.exports = configure(function (ctx) {
// '@': path.resolve(__dirname, './src') // '@': path.resolve(__dirname, './src')
// } // }
// }, // },
vitePlugins: [ vitePlugins: [
[ [
'@intlify/vite-plugin-vue-i18n', '@intlify/vite-plugin-vue-i18n',
{ {
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false` // 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 ! // you need to set i18n resource including paths !
include: path.resolve(__dirname, './src/i18n/**'), include: path.resolve(__dirname, './src/i18n/**')
}, }
], ]
], ]
// alias:[{ // alias:[{
// '@': path.resolve(__dirname, './src') // '@': path.resolve(__dirname, './src')
// }], // }],
...@@ -129,7 +129,7 @@ module.exports = configure(function (ctx) { ...@@ -129,7 +129,7 @@ module.exports = configure(function (ctx) {
directives: ['ClosePopup'], directives: ['ClosePopup'],
// Quasar plugins // Quasar plugins
plugins: ['Notify','SessionStorage','Dialog'] plugins: ['Notify', 'SessionStorage', 'Dialog', 'LoadingBar']
}, },
animations: 'all', // --- includes all animations animations: 'all', // --- includes all animations
...@@ -210,7 +210,7 @@ module.exports = configure(function (ctx) { ...@@ -210,7 +210,7 @@ module.exports = configure(function (ctx) {
injectPwaMetaTags: true, injectPwaMetaTags: true,
swFilename: 'sw.js', swFilename: 'sw.js',
manifestFilename: 'manifest.json', manifestFilename: 'manifest.json',
useCredentialsForManifestTag: false, useCredentialsForManifestTag: false
// useFilenameHashes: true, // useFilenameHashes: true,
// extendGenerateSWOptions (cfg) {} // extendGenerateSWOptions (cfg) {}
// extendInjectManifestOptions (cfg) {}, // extendInjectManifestOptions (cfg) {},
...@@ -239,13 +239,11 @@ module.exports = configure(function (ctx) { ...@@ -239,13 +239,11 @@ module.exports = configure(function (ctx) {
packager: { packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
// OS X / Mac App Store // OS X / Mac App Store
// appBundleId: '', // appBundleId: '',
// appCategoryType: '', // appCategoryType: '',
// osxSign: '', // osxSign: '',
// protocol: 'myapp://path', // protocol: 'myapp://path',
// Windows only // Windows only
// win32metadata: { ... } // win32metadata: { ... }
}, },
...@@ -259,9 +257,7 @@ module.exports = configure(function (ctx) { ...@@ -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 // Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
bex: { bex: {
contentScripts: [ contentScripts: ['JVS']
'JVS'
],
// extendBexScriptsConf (esbuildConf) {} // extendBexScriptsConf (esbuildConf) {}
// extendBexManifestJson (json) {} // extendBexManifestJson (json) {}
......
import Axios, { AxiosResponse, AxiosRequestConfig, AxiosError } from 'axios' import Axios, { AxiosResponse, AxiosRequestConfig, AxiosError } from 'axios'
import router from '../router/index'
import message from '../utils/message' import message from '../utils/message'
import { i18n } from '../boot/i18n' import { i18n } from '../boot/i18n'
import router from '../router'
// import { message } from 'ant-design-vue' // import { message } from 'ant-design-vue'
// import Store from '../store' // import Store from '../store'
// import { Notify } from 'quasar' // import { Notify } from 'quasar'
...@@ -140,19 +141,19 @@ service.interceptors.response.use( ...@@ -140,19 +141,19 @@ service.interceptors.response.use(
} }
//TODO: 结合接口实际情况进行权限判断 //TODO: 结合接口实际情况进行权限判断
if (error?.response?.status === 401) { // if (error?.response?.status === 401) {
if (router.currentRoute.value.path !== '/auth/login') { // if (router.currentRoute.value.path !== '/auth/login') {
// Notify.create({ // // Notify.create({
// message: '登录凭证已过期,请重新登录', // // message: '登录凭证已过期,请重新登录',
// color: 'warning', // // color: 'warning',
// textColor: 'dark', // // textColor: 'dark',
// icon: 'announcement' // // icon: 'announcement'
// }) // // })
message.errorMsg(t('loginout')); // message.errorMsg(t('loginout'));
router.push('/auth/login') // router.push('/auth/login')
} // }
return Promise.reject(new Error('401')) // return Promise.reject(new Error('401'))
} // }
return Promise.reject(new Error(__emsg)) 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({ import messages from 'src/i18n'
// 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';
export type MessageLanguages = keyof typeof messages; export type MessageLanguages = keyof typeof messages;
// Type-define 'en-US' as the master schema for the resource // 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 // See https://vue-i18n.intlify.dev/guide/advanced/typescript.html#global-resource-schema-type-definition
/* eslint-disable @typescript-eslint/no-empty-interface */ /* eslint-disable @typescript-eslint/no-empty-interface */
...@@ -35,17 +20,15 @@ declare module 'vue-i18n' { ...@@ -35,17 +20,15 @@ declare module 'vue-i18n' {
// define the number format schema // define the number format schema
export interface DefineNumberFormat {} export interface DefineNumberFormat {}
} }
/* eslint-enable @typescript-eslint/no-empty-interface */
const i18n = createI18n({ const i18n = createI18n({
locale: localStorage.getItem("lanuage")??'zh-TW', locale: localStorage.getItem('lanuage') ?? 'zhTW',
legacy: false, legacy: false,
globalInjection:true, globalInjection: true,
messages, messages
}); })
export default boot(({ app }) => { export default boot(({ app }) => {
console.log(app,i18n,messages)
app.use(i18n)
// Set i18n instance on app })
app.use(i18n); export { i18n }
});
export { i18n }
\ No newline at end of file
...@@ -23,7 +23,7 @@ export default boot(({ router, store }) => { ...@@ -23,7 +23,7 @@ export default boot(({ router, store }) => {
//debugger; //debugger;
if (to.path === '/auth/login' || to.path === '/') { if (to.path === '/auth/login' || to.path === '/') {
next('/index') next('/index')
LoadingBar.stop() //LoadingBar.stop()
} else { } else {
if (!loadAsyncRouter) { if (!loadAsyncRouter) {
// 判断当前用户是否获取权限 // 判断当前用户是否获取权限
...@@ -52,7 +52,6 @@ export default boot(({ router, store }) => { ...@@ -52,7 +52,6 @@ export default boot(({ router, store }) => {
console.log(x.menuUrl,to.path) console.log(x.menuUrl,to.path)
return x.menuUrl == to.path return x.menuUrl == to.path
}) })
console.log(authMenu)
if (authMenu != -1) { if (authMenu != -1) {
next({ next({
...to, ...to,
...@@ -61,10 +60,10 @@ export default boot(({ router, store }) => { ...@@ -61,10 +60,10 @@ export default boot(({ router, store }) => {
} else { } else {
next('/404') next('/404')
} }
LoadingBar.stop() //LoadingBar.stop()
} else { } else {
next('/404') next('/404')
LoadingBar.stop() //LoadingBar.stop()
} }
} }
} else { } else {
...@@ -79,24 +78,26 @@ export default boot(({ router, store }) => { ...@@ -79,24 +78,26 @@ export default boot(({ router, store }) => {
next() next()
} else { } else {
next(`/auth/login?redirect=${decodeURIComponent(to.path)}`) // 否则全部重定向到登录页 next(`/auth/login?redirect=${decodeURIComponent(to.path)}`) // 否则全部重定向到登录页
LoadingBar.stop() //LoadingBar.stop()
} }
} }
}) })
router.afterEach(() => { 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 pattern = /Loading chunk (\d)+ failed/g
const isChunkLoadFailed = error.message.match(pattern) // // const isChunkLoadFailed = error.message.match(pattern)
const targetPath = error.to // // const targetPath = error.to
console.log('異常:',error,targetPath) // console.log('異常:',error)
if (isChunkLoadFailed) { // // if (isChunkLoadFailed) {
router.replace(targetPath) // // router.replace(targetPath)
} // // }
}) // })
}) })
...@@ -43,7 +43,6 @@ export default { ...@@ -43,7 +43,6 @@ export default {
const svgIcon = computed(() => { const svgIcon = computed(() => {
return new URL(`../../assets/svg/${props.icon}`,import.meta.url).href return new URL(`../../assets/svg/${props.icon}`,import.meta.url).href
}) })
console.log(svgIcon.value)
return { svgSize, svgColor,svgIcon } return { svgSize, svgColor,svgIcon }
} }
} }
......
...@@ -3,7 +3,7 @@ import zhTW from './zh-TW' ...@@ -3,7 +3,7 @@ import zhTW from './zh-TW'
import zhSW from './zh-SW' import zhSW from './zh-SW'
export default { export default {
'en-US': enUS, enUS,
'zh-TW': zhTW, zhTW,
'zh-SW': zhSW, zhSW,
} }
import { OrderType } from './../../@types/index';
// This is just an example,
// so you can safely delete all default props below
export default { export default {
failed: '執行失敗', failed: '執行失敗',
success: '執行成功', success: '執行成功',
......
<template> <template>
<div class="fix-height-subpage column no-wrap q-pa-md"> <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}"> <div class="col q-mt-md" :class="{'light-shadow q-pa-md bg-white rounded-border':$q.platform.is.desktop}">
<list-table></list-table> <list-table></list-table>
</div> </div>
...@@ -39,11 +39,12 @@ export default defineComponent({ ...@@ -39,11 +39,12 @@ export default defineComponent({
MaxPrice:'', MaxPrice:'',
MinPrice:'' MinPrice:''
}) })
provide(DirtionmaryHelper.HOTEL_QUERY_PARAM, search) provide(DirtionmaryHelper.HOTEL_QUERY_PARAM, search)
const HotelCarList = ref([]) const HotelCarList = ref([])
provide(DirtionmaryHelper.HOTEL_CAR_LIST, HotelCarList) provide(DirtionmaryHelper.HOTEL_CAR_LIST, HotelCarList)
const methods = { const methods = {
} }
return { return {
...toRefs(data), ...toRefs(data),
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
const files = import.meta.globEager("./**/*.ts") //require.context('.', true, /\.ts$/) const files = import.meta.globEager("./**/*.ts") //require.context('.', true, /\.ts$/)
const modules: any = {} const modules: any = {}
console.log(files)
Object.keys(files).forEach((key: string) => { Object.keys(files).forEach((key: string) => {
console.log(key)
if (key === './index.ts') return if (key === './index.ts') return
const path = key.replace(/(\.\/|\.ts)/g, '') const path = key.replace(/(\.\/|\.ts)/g, '')
......
...@@ -48,6 +48,5 @@ export function dispatchAction<T>(module: ModuleNameType, key: keyof T, value?: ...@@ -48,6 +48,5 @@ export function dispatchAction<T>(module: ModuleNameType, key: keyof T, value?:
* @example 使用方法如下 const result = getStoreGetter<ConsoleGetterType>('console','list') * @example 使用方法如下 const result = getStoreGetter<ConsoleGetterType>('console','list')
*/ */
export function getStoreGetter<T>(module: ModuleNameType, key: keyof T) { export function getStoreGetter<T>(module: ModuleNameType, key: keyof T) {
console.log(store)
return store.getters[`${module}/${String(key)}`] return store.getters[`${module}/${String(key)}`]
} }
...@@ -7,7 +7,6 @@ import { ResultType } from '../@types/enumHelper' ...@@ -7,7 +7,6 @@ import { ResultType } from '../@types/enumHelper'
*/ */
export function getAuth() { export function getAuth() {
const token = getStoreGetter<UserGetter>('user', 'getUserToken') ?? ResultType.Empty const token = getStoreGetter<UserGetter>('user', 'getUserToken') ?? ResultType.Empty
console.log(token)
return token != ResultType.Empty return token != ResultType.Empty
} }
...@@ -17,6 +16,5 @@ export function getAuth() { ...@@ -17,6 +16,5 @@ export function getAuth() {
*/ */
export function getUserAllMenu() { export function getUserAllMenu() {
const auths = getStoreGetter<UserGetter>('user', 'getUserAllAuth')??[] const auths = getStoreGetter<UserGetter>('user', 'getUserAllAuth')??[]
console.log(auths)
return auths.length > 0 ? auths : ResultType.EmptyArray return auths.length > 0 ? auths : ResultType.EmptyArray
} }
...@@ -58,7 +58,7 @@ export function getHotelOrderStatus():Array<StandardStatus>{ ...@@ -58,7 +58,7 @@ export function getHotelOrderStatus():Array<StandardStatus>{
Color:`text-${color[i]}` Color:`text-${color[i]}`
}) })
}) })
return status return status
} }
...@@ -143,15 +143,15 @@ export function getHotelOrderType(getNormal:boolean = false):Array<OrderType>{ ...@@ -143,15 +143,15 @@ export function getHotelOrderType(getNormal:boolean = false):Array<OrderType>{
export function getLangs() { export function getLangs() {
const zhTw:SitLang={ const zhTw:SitLang={
langLocale:"zh-TW", langLocale:"zhTW",
langName:"中文繁体" langName:"中文繁体"
} }
const zhSw:SitLang={ const zhSw:SitLang={
langLocale:"zh-SW", langLocale:"zhSW",
langName:"中文简体" langName:"中文简体"
} }
const enUs:SitLang={ const enUs:SitLang={
langLocale:"en-US", langLocale:"enUS",
langName:"English" langName:"English"
} }
let langs:SitLang[]=[] 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", "extends": "@quasar/app-vite/tsconfig-preset",
"compilerOptions": { "compilerOptions": {
"target": "es2015", "baseUrl": "."
"lib": ["es2017","DOM"],
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
"types": [
"node"
]
} }
} }
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