@tplc/business 0.5.6 → 0.5.8
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,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.5.8](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.2...v0.5.8) (2025-10-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* **release:** 0.5.3 ([57c7130](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/57c7130540071280353fd605b87f6815cc2d89e2))
|
|
11
|
+
* **release:** 0.5.4 ([e26bb51](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/e26bb514cdfbce2ec5f90f1f11b9e7a705a75236))
|
|
12
|
+
* **release:** 0.5.5 ([5e54c9a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5e54c9a5d7595feab969bb272c538ab9e81dce0e))
|
|
13
|
+
* **release:** 0.5.6 ([8927745](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8927745805c238149ef478bee1b0e5528e9c9187))
|
|
14
|
+
* **release:** 0.5.7 ([2ffa756](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/2ffa75665995fe5ec0df5e36956564f1069be226))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### ✨ Features | 新功能
|
|
18
|
+
|
|
19
|
+
* 支持地址选择 ([2bdb47b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/2bdb47bededa3a5b091f4c0d52b2a55219bf9369))
|
|
20
|
+
* 新增pop ([70282d2](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/70282d2ce61843f7c81dd686385f38a7a8da1956))
|
|
21
|
+
* 新增组件 ([090ee4f](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/090ee4f5aec2f05922dc12eee7cc1c5ea5906ea9))
|
|
22
|
+
* 调整参数 ([fa298c9](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/fa298c94d7b34b3374f3d9fa82a22b50ccc8ac6d))
|
|
23
|
+
|
|
24
|
+
### [0.5.7](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.6...v0.5.7) (2025-10-10)
|
|
25
|
+
|
|
5
26
|
### [0.5.6](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.5...v0.5.6) (2025-10-10)
|
|
6
27
|
|
|
7
28
|
### [0.5.5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.4...v0.5.5) (2025-10-10)
|
package/action.d.ts
CHANGED
|
@@ -48,6 +48,9 @@ export interface LcbGlobal {
|
|
|
48
48
|
constantsStore?: () => {
|
|
49
49
|
mainConfig?: Record<string, any>
|
|
50
50
|
otherConfig?: Record<string, any>
|
|
51
|
+
addressId?: string
|
|
52
|
+
setAddressId: (addressId: string) => void
|
|
53
|
+
getAddressId: () => string
|
|
51
54
|
}
|
|
52
55
|
messageStore?: () => {
|
|
53
56
|
messageCount: number
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
<script setup lang="ts">
|
|
21
21
|
import { ref, watch } from 'vue'
|
|
22
22
|
import { AddressCommunityProps } from '../types'
|
|
23
|
-
import useLocation
|
|
24
|
-
|
|
23
|
+
import useLocation from '../../../hooks/useLocation'
|
|
25
24
|
defineOptions({
|
|
26
25
|
name: 'AddressCommunity',
|
|
27
26
|
options: {
|
|
@@ -42,21 +41,21 @@ const options = ref<{ addressName: string; addressId: string }[]>([])
|
|
|
42
41
|
|
|
43
42
|
const handleChange = (e: any) => {
|
|
44
43
|
title.value = e.selectedItem.label
|
|
45
|
-
|
|
44
|
+
uni.$lcb.constantsStore?.()?.setAddressId(e.selectedItem.addressId)
|
|
46
45
|
}
|
|
47
46
|
watch(
|
|
48
47
|
() => userLocation.value,
|
|
49
48
|
async (val) => {
|
|
50
|
-
if (val) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
49
|
+
// if (val) {
|
|
50
|
+
const { data } = await uni.$lcb.http.post<any[]>('/addressCommunity/list')
|
|
51
|
+
options.value = data
|
|
52
|
+
if (data.length > 0) {
|
|
53
|
+
const firstItem = data[0]
|
|
54
|
+
title.value = firstItem.label
|
|
55
|
+
value.value = firstItem.addressId
|
|
56
|
+
uni.$lcb.constantsStore?.()?.setAddressId(firstItem.addressId)
|
|
59
57
|
}
|
|
58
|
+
// }
|
|
60
59
|
},
|
|
61
60
|
{
|
|
62
61
|
immediate: true,
|
|
@@ -67,6 +66,7 @@ watch(
|
|
|
67
66
|
<style lang="scss" scoped>
|
|
68
67
|
.drop-menu-container {
|
|
69
68
|
margin-right: 24rpx;
|
|
69
|
+
margin-left: -24rpx;
|
|
70
70
|
|
|
71
71
|
:deep(.wd-drop-menu__list) {
|
|
72
72
|
background-color: transparent;
|
|
@@ -24,12 +24,7 @@
|
|
|
24
24
|
}"
|
|
25
25
|
>
|
|
26
26
|
<!-- 左边布局 -->
|
|
27
|
-
<view
|
|
28
|
-
class="navbar-left z-1"
|
|
29
|
-
:style="{
|
|
30
|
-
paddingLeft: showAddressCommunity ? '0rpx' : '24rpx',
|
|
31
|
-
}"
|
|
32
|
-
>
|
|
27
|
+
<view class="navbar-left z-1">
|
|
33
28
|
<AddressCommunity v-if="showAddressCommunity" v-bind="addressCommunityProps" />
|
|
34
29
|
<view
|
|
35
30
|
v-if="(styleGroup === 3 || moreThanTwoPages() || !canBack) && capsuleList.length"
|
|
@@ -197,7 +192,7 @@ const props = withDefaults(defineProps<NavProps>(), {
|
|
|
197
192
|
fontWeight: 500,
|
|
198
193
|
textColor: '#000000',
|
|
199
194
|
keyFromUser: false,
|
|
200
|
-
showAddressCommunity:
|
|
195
|
+
showAddressCommunity: true,
|
|
201
196
|
})
|
|
202
197
|
const navbarBgColor = computed(() => {
|
|
203
198
|
return props.backgroundType === 'color' ? props.backColor : ''
|
package/hooks/useLocation.ts
CHANGED
|
@@ -2,9 +2,7 @@ import { useTranslate } from '@tplc/wot'
|
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
import { getUserLocation, UserLocation } from './useLocation.api'
|
|
4
4
|
export const currentLocation = ref<UserLocation>()
|
|
5
|
-
const currentAddressId = ref<string>('')
|
|
6
5
|
export const currentUserLatLon = ref<UniApp.GetLocationSuccess>()
|
|
7
|
-
export const useCurrentAddressId = () => currentAddressId
|
|
8
6
|
const useLocation = (onLocation?: (location: UserLocation) => void) => {
|
|
9
7
|
const { translate } = useTranslate()
|
|
10
8
|
// 正在获取经纬度
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { UserLocation } from './useLocation.api'
|
|
2
2
|
export declare const currentLocation: import('vue').Ref<UserLocation | undefined>
|
|
3
3
|
export declare const currentUserLatLon: import('vue').Ref<UniApp.GetLocationSuccess | undefined>
|
|
4
|
-
export declare const useCurrentAddressId: () => import('vue').Ref<string>
|
|
5
4
|
declare const useLocation: (onLocation?: (location: UserLocation) => void) => {
|
|
6
5
|
getLocation: (force?: boolean, forceSetting?: boolean) => Promise<void>
|
|
7
6
|
locationIng: import('vue').Ref<boolean>
|