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