@tplc/business 0.4.1 → 0.4.3

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,16 @@
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.3](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.2...v0.4.3) (2025-03-23)
6
+
7
+ ### [0.4.2](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.1...v0.4.2) (2025-03-23)
8
+
9
+
10
+ ### ✨ Features | 新功能
11
+
12
+ * 修改接口 ([d3a0193](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/d3a01931b2a4f86b992d9df0e390ce3bf5870cf4))
13
+ * 调整过滤选择 ([764ce1f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/764ce1f68a6a851777835ea0ff5f0d588c715937))
14
+
5
15
  ### [0.4.1](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.101...v0.4.1) (2025-03-22)
6
16
 
7
17
  ### [0.3.101](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.100...v0.3.101) (2025-03-22)
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <lcb-block></lcb-block>
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+ import { LcbCalendarFilterProps } from './types'
7
+ defineOptions({
8
+ name: 'LcbCalendarFilter',
9
+ options: {
10
+ addGlobalClass: true,
11
+ virtualHost: true,
12
+ styleIsolation: 'shared',
13
+ },
14
+ })
15
+ withDefaults(defineProps<LcbCalendarFilterProps>(), {})
16
+ </script>
17
+
18
+ <style lang="scss" scoped></style>
@@ -0,0 +1,3 @@
1
+ export interface LcbCalendarFilterProps {
2
+ // Define the component's prop types here
3
+ }
@@ -4,7 +4,7 @@
4
4
  class="flex flex-1 text-[var(--content-color)] rounded-16rpx bg-#F5F5F7 h-78rpx flex items-center px-3 text-[28rpx]"
5
5
  >
6
6
  <lcb-city-select :location="userLocation" v-model="addressCity">
7
- <view class="max-w-13 truncate">{{ addressCity?.addr || '全国' }}</view>
7
+ <view class="max-w-13 truncate">{{ addressCity?.addressName || '全国' }}</view>
8
8
  </lcb-city-select>
9
9
  <view class="v-line"></view>
10
10
  <lcb-calendar v-model="dayRange">
@@ -6,8 +6,10 @@ export interface HotAddress {
6
6
  }
7
7
 
