@tplc/business 0.5.39 → 0.5.41

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,41 @@
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.41](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.40...v0.5.41) (2025-11-05)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 新增轮询 以及 qrcode ([b3c2b59](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/b3c2b590f1c9812b546b6db677f7b53c2a7183e9))
11
+
12
+ ### [0.5.40](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.33...v0.5.40) (2025-11-05)
13
+
14
+
15
+ ### 🐛 Bug Fixes | Bug 修复
16
+
17
+ * pay 兼容 ([e800b85](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/e800b85f79fdaa6cca409b80890059db7db7aa85))
18
+ * pay 取值错误 ([8c5bd09](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/8c5bd09161e28684a2d480ee0135defb81b69f48))
19
+
20
+
21
+ ### 🚀 Chore | 构建/工程依赖/工具
22
+
23
+ * **release:** 0.5.34 ([9fe404c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/9fe404c3fe714bb6005c9b0ddc192b50a8d11c21))
24
+ * **release:** 0.5.35 ([c42aca2](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c42aca2931eaa090ea97920d2061472b5e2184f5))
25
+ * **release:** 0.5.36 ([9e49a5d](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/9e49a5de090d0f66db75ea2ef6d415273244b95f))
26
+ * **release:** 0.5.37 ([94b5280](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/94b52807b8781593f2352d653138574aae83be4c))
27
+ * **release:** 0.5.38 ([e7b6d9c](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/e7b6d9c4842e5825f7e39ac88a4ad0d0d597544a))
28
+ * **release:** 0.5.39 ([e3feb0b](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/e3feb0b97e55699f2023c48214b2ab7fd39fc7b7))
29
+
30
+
31
+ ### ✨ Features | 新功能
32
+
33
+ * filter page ([a688367](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/a6883672f4b973ebd7523f3daa3c0145b8611cab))
34
+ * form 调整 ([6bcea25](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/6bcea25152244b93f7be003fb18359f82024e316))
35
+ * lcb-filter-grid 新增颜色 ([64d77bb](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/64d77bb7322550f794d0e599d94cd2bf11beb3c5))
36
+ * 修改用户 ([d77e420](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/d77e42066ab0241c7d79432ff4cbb05d4403784a))
37
+ * 调整form ([91b9c49](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/91b9c49d135935ac58b9ac046ce1d8c6f8adb7b2))
38
+ * 调整字段 ([c65c53e](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/commit/c65c53ec4e65c8bee05cd86c1371dc2d717ef761))
39
+
5
40
  ### [0.5.39](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.38...v0.5.39) (2025-11-03)
6
41
 
7
42
  ### [0.5.38](https://gitlab888.30jia.com.cn/tourism-front/zero-code-pro/compare/v0.5.37...v0.5.38) (2025-11-03)
@@ -23,7 +23,7 @@
23
23
  <script setup lang="ts">
24
24
  import { transformValueUnit } from '../../../../utils/transform'
25
25
  import { TextRenderViewItem } from '../../../../action'
26
- import { provide, Ref, ref, watch } from 'vue'
26
+ import { onUnmounted, provide, Ref, ref, watch } from 'vue'
27
27
  import { PAGE_PROVIDE_KEY } from '../../../../constants'
28
28
  defineOptions({
29
29
  name: 'ActionCustomPopup',
@@ -40,11 +40,13 @@ const props = defineProps<{
40
40
  const popupInfo = ref({})
41
41
  provide(PAGE_PROVIDE_KEY, popupInfo)
42
42
  const show = defineModel({ default: false })
43
+ const timer = ref<NodeJS.Timeout | null>(null)
43
44
  const pageInfo = ref<{
44
45
  modules: TextRenderViewItem['items']
45
46
  page: {
46
47
  popupWidth: number
47
48
  requestApi: string
49
+ refreshTime: number
48
50
  }
49
51
  }>()
50
52
 
@@ -56,18 +58,37 @@ watch(
56
58
  pageType: props.jumpUrl,
57
59
  })) as any
58
60
  pageInfo.value = data
59
- if (pageInfo.value?.page?.requestApi) {
60
- uni.$lcb.http.post<Record<string, any>>(pageInfo.value?.page?.requestApi).then((res) => {
61
- popupInfo.value = {
62
- ...pageInfo.value,
63
- ...res.data,
64
- }
65
- })
66
- }
61
+ startTimer()
67
62
  }
68
63
  },
69
64
  {
70
65
  immediate: true,
71
66
  },
