@tplc/business 0.3.40 → 0.3.42
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,25 @@
|
|
|
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.3.42](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.37...v0.3.42) (2025-02-12)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* **release:** 0.3.38 ([c5217bb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c5217bbe78935df6fc86d557fa13a876ffe39ab5))
|
|
11
|
+
* **release:** 0.3.39 ([8f11cfa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8f11cfa82531fe08b28aa60406d29e55abe646bb))
|
|
12
|
+
* **release:** 0.3.40 ([5b0a9c7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5b0a9c72639b69413f9926116e51a52407992e73))
|
|
13
|
+
* **release:** 0.3.41 ([a2a4271](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a2a4271e0e859f0177a2220b0d2c319f5e8ffcbe))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### ✨ Features | 新功能
|
|
17
|
+
|
|
18
|
+
* vip完善样式 ([1aa72cb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1aa72cba21e651469afcf841733a6e9ff5b40a48))
|
|
19
|
+
* 刷新当前页面 ([461f20c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/461f20c7e47e994730713fedeb6d5fde984759aa))
|
|
20
|
+
* 新增btn cancel ([ce2e4f2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ce2e4f27ed09c8432ea1cd6ae9ae589a1103d946))
|
|
21
|
+
|
|
22
|
+
### [0.3.41](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.40...v0.3.41) (2025-02-12)
|
|
23
|
+
|
|
5
24
|
### [0.3.40](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.39...v0.3.40) (2025-02-12)
|
|
6
25
|
|
|
7
26
|
### [0.3.39](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.38...v0.3.39) (2025-02-12)
|
|
@@ -70,7 +70,7 @@ const dayRange = ref([
|
|
|
70
70
|
form.value.endDate ? dayjs(form.value.endDate).valueOf() : dayjs().add(1, 'day').valueOf(),
|
|
71
71
|
])
|
|
72
72
|
const { translate } = useTranslate()
|
|
73
|
-
const { getLocation, userLocation
|
|
73
|
+
const { getLocation, userLocation } = useLocation()
|
|
74
74
|
|
|
75
75
|
watch(
|
|
76
76
|
() => addressCity.value,
|
|
@@ -83,18 +83,7 @@ watch(
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
)
|
|
86
|
-
|
|
87
|
-
() => userLatLon.value,
|
|
88
|
-
(val) => {
|
|
89
|
-
if (!val) return
|
|
90
|
-
form.value.userLatitude = val.latitude
|
|
91
|
-
form.value.userLongitude = val.longitude
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
immediate: true,
|
|
95
|
-
deep: true,
|
|
96
|
-
},
|
|
97
|
-
)
|
|
86
|
+
|
|
98
87
|
watch(
|
|
99
88
|
() => dayRange.value,
|
|
100
89
|
(val) => {
|
package/hooks/useLocation.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { useTranslate } from '@tplc/wot'
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
import { getUserLocation, UserLocation } from './useLocation.api'
|
|
4
|
-
const currentLocation = ref<UserLocation>()
|
|
5
|
-
const currentUserLatLon = ref<UniApp.GetLocationSuccess>()
|
|
4
|
+
export const currentLocation = ref<UserLocation>()
|
|
5
|
+
export const currentUserLatLon = ref<UniApp.GetLocationSuccess>()
|
|
6
6
|
const useLocation = () => {
|
|
7
7
|
const { translate } = useTranslate()
|
|
8
|
-
const userLocation = ref(currentLocation.value)
|
|
9
|
-
const userLatLon = ref(currentUserLatLon.value)
|
|
10
8
|
// 正在获取经纬度
|
|
11
9
|
const locationIng = ref(false)
|
|
12
10
|
// 检查用户是否授权定位
|
|
@@ -58,13 +56,12 @@ const useLocation = () => {
|
|
|
58
56
|
// type: 'gcj02',
|
|
59
57
|
// type: 'wgs84',
|
|
60
58
|
success: function (res) {
|
|
61
|
-
|
|
59
|
+
currentUserLatLon.value = res
|
|
62
60
|
getUserLocation({
|
|
63
61
|
userLongitude: res.longitude.toString(),
|
|
64
62
|
userLatitude: res.latitude.toString(),
|
|
65
63
|
})
|
|
66
64
|
.then((res) => {
|
|
67
|
-
userLocation.value = res.data
|
|
68
65
|
currentLocation.value = res.data
|
|
69
66
|
})
|
|
70
67
|
.finally(() => {
|
|
@@ -80,7 +77,7 @@ const useLocation = () => {
|
|
|
80
77
|
navigateToSettings()
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
|
-
return { getLocation, locationIng, userLocation, userLatLon }
|
|
80
|
+
return { getLocation, locationIng, userLocation: currentLocation, userLatLon: currentUserLatLon }
|
|
84
81
|
}
|
|
85
82
|
|
|
86
83
|
export default useLocation
|
package/package.json
CHANGED
|
@@ -1,31 +1,10 @@
|
|
|
1
|
+
import { UserLocation } from './useLocation.api'
|
|
2
|
+
export declare const currentLocation: import('vue').Ref<UserLocation | undefined>
|
|
3
|
+
export declare const currentUserLatLon: import('vue').Ref<UniApp.GetLocationSuccess | undefined>
|
|
1
4
|
declare const useLocation: () => {
|
|
2
5
|
getLocation: (force?: boolean) => Promise<void>
|
|
3
6
|
locationIng: import('vue').Ref<boolean>
|
|
4
|
-
userLocation: import('vue').Ref<
|
|
5
|
-
|
|
6
|
-
addressInfo: string
|
|
7
|
-
cityId: string
|
|
8
|
-
cityName: string
|
|
9
|
-
haveNotCityId: string
|
|
10
|
-
haveNotCityName: string
|
|
11
|
-
haveNotAddressInfo: string
|
|
12
|
-
haveNotTip: string
|
|
13
|
-
}
|
|
14
|
-
| undefined
|
|
15
|
-
>
|
|
16
|
-
userLatLon: import('vue').Ref<
|
|
17
|
-
| {
|
|
18
|
-
latitude: number
|
|
19
|
-
longitude: number
|
|
20
|
-
speed: number
|
|
21
|
-
accuracy: number
|
|
22
|
-
altitude: number
|
|
23
|
-
verticalAccuracy: number
|
|
24
|
-
horizontalAccuracy: number
|
|
25
|
-
address?: any
|
|
26
|
-
errMsg?: string | undefined
|
|
27
|
-
}
|
|
28
|
-
| undefined
|
|
29
|
-
>
|
|
7
|
+
userLocation: import('vue').Ref<UserLocation | undefined>
|
|
8
|
+
userLatLon: import('vue').Ref<UniApp.GetLocationSuccess | undefined>
|
|
30
9
|
}
|
|
31
10
|
export default useLocation
|