diff --git a/common.js b/common.js index f7e9c5e..d3c9dc2 100644 --- a/common.js +++ b/common.js @@ -982,7 +982,7 @@ export function getConfig() { const config = this.env === "LOCAL" ? { name: 'LOCAL', - baseUrl: this.url + baseUrl: this.clientUrl } : configs[this.env]; return { diff --git a/star-cloud.js b/star-cloud.js index b0d88da..a446ffd 100644 --- a/star-cloud.js +++ b/star-cloud.js @@ -81,7 +81,7 @@ class StarCloud { // 环境 this.env = null //sdk服务器地址 - this.url = '' + this.clientUrl = '' // 客户端Id this.clientId = null // 客户端密码 @@ -139,7 +139,7 @@ class StarCloud { init(params) { Object.assign(StarCloud.prototype, device, lock, other, password, record, user, common) - const { clientId, clientSecret, env, platform, accounts,url } = params + const { clientId, clientSecret, env, platform, accounts,clientUrl } = params this.envVersion = 'release' if (platform !== 2) { const appInfo = uni.getAccountInfoSync() @@ -149,7 +149,7 @@ class StarCloud { onBLECharacteristicValueChange(this.listenCharacteristicValue.bind(this)) } - this.url = url + this.clientUrl = clientUrl this.isReportLog = params.isReportLog this.env = env || 'XHJ' diff --git a/web.md b/web.md index 7098a33..e4293b0 100644 --- a/web.md +++ b/web.md @@ -62,12 +62,13 @@ init(params) **入参** -| 参数名称 | 数据类型 | 必须 | 描述 | -|--------------|----------------------|----|---------------------------------| -| clientId | String | Y | 客户端Id | -| clientSecret | String | Y | 客户端密码 | -| env | String | Y | 环境('SKY':斯凯环境 'XHJ':鑫泓佳环境) | -| accounts | Array\ | Y | 账号列表,后续方法中需传入uid,若未传入则默认使用第一个账号 | +| 参数名称 | 数据类型 | 必须 | 描述 | +|--------------|----------------------|-----|-----------------------------------------| +| clientId | String | Y | 客户端Id | +| clientSecret | String | Y | 客户端密码 | +| env | String | Y | 环境('SKY':斯凯环境 'XHJ':鑫泓佳环境 'LOCAL': 本地环境) | +| clientUrl | String | Y | 客户端URL env等于LOCAL环境必传 其他默认设空字符 | +| accounts | Array\ | Y | 账号列表,后续方法中需传入uid,若未传入则默认使用第一个账号 | **返回** 无