@tplc/business 0.2.61 → 0.2.63

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,10 @@
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.63](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.62...v0.2.63) (2025-01-04)
6
+
7
+ ### [0.2.62](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.61...v0.2.62) (2025-01-04)
8
+
5
9
  ### [0.2.61](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.60...v0.2.61) (2025-01-04)
6
10
 
7
11
 
package/action.d.ts CHANGED
@@ -39,6 +39,16 @@ export interface LcbGlobal {
39
39
  }
40
40
  getIsTabbar: () => boolean
41
41
  layoutId: string
42
+ internalPages: {
43
+ webview: string
44
+ search: string
45
+ setting: string
46
+ home: string
47
+ orderList: string
48
+ authPhone: string
49
+ userEdit: string
50
+ drawdown: string
51
+ }
42
52
  }
43
53
 
44
54
  global {
@@ -79,7 +79,7 @@ const onActionClick = async () => {
79
79
  case 1:
80
80
  if (url)
81
81
  uni.navigateTo({
82
- url: `/pages/system/webview?url=${encodeURIComponent(url)}`,
82
+ url: `${uni.$lcb.internalPages.webview}?url=${encodeURIComponent(url)}`,
83
83
  })
84
84
  break
85
85
  /** 小程序内页 */
@@ -192,7 +192,7 @@ const onCapsule = ({ action }: ICapsule) => {
192
192
  break
193
193
  case 'search':
194
194
  uni.navigateTo({
195
- url: '/pages/search/index',
195
+ url: uni.$lcb.internalPages.search,
196
196
  })
197
197
  break
198
198
  case 'scanCode':
@@ -216,13 +216,13 @@ const onCapsule = ({ action }: ICapsule) => {
216
216
  break
217
217
  case 'setting':
218
218
  uni.navigateTo({
219
- url: '/pages/mine/setting',
219
+ url: uni.$lcb.internalPages.setting,
220
220
  })
221
221
  break
222
222
 
223
223
  case 'home':
224
224
  uni.switchTab({
225
- url: '/pages/index/index',
225
+ url: uni.$lcb.internalPages.home,
226
226
  })
227
227
  break
228
228
  }
@@ -231,7 +231,7 @@ const onCapsule = ({ action }: ICapsule) => {
231
231
  const toBack = () => {
232
232
  if (isLastPage()) {
233
233
  uni.switchTab({
234
- url: '/pages/index/index',
234
+ url: uni.$lcb.internalPages.home,
235
235
  })
236
236
  } else {
237
237
  uni.navigateBack()
@@ -62,7 +62,7 @@ defineOptions({
62
62
  })
63
63
  const onClick = (item: IIconList) => {
64
64
  uni.navigateTo({
65
- url: `/pages-sub/order/list?orderStatus=${item.status}`,
65
+ url: `${uni.$lcb.internalPages.orderList}?orderStatus=${item.status}`,
66
66
  })
67
67
  }
68
68
  const props = withDefaults(defineProps<LcbUserOrderProps>(), {
@@ -158,7 +158,7 @@ const padTop = computed(() => {
158
158
  })
159
159
  const phoneHandler = () => {
160
160
  uni.navigateTo({
161
- url: '/pages/system/authPhone',
161
+ url: uni.$lcb.internalPages.authPhone,
162
162
  })
163
163
  }
164
164
  const onAvatar = (headImgUrl) => {
@@ -168,7 +168,7 @@ const onAvatar = (headImgUrl) => {
168
168
  }
169
169
  const toEdit = () => {
170
170
  uni.navigateTo({
171
- url: '/pages/user/edit',
171
+ url: uni.$lcb.internalPages.userEdit,
172
172
  })
173
173
  }
174
174
  const navigateTo = (url) => {
@@ -45,7 +45,7 @@ watch(
45
45
  )
46
46
  const onDrawdown = () => {
47
47
  uni.navigateTo({
48
- url: `/pages/drawdown/drawdown?from=vip&id=${modelValue.value?.userRightsConfigId}`,
48
+ url: `${uni.$lcb.internalPages.drawdown}?from=vip&id=${modelValue.value?.userRightsConfigId}`,
49
49
  })
50
50
  }
51
51
  const onClose = () => {
package/index.ts CHANGED
@@ -1,15 +1,25 @@
1
1
  import { LcbGlobal } from './action'
2
-
2
+ import { merge } from 'lodash-es'
3
3
  export const $lcb: LcbGlobal = {
4
4
  navigateTo: (url) => {
5
5
  uni.navigateTo({ url })
6
6
  },
7
+ internalPages: {
8
+ webview: '/pages/system/webview',
9
+ search: '/pages/search/index',
10
+ setting: '/pages/mine/setting',
11
+ home: '/pages/index/index',
12
+ orderList: '/pages-sub/order/list',
13
+ authPhone: '/pages/system/authPhone',
14
+ userEdit: '/pages/user/edit',
15
+ drawdown: '/pages/drawdown/drawdown',
16
+ },
7
17
  } as LcbGlobal
8
-
18
+ uni.$lcb = $lcb
9
19
  export const setup = (params: Partial<LcbGlobal>) => {
10
- uni.$lcb = Object.assign($lcb, params)
20
+ merge(uni.$lcb, params)
11
21
  }
12
- uni.$lcb = $lcb
22
+
13
23
  // #ifdef H5
14
24
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
15
25
  // @ts-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.61",
3
+ "version": "0.2.63",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],