update env

This commit is contained in:
AceDataCloud committed 2023-01-26 12:18:08 +08:00
1 parent 6bc2988a32
commit 396b77406d
3 files changed
+11 -4

No files matched your search

+9 -2
View File
@@ -99,6 +99,7 @@ interface IData {
payWay: PayWay | undefined;
order: IOrder | undefined;
loading: boolean;
refreshTimer: number | undefined;
}
export default defineComponent({
@@ -112,7 +113,8 @@ export default defineComponent({
payWay: PayWay.WechatPay,
OrderState: OrderState,
order: undefined,
loading: false
loading: false,
refreshTimer: undefined
};
},
computed: {
@@ -128,6 +130,11 @@ export default defineComponent({
this.onFetchData();
this.onCheck();
},
unmounted() {
if (this.refreshTimer) {
clearTimeout(this.refreshTimer);
}
},
methods: {
onFetchData() {
this.loading = true;
@@ -147,7 +154,7 @@ export default defineComponent({
.then(({ data: data }: { data: IOrderDetailResponse }) => {
this.order = data;
if (this.order.state === OrderState.PAID) {
setTimeout(() => {
this.refreshTimer = setTimeout(() => {
if (this.redirect) {
window.location.replace(this.redirect?.toString());
}
+1 -1
View File
@@ -1,7 +1,7 @@
import { ENV_LOCAL, ENV_PRODUCTION, ENV_TEST } from '@/constants';
const PATTERN_TEST_ENV = '.test.zhishuyun.com';
const PATTERN_LOCAL_ENV = '.lcoal.zhishuyun.com';
const PATTERN_LOCAL_ENV = '.local.zhishuyun.com';
/**
* Get env of App, return local, test, production
+1 -1
View File
@@ -20,7 +20,7 @@ const getAuthEndpoint = () => {
const getDataEndpoint = () => {
switch (process.env.NODE_ENV) {
case 'local':
return 'https://auth.test.zhishuyun.com';
return 'http://localhost:8007';
case 'test':
return 'https://data.test.zhishuyun.com';
case 'production':