发布uniapp1.0.4+5版本
This commit is contained in:
parent
40828332d2
commit
ff194611a9
18
README.md
18
README.md
@ -44,16 +44,14 @@
|
||||
```
|
||||
|
||||
## 调试方法
|
||||
1. 在测试项目中执行以下命令,将星云SDK项目作为子项目添加到测试项目中,直接调用对应平台的index.js文件中的方法
|
||||
1. 执行想要调试的平台命令
|
||||
```shell
|
||||
npm run web-build
|
||||
npm run uni-build
|
||||
```
|
||||
git subtree add --prefix=starCloud git@code.star-lock.cn:StarlockTeam/starcloud-sdk-uniapp.git master
|
||||
```
|
||||
2. 更新子项目
|
||||
```
|
||||
git subtree pull --prefix=starCloud git@code.star-lock.cn:StarlockTeam/starcloud-sdk-uniapp.git master
|
||||
```
|
||||
3. 推送子项目
|
||||
```
|
||||
git subtree push --prefix=starCloud git@code.star-lock.cn:StarlockTeam/starcloud-sdk-uniapp.git master
|
||||
2. 将项目与调试项目放在同级目录下,在调试项目中执行npm命令
|
||||
```shell
|
||||
npm install ../[项目名称]
|
||||
```
|
||||
3. 即可在调试项目中用调用正式版npm包方法进行调试
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import {
|
||||
convertWeekdaysToNumber,
|
||||
createPackageEnd,
|
||||
md5Encrypt,
|
||||
removeTrailingZeros,
|
||||
timestampToArray,
|
||||
uint8ArrayToString
|
||||
} from './format'
|
||||
@ -787,9 +788,9 @@ export async function parsingCharacteristicValue(binaryData) {
|
||||
176 + decrypted[174] + decrypted[175 + decrypted[174]]
|
||||
)
|
||||
),
|
||||
featureSettingParams: Array.from(
|
||||
featureSettingParams: removeTrailingZeros(Array.from(
|
||||
decrypted.slice(176 + decrypted[174] + decrypted[175 + decrypted[174]])
|
||||
),
|
||||
)),
|
||||
lockConfig
|
||||
})
|
||||
console.log('获取锁状态成功', this.lockInfo.lockConfig)
|
||||
|
||||
4
env.js
4
env.js
@ -1,7 +1,7 @@
|
||||
// uni版本号
|
||||
export const uniVersion = '1.0.3'
|
||||
export const uniVersion = '1.0.4'
|
||||
// uni构建号
|
||||
export const uniBuildNumber = 4
|
||||
export const uniBuildNumber = 5
|
||||
|
||||
// web版本号
|
||||
export const webVersion = '1.0.1'
|
||||
|
||||
11
format.js
11
format.js
@ -77,3 +77,14 @@ export function uint8ArrayToString(uint8Array) {
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
// 去除特征值尾部0
|
||||
export function removeTrailingZeros(data) {
|
||||
const featureCount = data[0]
|
||||
let currentIndex = 1
|
||||
for (let i = 0; i < featureCount; i++) {
|
||||
const length = data[currentIndex + 1]
|
||||
currentIndex += 2 + length
|
||||
}
|
||||
return data.slice(0, currentIndex)
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "star-cloud-uni",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"type": "module",
|
||||
"main": "./web/index.js",
|
||||
"main": "./uni/index.js",
|
||||
"author": "zzc059",
|
||||
"scripts": {
|
||||
"web-build": "node obfuscate-web.js",
|
||||
|
||||
70
uni.md
70
uni.md
@ -607,3 +607,73 @@ removeBadLock(params)
|
||||
|
||||
**返回**
|
||||
无
|
||||
|
||||
|
||||
# 电表
|
||||
|
||||
## 更新电表信息
|
||||
|
||||
**调用方法**
|
||||
|
||||
```javascript
|
||||
import { refreshElecInfo } from 'star-cloud-web'
|
||||
|
||||
refreshElecInfo(params)
|
||||
```
|
||||
|
||||
**入参**
|
||||
|
||||
| 参数名称 | 数据类型 | 必须 | 描述 |
|
||||
|--------|--------|----|-------|
|
||||
| uid | Number | N | 用户uid |
|
||||
| elecId | Number | Y | 电表ID |
|
||||
|
||||
**返回**
|
||||
无
|
||||
|
||||
|
||||
# 冷水表
|
||||
|
||||
## 更新冷水表信息
|
||||
|
||||
**调用方法**
|
||||
|
||||
```javascript
|
||||
import { refreshColdWaterInfo } from 'star-cloud-web'
|
||||
|
||||
refreshColdWaterInfo(params)
|
||||
```
|
||||
|
||||
**入参**
|
||||
|
||||
| 参数名称 | 数据类型 | 必须 | 描述 |
|
||||
|---------|--------|----|-------|
|
||||
| uid | Number | N | 用户uid |
|
||||
| waterId | Number | Y | 冷水表ID |
|
||||
|
||||
**返回**
|
||||
无
|
||||
|
||||
|
||||
|
||||
# 热水表
|
||||
|
||||
## 更新热水表信息
|
||||
|
||||
**调用方法**
|
||||
|
||||
```javascript
|
||||
import { refreshHotWaterInfo } from 'star-cloud-web'
|
||||
|
||||
refreshHotWaterInfo(params)
|
||||
```
|
||||
|
||||
**入参**
|
||||
|
||||
| 参数名称 | 数据类型 | 必须 | 描述 |
|
||||
|---------|--------|----|-------|
|
||||
| uid | Number | N | 用户uid |
|
||||
| waterId | Number | Y | 热水表ID |
|
||||
|
||||
**返回**
|
||||
无
|
||||
|
||||
34
uni/index.js
34
uni/index.js
@ -228,3 +228,37 @@ export const getServerTime = async () => {
|
||||
export const getLockSupportFeatures = async params => {
|
||||
return await starCloudInstance.getLockSupportFeatures(params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 电表-刷新电表信息
|
||||
* @param params
|
||||
* @param {Number} [params.uid] 用户ID
|
||||
* @param {Number} params.elecId 用户ID
|
||||
* @returns Result
|
||||
*/
|
||||
export const refreshElecInfo = async params => {
|
||||
return await starCloudInstance.refreshElecInfo(params)
|
||||
}
|
||||
|
||||
/**
|
||||
* 冷水表-刷新水表信息
|
||||
* @param params
|
||||
* @param {Number} [params.uid] 用户ID
|
||||
* @param {Number} params.waterId 冷水表ID
|
||||
* @returns Result
|
||||
*/
|
||||
export const refreshColdWaterInfo = async params => {
|
||||
return await starCloudInstance.refreshColdWaterInfo(params)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 热水表-刷新水表信息
|
||||
* @param params
|
||||
* @param {Number} [params.uid] 用户ID
|
||||
* @param {Number} params.waterId 热水表ID
|
||||
* @returns Result
|
||||
*/
|
||||
export const refreshHotWaterInfo = async params => {
|
||||
return await starCloudInstance.refreshHotWaterInfo(params)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user