fix
This commit is contained in:
parent
ce8f68917a
commit
4933c31e28
@ -982,7 +982,7 @@ export function getConfig() {
|
|||||||
|
|
||||||
const config = this.env === "LOCAL" ? {
|
const config = this.env === "LOCAL" ? {
|
||||||
name: 'LOCAL',
|
name: 'LOCAL',
|
||||||
baseUrl: this.url
|
baseUrl: this.clientUrl
|
||||||
} : configs[this.env];
|
} : configs[this.env];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -81,7 +81,7 @@ class StarCloud {
|
|||||||
// 环境
|
// 环境
|
||||||
this.env = null
|
this.env = null
|
||||||
//sdk服务器地址
|
//sdk服务器地址
|
||||||
this.url = ''
|
this.clientUrl = ''
|
||||||
// 客户端Id
|
// 客户端Id
|
||||||
this.clientId = null
|
this.clientId = null
|
||||||
// 客户端密码
|
// 客户端密码
|
||||||
@ -139,7 +139,7 @@ class StarCloud {
|
|||||||
init(params) {
|
init(params) {
|
||||||
Object.assign(StarCloud.prototype, device, lock, other, password, record, user, common)
|
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'
|
this.envVersion = 'release'
|
||||||
if (platform !== 2) {
|
if (platform !== 2) {
|
||||||
const appInfo = uni.getAccountInfoSync()
|
const appInfo = uni.getAccountInfoSync()
|
||||||
@ -149,7 +149,7 @@ class StarCloud {
|
|||||||
onBLECharacteristicValueChange(this.listenCharacteristicValue.bind(this))
|
onBLECharacteristicValueChange(this.listenCharacteristicValue.bind(this))
|
||||||
}
|
}
|
||||||
|
|
||||||
this.url = url
|
this.clientUrl = clientUrl
|
||||||
this.isReportLog = params.isReportLog
|
this.isReportLog = params.isReportLog
|
||||||
|
|
||||||
this.env = env || 'XHJ'
|
this.env = env || 'XHJ'
|
||||||
|
|||||||
13
web.md
13
web.md
@ -62,12 +62,13 @@ init(params)
|
|||||||
|
|
||||||
**入参**
|
**入参**
|
||||||
|
|
||||||
| 参数名称 | 数据类型 | 必须 | 描述 |
|
| 参数名称 | 数据类型 | 必须 | 描述 |
|
||||||
|--------------|----------------------|----|---------------------------------|
|
|--------------|----------------------|-----|-----------------------------------------|
|
||||||
| clientId | String | Y | 客户端Id |
|
| clientId | String | Y | 客户端Id |
|
||||||
| clientSecret | String | Y | 客户端密码 |
|
| clientSecret | String | Y | 客户端密码 |
|
||||||
| env | String | Y | 环境('SKY':斯凯环境 'XHJ':鑫泓佳环境) |
|
| env | String | Y | 环境('SKY':斯凯环境 'XHJ':鑫泓佳环境 'LOCAL': 本地环境) |
|
||||||
| accounts | Array\<AccountInfo\> | Y | 账号列表,后续方法中需传入uid,若未传入则默认使用第一个账号 |
|
| clientUrl | String | Y | 客户端URL env等于LOCAL环境必传 其他默认设空字符 |
|
||||||
|
| accounts | Array\<AccountInfo\> | Y | 账号列表,后续方法中需传入uid,若未传入则默认使用第一个账号 |
|
||||||
|
|
||||||
**返回**
|
**返回**
|
||||||
无
|
无
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user