Skip to content

Commit

Permalink
fix(web): appid confict if open 2 tabs (#1011)
Browse files Browse the repository at this point in the history
* fix(web): appid confict if open 2 tabs

* fix(web): function editor scroll bug
  • Loading branch information
LeezQ committed Apr 7, 2023
1 parent 40e8e0b commit f6c39ee
Show file tree
Hide file tree
Showing 31 changed files with 105 additions and 92 deletions.
9 changes: 5 additions & 4 deletions web/src/apis/v1/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
///////////////////////////////////////////////////////////////////////
/// <reference path = "api-auto.d.ts" />
import request from "@/utils/request";
import useGlobalStore from "@/pages/globalStore";

/**
* Get account info
Expand All @@ -17,7 +18,7 @@ export async function AccountControllerFindOne(
): Promise<Paths.AccountControllerFindOne.Responses> {
// /v1/accounts
let _params: { [key: string]: any } = {
appid: localStorage.getItem("app"),
appid: useGlobalStore.getState().currentApp?.appid || "",
...params,
};
return request(`/v1/accounts`, {
Expand All @@ -34,7 +35,7 @@ export async function AccountControllerGetChargeOrder(
): Promise<Paths.AccountControllerGetChargeOrder.Responses> {
// /v1/accounts/charge-order/{id}
let _params: { [key: string]: any } = {
appid: localStorage.getItem("app"),
appid: useGlobalStore.getState().currentApp?.appid || "",
...params,
};
return request(`/v1/accounts/charge-order/${_params.id}`, {
Expand All @@ -51,7 +52,7 @@ export async function AccountControllerCharge(
): Promise<Paths.AccountControllerCharge.Responses> {
// /v1/accounts/charge-order
let _params: { [key: string]: any } = {
appid: localStorage.getItem("app"),
appid: useGlobalStore.getState().currentApp?.appid || "",
...params,
};
return request(`/v1/accounts/charge-order`, {
Expand All @@ -68,7 +69,7 @@ export async function AccountControllerWechatNotify(
): Promise<Paths.AccountControllerWechatNotify.Responses> {
// /v1/accounts/payment/wechat-notify
let _params: { [key: string]: any } = {
appid: localStorage.getItem("app"),
appid: useGlobalStore.getState().currentApp?.appid || "",
...params,
};
return request(`/v1/accounts/payment/wechat-notify`, {
Expand Down
7 changes: 4 additions & 3 deletions web/src/apis/v1/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
///////////////////////////////////////////////////////////////////////
/// <reference path = "api-auto.d.ts" />
import request from "@/utils/request";
import useGlobalStore from "@/pages/globalStore";

/**
* Get user application list
Expand All @@ -17,7 +18,7 @@ export async function ApplicationControllerFindAll(
): Promise<Paths.ApplicationControllerFindAll.Responses> {
// /v1/applications
let _params: { [key: string]: any } = {
appid: localStorage.getItem("app"),
appid: useGlobalStore.getState().currentApp?.appid || "",
...params,
};
return request(`/v1/applications`, {
Expand All @@ -34,7 +35,7 @@ export async function ApplicationControllerFindOne(
): Promise<Paths.ApplicationControllerFindOne.Responses> {
// /v1/applications/{appid}
let _params: { [key: string]: any } = {
appid: localStorage.getItem("app"),
appid: useGlobalStore.getState().currentApp?.appid || "",
...params,
};
return request(`/v1/applications/${_params.appid}`, {
Expand All @@ -51,7 +52,7 @@ export async function ApplicationControllerUpdate(
): Promise<Paths.ApplicationControllerUpdate.Responses> {
// /v1/applications/{appid}
let _params: { [key: string]: any } = {
appid: localStorage.getItem("app"),
appid: useGlobalStore.getState().currentApp?.appid || "",
...params,
};
return request(`/v1/applications/${_params.appid}`, {
Expand Down
Loading

0 comments on commit f6c39ee

Please sign in to comment.