@tplc/business 0.2.51 → 0.2.52
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 +7 -0
- package/components/lcb-city-select/api/index.ts +3 -0
- package/components/lcb-city-select/components/lcb-city-letter/index.vue +18 -3
- package/components/lcb-list/components/FilterSlider/index.vue +3 -1
- package/hooks/useLocation.api.ts +4 -0
- package/package.json +1 -1
- package/types/components/lcb-city-select/api/index.d.ts +3 -0
- package/types/hooks/useLocation.api.d.ts +4 -0
- package/types/hooks/useLocation.d.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.2.52](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.51...v0.2.52) (2025-01-02)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 兼容location ([cfeae91](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/cfeae9129e034ecec8055d930255894bfa05ebd9))
|
|
11
|
+
|
|
5
12
|
### [0.2.51](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.50...v0.2.51) (2025-01-02)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export interface HotAddress {
|
|
2
2
|
categoryName: string
|
|
3
3
|
hint?: string
|
|
4
|
+
tips?: string
|
|
4
5
|
childHotAddress: ChildHotAddress[]
|
|
5
6
|
}
|
|
6
7
|
|
|
@@ -11,8 +12,10 @@ export interface ChildHotAddress {
|
|
|
11
12
|
categoryName: string
|
|
12
13
|
createDate?: string
|
|
13
14
|
hotAddressId: string
|
|
15
|
+
icon?: string
|
|
14
16
|
lastModifyDate?: string
|
|
15
17
|
latitude?: string
|
|
18
|
+
className?: string
|
|
16
19
|
cityId: string
|
|
17
20
|
longitude?: string
|
|
18
21
|
weightSort: string
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
class="address-tag"
|
|
27
27
|
:class="{
|
|
28
28
|
'current-address': modelValue && modelValue.cityId === city.cityId,
|
|
29
|
+
[city.className || '']: true,
|
|
29
30
|
}"
|
|
30
31
|
v-for="city in item.childHotAddress"
|
|
31
32
|
:key="city.addr"
|
|
@@ -34,9 +35,17 @@
|
|
|
34
35
|
fontSize: city.addr.length > 4 ? '20rpx' : '24rpx',
|
|
35
36
|
}"
|
|
36
37
|
>
|
|
38
|
+
<wd-icon v-if="city.icon" :name="city.icon" class="mr-0.5" />
|
|
37
39
|
{{ city.addr }}
|
|
38
40
|
</view>
|
|
39
41
|
</view>
|
|
42
|
+
<view
|
|
43
|
+
v-if="item.tips"
|
|
44
|
+
class="flex items-center text-red-5 text-3 gap-1 px-28rpx box-border mt-3"
|
|
45
|
+
>
|
|
46
|
+
<wd-icon name="error-circle" size="28rpx"></wd-icon>
|
|
47
|
+
<view>{{ item.tips }}</view>
|
|
48
|
+
</view>
|
|
40
49
|
</view>
|
|
41
50
|
</wd-index-bar>
|
|
42
51
|
</view>
|
|
@@ -75,11 +84,17 @@ const locationAddress = computed<HotAddress[]>(() => {
|
|
|
75
84
|
{
|
|
76
85
|
categoryName: '定位',
|
|
77
86
|
hint: '当前位置',
|
|
87
|
+
tips: props.location.haveNotTip || '当前地址未开通',
|
|
78
88
|
childHotAddress: [
|
|
79
89
|
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
90
|
+
addr: props.location.haveNotCityName || props.location.cityName,
|
|
91
|
+
cityId: props.location.haveNotCityId || props.location.cityId,
|
|
92
|
+
icon: 'location',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
addr: props.location.haveNotAddressInfo || props.location.addressInfo,
|
|
96
|
+
cityId: props.location.haveNotCityId || props.location.cityId,
|
|
97
|
+
className: 'w-25',
|
|
83
98
|
},
|
|
84
99
|
],
|
|
85
100
|
},
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
custom-class="px-4"
|
|
13
13
|
custom-min-class="left-0 slider-text"
|
|
14
14
|
custom-max-class="right--2 slider-text"
|
|
15
|
+
:active-color="themeColor"
|
|
15
16
|
/>
|
|
16
17
|
<view class="grid grid-cols-4 gap-4 mt-2" v-if="options.length">
|
|
17
18
|
<SelectTagView
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
<script setup lang="ts">
|
|
30
31
|
import { FilterSliderProps } from './types'
|
|
31
32
|
import SelectTagView from '../SelectTagView/index.vue'
|
|
32
|
-
import { onMounted, onUnmounted, ref, watch } from 'vue'
|
|
33
|
+
import { onMounted, onUnmounted, ref, watch, inject } from 'vue'
|
|
33
34
|
import type { SliderInstance } from '@tplc/wot/components/wd-slider/types'
|
|
34
35
|
defineOptions({
|
|
35
36
|
name: 'FilterSlider',
|
|
@@ -39,6 +40,7 @@ defineOptions({
|
|
|
39
40
|
styleIsolation: 'shared',
|
|
40
41
|
},
|
|
41
42
|
})
|
|
43
|
+
const themeColor = inject('theme-color', '#3875FF')
|
|
42
44
|
const slider = ref<SliderInstance>()
|
|
43
45
|
const props = defineProps<FilterSliderProps>()
|
|
44
46
|
const model = defineModel<number[]>()
|
package/hooks/useLocation.api.ts
CHANGED
|
@@ -2,6 +2,10 @@ export interface UserLocation {
|
|
|
2
2
|
addressInfo: string
|
|
3
3
|
cityId: string
|
|
4
4
|
cityName: string
|
|
5
|
+
haveNotCityId: string
|
|
6
|
+
haveNotCityName: string
|
|
7
|
+
haveNotAddressInfo: string
|
|
8
|
+
haveNotTip: string
|
|
5
9
|
}
|
|
6
10
|
export const getUserLocation = (data: { userLongitude: string; userLatitude: string }) =>
|
|
7
11
|
uni.$lcb.http.post<UserLocation>('/hotAddress/userLocation', data)
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export interface HotAddress {
|
|
2
2
|
categoryName: string
|
|
3
3
|
hint?: string
|
|
4
|
+
tips?: string
|
|
4
5
|
childHotAddress: ChildHotAddress[]
|
|
5
6
|
}
|
|
6
7
|
export interface ChildHotAddress {
|
|
@@ -10,8 +11,10 @@ export interface ChildHotAddress {
|
|
|
10
11
|
categoryName: string
|
|
11
12
|
createDate?: string
|
|
12
13
|
hotAddressId: string
|
|
14
|
+
icon?: string
|
|
13
15
|
lastModifyDate?: string
|
|
14
16
|
latitude?: string
|
|
17
|
+
className?: string
|
|
15
18
|
cityId: string
|
|
16
19
|
longitude?: string
|
|
17
20
|
weightSort: string
|
|
@@ -2,6 +2,10 @@ export interface UserLocation {
|
|
|
2
2
|
addressInfo: string
|
|
3
3
|
cityId: string
|
|
4
4
|
cityName: string
|
|
5
|
+
haveNotCityId: string
|
|
6
|
+
haveNotCityName: string
|
|
7
|
+
haveNotAddressInfo: string
|
|
8
|
+
haveNotTip: string
|
|
5
9
|
}
|
|
6
10
|
export declare const getUserLocation: (data: {
|
|
7
11
|
userLongitude: string
|