li.shaoyi 10 miesięcy temu
rodzic
commit
e795e8ddfd
2 zmienionych plików z 2 dodań i 3 usunięć
  1. 1 2
      src/stores/modules/account.ts
  2. 1 1
      src/types/model/user.d.ts

+ 1 - 2
src/stores/modules/account.ts

@@ -25,7 +25,6 @@ export const useAccountStore = defineStore(() => {
         accountList: [],
         currentAccountId: 0,
         currentAccountConfig: {
-            riskRatioType: {},
             todayAccountMargins: [],
             todayAccountTradeRules: [],
             todayAccountTradefees: []
@@ -35,7 +34,7 @@ export const useAccountStore = defineStore(() => {
     // 资金账户计算列表
     const accountComputedList = computed(() => {
         const { riskRatioType } = state.currentAccountConfig
-        const { addmarginriskratio = 0, notemarginriskratio = 0, cutriskratio = 0 } = riskRatioType
+        const { addmarginriskratio = 0, notemarginriskratio = 0, cutriskratio = 0 } = riskRatioType ?? {}
 
         const result: (Model.TaAccountsRsp & {
             freezeMargin: number; // 冻结资金

+ 1 - 1
src/types/model/user.d.ts

@@ -167,7 +167,7 @@ declare namespace Model {
 
     /** 获取资金账户今日配置信息 响应 */
     interface TodayAccountConfigInfoRsp {
-        riskRatioType: Partial<RiskRatioType>;
+        riskRatioType?: RiskRatioType;
         todayAccountMargins: TodayAccountMargin[]; // 今日账户保证金表
         todayAccountTradeRules: TodayAccountTradeRule[]; // 今日账户交易规则信表
         todayAccountTradefees: TodayAccountTradefee[]; // 今日账户交易费用表