mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 05:18:10 +00:00
środowisko dev
This commit is contained in:
@@ -23,3 +23,6 @@ pnpm-debug.log*
|
||||
*.sln
|
||||
*.sw?
|
||||
node_modules
|
||||
|
||||
# Dev files
|
||||
stockInfoDev.json
|
||||
+7
-7
@@ -73,13 +73,13 @@ export default defineComponent({
|
||||
}),
|
||||
|
||||
async created() {
|
||||
const stockData = await (
|
||||
await fetch(
|
||||
`https://spythere.github.io/api/td2/data/stockInfo${import.meta.env['VITE_STOCK_DEV'] == '1' ? 'Dev' : ''}.json`
|
||||
)
|
||||
).json();
|
||||
|
||||
this.store.stockData = stockData;
|
||||
if (import.meta.env['VITE_STOCK_DEV'] == '1') {
|
||||
const data = await import('../stockInfoDev.json');
|
||||
this.store.stockData = data.default as any;
|
||||
} else {
|
||||
const stockData = await (await fetch(`https://spythere.github.io/api/td2/data/stockInfo.json`)).json();
|
||||
this.store.stockData = stockData;
|
||||
}
|
||||
|
||||
// routing
|
||||
switch (window.location.pathname) {
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ export interface IStockProps {
|
||||
|
||||
export interface IStockData {
|
||||
generator: {
|
||||
passenger: [];
|
||||
passenger: any;
|
||||
cargo: {
|
||||
[key: string]: string[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user