@tplc/business 0.2.23 → 0.2.24

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,13 @@
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.24](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.23...v0.2.24) (2024-12-16)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * action-view 新增锚点类型 ([a34dc9f](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/a34dc9f31a526ceb4c6b52a43e51f2e72fa91f6d))
11
+
5
12
  ### [0.2.23](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.17...v0.2.23) (2024-12-16)
6
13
 
7
14
 
@@ -39,6 +39,7 @@ import { LcbActionViewProps } from './types'
39
39
  import { uploadFile } from '../../hooks/useUpload'
40
40
  import mpHtml from 'mp-html/src/uni-app/components/mp-html/mp-html.vue'
41
41
  import { PAGE_ANCHOR_PROVIDE_KEY } from '../../constants'
42
+ import { $lcb } from 'index'
42
43
  defineOptions({
43
44
  name: 'LcbActionView',
44
45
  options: {
@@ -52,6 +53,7 @@ const emits = defineEmits<{
52
53
  (e: 'phone', value: { detail: { errMsg: string; encryptedData: string; iv: string } }): void
53
54
  (e: 'avatar', value: string): void
54
55
  (e: 'click', value: void): void
56
+ (e: 'refresh', value: void): void
55
57
  }>()
56
58
 
57
59
  const show = ref(false)
@@ -68,8 +70,8 @@ const openType = computed(() => {
68
70
  104: 'openSetting',
69
71
  }[props.jumpType || '']
70
72
  })
71
- const onActionClick = () => {
72
- const { jumpAppid, jumpUrl: url, jumpType, phoneNumber, addressInfo } = props
73
+ const onActionClick = async () => {
74
+ const { jumpUrl: url, jumpType } = props
73
75
  /**
74
76
  * 跳转类型 1: 网页 2: 小程序内页 10: 跳转小程序 11: 跳转半屏小程序 12: 小程序客服
75
77
  * 13: 退出登录 14: 小程序弹框 21: 新窗口跳到页面 22: 切换TAB页 23: 重启进入某页面
@@ -93,18 +95,18 @@ const onActionClick = () => {
93
95
  break
94
96
  /** 跳转小程序 */
95
97
  case 10:
96
- if (url && jumpAppid) {
98
+ if (url && props.jumpAppid) {
97
99
  uni.navigateToMiniProgram({
98
- appId: jumpAppid,
100
+ appId: props.jumpAppid,
99
101
  path: url,
100
102
  })
101
103
  }
102
104
  break
103
105
  /** 跳转半屏小程序 */
104
106
  case 11:
105
- if (url && jumpAppid) {
107
+ if (url && props.jumpAppid) {
106
108
  uni.openEmbeddedMiniProgram({
107
- appId: jumpAppid,
109
+ appId: props.jumpAppid,
108
110
  path: url,
109
111
  })
110
112
  }
@@ -116,11 +118,14 @@ const onActionClick = () => {
116
118
  case 14:
117
119
  show.value = true
118
120
  break
119
-
120
121
  /** 锚点跳转 */
121
122
  case 16:
122
123
  if (url) anchor.value = url
123
124
  break
125
+ case 17:
126
+ await $lcb.http.post(props.requestInfo.requestUrl, props.requestInfo.requestParams)
127
+ emits('refresh')
128
+ break
124
129
  /** 新窗口跳到页面 */
125
130
  case 21:
126
131
  if (url) {
@@ -163,15 +168,13 @@ const onActionClick = () => {
163
168
  break
164
169
  /** 拨打电话 */
165
170
  case 30:
166
- if (phoneNumber)
171
+ if (props.phoneNumber)
167
172
  uni.makePhoneCall({
168
- phoneNumber,
173
+ phoneNumber: props.phoneNumber,
169
174
  })
170
175
  break
171
176
  case 105:
172
- if (addressInfo) {
173
- uni.openLocation(addressInfo)
174
- }
177
+ uni.openLocation(props.addressInfo)
175
178
  break
176
179
  default:
177
180
  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.24",
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
+ )
@@ -0,0 +1,6 @@
1
+ import { LcbGlobal } from './action'
2
+ export declare const $lcb: LcbGlobal
3
+ declare const _default: {
4
+ install: (Vue: any) => void
5
+ }
6
+ export default _default