XieHaoLiang 4933c31e28 fix
2024-12-26 15:34:42 +08:00
2024-12-20 17:36:14 +08:00
2024-12-20 19:04:23 +08:00
2024-12-23 15:08:51 +08:00
2024-12-20 09:01:21 +08:00
2024-12-19 16:01:45 +08:00
fix
2024-12-26 15:34:42 +08:00
2024-12-19 16:01:45 +08:00
2024-12-26 09:58:59 +08:00
2024-12-20 19:04:23 +08:00
2024-10-21 09:58:17 +08:00
2024-12-19 17:34:15 +08:00
2024-12-23 11:44:48 +08:00
2024-12-23 11:44:48 +08:00
2024-12-26 09:58:59 +08:00
2024-12-24 15:19:49 +08:00
2024-12-23 11:44:48 +08:00
fix
2024-12-26 15:34:42 +08:00
2024-12-23 17:27:04 +08:00
fix
2024-12-26 15:34:42 +08:00

星云SDK

介绍

星云SDK是一款为开发者打造的智能锁SDK旨在简化与智能锁与星云平台的交互。通过封装底层操作使接入者无需关注锁的操作逻辑能够将更多精力集中在业务开发中。

星云SDK项目可根据不同的打包命令生成用于不同平台的npm包目前支持的平台有uniweb。

文件说明

  • star-cloud星云SDK支持的对外暴露的功能根据功能模块拆分成多个文件
  • uni星云SDK需要的uniapp平台的底层功能如请求、缓存等。index.js为uni平台npm包的入口文件可选择暴露哪些功能到uni平台
  • web星云SDK需要的web平台的底层功能如请求、缓存等。index.js为web平台npm包的入口文件可选择暴露哪些功能到web平台
  • api: 星云内部接口请求地址
  • common: 公共方法
  • constant: 常量
  • env: 环境配置,打包版本设置
  • export.js: 根据不同平台暴露平台支持的功能
  • format.js: 格式化数据相关公共方法
  • log.js: 不同平台的日志上报方法
  • obfuscation.js: 不同平台的混淆打包方法
  • star-cloud.js: StarCloud类

使用方法

  1. 安装npm包
    npm install
    
  2. 打包uni平台npm包
    npm run uni-build
    
    打包web平台npm包
    npm run web-build
    
  3. 发布npm包 进入dist目录执行npm publish命令
    cd dist
    npm publish
    
    若未登录npm账号需先登录
    npm login
    

调试方法

  1. 在测试项目中执行以下命令将星云SDK项目作为子项目添加到测试项目中直接调用对应平台的index.js文件中的方法
    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
    
Description
uniapp开发的微信小程序插件
Readme 229 KiB
Languages
JavaScript 100%