72
67
  )
68
+
69
+ const startTimer = () => {
70
+ getRequestData()
71
+ if (pageInfo.value?.page?.refreshTime) {
72
+ timer.value = setInterval(() => {
73
+ getRequestData()
74
+ }, pageInfo.value?.page?.refreshTime * 1000)
75
+ }
76
+ }
77
+
78
+ const getRequestData = async () => {
79
+ if (pageInfo.value?.page?.requestApi) {
80
+ const { data } = (await uni.$lcb.http.post('/pageDecoration/page/detail', {
81
+ pageType: props.jumpUrl,
82
+ })) as any
83
+ popupInfo.value = {
84
+ ...pageInfo.value,
85
+ ...data,
86
+ }
87
+ }
88
+ }
89
+ onUnmounted(() => {
90
+ if (timer.value) {
91
+ clearInterval(timer.value)
92
+ }
93
+ })
73
94
  </script>
@@ -317,6 +317,28 @@ const onActionClick = async () => {
317
317
  case 145:
318
318
  showCustomPopup.value = true
319
319
  break
320
+ case 146:
321
+ uni.scanCode({
322
+ success: ({ result: url }) => {
323
+ if (url.includes('plugin://kivicube-slam/scene')) {
324
+ uni.redirectTo({
325
+ url,
326
+ })
327
+ } else {
328
+ uni.navigateBack({
329
+ success: () => {
330
+ uni.showToast({
331
+ title: '请扫描正确的二维码',
332
+ icon: 'none',
333
+ duration: 1500,
334
+ })
335
+ },
336
+ })
337
+ }
338
+ },
339
+ fail: () => uni.navigateBack({}),
340
+ })
341
+ break
320
342
  default:
321
343
  emits('click', props)
322
344
  break
@@ -103,6 +103,9 @@ export type LcbActionViewProps = {
103
103
  jumpType: 142
104
104
  events: string
105
105
  }
106
+ | {
107
+ jumpType: 146
108
+ }
106
109
  )
107
110
 
108
111
  // 根据LcbActionViewProps 的jumTyp帮我生成一份英文映射 key为英文 value 为number
@@ -135,4 +138,5 @@ export const jumpTypeMap = {
135
138
  templateMessage: 142,
136
139
  'mixture-pay': 144,
137
140
  customPopup: 145,
141
+ arScan: 146,
138
142
  }
@@ -38,6 +38,14 @@
38
38
  :height="imageHeight ? transformValueUnit(imageHeight) : 'auto'"
39
39
  />
40
40
  </template>
41
+ <template v-else-if="mode === 'qrcode'">
42
+ <wd-qr-code
43
+ :size="qrCodeSize"
44
+ canvasId="qrCode"
45
+ :value="innerValue"
46
+ v-if="innerValue"
47
+ />
48
+ </template>
41
49
  <text v-else style="line-height: 1.54">
42
50
  {{ innerValue }}
43
51
  </text>
@@ -69,6 +77,7 @@ const props = withDefaults(defineProps<LcbButtonProps>(), {
69
77
  enablePreview: false,
70
78
  iconGap: 4,
71
79
  iconSize: 24,
80
+ qrCodeSize: 100,
72
81
  })
73
82
  const pageInfo = inject(PAGE_PROVIDE_KEY) as Ref<Record<string, any>>
74
83
  const wrapperItemData = inject(WRAPPER_ITEM_KEY, undefined) as unknown as Ref<Record<string, any>>
@@ -4,12 +4,13 @@ import { LcbBlockProps } from '../lcb-block/types'
4
4
  export interface LcbButtonProps extends LcbBlockProps {
5
5
  text: string
6
6
  action?: LcbActionViewProps
7
- mode: 'image' | 'text' | 'noStyle'
7
+ mode: 'image' | 'text' | 'noStyle' | 'qrcode'
8
8
  url?: string
9
9
  imageWidth?: number
10
10
  imageHeight?: number
11
11
  dynamicKey?: string
12
12
  keyFromUser?: boolean
13
+ qrCodeSize?: number
13
14
  customClass?: string
14
15
  fillWidth?: boolean
15
16
  fillHeight?: boolean
@@ -296,9 +296,35 @@ const onCapsule = ({ action }: ICapsule) => {
296
296
  })
297
297
  break
298
298
  case 'scanCode':
