@tplc/business 0.3.69 → 0.3.71

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,29 @@
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.71](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.70...v0.3.71) (2025-03-06)
6
+
7
+ ### [0.3.70](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.66...v0.3.70) (2025-03-06)
8
+
9
+
10
+ ### 🐛 Bug Fixes | Bug 修复
11
+
12
+ * 修改字段颜色 ([e661df9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e661df917517b5231129b428ade7fbc32208782e))
13
+
14
+
15
+ ### 🚀 Chore | 构建/工程依赖/工具
16
+
17
+ * **release:** 0.3.67 ([a7841dd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a7841dd76cee8116f83b8a995edceffc78552507))
18
+ * **release:** 0.3.68 ([b9aba5e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b9aba5e9313f999bed6daccd9adcebf9231f2001))
19
+ * **release:** 0.3.69 ([bd4b5d7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/bd4b5d79b5a2d92c4c88a42059f4bf2ef593597c))
20
+
21
+
22
+ ### ✨ Features | 新功能
23
+
24
+ * 修改图片策略 ([471609c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/471609ca404f2b2d9a8930fca81c2376b30a3ffa))
25
+ * 文字颜色改为黑色 ([ca34cf9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ca34cf962b6f9c886c0ba4bf5f8151b986908f78))
26
+ * 调整城市 ([0d04291](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0d0429144c4f6a468faa178513ecbda2bcc48ee9))
27
+
5
28
  ### [0.3.69](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.68...v0.3.69) (2025-03-05)
6
29
 
7
30
 
@@ -46,6 +46,7 @@ import { inject, onMounted, Ref, ref, watch } from 'vue'
46
46
  import { LcbCalendarSearchProps } from './types'
47
47
  import { LcbAddress } from '../lcb-city-select/api'
48
48
  import { FORM_KEY } from '../../constants'
49
+ import { getHistoryCity } from '../../utils/history'
49
50
  defineOptions({
50
51
  name: 'LcbCalendarSearch',
51
52
  options: {
@@ -63,7 +64,7 @@ withDefaults(defineProps<LcbCalendarSearchProps>(), {
63
64
 
64
65
  const form = inject(FORM_KEY) as Ref<Record<string, any>>
65
66
  const addressCity = ref<LcbAddress | undefined>(
66
- form.value.cityId || form.value.areaId ? (form.value as LcbAddress) : undefined,
67
+ (form.value.cityId || form.value.areaId ? form.value : getHistoryCity()) as LcbAddress,
67
68
  )
68
69
  const dayRange = ref([
69
70
  form.value.startDate ? dayjs(form.value.startDate).valueOf() : dayjs().valueOf(),
@@ -65,6 +65,7 @@ import LcbCityLetter from './components/lcb-city-letter/index.vue'
65
65
  import LcbCityList from './components/lcb-city-list/index.vue'
66
66
  import { LcbCitySelectProps } from './types'
67
67
  import { debounce } from '@tplc/wot/components/common/util'
68
+ import { setHistoryCity } from '../../utils/history'
68
69
  defineOptions({
69
70
  name: 'LcbCitySelect',
70
71
  options: {
@@ -126,6 +127,7 @@ watch(
126
127
  watch(
127
128
  () => modelValue.value,
128
129
  () => {
130
+ setHistoryCity(modelValue.value)
129
131
  show.value = false
130
132
  },
131
133
  )
@@ -113,10 +113,11 @@ import useLocation from '../../hooks/useLocation'
113
113
  import { useTranslate } from '@tplc/wot'
114
114
  import { ChildHotAddress } from '../lcb-city-select/api'
115
115
  import { stringify } from 'qs'
116
+ import { getHistoryCity } from '../../utils/history'
116
117
  const dayRange = ref([dayjs().valueOf(), dayjs().add(1, 'day').valueOf()])
117
118
  const { translate } = useTranslate()
118
119
  const { getLocation, userLocation, locationIng } = useLocation()
119
- const addressCity = ref<ChildHotAddress>()
120
+ const addressCity = ref<ChildHotAddress | undefined>(getHistoryCity())
120
121
  getLocation()
121
122
  const nightCount = computed(() => {
122
123
  return dayjs(dayRange.value[1]).diff(dayRange.value[0], 'day')
@@ -81,7 +81,6 @@ defineOptions({
81
81
  const titleObj = ref<Record<string, any>>({})
82
82
  const form = inject<Ref<Record<string, any>>>(FORM_KEY)
83
83
  const props = withDefaults(defineProps<LcbListProps>(), {
84
- pageFilterType: 'hotelTravelFilter',
85
84
  borderRadius: 12,
86
85
  styleMode: 'default',
87
86
  listType: 'list',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.3.69",
3
+ "version": "0.3.71",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -0,0 +1,5 @@
1
+ import { ChildHotAddress } from '../components/lcb-city-select/api'
2
+ /** 设置城市历史记录 */
3
+ export declare const setHistoryCity: (address?: ChildHotAddress) => void
4
+ /** 获取城市历史记录如果超过3天就不使用历史 */
5
+ export declare const getHistoryCity: () => ChildHotAddress | undefined
@@ -0,0 +1,17 @@
1
+ import { ChildHotAddress } from '../components/lcb-city-select/api'
2
+
3
+ /** 设置城市历史记录 */
4
+ export const setHistoryCity = (address?: ChildHotAddress) => {
5
+ uni.setStorageSync('cityHistory', {
6
+ address,
7
+ time: new Date().getTime(),
8
+ })
9
+ }
10
+
11
+ /** 获取城市历史记录如果超过3天就不使用历史 */
12
+ export const getHistoryCity = () => {
13
+ const history = uni.getStorageSync('cityHistory')
14
+ if (history && new Date().getTime() - history.time < 3 * 24 * 60 * 60 * 1000) {
15
+ return history.address as ChildHotAddress
16
+ }
17
+ }