@tplc/business 0.0.60 → 0.0.62

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.0.62](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.61...v0.0.62) (2024-11-20)
6
+
7
+ ### [0.0.61](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.27...v0.0.61) (2024-11-20)
8
+
9
+
10
+ ### ✨ Features | 新功能
11
+
12
+ * wd-qr-code ts global ([70bb8fe](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/70bb8fe820d27a5a8d769ac0bfc4087a020d5835))
13
+
5
14
  ### [0.0.60](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.0.59...v0.0.60) (2024-11-20)
6
15
 
7
16
 
@@ -5,7 +5,7 @@
5
5
  marginLeft: transformValueUnit(marginHorizontal || 0),
6
6
  marginRight: transformValueUnit(marginHorizontal || 0),
7
7
  padding: `${transformValueUnit(paddingTop || paddingVertical || 0)} ${transformValueUnit(paddingRight || paddingHorizontal || 0)} ${transformValueUnit(paddingBottom || paddingVertical || 0)} ${transformValueUnit(paddingLeft || paddingHorizontal || 0)}`,
8
- borderRadius: transformValueUnit(radius),
8
+ borderRadius: `${transformValueUnit(topRadius || radius)} ${transformValueUnit(topRadius || radius)} ${transformValueUnit(bottomRadius || radius)} ${transformValueUnit(bottomRadius || radius)}`,
9
9
  color,
10
10
  backgroundColor: innerBackgroundColor,
11
11
  backgroundImage: backgroundImage ? `url('${backgroundImage}')` : '',
