@tplc/business 0.3.30 → 0.3.32

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,15 @@
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.32](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.31...v0.3.32) (2025-02-10)
6
+
7
+ ### [0.3.31](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.30...v0.3.31) (2025-02-10)
8
+
9
+
10
+ ### ✨ Features | 新功能
11
+
12
+ * 修改过滤字段 ([0b0b10d](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/0b0b10daa2ad61a9797be3c1cb3b86f653ad60e6))
13
+
5
14
  ### [0.3.30](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.29...v0.3.30) (2025-02-10)
6
15
 
7
16
 
@@ -14,7 +14,12 @@
14
14
  width: transformValueUnit(iconSize),
15
15
  }"
16
16
  >
17
- <wd-badge :modelValue="dataInfo[item.countKey || ''] || 0" :max="99">
17
+ <wd-badge
18
+ :modelValue="
19
+ basicInfo?.orderStatusCount?.[item.status || ''] || dataInfo[item.countKey || ''] || 0
20
+ "
21
+ :max="99"
22
+ >
18
23
  <wd-icon
19
24
  v-if="item.iconType === 0"
20
25
  class-prefix="lcb"
@@ -49,9 +54,10 @@
49
54
  </template>
50
55
 
51
56
  <script setup lang="ts">
52
- import { ref, watch } from 'vue'
57
+ import { inject, ref, watch } from 'vue'
53
58
  import { LcbUserOrderProps, IIconList } from './types'
54
59
  import { transformValueUnit } from '../../utils/transform'
60
+ import { USER_BASIC_INFO } from '../../constants'
55
61
  defineOptions({
56
62
  name: 'LcbUserOrder',
57
63
  options: {
@@ -60,6 +66,7 @@ defineOptions({
60
66
  styleIsolation: 'shared',
61
67
  },
62
68
  })
69
+ const basicInfo = inject(USER_BASIC_INFO, {}) as { orderStatusCount: Record<string, number> }
63
70
  const onClick = (item: IIconList) => {
64
71
  uni.navigateTo({
65
72
  url: `${uni.$lcb.internalPages.orderList}?orderStatus=${item.status}`,
@@ -7,7 +7,7 @@
7
7
  color: numsColor,
8
8
  }"
9
9
  >
10
- 0
10
+ {{ (basicInfo?.[valueKey] || 0).toLocaleString() }}
11
11
  </view>
12
12
  <view
13
13
  class="mt-15rpx"
@@ -24,7 +24,10 @@
24
24
  <script setup lang="ts">
25
25
  import { NumsItemProps } from '../types'
26
26
  import { transformValueUnit } from '../../../utils/transform'
27
+ import { USER_BASIC_INFO } from '../../../constants'
28
+ import { inject } from 'vue'
27
29
 
28
30
  defineProps<NumsItemProps>()
29
31
  const emits = defineEmits(['click'])
32
+ const basicInfo = inject(USER_BASIC_INFO, {})
30
33
  </script>
@@ -94,24 +94,28 @@
94
94
  v-if="valuesCard == true"
95
95
  v-bind="$props"
96
96
  title="储值卡"
97
+ valueKey="walletAmount"
97
98
  @click="navigateTo('/pages-sub/walletAccount/index')"
98
99
  />
99
100
  <Nums
100
101
  v-if="coupons == true"
101
102
  v-bind="$props"
102
103
  title="优惠券"
104
+ valueKey="voucherCount"
103
105
  @click="navigateTo('/pages-sub/mine/coupon')"
104
106
  />
105
107
  <Nums
106
108
  v-if="presales == true"
107
109
  v-bind="$props"
108
110
  title="预售券"
111
+ valueKey="voucherCount"
109
112
  @click="navigateTo('/pages-sub/mine/advanceTicket')"
110
113
  />
111
114
  <Nums
112
115
  v-if="memberPoints == true"
113
116
  v-bind="$props"
114
117
  title="会员积分"
118
+ valueKey="usePoint"
115
119
  @click="navigateTo('/pages-sub/vip/points')"
116
120
  />
117
121
  </view>
@@ -38,4 +38,5 @@ export interface NumsItemProps {
38
38
  titleColor?: string
39
39
  value?: number
40
40
  title?: string
41
+ valueKey: string
41
42
  }
package/constants.ts CHANGED
@@ -5,3 +5,5 @@ export const PAGE_PROVIDE_KEY = 'page_provide'
5
5
  export const PAGE_TYPE_PROVIDE_KEY = 'page_type_provide'
6
6
  /** 页面锚点 */
7
7
  export const PAGE_ANCHOR_PROVIDE_KEY = 'page_anchor_provide'
8
+ /** 用户基本信息 */
9
+ export const USER_BASIC_INFO = 'user_basic_info'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.3.30",
3
+ "version": "0.3.32",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -35,4 +35,5 @@ export interface NumsItemProps {
35
35
  titleColor?: string
36
36
  value?: number
37
37
  title?: string
38
+ valueKey: string
38
39
  }
@@ -5,3 +5,5 @@ export declare const PAGE_PROVIDE_KEY = 'page_provide'
5
5
  export declare const PAGE_TYPE_PROVIDE_KEY = 'page_type_provide'
6
6
  /** 页面锚点 */
7
7
  export declare const PAGE_ANCHOR_PROVIDE_KEY = 'page_anchor_provide'
8
+ /** 用户基本信息 */
9
+ export declare const USER_BASIC_INFO = 'user_basic_info'