@tplc/business 0.5.71 → 0.5.72

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,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.72](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.71...v0.5.72) (2025-12-04)
6
+
5
7
  ### [0.5.71](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.70...v0.5.71) (2025-12-04)
6
8
 
7
9
 
@@ -28,7 +28,7 @@
28
28
  :safe-area-inset-bottom="position === 'bottom'"
29
29
  closable
30
30
  :position="position"
31
- v-if="[14, 141].includes(getJumpType(jumpType)) && show"
31
+ v-if="['14', '141'].includes(getJumpType(jumpType)) && show"
32
32
  :custom-class="position === 'bottom' ? '!rounded-t-20rpx' : '!rounded-20rpx'"
33
33
  >
34
34
  <view
@@ -43,7 +43,10 @@
43
43
  <view class="p-3 max-h-50vh overflow-y-auto" v-if="content">
44
44
  <lcb-rich-text :content="content" />
45
45
  </view>
46
- <view v-if="getJumpType(jumpType) === 141" class="pt-6 pb-5 box-border flex-col-center gap-3">
46
+ <view
47
+ v-if="getJumpType(jumpType) === '141'"
48
+ class="pt-6 pb-5 box-border flex-col-center gap-3"
49
+ >
47
50
  <wd-qr-code :value="jumpUrl" :canvas-id="`id_${jumpUrl}`" :size="160" />
48
51
  <view class="flex items-center justify-center gap-2">
49
52
  <view class="text-3.5">{{ jumpUrl }}</view>
@@ -57,12 +60,12 @@
57
60
  v-model="showPay"
58
61
  :requestInfo="requestInfo"
59
62
  :submitRequestInfo="submitRequestInfo"
60
- v-if="[144].includes(getJumpType(jumpType)) && showPay && requestInfo && submitRequestInfo"
63
+ v-if="['144'].includes(getJumpType(jumpType)) && showPay && requestInfo && submitRequestInfo"
61
64
  />
62
65
  <SharePopup v-model="showPoster" :params="requestParam" />
63
66
  <CustomPopup
64
67
  v-model="showCustomPopup"
65
- v-if="[145].includes(getJumpType(jumpType)) && showCustomPopup"
68
+ v-if="['145'].includes(getJumpType(jumpType)) && showCustomPopup"
66
69
  :jumpUrl="jumpUrl"
67
70
  />
68
71
  </template>
