@ray-js/api 1.4.42 → 1.4.43

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,3 +5,4 @@ export * from './statistic';
5
5
  export * from './device';
6
6
  export * from './linkage';
7
7
  export * from './doorlock';
8
+ export * from './outdoor';
@@ -6,4 +6,7 @@ export * from './device';
6
6
  export * from './linkage';
7
7
 
8
8
  // 仅用于门锁模版,在门锁未OpenAPI时使用。
9
- export * from './doorlock';
9
+ export * from './doorlock';
10
+
11
+ // 仅用于出行产品
12
+ export * from './outdoor';
@@ -0,0 +1,15 @@
1
+ type ProductIconVOMap = {
2
+ [productId: string]: {
3
+ icon: string;
4
+ smallIcon: string;
5
+ };
6
+ };
7
+ /**
8
+ * 根据设备ids获取出行产品图片
9
+ * @param params {deviceIds: string[]}
10
+ * @returns ProductIconVOMap
11
+ */
12
+ export declare const getOutdoorDeviceIcon: (params: {
13
+ deviceIds: string[];
14
+ }) => Promise<ProductIconVOMap>;
15
+ export {};
@@ -0,0 +1,25 @@
1
+ import { THING } from '../constants';
2
+ import requestCloud from '../requestCloud';
3
+ /**
4
+ * 根据设备ids获取出行产品图片
5
+ * @param params {deviceIds: string[]}
6
+ * @returns ProductIconVOMap
7
+ */
8
+ export const getOutdoorDeviceIcon = params => {
9
+ return new Promise((resolve, reject) => {
10
+ requestCloud({
11
+ api: `${THING}.m.trip.outdoors.device.icon.get`,
12
+ version: '1.0',
13
+ data: {
14
+ deviceIds: params.deviceIds.join(',')
15
+ },
16
+ success(res) {
17
+ // @ts-ignore
18
+ resolve(res.productIconVOMap);
19
+ },
20
+ fail(err) {
21
+ reject(err);
22
+ }
23
+ });
24
+ });
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.4.42",
3
+ "version": "1.4.43",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,14 +29,14 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.4.42",
33
- "@ray-js/router": "1.4.42",
32
+ "@ray-js/framework": "1.4.43",
33
+ "@ray-js/router": "1.4.43",
34
34
  "@ray-js/wechat": "^0.0.33",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.4.42",
39
+ "@ray-js/cli": "1.4.43",
40
40
  "art-template": "^4.13.2",
41
41
  "fs-extra": "^10.1.0",
42
42
  "miniprogram-api-typings": "^3.12.2",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.org"
48
48
  },
49
- "gitHead": "248b5bb0a425502d5ac45a1a8af5a6b96d3e1dc9"
49
+ "gitHead": "9da07e2e3428fda38f38d51718aea5e8589928fd"
50
50
  }