@cpzxrobot/sdk 1.3.0 → 1.3.1

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/dist/index.js CHANGED
@@ -302,6 +302,14 @@ class Cpzxrobot {
302
302
  // 检查当前域名是否在本地开发域名列表中
303
303
  return localDomains.includes(domain);
304
304
  }
305
+ setTitle(title) {
306
+ if (this.platform) {
307
+ this.platform.setTitle(title);
308
+ }
309
+ else {
310
+ console.warn("platform not ready, title will be set later");
311
+ }
312
+ }
305
313
  }
306
314
  exports.Cpzxrobot = Cpzxrobot;
307
315
  Cpzxrobot.factorySelectorLoaded = false;
@@ -275,6 +275,12 @@ class UserGateway extends Object {
275
275
  }
276
276
  });
277
277
  });
278
+ },
279
+ // 任务审核功能
280
+ approve: (params) => {
281
+ return this.context.ready.then((axios) => {
282
+ return axios.post('/api/v2/coremde-sale/task/approve', params);
283
+ });
278
284
  }
279
285
  };
280
286
  }
package/index.ts CHANGED
@@ -311,6 +311,14 @@ export class Cpzxrobot {
311
311
  // 检查当前域名是否在本地开发域名列表中
312
312
  return localDomains.includes(domain);
313
313
  }
314
+
315
+ setTitle(title: string) {
316
+ if (this.platform) {
317
+ this.platform.setTitle(title);
318
+ } else {
319
+ console.warn("platform not ready, title will be set later");
320
+ }
321
+ }
314
322
  }
315
323
 
316
324
  export default function (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {