Commit 0b6a554ec4214fee50fe06dc502d6ac69ff0d1af

Authored by ww
1 parent 0ee29d46

fix: 场景联动服务接口为选择产品时依然请求了接口

... ... @@ -587,7 +587,9 @@ export const actionSchema: FormSchema[] = [
587 587 placeholder: '请选择服务',
588 588 api: async (params: Recordable) => {
589 589 try {
590   - const record = await getModelServices(params as Record<'deviceProfileId', string>);
  590 + if (!Reflect.get(params, 'deviceProfileId')) return [];
  591 + const record =
  592 + (await getModelServices(params as Record<'deviceProfileId', string>)) || [];
591 593 const selected = record.find((item) => item.id === thingsModelId);
592 594 selected &&
593 595 updateSchema({
... ...