@tplc/business 0.4.130 → 0.4.132
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,21 @@
|
|
|
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.132](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.131...v0.4.132) (2025-06-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 新增默认值 ([77346b6](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/77346b60fde8a78bb1a095c852474481d7be73f9))
|
|
11
|
+
* 调整定位 ([2d796a0](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2d796a0d84c74584077f240c11d1433b8a5746ef))
|
|
12
|
+
|
|
13
|
+
### [0.4.131](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.130...v0.4.131) (2025-06-17)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### ✨ Features | 新功能
|
|
17
|
+
|
|
18
|
+
* version ([3088428](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/3088428b0dc76797651d51d050d264497f125df6))
|
|
19
|
+
|
|
5
20
|
### [0.4.130](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.129...v0.4.130) (2025-06-17)
|
|
6
21
|
|
|
7
22
|
|
|
@@ -55,10 +55,10 @@ const props = withDefaults(defineProps<LcbProductItemProps>(), {
|
|
|
55
55
|
blurSize: 5,
|
|
56
56
|
itemVerticalPadding: 0,
|
|
57
57
|
itemHorizontalPadding: 0,
|
|
58
|
-
itemContentPt:
|
|
59
|
-
itemContentPr:
|
|
60
|
-
itemContentPb:
|
|
61
|
-
itemContentPl:
|
|
58
|
+
itemContentPt: 0,
|
|
59
|
+
itemContentPr: 0,
|
|
60
|
+
itemContentPb: 10,
|
|
61
|
+
itemContentPl: 0,
|
|
62
62
|
})
|
|
63
63
|
const attrs = useAttrs() as Record<string, any>
|
|
64
64
|
provide('lcb-product-item-props', props)
|
package/hooks/useLocation.ts
CHANGED
|
@@ -20,10 +20,10 @@ const useLocation = (onLocation?: (location: UserLocation) => void) => {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
// 引导用户前往设置页面重新授权
|
|
23
|
-
function navigateToSettings() {
|
|
23
|
+
function navigateToSettings(forceSetting = false) {
|
|
24
24
|
/** 48小时提醒一次 */
|
|
25
25
|
const lastTime = uni.getStorageSync('location_last_time')
|
|
26
|
-
if (lastTime && new Date().getTime() - lastTime < 48 * 60 * 60 * 1000) {
|
|
26
|
+
if (lastTime && new Date().getTime() - lastTime < 48 * 60 * 60 * 1000 && !forceSetting) {
|
|
27
27
|
return
|
|
28
28
|
}
|
|
29
29
|
uni.setStorageSync('location_last_time', new Date().getTime())
|
|
@@ -47,7 +47,7 @@ const useLocation = (onLocation?: (location: UserLocation) => void) => {
|
|
|
47
47
|
})
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
const getLocation = async (force = false) => {
|
|
50
|
+
const getLocation = async (force = false, forceSetting = false) => {
|
|
51
51
|
// 如果不是force并且当前位置有值,则不刷新
|
|
52
52
|
if (!force && currentLocation.value) return
|
|
53
53
|
if ((await checkLocationPermission()) !== false) {
|
|
@@ -85,7 +85,7 @@ const useLocation = (onLocation?: (location: UserLocation) => void) => {
|
|
|
85
85
|
})
|
|
86
86
|
})
|
|
87
87
|
} else {
|
|
88
|
-
navigateToSettings()
|
|
88
|
+
navigateToSettings(forceSetting)
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
return { getLocation, locationIng, userLocation: currentLocation, userLatLon: currentUserLatLon }
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { UserLocation } from './useLocation.api'
|
|
|
2
2
|
export declare const currentLocation: import('vue').Ref<UserLocation | undefined>
|
|
3
3
|
export declare const currentUserLatLon: import('vue').Ref<UniApp.GetLocationSuccess | undefined>
|
|
4
4
|
declare const useLocation: (onLocation?: (location: UserLocation) => void) => {
|
|
5
|
-
getLocation: (force?: boolean) => Promise<void>
|
|
5
|
+
getLocation: (force?: boolean, forceSetting?: boolean) => Promise<void>
|
|
6
6
|
locationIng: import('vue').Ref<boolean>
|
|
7
7
|
userLocation: import('vue').Ref<UserLocation | undefined>
|
|
8
8
|
userLatLon: import('vue').Ref<UniApp.GetLocationSuccess | undefined>
|