@tplc/business 0.5.8 → 0.5.9
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 +2 -0
- package/action.d.ts +24 -0
- package/components/lcb-nav/AddressCommunity/index.vue +14 -20
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.9](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.8...v0.5.9) (2025-10-10)
|
|
6
|
+
|
|
5
7
|
### [0.5.8](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.2...v0.5.8) (2025-10-10)
|
|
6
8
|
|
|
7
9
|
|
package/action.d.ts
CHANGED
|
@@ -27,6 +27,30 @@ export interface DataSource {
|
|
|
27
27
|
/** 动态key */
|
|
28
28
|
dependKey?: string
|
|
29
29
|
}
|
|
30
|
+
export interface AddressCommunity {
|
|
31
|
+
address?: string
|
|
32
|
+
addressId?: string
|
|
33
|
+
addressIntro?: string
|
|
34
|
+
addressName?: string
|
|
35
|
+
addressType?: number
|
|
36
|
+
agentId?: string
|
|
37
|
+
areaId?: string
|
|
38
|
+
categoryName?: string
|
|
39
|
+
cityId?: string
|
|
40
|
+
createDate?: string
|
|
41
|
+
defaultFlag?: boolean
|
|
42
|
+
hotFlag?: boolean
|
|
43
|
+
lastModifyDate?: string
|
|
44
|
+
latitude?: string
|
|
45
|
+
longitude?: string
|
|
46
|
+
merchantHeadId?: string
|
|
47
|
+
merchantId?: string
|
|
48
|
+
openFlag?: boolean
|
|
49
|
+
productWeightSort?: number
|
|
50
|
+
provinceCityAreaType?: number
|
|
51
|
+
provinceId?: string
|
|
52
|
+
weightSort?: number
|
|
53
|
+
}
|
|
30
54
|
export interface LcbGlobal {
|
|
31
55
|
http: {
|
|
32
56
|
get<T>(url: string, query?: Record<string, any> | undefined): Promise<IResData<T>>
|
|
@@ -18,9 +18,8 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script setup lang="ts">
|
|
21
|
-
import { ref, watch } from 'vue'
|
|
21
|
+
import { computed, ref, watch } from 'vue'
|
|
22
22
|
import { AddressCommunityProps } from '../types'
|
|
23
|
-
import useLocation from '../../../hooks/useLocation'
|
|
24
23
|
defineOptions({
|
|
25
24
|
name: 'AddressCommunity',
|
|
26
25
|
options: {
|
|
@@ -34,33 +33,28 @@ withDefaults(defineProps<AddressCommunityProps>(), {
|
|
|
34
33
|
color: '#000',
|
|
35
34
|
width: 240,
|
|
36
35
|
})
|
|
37
|
-
const { userLocation } = useLocation()
|
|
38
36
|
const value = defineModel<string>('')
|
|
39
37
|
const title = ref<string>('地址社区')
|
|
40
|
-
const options =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
title.value = e.selectedItem.label
|
|
44
|
-
uni.$lcb.constantsStore?.()?.setAddressId(e.selectedItem.addressId)
|
|
45
|
-
}
|
|
38
|
+
const options = computed(() => {
|
|
39
|
+
return uni.$lcb.constantsStore?.().mainConfig?.addressList
|
|
40
|
+
})
|
|
46
41
|
watch(
|
|
47
|
-
() =>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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)
|
|
42
|
+
() => uni.$lcb.constantsStore?.().mainConfig?.address,
|
|
43
|
+
({ addressId }: { addressId: string }) => {
|
|
44
|
+
if (addressId) {
|
|
45
|
+
title.value = options.value.find((item) => item.addressId === addressId)?.addressName
|
|
46
|
+
value.value = addressId
|
|
57
47
|
}
|
|
58
|
-
// }
|
|
59
48
|
},
|
|
60
49
|
{
|
|
61
50
|
immediate: true,
|
|
62
51
|
},
|
|
63
52
|
)
|
|
53
|
+
|
|
54
|
+
const handleChange = (e: any) => {
|
|
55
|
+
title.value = e.selectedItem.label
|
|
56
|
+
uni.$lcb.constantsStore?.()?.setAddressId(e.selectedItem.addressId)
|
|
57
|
+
}
|
|
64
58
|
</script>
|
|
65
59
|
|
|
66
60
|
<style lang="scss" scoped>
|