@tplc/business 0.2.23 → 0.2.25

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,20 @@
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.2.25](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.24...v0.2.25) (2024-12-16)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * action-view 新增request ([a9de65c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a9de65ccb7da95be194438a0cca12c917343a272))
11
+
12
+ ### [0.2.24](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.23...v0.2.24) (2024-12-16)
13
+
14
+
15
+ ### ✨ Features | 新功能
16
+
17
+ * action-view 新增锚点类型 ([a34dc9f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a34dc9f31a526ceb4c6b52a43e51f2e72fa91f6d))
18
+
5
19
  ### [0.2.23](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.17...v0.2.23) (2024-12-16)
6
20
 
7
21
 
@@ -52,6 +52,7 @@ const emits = defineEmits<{
52
52
  (e: 'phone', value: { detail: { errMsg: string; encryptedData: string; iv: string } }): void
53
53
  (e: 'avatar', value: string): void
54
54
  (e: 'click', value: void): void
55
+ (e: 'refresh', value: void): void
55
56
  }>()
56
57
 
57
58
  const show = ref(false)
@@ -68,8 +69,8 @@ const openType = computed(() => {
68
69
  104: 'openSetting',
69
70
  }[props.jumpType || '']
70
71
  })
71
- const onActionClick = () => {
72
- const { jumpAppid, jumpUrl: url, jumpType, phoneNumber, addressInfo } = props
72
+ const onActionClick = async () => {
73
+ const { jumpUrl: url, jumpType } = props
73
74
  /**
74
75
  * 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
75
76
  * 13: 退出登录 14: 小程序弹框 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
@@ -93,18 +94,18 @@ const onActionClick = () => {
93
94
  break
94
95
  /** 跳转小程序 */
95
96
  case 10:
96
- if (url && jumpAppid) {
97
+ if (url && props.jumpAppid) {
97
98
  uni.navigateToMiniProgram({
98
- appId: jumpAppid,
99
+ appId: props.jumpAppid,
99
100
  path: url,
100
101
  })
101
102
  }
102
103
  break
103
104
  /** 跳转半屏小程序 */
104
105
  case 11:
105
- if (url && jumpAppid) {
106
+ if (url && props.jumpAppid) {
106
107
  uni.openEmbeddedMiniProgram({
107
- appId: jumpAppid,
108
+ appId: props.jumpAppid,
108
109
  path: url,
109
110
  })
110
111
  }
@@ -116,11 +117,14 @@ const onActionClick = () => {
116
117
  case 14:
117
118
  show.value = true
118
119
  break
119
-
120
120
  /** 锚点跳转 */
121
121
  case 16:
122
122
  if (url) anchor.value = url
123
123
  break
124
+ case 17:
125
+ await uni.$lcb.http.post(props.requestInfo.requestUrl, props.requestInfo.requestParams)
126
+ emits('refresh')
127
+ break
124
128
  /** 新窗口跳到页面 */
125
129
  case 21:
126
130
  if (url) {
@@ -163,15 +167,13 @@ const onActionClick = () => {
163
167
  break
164
168
  /** 拨打电话 */
165
169
  case 30:
166
- if (phoneNumber)
170
+ if (props.phoneNumber)
167
171
  uni.makePhoneCall({
168
- phoneNumber,
172
+ phoneNumber: props.phoneNumber,
169
173
  })
170
174
  break
171
175
  case 105:
172
- if (addressInfo) {
173
- uni.openLocation(addressInfo)
174
- }
176
+ uni.openLocation(props.addressInfo)
175
177
  break
176
178
  default:
177
179
  emits('click')
@@ -1,44 +1,62 @@
1
- export interface LcbActionViewProps {
2
- /**
3
- * 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
4
- * 13: 退出登录 14: 小程序弹框 16: 小程序锚点 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
5
- * 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页 105 查看地图
6
- */
7
- jumpType?:
8
- | 1
9
- | 2
10
- | 10
11
- | 11
12
- | 12
13
- | 13
14
- | 14
15
- | 16
16
- | 21
17
- | 22
18
- | 23
19
- | 24
20
- | 25
21
- | 26
22
- | 30
23
- | 88
24
- | 101
25
- | 102
26
- | 103
27
- | 104
28
- | 105
1
+ export type LcbActionViewProps = {
29
2
  /** 跳转路径 */
30
3
  jumpUrl?: string
31
- /** 小程序appid */
32
- jumpAppid?: string
33
- phoneNumber?: string
34
- customClass?: string
35
- content?: string
36
- title?: string
37
- position?: string
38
- addressInfo?: {
39
- address: string
40
- latitude: number
41
- longitude: number
42
- name: string
43
- }
44
- }
4
+ } & (
5
+ | {
6
+ /**
7
+ * 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
8
+ * 13: 退出登录 14: 小程序弹框 16: 小程序锚点 17 网络请求 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
9
+ * 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页 105 查看地图
10
+ */
11
+ jumpType?:
12
+ | 1
13
+ | 2
14
+ | 10
15
+ | 11
16
+ | 12
17
+ | 13
18
+ | 14
19
+ | 16
20
+ | 21
21
+ | 22
22
+ | 23
23
+ | 24
24
+ | 25
25
+ | 26
26
+ | 30
27
+ | 88
28
+ | 101
29
+ | 102
30
+ | 103
31
+ | 104
32
+
33
+ /** 小程序appid */
34
+ jumpAppid?: string
35
+ /** 手机号 */
36
+ phoneNumber?: string
37
+ customClass?: string
38
+ /** 弹窗文案 */
39
+ content?: string
40
+ /** 弹窗标题 */
41
+ title?: string
42
+ /** 弹窗位置 */
43
+ position?: string
44
+ /** 查看地图信息 */
45
+ }
46
+ | {
47
+ jumpType: 17
48
+ requestInfo: {
49
+ requestUrl: string
50
+ requestParams: Record<string, any>
51
+ }
52
+ }
53
+ | {
54
+ jumpType: 105
55
+ addressInfo: {
56
+ address: string
57
+ latitude: number
58
+ longitude: number
59
+ name: string
60
+ }
61
+ }
62
+ )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.23",
3
+ "version": "0.2.25",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -14,7 +14,7 @@ declare const __VLS_component: import('vue').DefineComponent<
14
14
  string,
15
15
  import('vue').PublicProps,
16
16
  any,
17
- {},
17
+ {} | {} | {},
18
18
  {}
19
19
  >
20
20
  declare const _default: __VLS_WithTemplateSlots<
@@ -1,44 +1,60 @@
1
- export interface LcbActionViewProps {
2
- /**
3
- * 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
4
- * 13: 退出登录 14: 小程序弹框 16: 小程序锚点 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
5
- * 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页 105 查看地图
6
- */
7
- jumpType?:
8
- | 1
9
- | 2
10
- | 10
11
- | 11
12
- | 12
13
- | 13
14
- | 14
15
- | 16
16
- | 21
17
- | 22
18
- | 23
19
- | 24
20
- | 25
21
- | 26
22
- | 30
23
- | 88
24
- | 101
25
- | 102
26
- | 103
27
- | 104
28
- | 105
1
+ export type LcbActionViewProps = {
29
2
  /** 跳转路径 */
30
3
  jumpUrl?: string
31
- /** 小程序appid */
32
- jumpAppid?: string
33
- phoneNumber?: string
34
- customClass?: string
35
- content?: string
36
- title?: string
37
- position?: string
38
- addressInfo?: {
39
- address: string
40
- latitude: number
41
- longitude: number
42
- name: string
43
- }
44
- }
4
+ } & (
5
+ | {
6
+ /**
7
+ * 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
8
+ * 13: 退出登录 14: 小程序弹框 16: 小程序锚点 17 网络请求 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
9
+ * 24: 回到上一层 25: 关闭当前页面 26: 关闭当前窗口 30: 拨打电话 88: 授权手机号 101 用户头像 102 分享 103 意见反馈 104 打开授权设置页 105 查看地图
10
+ */
11
+ jumpType?:
12
+ | 1
13
+ | 2
14
+ | 10
15
+ | 11
16
+ | 12
17
+ | 13
18
+ | 14
19
+ | 16
20
+ | 21
21
+ | 22
22
+ | 23
23
+ | 24
24
+ | 25
25
+ | 26
26
+ | 30
27
+ | 88
28
+ | 101
29
+ | 102
30
+ | 103
31
+ | 104
32
+ /** 小程序appid */
33
+ jumpAppid?: string
34
+ /** 手机号 */
35
+ phoneNumber?: string
36
+ customClass?: string
37
+ /** 弹窗文案 */
38
+ content?: string
39
+ /** 弹窗标题 */
40
+ title?: string
41
+ /** 弹窗位置 */
42
+ position?: string
43
+ }
44
+ | {
45
+ jumpType: 17
46
+ requestInfo: {
47
+ requestUrl: string
48
+ requestParams: Record<string, any>
49
+ }
50
+ }
51
+ | {
52
+ jumpType: 105
53
+ addressInfo: {
54
+ address: string
55
+ latitude: number
56
+ longitude: number
57
+ name: string
58
+ }
59
+ }
60
+ )