@tplc/business 0.3.5 → 0.3.7

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.3.6](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.5...v0.3.6) (2025-01-15)
6
+
5
7
  ### [0.3.5](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.4...v0.3.5) (2025-01-15)
6
8
 
7
9
  ### [0.3.4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.3...v0.3.4) (2025-01-15)
@@ -84,7 +84,7 @@
84
84
  </lcb-calendar>
85
85
  <lcb-action-view v-bind="link" :urlParams="stringify(form)">
86
86
  <wd-button type="primary" customClass="!w-full my-42rpx" size="large">
87
- {{ btnText }}
87
+ {{ btnText || `${translate('搜索')}${tabs?.[current]?.label || ''}` }}
88
88
  </wd-button>
89
89
  </lcb-action-view>
90
90
  <view
@@ -134,7 +134,6 @@ const props = withDefaults(defineProps<LcbHomeSearch>(), {
134
134
  backgroundColor: '#ffffff',
135
135
  radius: 16,
136
136
  placeholder: '位置|酒店|关键词',
137
- btnText: '搜索酒店',
138
137
  opacity: 1,
139
138
  })
140
139
 
@@ -24,7 +24,7 @@
24
24
  <lcb-operation-actions
25
25
  :size="size"
26
26
  :button-list="modelValue.buttonList"
27
- @refresh="emits('refresh')"
27
+ @refresh="onRefresh"
28
28
  />
29
29
  </view>
30
30
  </view>
@@ -32,13 +32,9 @@
32
32
  </template>
33
33
 
34
34
  <script setup lang="ts">
35
- import { useMessage } from '@tplc/wot'
36
- import { UserLevelRightsList } from '../../api'
37
- import type { IPageBtn, PageBtnProps } from '../../api'
38
35
  import mpHtml from 'mp-html/src/uni-app/components/mp-html/mp-html.vue'
39
- import { watch, ref } from 'vue'
40
- import { ButtonProps } from '@tplc/wot/types/components/wd-button/types'
41
- const message = useMessage()
36
+ import { ref, watch } from 'vue'
37
+ import { UserLevelRightsList } from '../../api'
42
38
  const show = ref(false)
43
39
  defineProps<{
44
40
  hiddenDrawdown?: boolean
@@ -49,7 +45,6 @@ const modelValue = defineModel<UserLevelRightsList>()
49
45
  watch(
50
46
  () => modelValue.value,
51
47
  (val) => {
52
- console.log(modelValue.value, 'modelValue')
53
48
  if (val) show.value = true
54
49
  },
55
50
  )
@@ -59,59 +54,9 @@ const onClose = () => {
59
54
  show.value = false
60
55
  modelValue.value = undefined
61
56
  }
62
- const getBtnProps = (item: IPageBtn) => {
63
- return {
64
- type: item.styleContent?.buttonType?.includes?.('theme') ? 'primary' : 'info',
65
- plain: item.styleContent?.buttonType?.includes?.('Hollow'),
66
- size: 'small',
67
- ...item.buttonProps,
68
- } as ButtonProps
69
- }
70
- async function link({ item }: { item: IPageBtn }) {
71
- if (item.popUpFlag) {
72
- message
73
- .confirm({
74
- msg: item.popUpTip,
75
- title: item.content,
76
- })
77
- .then(async () => {
78
- if (item.buttonType === 1) {
79
- await uni.$lcb.http.post(item.requestUrl, item.requestParam)
80
- emits('refresh')
81
- }
82
- })
83
- .catch(console.log)
84
- } else if (item.jumpType === 2) {
85
- uni.navigateTo({
86
- url: item.jumpUrl,
87
- })
88
- // 再次支付
89
- } else if (item.buttonKey === 'orderPaymentBtn') {
90
- const {
91
- data: { paymentParams },
92
- } = await uni.$lcb.http.post<any>(item.requestUrl, {
93
- ...item.requestParam,
94
- paymentPlatform: 'wechat',
95
- paymentType: 'JSAPI',
96
- })
97
- uni.requestPayment({
98
- provider: 'wxpay',
99
- ...paymentParams,
100
- success: () => {
101
- uni.showToast({
102
- title: '支付成功',
103
- icon: 'success',
104
- })
105
- emits('refresh')
106
- },
107
- fail: () => {
108
- uni.showToast({
109
- title: '支付取消',
110
- icon: 'none',
111
- })
112
- },
113
- })
114
- }
57
+ const onRefresh = () => {
58
+ onClose()
59
+ emits('refresh')
115
60
  }
116
61
  </script>
117
62
  <style lang="scss" scoped>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -7,7 +7,6 @@ declare const _default: import('vue').DefineComponent<
7
7
  backgroundColor: string
8
8
  radius: number
9
9
  placeholder: string
10
- btnText: string
11
10
  opacity: number
12
11
  }
13
12
  >,
@@ -29,7 +28,6 @@ declare const _default: import('vue').DefineComponent<
29
28
  backgroundColor: string
30
29
  radius: number
31
30
  placeholder: string
32
- btnText: string
33
31
  opacity: number
34
32
  }
35
33
  >
@@ -41,7 +39,6 @@ declare const _default: import('vue').DefineComponent<
41
39
  placeholder: string
42
40
  marginHorizontal: number
43
41
  opacity: number
44
- btnText: string
45
42
  },
46
43
  {}
47
44
  >