@tplc/business 0.1.14 → 0.2.1
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 +566 -0
- package/action.d.ts +2 -0
- package/{components/lcb-user-top/api/index.ts → api/user.ts} +1 -0
- package/components/lcb-action-view/lcb-action-view.vue +14 -2
- package/components/lcb-action-view/types.ts +21 -2
- package/components/lcb-advert/lcb-advert.vue +78 -0
- package/components/lcb-advert/types.ts +3 -0
- package/components/lcb-banner-block/lcb-banner-block.vue +3 -4
- package/components/lcb-block/lcb-block.vue +11 -3
- package/components/lcb-block/types.ts +5 -1
- package/components/lcb-button/lcb-button.vue +32 -0
- package/components/lcb-button/types.ts +8 -0
- package/components/lcb-calendar-search/lcb-calendar-search.vue +3 -2
- package/components/lcb-city-select/components/lcb-city-letter/index.vue +4 -1
- package/components/lcb-city-select/components/lcb-city-list/index.vue +6 -1
- package/components/lcb-city-select/lcb-city-select.vue +24 -8
- package/components/lcb-gap/lcb-gap.vue +15 -7
- package/components/lcb-gap/types.ts +4 -2
- package/components/lcb-grid/lcb-grid.vue +56 -20
- package/components/lcb-grid/types.ts +8 -0
- package/components/lcb-home-search/lcb-home-search.vue +44 -20
- package/components/lcb-img-nav/lcb-img-nav.vue +51 -30
- package/components/lcb-img-nav/types.ts +16 -0
- package/components/lcb-list/components/FilterList/index.vue +26 -21
- package/components/lcb-list/components/FilterList/type.ts +1 -1
- package/components/lcb-list/components/FilterView/index.vue +121 -0
- package/components/lcb-list/components/FilterView/type.ts +8 -0
- package/components/lcb-list/lcb-list.vue +57 -138
- package/components/lcb-list/types.ts +1 -0
- package/components/lcb-nav/lcb-nav.vue +22 -9
- package/components/lcb-notice/lcb-notice.vue +1 -1
- package/components/lcb-product/lcb-product.vue +114 -4
- package/components/lcb-product/types.ts +3 -0
- package/components/lcb-product-item/components/ItemValue.vue +14 -25
- package/components/lcb-product-item/lcb-product-item.vue +13 -7
- package/components/lcb-rich-text/lcb-rich-text.vue +22 -0
- package/components/lcb-rich-text/types.ts +5 -0
- package/components/lcb-text/lcb-text.vue +20 -0
- package/components/lcb-text/types.ts +5 -0
- package/components/lcb-title/lcb-title.vue +33 -6
- package/components/lcb-title/types.ts +17 -3
- package/components/lcb-user-order/lcb-user-order.vue +48 -61
- package/components/lcb-user-order/types.ts +5 -48
- package/components/lcb-user-top/Nums/index.vue +3 -2
- package/components/lcb-user-top/lcb-user-top.vue +44 -26
- package/components/lcb-vip/api/index.ts +35 -0
- package/components/lcb-vip/components/InfoDialog/index.vue +65 -0
- package/components/lcb-vip/lcb-vip.vue +96 -0
- package/components/lcb-vip/types.ts +8 -0
- package/global.d.ts +5 -0
- package/iconfonts/index.css +24 -3
- package/index.ts +5 -1
- package/package.json +8 -3
- package/types/{components/lcb-user-top/api/index.d.ts → api/user.d.ts} +2 -1
- package/types/components/lcb-action-view/lcb-action-view.vue.d.ts +2 -22
- package/types/components/lcb-action-view/types.d.ts +21 -2
- package/types/components/lcb-advert/lcb-advert.vue.d.ts +28 -0
- package/types/components/lcb-advert/types.d.ts +3 -0
- package/types/components/lcb-area-picker/lcb-area-picker.vue.d.ts +1 -1
- package/types/components/lcb-banner-block/lcb-banner-block.vue.d.ts +0 -9
- package/types/components/lcb-block/lcb-block.vue.d.ts +4 -0
- package/types/components/lcb-block/types.d.ts +5 -0
- package/types/components/lcb-button/lcb-button.vue.d.ts +42 -0
- package/types/components/lcb-button/types.d.ts +7 -0
- package/types/components/lcb-calendar-search/lcb-calendar-search.vue.d.ts +6 -4
- package/types/components/lcb-gap/types.d.ts +3 -2
- package/types/components/lcb-grid/lcb-grid.vue.d.ts +13 -4
- package/types/components/lcb-grid/types.d.ts +8 -0
- package/types/components/lcb-home-search/lcb-home-search.vue.d.ts +4 -1
- package/types/components/lcb-img-nav/lcb-img-nav.vue.d.ts +21 -2
- package/types/components/lcb-img-nav/types.d.ts +15 -0
- package/types/components/lcb-list/components/FilterList/index.vue.d.ts +12 -4
- package/types/components/lcb-list/components/FilterList/type.d.ts +1 -1
- package/types/components/lcb-list/components/FilterView/index.vue.d.ts +36 -0
- package/types/components/lcb-list/components/FilterView/type.d.ts +7 -0
- package/types/components/lcb-list/lcb-list.vue.d.ts +2 -1
- package/types/components/lcb-list/types.d.ts +1 -0
- package/types/components/lcb-nav/lcb-nav.vue.d.ts +0 -3
- package/types/components/lcb-notice/lcb-notice.vue.d.ts +2 -2
- package/types/components/lcb-product/lcb-product.vue.d.ts +3 -0
- package/types/components/lcb-product/types.d.ts +3 -0
- package/types/components/lcb-product-item/lcb-product-item.vue.d.ts +2 -2
- package/types/components/lcb-rich-text/lcb-rich-text.vue.d.ts +44 -0
- package/types/components/lcb-rich-text/types.d.ts +4 -0
- package/types/components/lcb-swiper/lcb-swiper.vue.d.ts +2 -2
- package/types/components/lcb-text/lcb-text.vue.d.ts +42 -0
- package/types/components/lcb-text/types.d.ts +4 -0
- package/types/components/lcb-title/lcb-title.vue.d.ts +27 -1
- package/types/components/lcb-title/types.d.ts +15 -3
- package/types/components/lcb-user-order/types.d.ts +5 -35
- package/types/components/lcb-user-top/Nums/index.vue.d.ts +6 -2
- package/types/components/lcb-vip/api/index.d.ts +34 -0
- package/types/components/lcb-vip/components/InfoDialog/index.vue.d.ts +38 -0
- package/types/components/lcb-vip/lcb-vip.vue.d.ts +68 -0
- package/types/components/lcb-vip/types.d.ts +8 -0
- package/types/utils/auth.d.ts +2 -0
- package/types/utils/transform.d.ts +5 -1
- package/types/utils/utils.d.ts +2 -0
- package/utils/auth.ts +19 -0
- package/utils/transform.ts +13 -2
- package/utils/utils.ts +6 -1
- package/types/components/lcb-list/components/FilterList/mockData.d.ts +0 -63
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
import { computed, provide, useAttrs } from 'vue'
|
|
3
3
|
import { LcbProductItemProps } from './types'
|
|
4
4
|
import ItemValue from './components/ItemValue.vue'
|
|
5
|
-
|
|
6
|
-
const isNumber = (value: any) => typeof value === 'number'
|
|
7
|
-
|
|
8
5
|
defineOptions({
|
|
9
6
|
name: 'LcbProductItem',
|
|
10
7
|
options: {
|
|
@@ -13,6 +10,7 @@ defineOptions({
|
|
|
13
10
|
styleIsolation: 'shared',
|
|
14
11
|
},
|
|
15
12
|
})
|
|
13
|
+
const isNumber = (value: any) => typeof value === 'number'
|
|
16
14
|
|
|
17
15
|
const props = withDefaults(defineProps<LcbProductItemProps>(), {
|
|
18
16
|
layoutType: 'horizontal',
|
|
@@ -139,7 +137,9 @@ defineSlots<{
|
|
|
139
137
|
<template #title="{ value }"><slot name="title" :value="value" /></template>
|
|
140
138
|
<template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
|
|
141
139
|
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
142
|
-
<template #priceUnit="{ value }"
|
|
140
|
+
<template #priceUnit="{ value }">
|
|
141
|
+
<slot name="priceUnit" :value="value" />
|
|
142
|
+
</template>
|
|
143
143
|
<template #priceSuffix="{ value }">
|
|
144
144
|
<slot name="priceSuffix" :value="value" />
|
|
145
145
|
</template>
|
|
@@ -169,7 +169,9 @@ defineSlots<{
|
|
|
169
169
|
<template #title="{ value }"><slot name="title" :value="value" /></template>
|
|
170
170
|
<template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
|
|
171
171
|
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
172
|
-
<template #priceUnit="{ value }"
|
|
172
|
+
<template #priceUnit="{ value }">
|
|
173
|
+
<slot name="priceUnit" :value="value" />
|
|
174
|
+
</template>
|
|
173
175
|
<template #priceSuffix="{ value }">
|
|
174
176
|
<slot name="priceSuffix" :value="value" />
|
|
175
177
|
</template>
|
|
@@ -256,7 +258,9 @@ defineSlots<{
|
|
|
256
258
|
<template #title="{ value }"><slot name="title" :value="value" /></template>
|
|
257
259
|
<template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
|
|
258
260
|
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
259
|
-
<template #priceUnit="{ value }"
|
|
261
|
+
<template #priceUnit="{ value }">
|
|
262
|
+
<slot name="priceUnit" :value="value" />
|
|
263
|
+
</template>
|
|
260
264
|
<template #priceSuffix="{ value }">
|
|
261
265
|
<slot name="priceSuffix" :value="value" />
|
|
262
266
|
</template>
|
|
@@ -286,7 +290,9 @@ defineSlots<{
|
|
|
286
290
|
<template #title="{ value }"><slot name="title" :value="value" /></template>
|
|
287
291
|
<template #subTitle="{ value }"><slot name="subTitle" :value="value" /></template>
|
|
288
292
|
<template #price="{ value }"><slot name="price" :value="value" /></template>
|
|
289
|
-
<template #priceUnit="{ value }"
|
|
293
|
+
<template #priceUnit="{ value }">
|
|
294
|
+
<slot name="priceUnit" :value="value" />
|
|
295
|
+
</template>
|
|
290
296
|
<template #priceSuffix="{ value }">
|
|
291
297
|
<slot name="priceSuffix" :value="value" />
|
|
292
298
|
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<lcb-block v-bind="$props">
|
|
3
|
+
<mp-html :content="content" />
|
|
4
|
+
</lcb-block>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import { LcbRichTextProps } from './types'
|
|
9
|
+
import mpHtml from 'mp-html/src/uni-app/components/mp-html/mp-html.vue'
|
|
10
|
+
defineOptions({
|
|
11
|
+
name: 'LcbRichText',
|
|
12
|
+
options: {
|
|
13
|
+
addGlobalClass: true,
|
|
14
|
+
virtualHost: true,
|
|
15
|
+
styleIsolation: 'shared',
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
const props = withDefaults(defineProps<LcbRichTextProps>(), {})
|
|
19
|
+
console.log('props', props)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<lcb-block>
|
|
3
|
+
{{ text }}
|
|
4
|
+
</lcb-block>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import { LcbTextProps } from './types'
|
|
9
|
+
defineOptions({
|
|
10
|
+
name: 'LcbText',
|
|
11
|
+
options: {
|
|
12
|
+
addGlobalClass: true,
|
|
13
|
+
virtualHost: true,
|
|
14
|
+
styleIsolation: 'shared',
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
withDefaults(defineProps<LcbTextProps>(), {})
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<style lang="scss" scoped></style>
|
|
@@ -4,24 +4,44 @@
|
|
|
4
4
|
...$props,
|
|
5
5
|
}"
|
|
6
6
|
>
|
|
7
|
-
<lcb-action-view customClass="
|
|
8
|
-
<
|
|
7
|
+
<lcb-action-view :customClass="`!flex ${justify} !leading-none`" v-bind="action">
|
|
8
|
+
<view
|
|
9
9
|
:style="{
|
|
10
10
|
fontWeight,
|
|
11
11
|
}"
|
|
12
12
|
>
|
|
13
13
|
{{ title }}
|
|
14
|
-
</
|
|
15
|
-
<
|
|
14
|
+
</view>
|
|
15
|
+
<view
|
|
16
|
+
class="ml-3"
|
|
17
|
+
v-if="hint"
|
|
18
|
+
:style="{
|
|
19
|
+
fontSize: transformValueUnit(hintFontSize),
|
|
20
|
+
color: hintColor,
|
|
21
|
+
alignSelf: hintVerticalAlign,
|
|
22
|
+
}"
|
|
23
|
+
>
|
|
16
24
|
{{ hint }}
|
|
17
|
-
</
|
|
18
|
-
<
|
|
25
|
+
</view>
|
|
26
|
+
<view
|
|
27
|
+
v-if="moreText"
|
|
28
|
+
class="flex-1 flex justify-end items-center"
|
|
29
|
+
:style="{
|
|
30
|
+
fontSize: transformValueUnit(moreFontSize),
|
|
31
|
+
color: moreColor,
|
|
32
|
+
alignSelf: moreVerticalAlign,
|
|
33
|
+
}"
|
|
34
|
+
>
|
|
35
|
+
更多
|
|
36
|
+
<wd-icon name="xiangyou" classPrefix="lcb" :size="transformValueUnit(moreFontSize)" />
|
|
37
|
+
</view>
|
|
19
38
|
</lcb-action-view>
|
|
20
39
|
</lcb-block>
|
|
21
40
|
</template>
|
|
22
41
|
|
|
23
42
|
<script setup lang="ts">
|
|
24
43
|
import { LcbTitleProps } from './types'
|
|
44
|
+
import { transformValueUnit } from '../../utils/transform'
|
|
25
45
|
defineOptions({
|
|
26
46
|
name: 'LcbTitle',
|
|
27
47
|
options: {
|
|
@@ -36,6 +56,13 @@ withDefaults(defineProps<LcbTitleProps>(), {
|
|
|
36
56
|
fontSize: 28,
|
|
37
57
|
color: '#333',
|
|
38
58
|
title: '标题',
|
|
59
|
+
justify: 'justify-start',
|
|
60
|
+
moreFontSize: 24,
|
|
61
|
+
moreColor: '#999',
|
|
62
|
+
moreVerticalAlign: 'center',
|
|
63
|
+
hintFontSize: 24,
|
|
64
|
+
hintColor: '#666',
|
|
65
|
+
hintVerticalAlign: 'end',
|
|
39
66
|
})
|
|
40
67
|
</script>
|
|
41
68
|
<style lang="scss" scoped></style>
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import { LcbActionViewProps } from '../lcb-action-view/types'
|
|
2
2
|
import { LcbBlockProps } from '../lcb-block/types'
|
|
3
3
|
export interface LcbTitleProps extends LcbBlockProps {
|
|
4
|
-
title: string
|
|
5
4
|
/** 副标题 */
|
|
6
|
-
|
|
5
|
+
title: string
|
|
7
6
|
fontWeight?: number
|
|
8
|
-
showMore?: boolean
|
|
9
7
|
action?: LcbActionViewProps
|
|
8
|
+
justify?:
|
|
9
|
+
| 'justify-start'
|
|
10
|
+
| 'justify-end'
|
|
11
|
+
| 'justify-center'
|
|
12
|
+
| 'justify-between'
|
|
13
|
+
| 'justify-around'
|
|
14
|
+
|
|
15
|
+
hint?: string
|
|
16
|
+
hintColor?: string
|
|
17
|
+
hintFontSize?: number
|
|
18
|
+
hintVerticalAlign?: 'end' | 'center'
|
|
19
|
+
|
|
20
|
+
moreColor?: string
|
|
21
|
+
moreFontSize?: number
|
|
22
|
+
moreText?: string
|
|
23
|
+
moreVerticalAlign?: 'end' | 'center'
|
|
10
24
|
}
|
|
@@ -1,60 +1,55 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<lcb-block v-bind="$props"
|
|
3
|
-
<view
|
|
4
|
-
class="flex flex-col flex-justify-center items-center"
|
|
5
|
-
@click="onClick(item)"
|
|
6
|
-
v-for="item in iconList"
|
|
7
|
-
:key="item.id"
|
|
8
|
-
>
|
|
2
|
+
<lcb-block v-bind="$props">
|
|
3
|
+
<view class="flex justify-between">
|
|
9
4
|
<view
|
|
10
|
-
class="
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}"
|
|
15
|
-
@click="onClick"
|
|
5
|
+
class="flex flex-col flex-justify-center items-center"
|
|
6
|
+
@click="onClick(item)"
|
|
7
|
+
v-for="item in items"
|
|
8
|
+
:key="item.iconTitle"
|
|
16
9
|
>
|
|
17
|
-
<view v-if="item.iconType === 0">
|
|
18
|
-
<wd-icon
|
|
19
|
-
class-prefix="lcb"
|
|
20
|
-
v-bind="{
|
|
21
|
-
name: item.iconName || '',
|
|
22
|
-
size: transformValueUnit(iconSize),
|
|
23
|
-
color: iconColor,
|
|
24
|
-
}"
|
|
25
|
-
/>
|
|
26
|
-
</view>
|
|
27
10
|
<view
|
|
28
|
-
|
|
29
|
-
class="bg-no-repeat bg-contain"
|
|
11
|
+
class="position-relative"
|
|
30
12
|
:style="{
|
|
31
13
|
height: transformValueUnit(iconSize),
|
|
32
14
|
width: transformValueUnit(iconSize),
|
|
33
|
-
color: iconColor,
|
|
34
|
-
backgroundImage: `url('${item.iconUpload}')`,
|
|
35
15
|
}"
|
|
36
|
-
|
|
16
|
+
>
|
|
17
|
+
<wd-badge :modelValue="dataInfo[item.countKey || ''] || 0" :max="99">
|
|
18
|
+
<wd-icon
|
|
19
|
+
v-if="item.iconType === 0"
|
|
20
|
+
class-prefix="lcb"
|
|
21
|
+
v-bind="{
|
|
22
|
+
name: item.iconName || '',
|
|
23
|
+
size: transformValueUnit(iconSize),
|
|
24
|
+
color: iconColor,
|
|
25
|
+
}"
|
|
26
|
+
/>
|
|
27
|
+
|
|
28
|
+
<wd-img
|
|
29
|
+
v-if="item.iconType === 1"
|
|
30
|
+
:height="transformValueUnit(iconSize)"
|
|
31
|
+
:width="transformValueUnit(iconSize)"
|
|
32
|
+
:src="item.iconUpload"
|
|
33
|
+
/>
|
|
34
|
+
</wd-badge>
|
|
35
|
+
</view>
|
|
37
36
|
<view
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
marginTop: transformValueUnit((textSize || 0) / 3),
|
|
48
|
-
}"
|
|
49
|
-
>
|
|
50
|
-
{{ item.iconTitle }}
|
|
37
|
+
class="flex flex-justify-between text-center"
|
|
38
|
+
:style="{
|
|
39
|
+
color: textColor,
|
|
40
|
+
fontSize: transformValueUnit(textSize),
|
|
41
|
+
marginTop: transformValueUnit((textSize || 0) / 3),
|
|
42
|
+
}"
|
|
43
|
+
>
|
|
44
|
+
{{ item.iconTitle }}
|
|
45
|
+
</view>
|
|
51
46
|
</view>
|
|
52
47
|
</view>
|
|
53
48
|
</lcb-block>
|
|
54
49
|
</template>
|
|
55
50
|
|
|
56
51
|
<script setup lang="ts">
|
|
57
|
-
import {
|
|
52
|
+
import { ref, watch } from 'vue'
|
|
58
53
|
import { LcbUserOrderProps, IIconList } from './types'
|
|
59
54
|
import { transformValueUnit } from '../../utils/transform'
|
|
60
55
|
defineOptions({
|
|
@@ -65,7 +60,7 @@ defineOptions({
|
|
|
65
60
|
styleIsolation: 'shared',
|
|
66
61
|
},
|
|
67
62
|
})
|
|
68
|
-
const onClick = (item:
|
|
63
|
+
const onClick = (item: IIconList) => {
|
|
69
64
|
uni.navigateTo({
|
|
70
65
|
url: `/pages/order/index?status=${item.status}`,
|
|
71
66
|
})
|
|
@@ -75,25 +70,17 @@ const props = withDefaults(defineProps<LcbUserOrderProps>(), {
|
|
|
75
70
|
paddingHorizontal: 0,
|
|
76
71
|
blurSize: 5,
|
|
77
72
|
})
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
list.push({
|
|
86
|
-
id: i,
|
|
87
|
-
iconType: props['iconType' + item],
|
|
88
|
-
iconTitle: props['iconTitle' + item],
|
|
89
|
-
iconName: props['iconName' + item],
|
|
90
|
-
iconUpload: props['iconUpload' + item],
|
|
91
|
-
status: item,
|
|
92
|
-
})
|
|
73
|
+
const dataInfo = ref<Record<string, any>>({})
|
|
74
|
+
watch(
|
|
75
|
+
() => props.dataUrl,
|
|
76
|
+
async (url) => {
|
|
77
|
+
if (url) {
|
|
78
|
+
const { data } = await uni.$lcb.http.post(url)
|
|
79
|
+
dataInfo.value = data as Record<string, any>
|
|
93
80
|
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
},
|
|
82
|
+
{ immediate: true },
|
|
83
|
+
)
|
|
97
84
|
</script>
|
|
98
85
|
|
|
99
86
|
<style lang="scss" scoped></style>
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
export interface IIconList {
|
|
2
|
-
|
|
3
|
-
iconType: number
|
|
2
|
+
iconType: 0 | 1
|
|
4
3
|
iconTitle?: string
|
|
5
4
|
iconName?: string
|
|
6
5
|
iconUpload?: string
|
|
7
|
-
status?:
|
|
6
|
+
status?: string
|
|
7
|
+
countKey?: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface LcbUserOrderProps {
|
|
11
|
-
|
|
11
|
+
dataUrl?: string
|
|
12
12
|
marginTop?: number
|
|
13
13
|
marginBottom?: number
|
|
14
14
|
marginHorizontal?: number
|
|
15
|
-
// marginLeft?: number
|
|
16
|
-
// marginRight?: number
|
|
17
|
-
// paddingTop?: number
|
|
18
|
-
// paddingBottom?: number
|
|
19
|
-
// paddingLeft?: number
|
|
20
|
-
// paddingRight?: number
|
|
21
15
|
paddingVertical?: number
|
|
22
16
|
paddingHorizontal?: number
|
|
23
17
|
backgroundColor?: string
|
|
@@ -30,42 +24,5 @@ export interface LcbUserOrderProps {
|
|
|
30
24
|
shadowColor?: string
|
|
31
25
|
shadowSize?: number
|
|
32
26
|
blurSize?: number
|
|
33
|
-
|
|
34
|
-
iconTitle0?: string
|
|
35
|
-
iconType0?: 0 | 1
|
|
36
|
-
iconName0?: string
|
|
37
|
-
iconUpload0?: string
|
|
38
|
-
|
|
39
|
-
iconTitle1?: string
|
|
40
|
-
iconType1?: 0 | 1
|
|
41
|
-
iconName1?: string
|
|
42
|
-
iconUpload1?: string
|
|
43
|
-
iconShow1?: boolean
|
|
44
|
-
|
|
45
|
-
iconTitle2?: string
|
|
46
|
-
iconType2?: 0 | 1
|
|
47
|
-
iconName2?: string
|
|
48
|
-
iconUpload2?: string
|
|
49
|
-
iconShow2?: boolean
|
|
50
|
-
|
|
51
|
-
iconTitle3?: string
|
|
52
|
-
iconType3?: 0 | 1
|
|
53
|
-
iconName3?: string
|
|
54
|
-
iconUpload3?: string
|
|
55
|
-
iconShow3?: boolean
|
|
56
|
-
|
|
57
|
-
iconTitle4?: string
|
|
58
|
-
iconType4?: 0 | 1
|
|
59
|
-
iconName4?: string
|
|
60
|
-
iconUpload4?: string
|
|
61
|
-
iconShow4?: boolean
|
|
62
|
-
|
|
63
|
-
iconTitle5?: string
|
|
64
|
-
iconType5?: 0 | 1
|
|
65
|
-
iconName5?: string
|
|
66
|
-
iconUpload5?: string
|
|
67
|
-
iconTitle?: string
|
|
68
|
-
iconType?: 0 | 1
|
|
69
|
-
iconName?: string
|
|
70
|
-
iconUpload?: string
|
|
27
|
+
items: IIconList[]
|
|
71
28
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<view @click="emits('click')">
|
|
3
3
|
<view
|
|
4
4
|
class="font-bold leading-none"
|
|
5
5
|
:style="{
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
>
|
|
19
19
|
{{ title }}
|
|
20
20
|
</view>
|
|
21
|
-
</
|
|
21
|
+
</view>
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script setup lang="ts">
|
|
@@ -26,4 +26,5 @@ import { NumsItemProps } from '../types'
|
|
|
26
26
|
import { transformValueUnit } from '../../../utils/transform'
|
|
27
27
|
|
|
28
28
|
defineProps<NumsItemProps>()
|
|
29
|
+
const emits = defineEmits(['click'])
|
|
29
30
|
</script>
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
/>
|
|
28
28
|
</lcb-action-view>
|
|
29
29
|
<view class="flex-1">
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</
|
|
30
|
+
<view
|
|
31
|
+
class="font-500"
|
|
32
|
+
v-if="!userStore?.userInfo?.phone"
|
|
33
|
+
:style="{
|
|
34
|
+
fontSize: transformValueUnit(textSize),
|
|
35
|
+
color: textColor,
|
|
36
|
+
}"
|
|
37
|
+
@click="phoneHandler"
|
|
38
|
+
>
|
|
39
|
+
授权登录
|
|
40
|
+
</view>
|
|
41
41
|
<view v-else class="leading-none">
|
|
42
42
|
<view class="text-32rpx font-#333 font-500 mb-20rpx">
|
|
43
43
|
{{ userStore?.userInfo?.userName || '微信用户' }}
|
|
@@ -90,10 +90,30 @@
|
|
|
90
90
|
padding: `0 ${transformValueUnit(numsPadLR || 0)}`,
|
|
91
91
|
}"
|
|
92
92
|
>
|
|
93
|
-
<Nums
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
<Nums
|
|
94
|
+
v-if="valuesCard == true"
|
|
95
|
+
v-bind="$props"
|
|
96
|
+
title="储值卡"
|
|
97
|
+
@click="navigateTo('/pages-sub/walletAccount/index')"
|
|
98
|
+
/>
|
|
99
|
+
<Nums
|
|
100
|
+
v-if="coupons == true"
|
|
101
|
+
v-bind="$props"
|
|
102
|
+
title="优惠券"
|
|
103
|
+
@click="navigateTo('/pages-sub/mine/coupon')"
|
|
104
|
+
/>
|
|
105
|
+
<Nums
|
|
106
|
+
v-if="presales == true"
|
|
107
|
+
v-bind="$props"
|
|
108
|
+
title="预售券"
|
|
109
|
+
@click="navigateTo('/pages-sub/mine/advanceTicket')"
|
|
110
|
+
/>
|
|
111
|
+
<Nums
|
|
112
|
+
v-if="memberPoints == true"
|
|
113
|
+
v-bind="$props"
|
|
114
|
+
title="会员积分"
|
|
115
|
+
@click="navigateTo('/pages-sub/vip/points')"
|
|
116
|
+
/>
|
|
97
117
|
</view>
|
|
98
118
|
</lcb-block>
|
|
99
119
|
</template>
|
|
@@ -104,7 +124,7 @@ import { transformValueUnit } from '../../utils/transform'
|
|
|
104
124
|
import Nums from './Nums/index.vue'
|
|
105
125
|
import { computed } from 'vue'
|
|
106
126
|
import { addUnit } from '@tplc/wot/components/common/util'
|
|
107
|
-
|
|
127
|
+
|
|
108
128
|
const { statusBarHeight } = uni.getSystemInfoSync()
|
|
109
129
|
defineOptions({
|
|
110
130
|
name: 'LcbUserTop',
|
|
@@ -136,16 +156,9 @@ withDefaults(defineProps<LcbUserTopProps>(), {
|
|
|
136
156
|
const padTop = computed(() => {
|
|
137
157
|
return addUnit(statusBarHeight || 0)
|
|
138
158
|
})
|
|
139
|
-
const
|
|
140
|
-
uni.
|
|
141
|
-
|
|
142
|
-
success: async (res) => {
|
|
143
|
-
const { code } = res
|
|
144
|
-
await getUserPhone({
|
|
145
|
-
...e.detail,
|
|
146
|
-
code,
|
|
147
|
-
})
|
|
148
|
-
},
|
|
159
|
+
const phoneHandler = () => {
|
|
160
|
+
uni.navigateTo({
|
|
161
|
+
url: '/pages/system/authPhone',
|
|
149
162
|
})
|
|
150
163
|
}
|
|
151
164
|
const onAvatar = (headImgUrl) => {
|
|
@@ -158,6 +171,11 @@ const toEdit = () => {
|
|
|
158
171
|
url: '/pages/user/edit',
|
|
159
172
|
})
|
|
160
173
|
}
|
|
174
|
+
const navigateTo = (url) => {
|
|
175
|
+
uni.navigateTo({
|
|
176
|
+
url,
|
|
177
|
+
})
|
|
178
|
+
}
|
|
161
179
|
</script>
|
|
162
180
|
<style lang="scss" scoped>
|
|
163
181
|
.userPlace {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LcbActionViewProps } from '../../lcb-action-view/types'
|
|
2
|
+
import { ActionView } from '../../../action'
|
|
3
|
+
|
|
4
|
+
export interface CurrentRightsDetail {
|
|
5
|
+
coverImg: string
|
|
6
|
+
effectiveDate: string
|
|
7
|
+
sumPoint: number
|
|
8
|
+
upgradeTips: string
|
|
9
|
+
usePoint: number
|
|
10
|
+
usedPoint: number
|
|
11
|
+
userLevelName: string
|
|
12
|
+
userLevelRightsList: UserLevelRightsList[]
|
|
13
|
+
waitPoint: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface UserLevelRightsList extends ActionView {
|
|
17
|
+
categoryId: string
|
|
18
|
+
categoryName: string
|
|
19
|
+
categoryTags: string
|
|
20
|
+
icon: string
|
|
21
|
+
userRightsConfigId: string
|
|
22
|
+
userRightsContent: string
|
|
23
|
+
userRightsSubTitle: string
|
|
24
|
+
userRightsTitle: string
|
|
25
|
+
link: LcbActionViewProps
|
|
26
|
+
userRightsType: string
|
|
27
|
+
weightSort: string
|
|
28
|
+
qrCode: string
|
|
29
|
+
qrCodeTips: string
|
|
30
|
+
otherConfig: {
|
|
31
|
+
textColor: string
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export const currentRightsDetail = () =>
|
|
35
|
+
uni.$lcb.http.post<CurrentRightsDetail>('/userLevel/currentRightsDetail')
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wd-popup v-model="show" custom-style="background:transparent" @close="onClose" closable>
|
|
3
|
+
<view class="pop-view flex justify-center flex-col items-center" v-if="modelValue">
|
|
4
|
+
<view class="text-4 mb-4 font-500">{{ modelValue.userRightsTitle }}</view>
|
|
5
|
+
<mp-html :content="modelValue.userRightsContent" v-if="modelValue.userRightsContent" />
|
|
6
|
+
<wd-qr-code
|
|
7
|
+
custom-class="!mt-5"
|
|
8
|
+
:size="130"
|
|
9
|
+
canvasId="qrCode"
|
|
10
|
+
:value="modelValue.qrCode"
|
|
11
|
+
v-if="modelValue.qrCode"
|
|
12
|
+
/>
|
|
13
|
+
<view class="text-3 text-#969696 mt-3.5" v-if="modelValue.qrCodeTips">
|
|
14
|
+
{{ modelValue.qrCodeTips }}
|
|
15
|
+
</view>
|
|
16
|
+
<wd-button
|
|
17
|
+
type="primary"
|
|
18
|
+
plain
|
|
19
|
+
custom-class="!rounded-10rpx !mt-4 "
|
|
20
|
+
@click="onDrawdown"
|
|
21
|
+
v-if="['voucher', 'cashVoucher'].includes(modelValue.userRightsType) && !hiddenDrawdown"
|
|
22
|
+
>
|
|
23
|
+
{{ translate('领取') }}
|
|
24
|
+
</wd-button>
|
|
25
|
+
</view>
|
|
26
|
+
</wd-popup>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup lang="ts">
|
|
30
|
+
import { useTranslate } from '@tplc/wot'
|
|
31
|
+
import { UserLevelRightsList } from '../../api'
|
|
32
|
+
import mpHtml from 'mp-html/src/uni-app/components/mp-html/mp-html.vue'
|
|
33
|
+
import { watch, ref } from 'vue'
|
|
34
|
+
const { translate } = useTranslate()
|
|
35
|
+
const show = ref(false)
|
|
36
|
+
defineProps<{
|
|
37
|
+
hiddenDrawdown?: boolean
|
|
38
|
+
}>()
|
|
39
|
+
const modelValue = defineModel<UserLevelRightsList>()
|
|
40
|
+
watch(
|
|
41
|
+
() => modelValue.value,
|
|
42
|
+
(val) => {
|
|
43
|
+
if (val) show.value = true
|
|
44
|
+
},
|
|
45
|
+
)
|
|
46
|
+
const onDrawdown = () => {
|
|
47
|
+
uni.navigateTo({
|
|
48
|
+
url: `/pages/drawdown/drawdown?from=vip&id=${modelValue.value?.userRightsConfigId}`,
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
const onClose = () => {
|
|
52
|
+
show.value = false
|
|
53
|
+
modelValue.value = undefined
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<style lang="scss" scoped>
|
|
57
|
+
.pop-view {
|
|
58
|
+
width: 606rpx;
|
|
59
|
+
padding: 40rpx;
|
|
60
|
+
color: #000000;
|
|
61
|
+
background: #ffffff;
|
|
62
|
+
border-radius: 40rpx;
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
}
|
|
65
|
+
</style>
|