299
+ // Taro.scanCode({
300
+ // success: ({result:url}) => {
301
+ // if(url.includes('plugin://kivicube-slam/scene')){
302
+ // Taro.redirectTo({
303
+ // url,
304
+ // });
305
+ // }else{
306
+ // Taro.navigateBack({
307
+ // success:()=>{
308
+ // Taro.showToast({
309
+ // title:'请扫描正确的二维码',
310
+ // icon:'none',
311
+ // duration:1500
312
+ // })
313
+ // }
314
+ // })
315
+ // }
316
+
317
+ // },
318
+ // fail:()=>Taro.navigateBack({})
319
+ // });
299
320
  uni.scanCode({
300
321
  success: (res) => {
301
- console.log(res)
322
+ const { result } = res
323
+ if (result.includes('plugin://kivicube-slam/scene')) {
324
+ uni.redirectTo({
325
+ url: result,
326
+ })
327
+ }
302
328
  },
303
329
  })
304
330
  break
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.5.39",
3
+ "version": "0.5.41",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -15,7 +15,7 @@ declare const __VLS_component: import('vue').DefineComponent<
15
15
  string,
16
16
  import('vue').PublicProps,
17
17
  any,
18
- {} | {} | {} | {} | {} | {} | {} | {} | {},
18
+ {} | {} | {} | {} | {} | {} | {} | {} | {} | {},
19
19
  {}
20
20
  >
21
21
  declare const _default: __VLS_WithTemplateSlots<
@@ -98,6 +98,9 @@ export type LcbActionViewProps = {
98
98
  jumpType: 142
99
99
  events: string
100
100
  }
101
+ | {
102
+ jumpType: 146
103
+ }
101
104
  )
102
105
  export declare const jumpTypeMap: {
103
106
  webview: number
@@ -128,4 +131,5 @@ export declare const jumpTypeMap: {
128
131
  templateMessage: number
129
132
  'mixture-pay': number
130
133
  customPopup: number
134
+ arScan: number
131
135
  }
@@ -9,6 +9,7 @@ declare const _default: import('vue').DefineComponent<
9
9
  enablePreview: boolean
10
10
  iconGap: number
11
11
  iconSize: number
12
+ qrCodeSize: number
12
13
  }
13
14
  >,
14
15
  {},
@@ -31,6 +32,7 @@ declare const _default: import('vue').DefineComponent<
31
32
  enablePreview: boolean
32
33
  iconGap: number
33
34
  iconSize: number
35
+ qrCodeSize: number
34
36
  }
35
37
  >
36
38
  >
@@ -40,6 +42,7 @@ declare const _default: import('vue').DefineComponent<
40
42
  color: string
41
43
  enablePreview: boolean
42
44
  iconSize: number
45
+ qrCodeSize: number
43
46
  iconGap: number
44
47
  hideWhenDynamicKeyNotExist: boolean
45
48
  },
@@ -3,12 +3,13 @@ import { LcbBlockProps } from '../lcb-block/types'
3
3
  export interface LcbButtonProps extends LcbBlockProps {
4
4
  text: string
5
5
  action?: LcbActionViewProps
6
- mode: 'image' | 'text' | 'noStyle'
6
+ mode: 'image' | 'text' | 'noStyle' | 'qrcode'
7
7
  url?: string
8
8
  imageWidth?: number
9
9
  imageHeight?: number
10
10
  dynamicKey?: string
11
11
  keyFromUser?: boolean
12
+ qrCodeSize?: number
12
13
  customClass?: string
13
14
  fillWidth?: boolean
14
15
  fillHeight?: boolean
@@ -13,8 +13,8 @@ declare const _default: import('vue').DefineComponent<
13
13
  import('vue').ComponentOptionsMixin,
14
14
  import('vue').ComponentOptionsMixin,
15
15
  {
16
- cancel: (...args: any[]) => void
17
16
  refresh: (...args: any[]) => void
17
+ cancel: (...args: any[]) => void
18
18
  },
19
19
  string,
20
20
  import('vue').PublicProps,
@@ -19,8 +19,8 @@ declare const _default: import('vue').DefineComponent<
19
19
  import('vue').ComponentOptionsMixin,
20
20
  import('vue').ComponentOptionsMixin,
21
21
  {
22
- cancel: (...args: any[]) => void
23
22
  refresh: (...args: any[]) => void
23
+ cancel: (...args: any[]) => void
24
24
  },
25
25
  string,
26
26
  import('vue').PublicProps,
@@ -8,8 +8,8 @@ declare const _default: import('vue').DefineComponent<
8
8
  import('vue').ComponentOptionsMixin,
9
9
  import('vue').ComponentOptionsMixin,
10
10
  {
11
- cancel: (...args: any[]) => void
12
11
  refresh: (...args: any[]) => void
12
+ cancel: (...args: any[]) => void
13
13
  },
14
14
  string,
15
15
  import('vue').PublicProps,
@@ -836,6 +836,91 @@ declare const _default: import('vue').DefineComponent<
836
836
  }
