Please enter the commit message for your changes. Lines starting

with '#' will be ignored, and an empty message aborts the commit.

On branch develop
Your branch is up to date with 'goflyapp/develop'.

Changes to be committed:
	modified:   zlt-business/order-center/src/main/resources/application.yml
	modified:   zlt-gateway/sc-gateway/src/main/resources/application.yml
	modified:   zlt-web/react-web/src/main/frontend/src/pages/device/Device/index.tsx
	modified:   zlt-web/react-web/src/main/frontend/src/pages/orders/Qrcode/index.tsx
	modified:   zlt-web/react-web/src/main/frontend/src/services/device/api.ts

Changes not staged for commit:
	modified:   zlt-web/react-web/src/main/frontend/config/config.ts
	modified:   zlt-web/react-web/src/main/frontend/package.json
	modified:   zlt-web/react-web/src/main/frontend/src/app.tsx
This commit is contained in:
2025-04-30 12:58:15 +08:00
parent e824862582
commit 84eca04230
5 changed files with 29 additions and 31 deletions
@@ -65,7 +65,7 @@ tencent:
play-domain: goflytec.com
app-name: live
key: 06b20e5b7d637c1128fa1b48ea91a13e
expire-seconds: 3600
expire-seconds: 3600000
file:
oss-url: goflyapp.oss-cn-beijing.aliyuncs.com
cdn-url: cdn.goflytec.com
@@ -144,7 +144,8 @@ zlt:
/api-order/wechat/**,
/api-order/home/carousel/app,
/api-order/device/status,
/api-order/token/callback
/api-order/token/callback,
/api-order/live/stream-urls
auth:
urlPermission:
#是否开启url级别权限
@@ -272,7 +272,20 @@ const TableList: React.FC = () => {
rowKey="deviceSn"
headerTitle="设备管理"
actionRef={actionRef}
request={device}
request={async (params, sorter, filter) => {
const res = await device({
page: params.current,
limit: params.pageSize,
searchKey: params.searchKey,
searchValue: params.searchValue,
});
return {
data: res.data || [],
success: res.resp_code === 0,
total: res.count || 0,
};
}}
columns={columns}
search={false}
params={searchParams}
@@ -191,8 +191,8 @@ const TableList: React.FC = () => {
const fetchDeviceList = useCallback(async () => {
try {
const result = await device({
current: 1,
pageSize: 100,
page: 1,
limit: 100,
});
if (result?.data) {
@@ -29,32 +29,16 @@ export async function deleteWayline(id: number) {
}
// 获取设备列表
export async function device(params?: { [key: string]: any }) {
const { current, pageSize, ...rest } = params ?? {};
try {
const result = await request<API.Result<DEVICE.Device[]>>('/api-device/device', {
method: 'GET',
params: {
page: current,
limit: pageSize,
...rest,
},
});
// 根据实际返回的数据结构进行处理
return {
data: result.data || [], // 直接使用返回的数组
success: result.resp_code === 0,
total: result.count || 0, // 使用返回的count作为总数
};
} catch (error) {
console.error('获取设备列表失败:', error);
return {
data: [],
success: false,
total: 0,
};
}
export async function device(params: {
page?: number;
limit?: number;
searchKey?: string;
searchValue?: string;
}) {
return request('/api-device/device', {
method: 'GET',
params,
});
}
// 新增或更新设备