@@ -104,7 +107,7 @@ const emits = defineEmits<{
104
107
  const templateMessageList = ref<TemplateMessage[]>([])
105
108
  const routeFullPath = ref('')
106
109
  onMounted(async () => {
107
- if (getJumpType(props.jumpType) === 142 && 'events' in props && props.events) {
110
+ if (getJumpType(props.jumpType) === '142' && 'events' in props && props.events) {
108
111
  const data = await getTemplateMessageList(props.events)
109
112
  templateMessageList.value = data
110
113
  }
@@ -140,7 +143,7 @@ const onActionClick = async () => {
140
143
  const url = getFinalUrl(jumpUrl || '', props.urlParams)
141
144
  switch (jumpType) {
142
145
  /** 网页 */
143
- case 1:
146
+ case '1':
144
147
  if (url)
145
148
  uni.navigateTo({
146
149
  url: `${uni.$lcb.internalPages.webview}?url=${encodeURIComponent(url)}`,
@@ -148,7 +151,7 @@ const onActionClick = async () => {
148
151
  emits('nav')
149
152
  break
150
153
  /** 小程序内页 */
151
- case 2:
154
+ case '2':
152
155
  if (url) {
153
156
  uni.navigateTo({
154
157
  url,
@@ -157,7 +160,7 @@ const onActionClick = async () => {
157
160
  emits('nav')
158
161
  break
159
162
  /** 跳转小程序 */
160
- case 10:
163
+ case '10':
161
164
  if (url && 'jumpAppid' in props && props.jumpAppid) {
162
165
  uni.navigateToMiniProgram({
163
166
  appId: props.jumpAppid,
@@ -167,7 +170,7 @@ const onActionClick = async () => {
167
170
  emits('nav')
168
171
  break
169
172
  /** 跳转半屏小程序 */
170
- case 11:
173
+ case '11':
171
174
  if (url && 'jumpAppid' in props && props.jumpAppid) {
172
175
  uni.openEmbeddedMiniProgram({
173
176
  appId: props.jumpAppid,
@@ -177,7 +180,7 @@ const onActionClick = async () => {
177
180
  emits('nav')
178
181
  break
179
182
  /** 退出登录 */
180
- case 13:
183
+ case '13':
181
184
  uni.showModal({
182
185
  title: '提示',
183
186
  content: '确定退出登录吗?',
@@ -198,18 +201,18 @@ const onActionClick = async () => {
198
201
  })
199
202
  break
200
203
  /** 小程序弹框 */
201
- case 14:
204
+ case '14':
202
205
  show.value = true
203
206
  break
204
207
  /** 锚点跳转 */
205
- case 16:
208
+ case '16':
206
209
  if (url) {
207
210
  const windowInfo = uni.getWindowInfo()
208
211
  const navbarHeight = (windowInfo.statusBarHeight || 0) + 44
209
212
  onPageScrollSelector(url, navbarHeight)
210
213
  }
211
214
  break
212
- case 17:
215
+ case '17':
213
216
  if ('requestInfo' in props && props.requestInfo)
214
217
  await uni.$lcb.http.post(props.requestInfo.requestUrl, props.requestInfo.requestParams)
215
218
  /** 请求之后刷新schemaPage */
@@ -219,7 +222,7 @@ const onActionClick = async () => {
219
222
  emits('refresh')
220
223
  break
221
224
  /** 新窗口跳到页面 */
222
- case 21:
225
+ case '21':
223
226
  if (url) {
224
227
  uni.navigateTo({
225
228
  url,
@@ -228,7 +231,7 @@ const onActionClick = async () => {
228
231
  emits('nav')
229
232
  break
230
233
  /** 切换TAB页 */
231
- case 22:
234
+ case '22':
232
235
  if (url) {
233
236
  uni.switchTab({
234
237
  url,
@@ -237,7 +240,7 @@ const onActionClick = async () => {
237
240
  emits('nav')
238
241
  break
239
242
  /** 重启进入某页面 */
240
- case 23:
243
+ case '23':
241
244
  if (url) {
242
245
  uni.reLaunch({
243
246
  url,
@@ -246,17 +249,17 @@ const onActionClick = async () => {
246
249
  emits('nav')
247
250
  break
248
251
  /** 回到上一层 */
249
- case 24:
252
+ case '24':
250
253
  uni.navigateBack({})
251
254
  emits('nav')
252
255
  break
253
256
  /** 关闭当前页面 */
254
- case 25:
257
+ case '25':
255
258
  uni.navigateBack({})
256
259
  emits('nav')
257
260
  break
258
261
  /** 关闭当前窗口 */
259
- case 26:
262
+ case '26':
260
263
  if (url) {
261
264
  uni.redirectTo({
262
265
  url,
@@ -265,27 +268,27 @@ const onActionClick = async () => {
265
268
  emits('nav')
266
269
  break
267
270
  /** 拨打电话 */
268
- case 30:
271
+ case '30':
269
272
  if ('phoneNumber' in props && props.phoneNumber)
270
273
  uni.makePhoneCall({
271
274
  phoneNumber: props.phoneNumber,
272
275
  })
273
276
  break
274
- case 105:
277
+ case '105':
275
278
  if ('addressInfo' in props && props.addressInfo) uni.openLocation(props.addressInfo)
276
279
  emits('nav')
277
280
  break
278
- case 106:
281
+ case '106':
279
282
  showPoster.value = true
280
283
  break
281
- case 141:
284
+ case '141':
282
285
  show.value = true
283
286
  break
284
- case 241:
287
+ case '241':
285
288
  getExposed?.()?.reload?.()
286
289
  uni.navigateBack()
287
290
  break
288
- case 107:
291
+ case '107':
289
292
  if ('content' in props && props.content) {
290
293
  uni.setStorageSync('imagePreview', JSON.stringify(props.content))
291
294
  uni.navigateTo({
@@ -293,10 +296,10 @@ const onActionClick = async () => {
293
296
  })
294
297
  }
295
298
  break
296
- case 142:
299
+ case '142':
297
300
  onTemplateMessage()
298
301
  break
299
- case 143:
302
+ case '143':
300
303
  if (jumpUrl) {
301
304
  uni.downloadFile({
302
305
  url: jumpUrl,
@@ -314,13 +317,13 @@ const onActionClick = async () => {
314
317
  })
315
318
  }
316
319
  break
317
- case 144:
320
+ case '144':
318
321
  showPay.value = true
319
322
  break
320
- case 145:
323
+ case '145':
321
324
  showCustomPopup.value = true
322
325
  break
323
- case 146:
326
+ case '146':
324
327
  uni.scanCode({
325
328
  success: ({ result: url }) => {
326
329
  if (url.includes('plugin://kivicube-slam/scene')) {
@@ -349,7 +352,7 @@ const onActionClick = async () => {
349
352
  }
350
353
  const getJumpType = (jumpType?: string | number) => {
351
354
  if (!jumpType) return ''
352
- return jumpTypeMap[jumpType] || jumpType
355
+ return jumpTypeMap[jumpType] || `${jumpType}`
353
356
  }
354
357
  const getPhoneNumber = (e) => {
355
358
  if (e.detail.errMsg === 'getPhoneNumber:ok') {
@@ -92,7 +92,7 @@ async function link({ item }: { item: IPageBtn }, e: LcbActionViewProps) {
92
92
  })
93
93
  .catch(console.log)
94
94
  }
95
- } else if (item.jumpType === 2) {
95
+ } else if (`${item.jumpType}` === '2') {
96
96
  uni.navigateTo({
97
97
  url: item.jumpUrl,
98
98
  })
@@ -81,13 +81,13 @@ function link({ item }: { item: IPageBtn }, index: number) {
81
81
  title: item.content,
82
82
  })
83
83
  .then(async () => {
84
- if (item.buttonType === 1) {
84
+ if (`${item.buttonType}` === '1') {
85
85
  await uni.$lcb.http.post(item.requestUrl, item.requestParam)
86
86
  emits('refresh')
87
87
  }
88
88
  })
89
89
  .catch(console.log)
90
- } else if (item.jumpType === 2) {
90
+ } else if (`${item.jumpType}` === '2') {
91
91
  uni.navigateTo({
92
92
  url: item.jumpUrl,
93
93
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.5.71",
3
+ "version": "0.5.72",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],