@@ -27,6 +27,8 @@ export interface LcbBlockProps {
27
27
  color?: string
28
28
  fontSize?: number
29
29
  radius?: number
30
+ topRadius?: number
31
+ bottomRadius?: number
30
32
  customClass?: string
31
33
  backgroundRepeat?: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'
32
34
  backgroundSize?: string
@@ -1,11 +1,13 @@
1
1
  <template>
2
- <wd-gap
3
- :height="transformValueUnit(height)"
4
- :safe-area-bottom="safeAreaBottom"
5
- :bg-color="bgColor"
6
- :safe-area-top="safeAreaTop"
7
- :custom-class="cutomClass"
8
- />
2
+ <lcb-block v-bind="$props">
3
+ <wd-gap
4
+ :height="transformValueUnit(height)"
5
+ :safe-area-bottom="safeAreaBottom"
6
+ :bg-color="bgColor"
7
+ :safe-area-top="safeAreaTop"
8
+ :custom-class="cutomClass"
9
+ />
10
+ </lcb-block>
9
11
  </template>
10
12
 
11
13
  <script setup lang="ts">
@@ -1,4 +1,6 @@
1
- export interface LcbGapProps {
1
+ import { LcbBlockProps } from '../lcb-block/types'
2
+
3
+ export interface LcbGapProps extends LcbBlockProps {
2
4
  height?: number
3
5
  safeAreaBottom?: boolean
4
6
  bgColor?: string
@@ -72,14 +72,15 @@
72
72
  <Search v-if="styleGroup === 2 && titleLocation === 'center'" :back="back" />
73
73
  <Title v-bind="titleProps" v-else-if="styleGroup === 2 || titleLocation === 'center'" />
74
74
  </view>
75
- <!-- </template> -->
76
75
  </view>
77
76
  </view>
77
+ <!-- 常规默认底部弹一个高度的gap -->
78
+ <lcb-gap v-if="topStyle === 1" :height="88" safe-area-top />
78
79
  </template>
79
80
 
80
81
  <script setup lang="ts">
81
82
  import { addUnit } from '@tplc/wot/components/common/util'
82
- import { computed, ref } from 'vue'
83
+ import { computed } from 'vue'
83
84
  import { ICapsule, NavProps } from './types'
84
85
  import Title from './Title/index.vue'
85
86
  import Search from './Search/index.vue'
@@ -27,7 +27,9 @@ export interface UserLevelRightsList extends ActionView {
27
27
  weightSort: string
28
28
  qrCode: string
29
29
  qrCodeTips: string
30
- otherConfig: string
30
+ otherConfig: {
31
+ textColor: string
32
+ }
31
33
  }
32
34
  export const currentRightsDetail = () =>
33
35
  uni.$lcb.http.post<CurrentRightsDetail>('/userLevel/currentRightsDetail')
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <wd-popup v-model="show" custom-style="background:transparent" @close="show = false" closable>
3
3
  <view class="pop-view flex justify-center flex-col items-center" v-if="data">
4
- <view class="text-4 mb-4">{{ data.userRightsTitle }}</view>
4
+ <view class="text-4 mb-4 font-500">{{ data.userRightsTitle }}</view>
5
5
  <mp-html :content="data.userRightsContent" v-if="data.userRightsContent" />
6
6
  <wd-qr-code
7
7
  custom-class="!mt-2.5"
@@ -3,7 +3,7 @@
3
3
  <view
4
4
  class="text-3"
5
5
  :style="{
6
- color: config.value.textColor || '#000',
6
+ color: current?.otherConfig?.textColor || '#000',
7
7
  }"
8
8
  >
9
9
  <view class="relative">
@@ -17,14 +17,14 @@
17
17
  </view>
18
18
  <view
19
19
  class="absolute leading-4.5 top-156rpx left-4 flex items-center gap-0.5"
20
- @click="$lcb.navigateTo('/pages-subs/vip/points')"
20
+ @click="navigateTo('/pages-subs/vip/points')"
21
21
  >
22
22
  <view>{{ translate('消费积分') }} {{ info.sumPoint }}</view>
23
23
  <wd-icon classPrefix="lcb" name="xiangyou" size="24rpx" />
24
24
  </view>
25
25
  <view
26
26
  class="absolute text-2.5 w-662rpx leading-8 bottom-2.5 left-2.5 flex items-center gap-0.5"
27
- @click="$lcb.navigateTo('/pages-subs/vip/upgrade-guide')"
27
+ @click="navigateTo('/pages-subs/vip/upgrade-guide')"
28
28
  >
29
29
  <view class="flex-1 truncate">
30
30
  {{ info.upgradeTips }}
@@ -54,10 +54,9 @@
54
54
  <script setup lang="ts">
55
55
  import { LcbVipProps } from './types'
56
56
  import { getJsonStrFirstUrl, transformValueUnit } from '../../utils/transform'
57
- import { computed, onMounted, ref } from 'vue'
57
+ import { onMounted, ref } from 'vue'
58
58
  import { CurrentRightsDetail, currentRightsDetail, UserLevelRightsList } from './api'
59
59
  import { useTranslate } from '@tplc/wot'
60
- import { $lcb } from '../../index'
61
60
  import InfoDialog from './components/InfoDialog/index.vue'
62
61
  const { translate } = useTranslate()
63
62
  defineOptions({
@@ -70,7 +69,7 @@ defineOptions({
70
69
  })
71
70
  withDefaults(defineProps<LcbVipProps>(), {
72
71
  cardHeight: 340,
73
- itemIconSize: 84,
72
+ itemIconSize: 48,
74
73
  itemNum: 5,
75
74
  itemTextColor: '#fff',
76
75
  itemTextSize: 24,
@@ -78,6 +77,10 @@ withDefaults(defineProps<LcbVipProps>(), {
78
77
  const info = ref<CurrentRightsDetail>()
79
78
  const current = ref<UserLevelRightsList>()
80
79
  const onItemClick = (item: UserLevelRightsList) => {
80
+ if (item.userRightsConfigId === '0') {
81
+ navigateTo('/pages-subs/vip/rights')
82
+ return
83
+ }
81
84
  current.value = item
82
85
  }
83
86
 
@@ -85,9 +88,9 @@ onMounted(async () => {
85
88
  const { data } = await currentRightsDetail()
86
89
  info.value = data
87
90
  })
88
- const config = computed(() => {
89
- return JSON.parse(current?.value?.otherConfig || '{}')
90
- })
91
+ const navigateTo = (url: string) => {
92
+ uni.$lcb.navigateTo(url)
93
+ }
91
94
  </script>
92
95
 
93
96
  <style lang="scss" scoped></style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.0.60",
3
+ "version": "0.0.62",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "peerDependencies": {
13
13
  "vue": ">=3.2.47",
14
- "@tplc/wot": "0.1.25"
14
+ "@tplc/wot": "0.1.27"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=18",
@@ -26,6 +26,8 @@ export interface LcbBlockProps {
26
26
  color?: string
27
27
  fontSize?: number
28
28
  radius?: number
29
+ topRadius?: number
30
+ bottomRadius?: number
29
31
  customClass?: string
30
32
  backgroundRepeat?: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'
31
33
  backgroundSize?: string
@@ -1,4 +1,5 @@
1
- export interface LcbGapProps {
1
+ import { LcbBlockProps } from '../lcb-block/types'
2
+ export interface LcbGapProps extends LcbBlockProps {
2
3
  height?: number
3
4
  safeAreaBottom?: boolean
4
5
  bgColor?: string
@@ -25,7 +25,9 @@ export interface UserLevelRightsList extends ActionView {
25
25
  weightSort: string
26
26
  qrCode: string
27
27
  qrCodeTips: string
28
- otherConfig: string
28
+ otherConfig: {
29
+ textColor: string
30
+ }
29
31
  }
30
32
  export declare const currentRightsDetail: () => Promise<
31
33
  import('../../../action').IResData<CurrentRightsDetail>
package/types/index.d.ts DELETED
@@ -1,6 +0,0 @@
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