@tplc/business 0.4.104 → 0.4.106

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
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.4.106](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.105...v0.4.106) (2025-05-09)
6
+
7
+ ### [0.4.105](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.104...v0.4.105) (2025-05-09)
8
+
9
+
10
+ ### ✨ Features | 新功能
11
+
12
+ * 对比值对比 ([9673e9a](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/9673e9ae729a0d539bf30d2c9fe48dd151bd119d))
13
+
5
14
  ### [0.4.104](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.103...v0.4.104) (2025-05-09)
6
15
 
7
16
  ### [0.4.103](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.96...v0.4.103) (2025-05-09)
@@ -49,36 +49,41 @@ const useLocation = (onLocation?: (location: UserLocation) => void) => {
49
49
 
50
50
  const getLocation = async (force = false) => {
51
51
  // 如果不是force并且当前位置有值,则不刷新
52
+ console.log('currentLocation.value', currentLocation.value, force)
52
53
  if (!force && currentLocation.value) return
53
54
  if ((await checkLocationPermission()) !== false) {
54
55
  locationIng.value = true
55
- uni.getLocation({
56
- // type: 'gcj02',
57
- // type: 'wgs84',
58
- success: function (res) {
59
- currentUserLatLon.value = res
60
- getUserLocation({
61
- userLongitude: res.longitude.toString(),
62
- userLatitude: res.latitude.toString(),
63
- })
64
- .then((res) => {
65
- currentLocation.value = res.data
66
- if (force) onLocation?.(res.data)
67
- })
68
- .finally(() => {
69
- locationIng.value = false
70
- })
71
- },
72
- fail: function (res) {
73
- console.log('获取位置信息失败:', res)
74
- getUserLocation()
75
- .then((res) => {
76
- currentLocation.value = res.data
77
- })
78
- .finally(() => {
79
- locationIng.value = false
56
+ await new Promise<void>((resolve) => {
57
+ uni.getLocation({
58
+ // type: 'gcj02',
59
+ // type: 'wgs84',
60
+ success: function (res) {
61
+ currentUserLatLon.value = res
62
+ getUserLocation({
63
+ userLongitude: res.longitude.toString(),
64
+ userLatitude: res.latitude.toString(),
80
65
  })
81
- },
66
+ .then((res) => {
67
+ currentLocation.value = res.data
68
+ if (force) onLocation?.(res.data)
69
+ })
70
+ .finally(() => {
71
+ locationIng.value = false
72
+ resolve()
73
+ })
74
+ },
75
+ fail: function (res) {
76
+ console.log('获取位置信息失败:', res)
77
+ getUserLocation()
78
+ .then((res) => {
79
+ currentLocation.value = res.data
80
+ })
81
+ .finally(() => {
82
+ locationIng.value = false
83
+ resolve()
84
+ })
85
+ },
86
+ })
82
87
  })
83
88
  } else {
84
89
  navigateToSettings()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.104",
3
+ "version": "0.4.106",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],