@ledvance/base 1.1.75 → 1.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/api/native.ts +5 -2
- package/src/composeLayout.tsx +4 -0
package/package.json
CHANGED
package/src/api/native.ts
CHANGED
|
@@ -221,9 +221,12 @@ export class NativeApi {
|
|
|
221
221
|
static getAllTaskTimer(devId: string, type: number = 0): Promise<Result<any>> {
|
|
222
222
|
return new Promise<Result<any>>((resolve, _reject) => {
|
|
223
223
|
getAllTaskTimer(devId, type, res => {
|
|
224
|
+
const allList = JSON.parse(res.data || '[]')
|
|
225
|
+
.map(item => item.mTimerList)
|
|
226
|
+
.flat();
|
|
224
227
|
resolve({
|
|
225
228
|
success: res.result,
|
|
226
|
-
data: res.result ?
|
|
229
|
+
data: res.result ? allList : undefined,
|
|
227
230
|
msg: res.msg,
|
|
228
231
|
})
|
|
229
232
|
})
|
|
@@ -346,4 +349,4 @@ export const getSystemTimeFormat = async (): Promise<number> => {
|
|
|
346
349
|
} catch (_) {
|
|
347
350
|
return 24
|
|
348
351
|
}
|
|
349
|
-
}
|
|
352
|
+
}
|
package/src/composeLayout.tsx
CHANGED
|
@@ -25,11 +25,13 @@ interface Props {
|
|
|
25
25
|
interface LdvDevInfo extends DeviceInfo {
|
|
26
26
|
schema: any
|
|
27
27
|
familyName: string
|
|
28
|
+
role: 0 | 1 | 2 | 3
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
interface UAGroupInfoProps extends UAGroupInfo {
|
|
31
32
|
schema: any
|
|
32
33
|
familyName: string
|
|
34
|
+
role: 0 | 1 | 2 | 3
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
const TYEvent = TYSdk.event
|
|
@@ -132,6 +134,7 @@ const composeLayout = (component: React.ComponentType) => {
|
|
|
132
134
|
config: {},
|
|
133
135
|
},
|
|
134
136
|
familyName: ldvDevInfo.familyName,
|
|
137
|
+
role: ldvDevInfo.role
|
|
135
138
|
}
|
|
136
139
|
NativeApi.showObj(nativeProps)
|
|
137
140
|
console.log('Redux 初始数据:', JSON.stringify(nativeProps))
|
|
@@ -156,6 +159,7 @@ const composeLayout = (component: React.ComponentType) => {
|
|
|
156
159
|
config: JSON.parse(uaGroupInfo.config || '{}'),
|
|
157
160
|
},
|
|
158
161
|
familyName: uaGroupInfo.familyName,
|
|
162
|
+
role: uaGroupInfo.role
|
|
159
163
|
}
|
|
160
164
|
NativeApi.showObj(nativeProps)
|
|
161
165
|
console.log('Redux 初始数据:', JSON.stringify(nativeProps))
|