@tplc/business 0.7.3 → 0.7.5
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 +31 -0
- package/action.d.ts +1 -1
- package/components/lcb-nav/AddressCommunity/index.vue +45 -4
- package/components/lcb-nav/types.ts +1 -1
- package/package.json +1 -1
- package/types/components/lcb-nav/AddressCommunity/index.vue.d.ts +1 -1
- package/types/components/lcb-nav/types.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,37 @@
|
|
|
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.7.5](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.89...v0.7.5) (2025-12-13)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* **release:** 0.5.88 ([147ff6e](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/147ff6e104f27f92690da8df5aca80e628fa9ed3))
|
|
11
|
+
* **release:** 0.5.89 ([414fcce](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/414fcce2d291ecfb1526eaf19512d745370f9893))
|
|
12
|
+
* **release:** 0.5.90 ([8965a49](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8965a49098b6e87bf49c496160b37efbcc369a1c))
|
|
13
|
+
* **release:** 0.5.91 ([c618ab3](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c618ab3e525bdc0faa81d69b64c5d560183fdb3d))
|
|
14
|
+
* **release:** 0.5.91 ([682a08c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/682a08cbd4be990feeaac7fe4dc9b7c4494acafd))
|
|
15
|
+
* **release:** 0.7.1 ([dc26746](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/dc26746c5e35bbca6e4becc9463dd63a85c18635))
|
|
16
|
+
* **release:** 0.7.2 ([0f3050c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/0f3050cc048955e83c1fc3af62dcbb2959785792))
|
|
17
|
+
* **release:** 0.7.3 ([5912bfd](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/5912bfdea30fa0c6a29ab9016f0e21bce040d135))
|
|
18
|
+
* **release:** 0.7.4 ([aeb4b94](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/aeb4b9483077e8796cece772c6f3e0f690b7d9d9))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### ✨ Features | 新功能
|
|
22
|
+
|
|
23
|
+
* 地址切换修改 ([ef8042b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/ef8042b422e59cc12090a80665504fbc17d65257))
|
|
24
|
+
* 支持切换模式 ([2983347](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/2983347d57b86c5cb99e0a7a93550c438bbd829c))
|
|
25
|
+
* 更新版本 ([71a7e8a](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/71a7e8ab13cc71ae43c0e6152df26a55a6faa996))
|
|
26
|
+
* 更新版本 ([0fce71c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/0fce71ccbb8387302b003f93b0108f98b1b0273e))
|
|
27
|
+
* 调整hover 才显示 ([59d3fac](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/59d3faca5f780005d1868bc6681a2cdc59c5d3c5))
|
|
28
|
+
|
|
29
|
+
### [0.7.4](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.3...v0.7.4) (2025-12-12)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### ✨ Features | 新功能
|
|
33
|
+
|
|
34
|
+
* 支持切换模式 ([2983347](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/2983347d57b86c5cb99e0a7a93550c438bbd829c))
|
|
35
|
+
|
|
5
36
|
### [0.7.3](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.7.2...v0.7.3) (2025-12-12)
|
|
6
37
|
|
|
7
38
|
|
package/action.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export interface LcbGlobal {
|
|
|
73
73
|
mainConfig?: Record<string, any>
|
|
74
74
|
otherConfig?: Record<string, any>
|
|
75
75
|
addressId?: string
|
|
76
|
-
setAddressId: (addressId: string, switchType?: '
|
|
76
|
+
setAddressId: (addressId: string, switchType?: 'merchant' | 'address') => void
|
|
77
77
|
getAddressId: () => string
|
|
78
78
|
}
|
|
79
79
|
messageStore?: () => {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
<script setup lang="ts">
|
|
26
26
|
import { ref, watch, computed } from 'vue'
|
|
27
27
|
import { AddressCommunityProps } from '../types'
|
|
28
|
+
import { getCurrentPage } from '../../../utils/utils'
|
|
28
29
|
defineOptions({
|
|
29
30
|
name: 'AddressCommunity',
|
|
30
31
|
options: {
|
|
@@ -40,13 +41,20 @@ const props = withDefaults(defineProps<AddressCommunityProps>(), {
|
|
|
40
41
|
width: 240,
|
|
41
42
|
mode: 'normal',
|
|
42
43
|
popupWidth: 240,
|
|
43
|
-
switchType: '
|
|
44
|
+
switchType: 'address',
|
|
44
45
|
})
|
|
46
|
+
type Merchant = { merchantName: string; pageDecorationId: string }
|
|
45
47
|
const value = defineModel<string>('')
|
|
46
48
|
const constantsStore = uni.$lcb.constantsStore?.()
|
|
47
49
|
const title = ref<string>('')
|
|
50
|
+
const merchantList = ref<Merchant[]>([])
|
|
48
51
|
const options = computed(() => {
|
|
49
|
-
return
|
|
52
|
+
return props.switchType === 'merchant'
|
|
53
|
+
? (merchantList.value || []).map((item) => ({
|
|
54
|
+
addressName: item.merchantName,
|
|
55
|
+
addressId: item.pageDecorationId,
|
|
56
|
+
}))
|
|
57
|
+
: constantsStore?.mainConfig?.addressList
|
|
50
58
|
})
|
|
51
59
|
const setCurrentAddress = (address: { addressName: string; addressId: string }) => {
|
|
52
60
|
if (address) {
|
|
@@ -64,14 +72,38 @@ watch(
|
|
|
64
72
|
deep: true,
|
|
65
73
|
},
|
|
66
74
|
)
|
|
75
|
+
watch(
|
|
76
|
+
() => props.switchType,
|
|
77
|
+
(switchType) => {
|
|
78
|
+
if (switchType === 'merchant') {
|
|
79
|
+
getMerchantList()
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
immediate: true,
|
|
84
|
+
deep: true,
|
|
85
|
+
},
|
|
86
|
+
)
|
|
67
87
|
|
|
68
88
|
const handleChange = (e: any) => {
|
|
69
|
-
|
|
89
|
+
if (props.switchType === 'merchant') {
|
|
90
|
+
// 刷新当前页面
|
|
91
|
+
uni.$emit('refreshSchemaPage', {
|
|
92
|
+
pageDecorationId: e.selectedItem.addressId,
|
|
93
|
+
pageId: getCurrentPage().pageId,
|
|
94
|
+
})
|
|
95
|
+
} else {
|
|
96
|
+
uni.$lcb.constantsStore?.()?.setAddressId(e.selectedItem.addressId, props.switchType)
|
|
97
|
+
}
|
|
70
98
|
}
|
|
71
99
|
|
|
72
100
|
const onChooseAddress = () => {
|
|
73
101
|
if (props.mode === 'normal') {
|
|
74
|
-
|
|
102
|
+
if (props.switchType === 'address') {
|
|
103
|
+
uni.$lcb.navigateTo(`/pages-sub/index/store`)
|
|
104
|
+
} else if (props.switchType === 'merchant') {
|
|
105
|
+
uni.$lcb.navigateTo(`/pages-sub/index/merchant?pageId=${getCurrentPage().pageId}`)
|
|
106
|
+
}
|
|
75
107
|
}
|
|
76
108
|
}
|
|
77
109
|
const containerStyle = computed(() => {
|
|
@@ -84,6 +116,15 @@ const containerStyle = computed(() => {
|
|
|
84
116
|
[props.mode === 'normal' ? 'max-width' : 'width']: `${props.width}rpx`,
|
|
85
117
|
}
|
|
86
118
|
})
|
|
119
|
+
const getMerchantList = async () => {
|
|
120
|
+
const { data } = await uni.$lcb.http.post('/merchant/page', {
|
|
121
|
+
pageSearch: {
|
|
122
|
+
limit: 1000,
|
|
123
|
+
page: 1,
|
|
124
|
+
},
|
|
125
|
+
})
|
|
126
|
+
merchantList.value = data as Merchant[]
|
|
127
|
+
}
|
|
87
128
|
</script>
|
|
88
129
|
|
|
89
130
|
<style lang="scss" scoped>
|
package/package.json
CHANGED