diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..01212db --- /dev/null +++ b/.env.development @@ -0,0 +1 @@ +VITE_API_URL=https://panelapi.cekilisevitest.gov.tr/ \ No newline at end of file diff --git a/.env.localdev b/.env.localdev new file mode 100644 index 0000000..eb228c4 --- /dev/null +++ b/.env.localdev @@ -0,0 +1 @@ +VITE_API_URL=https://localhost:7241/ \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..f8e16bb --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +VITE_API_URL=https://panelapi.cekilisevi.gov.tr/ \ No newline at end of file diff --git a/env.d.ts b/env.d.ts index ed77210..2e528ed 100644 --- a/env.d.ts +++ b/env.d.ts @@ -1,2 +1,9 @@ /// +interface ImportMetaEnv { + readonly VITE_API_URL: string; +} + +interface ImportMeta { + readonly env: ImportMetaEnv; +} \ No newline at end of file diff --git a/package.json b/package.json index c5df6a2..bc246eb 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,12 @@ "type": "module", "scripts": { "dev": "vite", + "localdev": "vite", "build": "run-p type-check \"build-only {@}\" --", + "buildtest": "run-p type-check \"build-only-test {@}\" --", "preview": "vite preview", "build-only": "vite build", + "build-only-test": "vite build --mode development", "type-check": "vue-tsc --build --force" }, "dependencies": { diff --git a/src/init/axios-init.ts b/src/init/axios-init.ts index fcbf462..ff4b907 100644 --- a/src/init/axios-init.ts +++ b/src/init/axios-init.ts @@ -2,7 +2,7 @@ import axios from 'axios' import { useUsersStore } from '@/stores/usersStore' import router from '@/router' -axios.defaults.baseURL = 'https://panelapi.cekilisevi.gov.tr/' +axios.defaults.baseURL = import.meta.env.VITE_API_URL //axios.defaults.timeout = 2000; axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8' import { useDataStore } from '@/stores/dataStore' diff --git a/src/module/cekilisler/components/TabPiyangoTeminatDurumu.vue b/src/module/cekilisler/components/TabPiyangoTeminatDurumu.vue index 22fbce6..945002d 100644 --- a/src/module/cekilisler/components/TabPiyangoTeminatDurumu.vue +++ b/src/module/cekilisler/components/TabPiyangoTeminatDurumu.vue @@ -22,13 +22,20 @@ v-if=" usersStore.isPanelUser || (!usersStore.isPanelUser && + piyangoStore.lotteryApprove !== 0 && + piyangoStore.lotteryApprove !== 1 && + piyangoStore.lotteryApprove !== 2 && piyangoStore.lotteryApprove !== 3 && !piyangoTeminatStore.isNew) " />