8
8
  export interface ChildHotAddress {
9
- addr: string
9
+ addressName: string
10
10
  addrFlag?: boolean
11
+ // 1 是以前的 true ,等于 2 是热门地址,等于 3 是商圈
12
+ addressType?: string
11
13
  area?: string
12
14
  categoryName?: string
13
15
  createDate?: string
@@ -23,10 +25,12 @@ export interface ChildHotAddress {
23
25
  weightSort?: string
24
26
  addressInfo?: string
25
27
  }
26
- export const getHotAddress = () => uni.$lcb.http.post<HotAddress[]>('/hotAddress/categoryList', {})
28
+ export const getHotAddress = () => uni.$lcb.http.post<HotAddress[]>('/address/categoryList', {})
27
29
  export interface LcbAddress {
28
- addr: string
30
+ addressName: string
29
31
  addrFlag: boolean
32
+ // 1 是以前的 true ,等于 2 是热门地址,等于 3 是商圈
33
+ addressType: string
30
34
  categoryName: string
31
35
  keywords?: string
32
36
  cityId: string
@@ -36,7 +40,7 @@ export interface LcbAddress {
36
40
  area: string
37
41
  weightSort: string
38
42
  }
39
- export const getAddressList = (addr: string) =>
40
- uni.$lcb.http.post<LcbAddress[]>('/hotAddress/list', {
41
- addr,
43
+ export const getAddressList = (addressName: string) =>
44
+ uni.$lcb.http.post<LcbAddress[]>('/address/list', {
45
+ addressName,
42
46
  })
@@ -28,18 +28,19 @@
28
28
  :class="{
29
29
  'current-address':
30
30
  modelValue &&
31
- `${modelValue.addr},${modelValue.keywords}` === `${city.addr},${city.keywords}`,
31
+ `${modelValue.addressName},${modelValue.keywords}` ===
32
+ `${city.addressName},${city.keywords}`,
32
33
  [city.className || '']: true,
33
34
  }"
34
35
  v-for="city in item.childHotAddress"
35
36
  @click="onAddrClick(city, item.categoryName.includes('字母'))"
36
37
  :style="{
37
- fontSize: city?.addr?.length > 4 ? '20rpx' : '24rpx',
38
+ fontSize: city?.addressName?.length > 4 ? '20rpx' : '24rpx',
38
39
  }"
39
40
  >
40
41
  <view class="tag-view">
41
42
  <wd-icon v-if="city.icon" :name="city.icon" class="mr-0.5" />
42
- {{ city.keywords ? `${city.keywords},` : '' }} {{ city.addr }}
43
+ {{ city.keywords ? `${city.keywords},` : '' }} {{ city.addressName }}
43
44
  </view>
44
45
  </view>
45
46
  </view>
@@ -90,13 +91,13 @@ const locationAddress = computed<HotAddress[]>(() => {
90
91
  tips: props.location.haveNotTip,
91
92
  childHotAddress: [
92
93
  {
93
- addr: props.location.haveNotCityName || props.location.cityName,
94
+ addressName: props.location.haveNotCityName || props.location.cityName,
94
95
  cityId: props.location.haveNotCityId || props.location.cityId,
95
96
  areaId: props.location.areaId,
96
97
  icon: 'location',
97
98
  },
98
99
  {
99
- addr: props.location.haveNotAddressInfo || props.location.addressInfo,
100
+ addressName: props.location.haveNotAddressInfo || props.location.addressInfo,
100
101
  cityId: props.location.haveNotCityId || props.location.cityId,
101
102
  areaId: props.location.areaId,
102
103
  className: 'w-25',
@@ -121,7 +122,7 @@ const historyLetter = computed<HotAddress[]>(() => {
121
122
 
122
123
  const onAddrClick = (city: ChildHotAddress, letter = false) => {
123
124
  if (letter) {
124
- indexBarRef.value?.scrollToIndex(city.addr)
125
+ indexBarRef.value?.scrollToIndex(city.addressName)
125
126
  return
126
127
  }
127
128
  const currentCity = {
@@ -132,7 +133,8 @@ const onAddrClick = (city: ChildHotAddress, letter = false) => {
132
133
  historyList.value =
133
134
  historyList.value?.filter(
134
135
  (historyItem) =>
135
- `${historyItem.keywords},${historyItem.addr}` !== `${city.keywords},${city.addr}`,
136
+ `${historyItem.keywords},${historyItem.addressName}` !==
137
+ `${city.keywords},${city.addressName}`,
136
138
  ) || []
137
139
  if (historyList.value.length === 8) {
138
140
  historyList.value = [currentCity as unknown as LcbAddress, ...historyList.value.slice(0, 7)]
@@ -147,7 +149,7 @@ const indexBars = computed<HotAddress[]>(() => {
147
149
  categoryName: '字母索引',
148
150
  childHotAddress: letterList.value.map((v) => {
149
151
  return {
150
- addr: v,
152
+ addressName: v,
151
153
  cityId: v,
152
154
  }
153
155
  }),
@@ -23,7 +23,7 @@
23
23
  class="history-tag"
24
24
  >
25
25
  {{ item.keywords ? `${item.keywords},` : '' }}
26
- {{ item.addr }}
26
+ {{ item.addressName }}
27
27
  </view>
28
28
  </view>
29
29
  </view>
@@ -58,10 +58,10 @@ const getText = (text: string) => {
58
58
  return `<div class="flex">${str}</div>`
59
59
  }
60
60
  const onItemClick = (item: LcbAddress) => {
61
- const addr = `${item.keywords},${item.addr}`
61
+ const addr = `${item.keywords},${item.addressName}`
62
62
  historyList.value =
63
63
  historyList.value?.filter(
64
- (historyItem) => `${historyItem.keywords},${historyItem.addr}` !== addr,
64
+ (historyItem) => `${historyItem.keywords},${historyItem.addressName}` !== addr,
65
65
  ) || []
66
66
  historyList.value.unshift(item)
67
67
  emits('click', item)
@@ -113,7 +113,7 @@ watch(
113
113
  if (val && !modelValue.value) {
114
114
  modelValue.value = {
115
115
  addressInfo: val.addressInfo,
116
- addr: val.showName || val.cityName,
116
+ addressName: val.showName || val.cityName,
117
117
  cityId: val.cityId,
118
118
  areaId: val.areaId,
119
119
  } as ChildHotAddress
@@ -31,7 +31,7 @@
31
31
  <lcb-city-select :location="userLocation" v-model="addressCity">
32
32
  <view class="flex items-center gap-16rpx">
33
33
  <view class="text-30rpx max-w-13 truncate">
34
- {{ addressCity?.addr || '全国' }}
34
+ {{ addressCity?.addressName || '全国' }}
35
35
  </view>
36
36
  <img
37
37
  class="w-30rpx h-30rpx"
@@ -146,7 +146,7 @@ const form = reactive({
146
146
  endDate: '',
147
147
  cityId: '',
148
148
  areaId: '',
149
- addr: '',
149
+ addressName: '',
150
150
  cityName: '',
151
151
  })
152
152
 
@@ -177,7 +177,7 @@ watchEffect(() => {
177
177
  if (addressCity.value) {
178
178
  form.cityId = addressCity.value.cityId
179
179
  form.areaId = addressCity.value.areaId
180
- form.addr = addressCity.value.addr
180
+ form.addressName = addressCity.value.addressName
181
181
  if (addressCity.value.keywords) {
182
182
  form.keywords = addressCity.value.keywords
183
183
  }
@@ -27,7 +27,7 @@
27
27
  fontSize: transformValueUnit(citySize),
28
28
  }"
29
29
  >
30
- {{ addressCity?.addr || '全国' }}
30
+ {{ addressCity?.addressName || '全国' }}
31
31
  </view>
32
32
  <view
33
33
  :style="{
package/global.d.ts CHANGED
@@ -11,6 +11,7 @@ declare module 'vue' {
11
11
  'lcb-block': (typeof import('@tplc/business/components/lcb-block/lcb-block.vue'))['default']
12
12
  'lcb-button': (typeof import('@tplc/business/components/lcb-button/lcb-button.vue'))['default']
13
13
  'lcb-calendar': (typeof import('@tplc/business/components/lcb-calendar/lcb-calendar.vue'))['default']
14
+ 'lcb-calendar-filter': (typeof import('@tplc/business/components/lcb-calendar-filter/lcb-calendar-filter.vue'))['default']
14
15
  'lcb-calendar-search': (typeof import('@tplc/business/components/lcb-calendar-search/lcb-calendar-search.vue'))['default']
15
16
  'lcb-city-select': (typeof import('@tplc/business/components/lcb-city-select/lcb-city-select.vue'))['default']
16
17
  'lcb-dynamic-data': (typeof import('@tplc/business/components/lcb-dynamic-data/lcb-dynamic-data.vue'))['default']
@@ -35,7 +36,6 @@ declare module 'vue' {
35
36
  'lcb-search': (typeof import('@tplc/business/components/lcb-search/lcb-search.vue'))['default']
36
37
  'lcb-swiper': (typeof import('@tplc/business/components/lcb-swiper/lcb-swiper.vue'))['default']
37
38
  'lcb-tabs': (typeof import('@tplc/business/components/lcb-tabs/lcb-tabs.vue'))['default']
38
- 'lcb-tags': (typeof import('@tplc/business/components/lcb-tags/lcb-tags.vue'))['default']
39
39
  'lcb-text': (typeof import('@tplc/business/components/lcb-text/lcb-text.vue'))['default']
40
40
  'lcb-title': (typeof import('@tplc/business/components/lcb-title/lcb-title.vue'))['default']
41
41
  'lcb-user-order': (typeof import('@tplc/business/components/lcb-user-order/lcb-user-order.vue'))['default']
@@ -10,4 +10,4 @@ export interface UserLocation {
10
10
  showName: string
11
11
  }
12
12
  export const getUserLocation = (data: { userLongitude: string; userLatitude: string }) =>
13
- uni.$lcb.http.post<UserLocation>('/hotAddress/userLocation', data)
13
+ uni.$lcb.http.post<UserLocation>('/address/userLocation', data)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -0,0 +1,32 @@
1
+ declare const _default: import('vue').DefineComponent<
2
+ Readonly<
3
+ import('vue').ComponentPropsOptions<{
4
+ [x: string]: unknown
5
+ }>
6
+ >,
7
+ {},
8
+ unknown,
9
+ {},
10
+ {},
11
+ import('vue').ComponentOptionsMixin,
12
+ import('vue').ComponentOptionsMixin,
13
+ {},
14
+ string,
15
+ import('vue').PublicProps,
16
+ | readonly string[]
17
+ | Readonly<
18
+ import('vue').ExtractPropTypes<
19
+ Readonly<
20
+ import('vue').ComponentObjectPropsOptions<{
21
+ [x: string]: unknown
22
+ }>
23
+ >
24
+ >
25
+ >,
26
+ | {
27
+ readonly [x: number]: string
28
+ }
29
+ | {},
30
+ {}
31
+ >
32
+ export default _default
@@ -0,0 +1 @@
1
+ export interface LcbCalendarFilterProps {}
@@ -5,8 +5,9 @@ export interface HotAddress {
5
5
  childHotAddress: ChildHotAddress[]
6
6
  }
7
7
  export interface ChildHotAddress {
8
- addr: string
8
+ addressName: string
9
9
  addrFlag?: boolean
10
+ addressType?: string
10
11
  area?: string
11
12
  categoryName?: string
12
13
  createDate?: string
@@ -24,8 +25,9 @@ export interface ChildHotAddress {
24
25
  }
25
26
  export declare const getHotAddress: () => Promise<import('../../../action').IResData<HotAddress[]>>
26
27
  export interface LcbAddress {
27
- addr: string
28
+ addressName: string
28
29
  addrFlag: boolean
30
+ addressType: string
29
31
  categoryName: string
30
32
  keywords?: string
31
33
  cityId: string
@@ -36,5 +38,5 @@ export interface LcbAddress {
36
38
  weightSort: string
37
39
  }
38
40
  export declare const getAddressList: (
39
- addr: string,
41
+ addressName: string,
40
42
  ) => Promise<import('../../../action').IResData<LcbAddress[]>>