@zfqh/uniapp 0.2.19 → 0.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.2.20](http://10.10.10.16/caoben/front-end/compare/@zfqh/uniapp@0.2.19...@zfqh/uniapp@0.2.20) (2026-06-25)
7
+
8
+ **Note:** Version bump only for package @zfqh/uniapp
9
+
10
+
11
+
12
+
13
+
6
14
  ## [0.2.19](http://10.10.10.16/caoben/front-end/compare/@zfqh/uniapp@0.2.18...@zfqh/uniapp@0.2.19) (2026-06-25)
7
15
 
8
16
  **Note:** Version bump only for package @zfqh/uniapp
@@ -27,7 +27,7 @@ import { checkVersion, installUpdate, restartApp } from '@zfqh/uniapp';
27
27
  检查指定应用是否有新版本可用。
28
28
 
29
29
  ```ts
30
- function checkVersion(appid: string): Promise<VersionInfo | null>
30
+ function checkVersion(appId: string): Promise<VersionInfo | null>
31
31
  ```
32
32
 
33
33
  - 返回 `VersionInfo` 表示有可用更新
@@ -50,7 +50,7 @@ function installUpdate(options: InstallOptions): void
50
50
 
51
51
  ```ts
52
52
  installUpdate({
53
- appid: 'com.example.app',
53
+ appId: 'com.example.app',
54
54
  url: versionInfo.fileUrl || versionInfo.hotUpdateUrl,
55
55
  progress(p) {
56
56
  console.log(`下载进度: ${p}%`);
@@ -117,7 +117,7 @@ interface VersionInfo {
117
117
 
118
118
  ```ts
119
119
  interface InstallOptions {
120
- appid: string;
120
+ appId: string;
121
121
  url: string;
122
122
  progress?: (p: number) => void;
123
123
  success?: () => void;
@@ -127,7 +127,7 @@ interface InstallOptions {
127
127
 
128
128
  | 字段 | 说明 |
129
129
  | --- | --- |
130
- | `appid` | 目标应用 ID |
130
+ | `appId` | 目标应用 ID |
131
131
  | `url` | 安装包下载地址 |
132
132
  | `progress` | 下载进度回调(0-100) |
133
133
  | `success` | 安装成功回调 |
@@ -147,7 +147,7 @@ async function doUpdate() {
147
147
  if (!url) return;
148
148
 
149
149
  installUpdate({
150
- appid: config.app.appId,
150
+ appId: config.app.appId,
151
151
  url,
152
152
  progress(p) {
153
153
  // 更新进度 UI
@@ -65,7 +65,7 @@ export async function checkVersion(appId) {
65
65
  version,
66
66
  appId,
67
67
  type,
68
- platform: { android: 1, ios: 2, windows: 4 }[platform],
68
+ platform: { android: '1', ios: '2', harmony: '3', windows: '4', macos: '5' }[platform],
69
69
  }, { custom: { message: false } });
70
70
  const lastVer = { ...res?.data };
71
71
  // #ifdef APP
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zfqh/uniapp",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "description": "uniapp公共模块",
5
5
  "author": "yinjiazeng@163.com",
6
6
  "license": "MIT",
@@ -46,5 +46,5 @@
46
46
  "@types/qs": "^6.9.16",
47
47
  "@types/url-parse": "^1.4.11"
48
48
  },
49
- "gitHead": "5c4b549af6bc65943179fb99ec1fb7e2641cd610"
49
+ "gitHead": "795623145cc7dc0f0f9f7a1970a7a020b7bef16c"
50
50
  }