@zfqh/uniapp 0.2.1 → 0.2.2
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 +8 -0
- package/lib/mixins/webview.d.ts +1 -1
- package/lib/mixins/webview.js +28 -17
- package/package.json +2 -2
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.2](http://10.10.10.16/caoben/front-end/compare/@zfqh/uniapp@0.2.1...@zfqh/uniapp@0.2.2) (2026-06-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @zfqh/uniapp
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.2.1](http://10.10.10.16/caoben/front-end/compare/@zfqh/uniapp@0.2.0...@zfqh/uniapp@0.2.1) (2026-06-22)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @zfqh/uniapp
|
package/lib/mixins/webview.d.ts
CHANGED
package/lib/mixins/webview.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Url from 'url-parse';
|
|
2
|
+
import { stringify, parse } from 'qs';
|
|
2
3
|
import { PLATFORM_CODE, IS_WEBVIEW_ENV, SYSTEM_INFO, TYPES } from '../utils/consts';
|
|
3
4
|
import app from '../configs/app';
|
|
4
5
|
import { requestPermission } from '../utils/permit';
|
|
@@ -35,6 +36,7 @@ export default {
|
|
|
35
36
|
app: app.code,
|
|
36
37
|
channel: app.channel,
|
|
37
38
|
platform: PLATFORM_CODE,
|
|
39
|
+
safeBottom: SYSTEM_INFO.safeAreaInsets.bottom,
|
|
38
40
|
};
|
|
39
41
|
if (query.primary) {
|
|
40
42
|
if (String(query.primary).startsWith('#')) {
|
|
@@ -157,10 +159,16 @@ export default {
|
|
|
157
159
|
let url = _url;
|
|
158
160
|
let title = rest.title;
|
|
159
161
|
let src = '';
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
if (_app && web[_app] && /^(https?|file):/.test(web[_app])) {
|
|
163
|
+
const u = new Url(web[_app], true);
|
|
164
|
+
u.set('query', {
|
|
165
|
+
...u.query,
|
|
166
|
+
...parse(this.queryString),
|
|
167
|
+
...rest,
|
|
168
|
+
_: Date.now(),
|
|
169
|
+
});
|
|
170
|
+
u.set('hash', `#${url}`);
|
|
171
|
+
src = u.toString();
|
|
164
172
|
}
|
|
165
173
|
else {
|
|
166
174
|
if (link && link[type]) {
|
|
@@ -172,8 +180,10 @@ export default {
|
|
|
172
180
|
title = _title;
|
|
173
181
|
}
|
|
174
182
|
}
|
|
175
|
-
if (url && /^https
|
|
176
|
-
|
|
183
|
+
if (url && /^(https?|file):/.test(url)) {
|
|
184
|
+
const u = new Url(url, true);
|
|
185
|
+
u.set('query', { ...u.query, _: Date.now() });
|
|
186
|
+
src = u.toString();
|
|
177
187
|
}
|
|
178
188
|
}
|
|
179
189
|
if (title) {
|
|
@@ -193,19 +203,20 @@ export default {
|
|
|
193
203
|
...this.params,
|
|
194
204
|
};
|
|
195
205
|
},
|
|
196
|
-
onShow() {
|
|
206
|
+
async onShow() {
|
|
197
207
|
if (this.$options.mpType === 'app') {
|
|
198
208
|
return;
|
|
199
209
|
}
|
|
200
|
-
this
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
this.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
210
|
+
if (this.changed !== true) {
|
|
211
|
+
await this.$nextTick();
|
|
212
|
+
}
|
|
213
|
+
if (this.changed === true || (this.changed === 'changed' && !path['referrer'])) {
|
|
214
|
+
this.params = {
|
|
215
|
+
...this._params,
|
|
216
|
+
};
|
|
217
|
+
this.initUrl();
|
|
218
|
+
this.changed = false;
|
|
219
|
+
}
|
|
209
220
|
},
|
|
210
221
|
onReady() {
|
|
211
222
|
// #ifdef H5
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zfqh/uniapp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
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": "
|
|
49
|
+
"gitHead": "b2b3df082d25e0bf9a8f8b67f37c7d31863d56ea"
|
|
50
50
|
}
|