@tplc/business 0.3.39 → 0.3.41

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,10 @@
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.41](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.40...v0.3.41) (2025-02-12)
6
+
7
+ ### [0.3.40](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.39...v0.3.40) (2025-02-12)
8
+
5
9
  ### [0.3.39](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.38...v0.3.39) (2025-02-12)
6
10
 
7
11
 
@@ -77,24 +77,15 @@ watch(
77
77
  (val) => {
78
78
  if (val) {
79
79
  form.value.cityId = val?.cityId
80
+ form.value.userLatitude = userLatLon.value?.latitude
81
+ form.value.userLongitude = userLatLon.value?.longitude
80
82
  if (val.keywords) {
81
83
  form.value.keywords = val.keywords
82
84
  }
83
85
  }
84
86
  },
85
87
  )
86
- watch(
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
- )
88
+
98
89
  watch(
99
90
  () => dayRange.value,
100
91
  (val) => {
@@ -4,7 +4,7 @@
4
4
  v-for="item in buttonList"
5
5
  :key="item.buttonName"
6
6
  @click="link({ item })"
7
- @refresh="$emit('refresh')"
7
+ @refresh="$emit('refresh', { item })"
8
8
  >
9
9
  <wd-button v-bind="getBtnProps(item)" :size="size">{{ item.buttonName }}</wd-button>
10
10
  </lcb-action-view>
@@ -29,7 +29,7 @@
29
29
  <view class="flex-1" v-if="!noIcons"></view>
30
30
  <BtnViews
31
31
  :button-list="buttonList"
32
- @refresh="emits('refresh')"
32
+ @refresh="emits('refresh', $event)"
33
33
  @cancel="emits('cancel')"
34
34
  :size="size"
35
35
  />
@@ -21,6 +21,7 @@ export interface IPageBtn {
21
21
  requestParam?: {
22
22
  orderNo: string
23
23
  }
24
+ refreshCurrentPage?: boolean
24
25
  jumpType?: 1 | 2 | 10 | 11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 88
25
26
  jumpUrl: string
26
27
  requestUrl: string
@@ -5,8 +5,6 @@ const currentLocation = ref<UserLocation>()
5
5
  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
- userLatLon.value = res
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.3.39",
3
+ "version": "0.3.41",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -19,6 +19,7 @@ export interface IPageBtn {
19
19
  requestParam?: {
20
20
  orderNo: string
21
21
  }
22
+ refreshCurrentPage?: boolean
22
23
  jumpType?: 1 | 2 | 10 | 11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 88
23
24
  jumpUrl: string
24
25
  requestUrl: string
@@ -1,31 +1,8 @@
1
+ import { UserLocation } from './useLocation.api'
1
2
  declare const useLocation: () => {
2
3
  getLocation: (force?: boolean) => Promise<void>
3
4
  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
- >
5
+ userLocation: import('vue').Ref<UserLocation | undefined>
6
+ userLatLon: import('vue').Ref<UniApp.GetLocationSuccess | undefined>
30
7
  }
31
8
  export default useLocation