@tplc/business 0.4.190 → 0.4.191
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,19 @@
|
|
|
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.4.191](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.189...v0.4.191) (2025-08-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🚀 Chore | 构建/工程依赖/工具
|
|
9
|
+
|
|
10
|
+
* **release:** 0.4.190 ([c7aff92](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c7aff92429d278770f1a3298e6c962d36dd10746))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ✨ Features | 新功能
|
|
14
|
+
|
|
15
|
+
* area auto ([7df0e63](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/7df0e6312d2ea031bc2474d8894fefc071edaaa4))
|
|
16
|
+
* 城市不需要判断 openFlag ([5132529](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5132529d23f6607145c6df519df6500b1e024765))
|
|
17
|
+
|
|
5
18
|
### [0.4.190](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.187...v0.4.190) (2025-08-14)
|
|
6
19
|
|
|
7
20
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:safe-area-inset-bottom="position === 'bottom'"
|
|
28
28
|
closable
|
|
29
29
|
:position="position"
|
|
30
|
-
v-if="[14, 141].includes(
|
|
30
|
+
v-if="[14, 141].includes(getJumpType(jumpType)) && show"
|
|
31
31
|
:custom-class="position === 'bottom' ? '!rounded-t-20rpx' : '!rounded-20rpx'"
|
|
32
32
|
>
|
|
33
33
|
<view
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<view class="p-3 max-h-50vh overflow-y-auto" v-if="content">
|
|
43
43
|
<lcb-rich-text :content="content" />
|
|
44
44
|
</view>
|
|
45
|
-
<view v-if="jumpType === 141" class="pt-6 pb-5 box-border flex-col-center gap-3">
|
|
45
|
+
<view v-if="getJumpType(jumpType) === 141" class="pt-6 pb-5 box-border flex-col-center gap-3">
|
|
46
46
|
<wd-qr-code :value="jumpUrl" :canvas-id="`id_${jumpUrl}`" :size="160" />
|
|
47
47
|
<view class="flex items-center justify-center gap-2">
|
|
48
48
|
<view class="text-3.5">{{ jumpUrl }}</view>
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
<script setup lang="ts">
|
|
59
59
|
import { computed, ref, inject, Ref, onMounted } from 'vue'
|
|
60
|
-
import { LcbActionViewProps } from './types'
|
|
60
|
+
import { jumpTypeMap, LcbActionViewProps } from './types'
|
|
61
61
|
import { uploadFile } from '../../hooks/useUpload'
|
|
62
62
|
import { getFinalUrl, onPageScrollSelector, getExposed, getCurrentPage } from '../../utils/utils'
|
|
63
63
|
import SharePopup from '../lcb-nav/SharePopup/index.vue'
|
|
@@ -89,7 +89,7 @@ const emits = defineEmits<{
|
|
|
89
89
|
const templateMessageList = ref<TemplateMessage[]>([])
|
|
90
90
|
const routeFullPath = ref('')
|
|
91
91
|
onMounted(async () => {
|
|
92
|
-
if (props.jumpType === 142 && props.events) {
|
|
92
|
+
if (getJumpType(props.jumpType) === 142 && 'events' in props && props.events) {
|
|
93
93
|
const data = await getTemplateMessageList(props.events)
|
|
94
94
|
templateMessageList.value = data
|
|
95
95
|
}
|
|
@@ -110,10 +110,11 @@ const openType = computed(() => {
|
|
|
110
110
|
102: 'share',
|
|
111
111
|
103: 'feedback',
|
|
112
112
|
104: 'openSetting',
|
|
113
|
-
}[props.jumpType
|
|
113
|
+
}[getJumpType(props.jumpType)]
|
|
114
114
|
})
|
|
115
115
|
const onActionClick = async () => {
|
|
116
|
-
const { jumpUrl, jumpType } = props
|
|
116
|
+
const { jumpUrl, jumpType: type } = props
|
|
117
|
+
const jumpType = getJumpType(type)
|
|
117
118
|
/**
|
|
118
119
|
* 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
|
|
119
120
|
* 13: 退出登录 14: 小程序弹框 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
|
|
@@ -140,7 +141,7 @@ const onActionClick = async () => {
|
|
|
140
141
|
break
|
|
141
142
|
/** 跳转小程序 */
|
|
142
143
|
case 10:
|
|
143
|
-
if (url && props.jumpAppid) {
|
|
144
|
+
if (url && 'jumpAppid' in props && props.jumpAppid) {
|
|
144
145
|
uni.navigateToMiniProgram({
|
|
145
146
|
appId: props.jumpAppid,
|
|
146
147
|
path: url,
|
|
@@ -150,7 +151,7 @@ const onActionClick = async () => {
|
|
|
150
151
|
break
|
|
151
152
|
/** 跳转半屏小程序 */
|
|
152
153
|
case 11:
|
|
153
|
-
if (url && props.jumpAppid) {
|
|
154
|
+
if (url && 'jumpAppid' in props && props.jumpAppid) {
|
|
154
155
|
uni.openEmbeddedMiniProgram({
|
|
155
156
|
appId: props.jumpAppid,
|
|
156
157
|
path: url,
|
|
@@ -190,10 +191,10 @@ const onActionClick = async () => {
|
|
|
190
191
|
}
|
|
191
192
|
break
|
|
192
193
|
case 17:
|
|
193
|
-
if (props.requestInfo)
|
|
194
|
+
if ('requestInfo' in props && props.requestInfo)
|
|
194
195
|
await uni.$lcb.http.post(props.requestInfo.requestUrl, props.requestInfo.requestParams)
|
|
195
196
|
/** 请求之后刷新schemaPage */
|
|
196
|
-
if (props.requestInfo?.refreshSchemaPage) {
|
|
197
|
+
if ('requestInfo' in props && props.requestInfo?.refreshSchemaPage) {
|
|
197
198
|
uni.$emit('refreshSchemaPage')
|
|
198
199
|
}
|
|
199
200
|
emits('refresh')
|
|
@@ -246,13 +247,13 @@ const onActionClick = async () => {
|
|
|
246
247
|
break
|
|
247
248
|
/** 拨打电话 */
|
|
248
249
|
case 30:
|
|
249
|
-
if (props.phoneNumber)
|
|
250
|
+
if ('phoneNumber' in props && props.phoneNumber)
|
|
250
251
|
uni.makePhoneCall({
|
|
251
252
|
phoneNumber: props.phoneNumber,
|
|
252
253
|
})
|
|
253
254
|
break
|
|
254
255
|
case 105:
|
|
255
|
-
if (props.addressInfo) uni.openLocation(props.addressInfo)
|
|
256
|
+
if ('addressInfo' in props && props.addressInfo) uni.openLocation(props.addressInfo)
|
|
256
257
|
emits('nav')
|
|
257
258
|
break
|
|
258
259
|
case 106:
|
|
@@ -266,10 +267,12 @@ const onActionClick = async () => {
|
|
|
266
267
|
uni.navigateBack()
|
|
267
268
|
break
|
|
268
269
|
case 107:
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
if ('content' in props && props.content) {
|
|
271
|
+
uni.setStorageSync('imagePreview', JSON.stringify(props.content))
|
|
272
|
+
uni.navigateTo({
|
|
273
|
+
url: `/pages/system/imagePreview`,
|
|
274
|
+
})
|
|
275
|
+
}
|
|
273
276
|
break
|
|
274
277
|
case 142:
|
|
275
278
|
onTemplateMessage()
|
|
@@ -297,6 +300,10 @@ const onActionClick = async () => {
|
|
|
297
300
|
break
|
|
298
301
|
}
|
|
299
302
|
}
|
|
303
|
+
const getJumpType = (jumpType?: string | number) => {
|
|
304
|
+
if (!jumpType) return ''
|
|
305
|
+
return jumpTypeMap[jumpType] || jumpType
|
|
306
|
+
}
|
|
300
307
|
const getPhoneNumber = (e) => {
|
|
301
308
|
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
|
302
309
|
emits('phone', e)
|
|
@@ -93,3 +93,33 @@ export type LcbActionViewProps = {
|
|
|
93
93
|
events: string
|
|
94
94
|
}
|
|
95
95
|
)
|
|
96
|
+
|
|
97
|
+
// 根据LcbActionViewProps 的jumTyp帮我生成一份英文映射 key为英文 value 为number
|
|
98
|
+
export const jumpTypeMap = {
|
|
99
|
+
webview: 1,
|
|
100
|
+
miniProgram: 2,
|
|
101
|
+
jumpMiniProgram: 10,
|
|
102
|
+
halfScreenMiniProgram: 11,
|
|
103
|
+
miniProgramCustomerService: 12,
|
|
104
|
+
logout: 13,
|
|
105
|
+
miniProgramDialog: 14,
|
|
106
|
+
miniProgramAnchor: 16,
|
|
107
|
+
request: 17,
|
|
108
|
+
newWindow: 21,
|
|
109
|
+
switchTab: 22,
|
|
110
|
+
restartMiniProgram: 23,
|
|
111
|
+
back: 24,
|
|
112
|
+
closeCurrentPage: 25,
|
|
113
|
+
closeCurrentWindow: 26,
|
|
114
|
+
phoneCall: 30,
|
|
115
|
+
getPhoneNumber: 88,
|
|
116
|
+
chooseAvatar: 101,
|
|
117
|
+
share: 102,
|
|
118
|
+
feedback: 103,
|
|
119
|
+
openSetting: 104,
|
|
120
|
+
map: 105,
|
|
121
|
+
poster: 106,
|
|
122
|
+
imagePreview: 107,
|
|
123
|
+
qrCode: 141,
|
|
124
|
+
templateMessage: 142,
|
|
125
|
+
}
|
package/package.json
CHANGED
|
@@ -90,3 +90,31 @@ export type LcbActionViewProps = {
|
|
|
90
90
|
events: string
|
|
91
91
|
}
|
|
92
92
|
)
|
|
93
|
+
export declare const jumpTypeMap: {
|
|
94
|
+
webview: number
|
|
95
|
+
miniProgram: number
|
|
96
|
+
jumpMiniProgram: number
|
|
97
|
+
halfScreenMiniProgram: number
|
|
98
|
+
miniProgramCustomerService: number
|
|
99
|
+
logout: number
|
|
100
|
+
miniProgramDialog: number
|
|
101
|
+
miniProgramAnchor: number
|
|
102
|
+
request: number
|
|
103
|
+
newWindow: number
|
|
104
|
+
switchTab: number
|
|
105
|
+
restartMiniProgram: number
|
|
106
|
+
back: number
|
|
107
|
+
closeCurrentPage: number
|
|
108
|
+
closeCurrentWindow: number
|
|
109
|
+
phoneCall: number
|
|
110
|
+
getPhoneNumber: number
|
|
111
|
+
chooseAvatar: number
|
|
112
|
+
share: number
|
|
113
|
+
feedback: number
|
|
114
|
+
openSetting: number
|
|
115
|
+
map: number
|
|
116
|
+
poster: number
|
|
117
|
+
imagePreview: number
|
|
118
|
+
qrCode: number
|
|
119
|
+
templateMessage: number
|
|
120
|
+
}
|