@tplc/business 0.3.69 → 0.3.70
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 +21 -0
- package/components/lcb-calendar-search/lcb-calendar-search.vue +2 -1
- package/components/lcb-city-select/lcb-city-select.vue +2 -0
- package/components/lcb-home-search/lcb-home-search.vue +2 -1
- package/components/lcb-list/lcb-list.vue +0 -1
- package/package.json +1 -1
- package/types/utils/history.d.ts +5 -0
- package/utils/history.ts +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
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.70](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.66...v0.3.70) (2025-03-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
9
|
+
|
|
10
|
+
* 修改字段颜色 ([e661df9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/e661df917517b5231129b428ade7fbc32208782e))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
14
|
+
|
|
15
|
+
* **release:** 0.3.67 ([a7841dd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a7841dd76cee8116f83b8a995edceffc78552507))
|
|
16
|
+
* **release:** 0.3.68 ([b9aba5e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/b9aba5e9313f999bed6daccd9adcebf9231f2001))
|
|
17
|
+
* **release:** 0.3.69 ([bd4b5d7](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/bd4b5d79b5a2d92c4c88a42059f4bf2ef593597c))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### ✨ Features | 新功能
|
|
21
|
+
|
|
22
|
+
* 修改图片策略 ([471609c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/471609ca404f2b2d9a8930fca81c2376b30a3ffa))
|
|
23
|
+
* 文字颜色改为黑色 ([ca34cf9](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/ca34cf962b6f9c886c0ba4bf5f8151b986908f78))
|
|
24
|
+
* 调整城市 ([0d04291](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0d0429144c4f6a468faa178513ecbda2bcc48ee9))
|
|
25
|
+
|
|
5
26
|
### [0.3.69](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.68...v0.3.69) (2025-03-05)
|
|
6
27
|
|
|
7
28
|
|
|
@@ -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 ?
|
|
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: {
|
|
@@ -103,6 +104,7 @@ const onAddressClick = (item: LcbAddress) => {
|
|
|
103
104
|
// url: `/pages/residentialHotel/index?${qs.stringify(item)}`,
|
|
104
105
|
// })
|
|
105
106
|
// }
|
|
107
|
+
setHistoryCity(item as ChildHotAddress)
|
|
106
108
|
onCancel()
|
|
107
109
|
show.value = false
|
|
108
110
|
}
|
|
@@ -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
package/utils/history.ts
ADDED
|
@@ -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
|
+
}
|