837
837
  >
838
838
  >
839
+ >
840
+ | Readonly<
841
+ import('vue').ExtractPropTypes<
842
+ __VLS_WithDefaults<
843
+ __VLS_TypePropsToOption<
844
+ {
845
+ placeholder?: string
846
+ icon?: string
847
+ url?: string
848
+ iconSize?: string
849
+ borderWidth?: number
850
+ iconColor?: string
851
+ gap?: number
852
+ link?: import('../lcb-action-view/types').LcbActionViewProps
853
+ iconType?: 'icon' | 'img'
854
+ mode?: 'search' | 'link'
855
+ productTypeList?: string[]
856
+ city?: boolean
857
+ cityColor?: string
858
+ citySize?: number
859
+ cityIconSize?: number
860
+ cityIconColor?: string
861
+ lineColor?: string
862
+ lineWidth?: number
863
+ linePadding?: number
864
+ lineHeight?: number
865
+ historyKey?: string
866
+ showCancel?: boolean
867
+ initFocus?: boolean
868
+ blockBackground?: string
869
+ } & {
870
+ jumpUrl?: string
871
+ urlParams?: string
872
+ customClass?: string
873
+ customStyle?: import('vue').StyleValue
874
+ renderMode?: 'view' | 'button'
875
+ autoJumpSecond?: number
876
+ position?: import('@tplc/wot/types/components/wd-popup/types').PopupType
877
+ jumpInterceptor?: (
878
+ action: import('../lcb-action-view/types').LcbActionViewProps,
879
+ ) => boolean
880
+ content?: string
881
+ title?: string
882
+ requestParam?: Record<string, any>
883
+ requestInfo?: {
884
+ requestUrl: string
885
+ requestParams: Record<string, any>
886
+ refreshSchemaPage?: boolean
887
+ }
888
+ submitRequestInfo?: {
889
+ requestUrl: string
890
+ requestParams: Record<string, any>
891
+ }
892
+ } & {
893
+ jumpType: 146
894
+ } & import('../lcb-block/types').LcbBlockProps
895
+ >,
896
+ {
897
+ placeholder: string
898
+ iconSize: string
899
+ borderWidth: number
900
+ color: string
901
+ iconColor: string
902
+ gap: number
903
+ paddingVertical: number
904
+ marginHorizontal: number
905
+ cityColor: string
906
+ citySize: number
907
+ cityIconSize: number
908
+ radius: number
909
+ paddingHorizontal: number
910
+ borderColor: string
911
+ cityIconColor: string
912
+ lineColor: string
913
+ lineWidth: number
914
+ linePadding: number
915
+ lineHeight: number
916
+ iconType: string
917
+ mode: string
918
+ fontSize: number
919
+ initFocus: boolean
920
+ showCancel: boolean
921
+ }
922
+ >
923
+ >
839
924
  >,
840
925
  | {
841
926
  mode: 'search' | 'link'
@@ -1045,6 +1130,32 @@ declare const _default: import('vue').DefineComponent<
1045
1130
  showCancel: boolean
1046
1131
  initFocus: boolean
1047
1132
  }
1133
+ | {
1134
+ mode: 'search' | 'link'
1135
+ color: string
1136
+ lineHeight: number
1137
+ radius: number
1138
+ iconSize: string
1139
+ iconColor: string
1140
+ marginHorizontal: number
1141
+ paddingHorizontal: number
1142
+ paddingVertical: number
1143
+ fontSize: number
1144
+ borderColor: string
1145
+ borderWidth: number
1146
+ gap: number
1147
+ placeholder: string
1148
+ lineWidth: number
1149
+ iconType: 'icon' | 'img'
1150
+ cityColor: string
1151
+ citySize: number
1152
+ cityIconSize: number
1153
+ cityIconColor: string
1154
+ lineColor: string
1155
+ linePadding: number
1156
+ showCancel: boolean
1157
+ initFocus: boolean
1158
+ }
1048
1159
  | {
1049
1160
  mode: 'search' | 'link'
1050
1161
  color: string