wjx 1 year ago
parent
commit
8ab7cbf6b4
2 changed files with 12 additions and 5 deletions
  1. 5 5
      src/components/QueryForm/index.tsx
  2. 7 0
      src/services/gameData/index.ts

+ 5 - 5
src/components/QueryForm/index.tsx

@@ -2,7 +2,7 @@ import { Button, Checkbox, Col, DatePicker, Form, Input, InputNumber, Radio, Row
 import React, { useEffect, useState } from "react"
 import React, { useEffect, useState } from "react"
 import moment from "moment"
 import moment from "moment"
 import { useAjax } from "@/Hook/useAjax"
 import { useAjax } from "@/Hook/useAjax"
-import { getAllOfOwnerUserApi, getChannelChoiceListApi, getGameChoiceListApi, getCpChoiceListApi, getGameChoiceParentListType1Api, getPayListApi, getSubUserWithSelfListApi, getTtAllUserListApi, getUserSystemTypeChoiceListApi, getUserVipLevelChoiceListApi, getRoleUserListApi, getGameServerListApi, getGameServerUnListApi, getAccountListNewApi, getAgentListNewApi, getPitcherListNewApi, getGameListNewApi } from "@/services/gameData"
+import { getAllOfOwnerUserApi, getChannelChoiceListApi, getGameChoiceListApi, getCpChoiceListApi, getGameChoiceParentListType1Api, getPayListApi, getSubUserWithSelfListApi, getTtAllUserListApi, getUserSystemTypeChoiceListApi, getUserVipLevelChoiceListApi, getRoleUserListApi, getGameServerListApi, getGameServerUnListApi, getAccountListNewApi, getAgentListNewApi, getPitcherListNewApi, getGameListNewApi, getVipLevelApi } from "@/services/gameData"
 import { ActiveEnum, DeviceType, LoginType, PayStatus, TYPE, gameClassifyEnum } from "./const"
 import { ActiveEnum, DeviceType, LoginType, PayStatus, TYPE, gameClassifyEnum } from "./const"
 import { ADSTATUSEnum as ADSTTTATUSEnum } from "@/pages/gameDataStatistics/adlist/monitor/const"
 import { ADSTATUSEnum as ADSTTTATUSEnum } from "@/pages/gameDataStatistics/adlist/monitor/const"
 import { ADSTATUSEnum } from "@/pages/gameDataStatistics/adlist/tencentMonitor/const"
 import { ADSTATUSEnum } from "@/pages/gameDataStatistics/adlist/tencentMonitor/const"
@@ -264,7 +264,7 @@ const QueryForm: React.FC<Props> = (props) => {
     const getUserSystemTypeChoiceList = useAjax(() => getUserSystemTypeChoiceListApi())
     const getUserSystemTypeChoiceList = useAjax(() => getUserSystemTypeChoiceListApi())
     const getCpChoiceList = useAjax(() => getCpChoiceListApi())
     const getCpChoiceList = useAjax(() => getCpChoiceListApi())
     const getPayList = useAjax(() => getPayListApi())
     const getPayList = useAjax(() => getPayListApi())
-    const getUserVipLevelChoiceList = useAjax(() => getUserVipLevelChoiceListApi())
+    const getVipLevel = useAjax(() => getVipLevelApi())
     const getRoleUserList = useAjax((params) => getRoleUserListApi(params))
     const getRoleUserList = useAjax((params) => getRoleUserListApi(params))
     const getGameServerList = useAjax((params) => getGameServerListApi(params))
     const getGameServerList = useAjax((params) => getGameServerListApi(params))
     const getGameServerUnList = useAjax((params) => getGameServerUnListApi(params))
     const getGameServerUnList = useAjax((params) => getGameServerUnListApi(params))
@@ -346,7 +346,7 @@ const QueryForm: React.FC<Props> = (props) => {
 
 
     useEffect(() => {
     useEffect(() => {
         if (isVipLevel) {
         if (isVipLevel) {
-            getUserVipLevelChoiceList.run()
+            getVipLevel.run()
         }
         }
     }, [isVipLevel])
     }, [isVipLevel])
 
 
@@ -1364,14 +1364,14 @@ const QueryForm: React.FC<Props> = (props) => {
                     showSearch
                     showSearch
                     allowClear
                     allowClear
                     maxTagCount={1}
                     maxTagCount={1}
-                    mode="tags"
+                    mode="multiple"
                     style={{ minWidth: 98 }}
                     style={{ minWidth: 98 }}
                     placeholder={'角色VIP'}
                     placeholder={'角色VIP'}
                     filterOption={(input, option) =>
                     filterOption={(input, option) =>
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
                         (option?.children as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0
                     }
                     }
                 >
                 >
-                    {getUserVipLevelChoiceList?.data?.map((item: { vipLevel: React.Key | null | undefined; vipLevelName: boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined }) => <Select.Option value={item.vipLevel} key={item.vipLevel}>{item.vipLevelName}</Select.Option>)}
+                    {Array(getVipLevel?.data || 0).fill('').map((_item, index) => <Select.Option value={index + 1} key={index + 1}>{index + 1}</Select.Option>)}
                 </Select>
                 </Select>
             </Form.Item></Col>}
             </Form.Item></Col>}
 
 

+ 7 - 0
src/services/gameData/index.ts

@@ -152,4 +152,11 @@ export async function getGameListNewApi(data: { sourceSystem: string }) {
 // 所有投手列表
 // 所有投手列表
 export async function getPitcherListNewApi(data: { sourceSystem: string }) {
 export async function getPitcherListNewApi(data: { sourceSystem: string }) {
     return request(api + `/gameData/choice/pitcher/list`, { method: 'POST', data });
     return request(api + `/gameData/choice/pitcher/list`, { method: 'POST', data });
+}
+/**
+ * 最大vip
+ * @returns 
+ */
+export async function getVipLevelApi() {
+    return request(api + `/gameData/choice/vip/level`);
 }
 }