@zfqh/uniapp 0.3.6 → 0.3.7

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.3.7](http://10.10.10.16/caoben/front-end/compare/@zfqh/uniapp@0.3.6...@zfqh/uniapp@0.3.7) (2026-07-28)
7
+
8
+ **Note:** Version bump only for package @zfqh/uniapp
9
+
10
+
11
+
12
+
13
+
6
14
  ## [0.3.6](http://10.10.10.16/caoben/front-end/compare/@zfqh/uniapp@0.3.5...@zfqh/uniapp@0.3.6) (2026-07-16)
7
15
 
8
16
  **Note:** Version bump only for package @zfqh/uniapp
@@ -2,7 +2,7 @@ import Url from 'url-parse';
2
2
  import { stringify, parse } from 'qs';
3
3
  import { PLATFORM_CODE, IS_WEBVIEW_ENV, SYSTEM_INFO, TYPES } from '../utils/consts';
4
4
  import app from '../configs/app';
5
- import { requestPermission } from '../utils/permit';
5
+ import { requestPermission, openAuthorizeSetting } from '../utils/permit';
6
6
  import web from '../configs/web';
7
7
  import cdn from '../configs/cdn';
8
8
  import link from '../configs/link';
@@ -97,6 +97,11 @@ export default {
97
97
  }
98
98
  break;
99
99
  }
100
+ case TYPES.MESSAGE.PERM_LOCATION:
101
+ case TYPES.MESSAGE.PERM_BLUETOOTH: {
102
+ openAuthorizeSetting(payload.name);
103
+ break;
104
+ }
100
105
  case TYPES.MESSAGE.GET_LOCATION:
101
106
  case TYPES.MESSAGE.OPEN_LOCATION: {
102
107
  const type = TYPES.MESSAGE.GET_LOCATION || TYPES.MESSAGE.OPEN_LOCATION;
@@ -46,6 +46,8 @@ export declare const TYPES: {
46
46
  readonly WEBVIEW_MESSAGE: "WEBVIEW_MESSAGE";
47
47
  readonly APP_RESTART: "APP_RESTART";
48
48
  readonly APP_INSTALL: "APP_INSTALL";
49
+ readonly PERM_LOCATION: "PERM_LOCATION";
50
+ readonly PERM_BLUETOOTH: "PERM_BLUETOOTH";
49
51
  };
50
52
  readonly STORAGE: {
51
53
  readonly APP: "app";
@@ -80,6 +80,8 @@ export const TYPES = {
80
80
  WEBVIEW_MESSAGE: 'WEBVIEW_MESSAGE',
81
81
  APP_RESTART: 'APP_RESTART',
82
82
  APP_INSTALL: 'APP_INSTALL',
83
+ PERM_LOCATION: 'PERM_LOCATION',
84
+ PERM_BLUETOOTH: 'PERM_BLUETOOTH',
83
85
  },
84
86
  STORAGE: {
85
87
  APP: 'app',
@@ -1,5 +1,6 @@
1
1
  import color from '../configs/color';
2
- import { SYSTEM_INFO } from './consts';
2
+ import { SYSTEM_INFO, IS_WEBVIEW_ENV, TYPES } from './consts';
3
+ import { postMessage } from './index';
3
4
  // #ifdef APP
4
5
  import permission from './permission';
5
6
  // #endif
@@ -76,6 +77,14 @@ const requestMpPermission = async (scope) => {
76
77
  };
77
78
  // #endif
78
79
  export function openAuthorizeSetting(name) {
80
+ // #ifdef H5
81
+ if (IS_WEBVIEW_ENV) {
82
+ postMessage({
83
+ type: name === 'location' ? TYPES.MESSAGE.PERM_LOCATION : TYPES.MESSAGE.PERM_BLUETOOTH,
84
+ payload: { name },
85
+ });
86
+ }
87
+ // #endif
79
88
  // #ifdef APP
80
89
  if (SYSTEM_INFO.platform == 'ios') {
81
90
  plus.runtime.openURL('app-settings://');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zfqh/uniapp",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
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": "08aca69006a003f3041048071bde7ad6bec6f093"
49
+ "gitHead": "4fee603e85f702980b72740ddcd91917bcef8430"
50
50
  }