@hlw-uni/mp-vue 2.2.6 → 2.2.8
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/dist/index.js
CHANGED
|
@@ -685,9 +685,9 @@ var __publicField = (obj, key, value) => {
|
|
|
685
685
|
return {
|
|
686
686
|
appid: getAppid(device),
|
|
687
687
|
app_name: app.appName || "",
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
688
|
+
version: app.appVersion || "",
|
|
689
|
+
version_code: app.appVersionCode || "",
|
|
690
|
+
channel: app.appChannel || "",
|
|
691
691
|
device_brand: device.brand || "",
|
|
692
692
|
device_model: device.model || "",
|
|
693
693
|
device_id: device.deviceId || "",
|
|
@@ -709,8 +709,7 @@ var __publicField = (obj, key, value) => {
|
|
|
709
709
|
host_language: app.hostLanguage || "",
|
|
710
710
|
host_theme: app.hostTheme || "",
|
|
711
711
|
platform: device.platform || "",
|
|
712
|
-
language: app.language || ""
|
|
713
|
-
version: app.version || ""
|
|
712
|
+
language: app.language || ""
|
|
714
713
|
};
|
|
715
714
|
}
|
|
716
715
|
function getAppid(device) {
|
|
@@ -733,14 +732,14 @@ var __publicField = (obj, key, value) => {
|
|
|
733
732
|
platform: info.platform,
|
|
734
733
|
system: info.system,
|
|
735
734
|
os: info.os,
|
|
736
|
-
version: info.version,
|
|
737
735
|
sdk_version: info.sdk_version,
|
|
738
736
|
host_name: info.host_name,
|
|
739
737
|
host_version: info.host_version,
|
|
740
738
|
host_language: info.host_language,
|
|
741
739
|
language: info.language,
|
|
742
|
-
|
|
743
|
-
|
|
740
|
+
version: info.version,
|
|
741
|
+
version_code: info.version_code,
|
|
742
|
+
channel: info.channel,
|
|
744
743
|
screen_width: info.screen_width,
|
|
745
744
|
screen_height: info.screen_height
|
|
746
745
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -684,9 +684,9 @@ function collectDevice() {
|
|
|
684
684
|
return {
|
|
685
685
|
appid: getAppid(device),
|
|
686
686
|
app_name: app.appName || "",
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
687
|
+
version: app.appVersion || "",
|
|
688
|
+
version_code: app.appVersionCode || "",
|
|
689
|
+
channel: app.appChannel || "",
|
|
690
690
|
device_brand: device.brand || "",
|
|
691
691
|
device_model: device.model || "",
|
|
692
692
|
device_id: device.deviceId || "",
|
|
@@ -708,8 +708,7 @@ function collectDevice() {
|
|
|
708
708
|
host_language: app.hostLanguage || "",
|
|
709
709
|
host_theme: app.hostTheme || "",
|
|
710
710
|
platform: device.platform || "",
|
|
711
|
-
language: app.language || ""
|
|
712
|
-
version: app.version || ""
|
|
711
|
+
language: app.language || ""
|
|
713
712
|
};
|
|
714
713
|
}
|
|
715
714
|
function getAppid(device) {
|
|
@@ -732,14 +731,14 @@ function getQueryInfo(info) {
|
|
|
732
731
|
platform: info.platform,
|
|
733
732
|
system: info.system,
|
|
734
733
|
os: info.os,
|
|
735
|
-
version: info.version,
|
|
736
734
|
sdk_version: info.sdk_version,
|
|
737
735
|
host_name: info.host_name,
|
|
738
736
|
host_version: info.host_version,
|
|
739
737
|
host_language: info.host_language,
|
|
740
738
|
language: info.language,
|
|
741
|
-
|
|
742
|
-
|
|
739
|
+
version: info.version,
|
|
740
|
+
version_code: info.version_code,
|
|
741
|
+
channel: info.channel,
|
|
743
742
|
screen_width: info.screen_width,
|
|
744
743
|
screen_height: info.screen_height
|
|
745
744
|
};
|
|
@@ -7,11 +7,11 @@ export interface DeviceInfo {
|
|
|
7
7
|
/** 应用名称 */
|
|
8
8
|
app_name: string;
|
|
9
9
|
/** 小程序版本号(版本名称) */
|
|
10
|
-
|
|
10
|
+
version: string;
|
|
11
11
|
/** 小程序版本号(版本号) */
|
|
12
|
-
|
|
12
|
+
version_code: string;
|
|
13
13
|
/** 小程序来源渠道 */
|
|
14
|
-
|
|
14
|
+
channel: string;
|
|
15
15
|
/** 设备 brand。如:apple、huawei */
|
|
16
16
|
device_brand: string;
|
|
17
17
|
/** 设备型号 */
|
|
@@ -56,13 +56,11 @@ export interface DeviceInfo {
|
|
|
56
56
|
platform: string;
|
|
57
57
|
/** 客户端语言 */
|
|
58
58
|
language: string;
|
|
59
|
-
/** 客户端版本号 */
|
|
60
|
-
version: string;
|
|
61
59
|
}
|
|
62
60
|
/**
|
|
63
61
|
* 过滤后常用于接口公共请求 Query 的设备字段子集。
|
|
64
62
|
*/
|
|
65
|
-
export type DeviceQueryInfo = Pick<DeviceInfo, "appid" | "device_brand" | "device_model" | "device_id" | "device_type" | "device_orientation" | "platform" | "system" | "os" | "
|
|
63
|
+
export type DeviceQueryInfo = Pick<DeviceInfo, "appid" | "device_brand" | "device_model" | "device_id" | "device_type" | "device_orientation" | "platform" | "system" | "os" | "sdk_version" | "host_name" | "host_version" | "host_language" | "language" | "version" | "version_code" | "channel" | "screen_width" | "screen_height">;
|
|
66
64
|
/**
|
|
67
65
|
* 获取缓存后的设备信息数据。
|
|
68
66
|
*/
|
package/package.json
CHANGED
|
@@ -13,11 +13,11 @@ export interface DeviceInfo {
|
|
|
13
13
|
/** 应用名称 */
|
|
14
14
|
app_name: string;
|
|
15
15
|
/** 小程序版本号(版本名称) */
|
|
16
|
-
|
|
16
|
+
version: string;
|
|
17
17
|
/** 小程序版本号(版本号) */
|
|
18
|
-
|
|
18
|
+
version_code: string;
|
|
19
19
|
/** 小程序来源渠道 */
|
|
20
|
-
|
|
20
|
+
channel: string;
|
|
21
21
|
/** 设备 brand。如:apple、huawei */
|
|
22
22
|
device_brand: string;
|
|
23
23
|
/** 设备型号 */
|
|
@@ -62,33 +62,14 @@ export interface DeviceInfo {
|
|
|
62
62
|
platform: string;
|
|
63
63
|
/** 客户端语言 */
|
|
64
64
|
language: string;
|
|
65
|
-
/** 客户端版本号 */
|
|
66
|
-
version: string;
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
/**
|
|
70
68
|
* 过滤后常用于接口公共请求 Query 的设备字段子集。
|
|
71
69
|
*/
|
|
72
|
-
export type DeviceQueryInfo = Pick<
|
|
73
|
-
|
|
74
|
-
| "device_brand"
|
|
75
|
-
| "device_model"
|
|
76
|
-
| "device_id"
|
|
77
|
-
| "device_type"
|
|
78
|
-
| "device_orientation"
|
|
79
|
-
| "platform"
|
|
80
|
-
| "system"
|
|
81
|
-
| "os"
|
|
82
|
-
| "version"
|
|
83
|
-
| "sdk_version"
|
|
84
|
-
| "host_name"
|
|
85
|
-
| "host_version"
|
|
86
|
-
| "host_language"
|
|
87
|
-
| "language"
|
|
88
|
-
| "app_version"
|
|
89
|
-
| "app_version_code"
|
|
90
|
-
| "screen_width"
|
|
91
|
-
| "screen_height"
|
|
70
|
+
export type DeviceQueryInfo = Pick<
|
|
71
|
+
DeviceInfo,
|
|
72
|
+
"appid" | "device_brand" | "device_model" | "device_id" | "device_type" | "device_orientation" | "platform" | "system" | "os" | "sdk_version" | "host_name" | "host_version" | "host_language" | "language" | "version" | "version_code" | "channel" | "screen_width" | "screen_height"
|
|
92
73
|
>;
|
|
93
74
|
|
|
94
75
|
let deviceCache: DeviceInfo | null = null;
|
|
@@ -126,9 +107,9 @@ function collectDevice(): DeviceInfo {
|
|
|
126
107
|
return {
|
|
127
108
|
appid: getAppid(device),
|
|
128
109
|
app_name: (app.appName as string) || "",
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
110
|
+
version: (app.appVersion as string) || "",
|
|
111
|
+
version_code: (app.appVersionCode as string) || "",
|
|
112
|
+
channel: (app.appChannel as string) || "",
|
|
132
113
|
device_brand: (device.brand as string) || "",
|
|
133
114
|
device_model: (device.model as string) || "",
|
|
134
115
|
device_id: (device.deviceId as string) || "",
|
|
@@ -151,7 +132,6 @@ function collectDevice(): DeviceInfo {
|
|
|
151
132
|
host_theme: (app.hostTheme as string) || "",
|
|
152
133
|
platform: (device.platform as string) || "",
|
|
153
134
|
language: (app.language as string) || "",
|
|
154
|
-
version: (app.version as string) || "",
|
|
155
135
|
};
|
|
156
136
|
}
|
|
157
137
|
|
|
@@ -181,14 +161,14 @@ function getQueryInfo(info: DeviceInfo): DeviceQueryInfo {
|
|
|
181
161
|
platform: info.platform,
|
|
182
162
|
system: info.system,
|
|
183
163
|
os: info.os,
|
|
184
|
-
version: info.version,
|
|
185
164
|
sdk_version: info.sdk_version,
|
|
186
165
|
host_name: info.host_name,
|
|
187
166
|
host_version: info.host_version,
|
|
188
167
|
host_language: info.host_language,
|
|
189
168
|
language: info.language,
|
|
190
|
-
|
|
191
|
-
|
|
169
|
+
version: info.version,
|
|
170
|
+
version_code: info.version_code,
|
|
171
|
+
channel: info.channel,
|
|
192
172
|
screen_width: info.screen_width,
|
|
193
173
|
screen_height: info.screen_height,
|
|
194
174
|
};
|