feat: 小程序初始化

This commit is contained in:
范鹏 2024-10-12 15:26:50 +08:00
parent 464f57925b
commit 077f431583
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,9 @@
### 1. 安装
在需要引用的项目中执行命令
`git fetch git@code.star-lock.cn:xhj/starcloud-sdk-uniapp.git master`
`git subtree add --prefix=starCloud git@code.star-lock.cn:xhj/starcloud-sdk-uniapp.git master`
更新
`git subtree pull --prefix=starCloud git@code.star-lock.cn:xhj/starcloud-sdk-uniapp.git master`
### 2. 需安装的npm包
`npm install buffer crc js-md5 pinia sm-crypto`
### 3. 使用

View File

@ -182,8 +182,6 @@ export const useStarCloudStore = defineStore('starCloud', {
username,
password
}
setStorage('starCloudUser', {"username":"vridg_Hgn3uuO1Sh36Hc2oI","access_token":"Bh7fBK8gIIsHPmZJG6Jpr4ka0tNHbAVJ3i43v69a","uid":650,"refresh_token":"TguBYKgPu9T0b5V96opXzk0gGaj3hMTpHANVsc1y","scope":"user,key,room","token_type":"Bearer","expires_in":7349225})
setStorage('starCloudToken', 'Bh7fBK8gIIsHPmZJG6Jpr4ka0tNHbAVJ3i43v69a')
const token = getStorage('starCloudToken')
if (token) {