Skip to content

Commit 1b2c7ce

Browse files
committed
2 parents 51cffa4 + 25484a9 commit 1b2c7ce

File tree

12 files changed

+452
-198
lines changed

12 files changed

+452
-198
lines changed

src/api/mall/trade/brokerage/user/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ export interface BrokerageUserVO {
1313
avatar: string
1414
}
1515

16+
// 创建分销用户
17+
export const createBrokerageUser = (data: any) => {
18+
return request.post({ url: '/trade/brokerage-user/create', data })
19+
}
20+
1621
// 查询分销用户列表
1722
export const getBrokerageUserPage = async (params: any) => {
1823
return await request.get({ url: `/trade/brokerage-user/page`, params })

src/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
<div class="h-40px flex items-center justify-center">
33
<MagicCubeEditor
44
v-model="cellList"
5-
class="m-b-16px"
6-
:rows="1"
75
:cols="cellCount"
86
:cube-size="38"
7+
:rows="1"
8+
class="m-b-16px"
99
@hot-area-selected="handleHotAreaSelected"
1010
/>
11-
<img src="@/assets/imgs/diy/app-nav-bar-mp.png" alt="" class="h-30px w-76px" v-if="isMp" />
11+
<img v-if="isMp" alt="" class="h-30px w-76px" src="@/assets/imgs/diy/app-nav-bar-mp.png" />
1212
</div>
1313
<template v-for="(cell, cellIndex) in cellList" :key="cellIndex">
1414
<template v-if="selectedHotAreaIndex === cellIndex">
15-
<el-form-item label="类型" :prop="`cell[${cellIndex}].type`">
15+
<el-form-item :prop="`cell[${cellIndex}].type`" label="类型">
1616
<el-radio-group v-model="cell.type">
1717
<el-radio value="text">文字</el-radio>
1818
<el-radio value="image">图片</el-radio>
@@ -21,45 +21,48 @@
2121
</el-form-item>
2222
<!-- 1. 文字 -->
2323
<template v-if="cell.type === 'text'">
24-
<el-form-item label="内容" :prop="`cell[${cellIndex}].text`">
24+
<el-form-item :prop="`cell[${cellIndex}].text`" label="内容">
2525
<el-input v-model="cell!.text" maxlength="10" show-word-limit />
2626
</el-form-item>
27-
<el-form-item label="颜色" :prop="`cell[${cellIndex}].text`">
27+
<el-form-item :prop="`cell[${cellIndex}].text`" label="颜色">
2828
<ColorInput v-model="cell!.textColor" />
2929
</el-form-item>
30+
<el-form-item :prop="`cell[${cellIndex}].url`" label="链接">
31+
<AppLinkInput v-model="cell.url" />
32+
</el-form-item>
3033
</template>
3134
<!-- 2. 图片 -->
3235
<template v-else-if="cell.type === 'image'">
33-
<el-form-item label="图片" :prop="`cell[${cellIndex}].imgUrl`">
36+
<el-form-item :prop="`cell[${cellIndex}].imgUrl`" label="图片">
3437
<UploadImg v-model="cell.imgUrl" :limit="1" height="56px" width="56px">
3538
<template #tip>建议尺寸 56*56</template>
3639
</UploadImg>
3740
</el-form-item>
38-
<el-form-item label="链接" :prop="`cell[${cellIndex}].url`">
41+
<el-form-item :prop="`cell[${cellIndex}].url`" label="链接">
3942
<AppLinkInput v-model="cell.url" />
4043
</el-form-item>
4144
</template>
4245
<!-- 3. 搜索框 -->
4346
<template v-else>
44-
<el-form-item label="提示文字" :prop="`cell[${cellIndex}].placeholder`">
47+
<el-form-item :prop="`cell[${cellIndex}].placeholder`" label="提示文字">
4548
<el-input v-model="cell.placeholder" maxlength="10" show-word-limit />
4649
</el-form-item>
47-
<el-form-item label="圆角" :prop="`cell[${cellIndex}].borderRadius`">
50+
<el-form-item :prop="`cell[${cellIndex}].borderRadius`" label="圆角">
4851
<el-slider
4952
v-model="cell.borderRadius"
5053
:max="100"
5154
:min="0"
52-
show-input
53-
input-size="small"
5455
:show-input-controls="false"
56+
input-size="small"
57+
show-input
5558
/>
5659
</el-form-item>
5760
</template>
5861
</template>
5962
</template>
6063
</template>
6164

62-
<script setup lang="ts">
65+
<script lang="ts" setup>
6366
import { NavigationBarCellProperty } from '../config'
6467
import { usePropertyForm } from '@/components/DiyEditor/util'
6568
// 导航栏属性面板
@@ -87,4 +90,4 @@ const handleHotAreaSelected = (cellValue: NavigationBarCellProperty, index: numb
8790
}
8891
</script>
8992

90-
<style scoped lang="scss"></style>
93+
<style lang="scss" scoped></style>

src/components/DiyEditor/components/mobile/TitleBar/config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
1+
import {ComponentStyle, DiyComponent} from '@/components/DiyEditor/util'
22

33
/** 标题栏属性 */
44
export interface TitleBarProperty {
5-
// 背景图
6-
bgImgUrl: string
75
// 偏移
86
marginLeft: number
97
// 显示位置

src/components/DiyEditor/components/mobile/TitleBar/index.vue

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,63 @@
11
<template>
2-
<div class="title-bar">
3-
<el-image v-if="property.bgImgUrl" :src="property.bgImgUrl" fit="cover" class="w-full" />
4-
<div class="absolute left-0 top-0 w-full">
2+
<div
3+
:style="{
4+
background:
5+
property.style.bgType === 'color' ? property.style.bgColor : `url(${property.style.bgImg})`,
6+
backgroundSize: '100% 100%',
7+
backgroundRepeat: 'no-repeat'
8+
}"
9+
class="title-bar"
10+
>
11+
<!-- 内容 -->
12+
<div>
513
<!-- 标题 -->
614
<div
15+
v-if="property.title"
716
:style="{
817
fontSize: `${property.titleSize}px`,
918
fontWeight: property.titleWeight,
1019
color: property.titleColor,
1120
textAlign: property.textAlign
1221
}"
13-
v-if="property.title"
1422
>
1523
{{ property.title }}
1624
</div>
1725
<!-- 副标题 -->
1826
<div
27+
v-if="property.description"
1928
:style="{
2029
fontSize: `${property.descriptionSize}px`,
2130
fontWeight: property.descriptionWeight,
2231
color: property.descriptionColor,
2332
textAlign: property.textAlign
2433
}"
2534
class="m-t-8px"
26-
v-if="property.description"
2735
>
2836
{{ property.description }}
2937
</div>
3038
</div>
3139
<!-- 更多 -->
3240
<div
33-
class="more"
3441
v-show="property.more.show"
3542
:style="{
3643
color: property.descriptionColor
3744
}"
45+
class="more"
3846
>
3947
<span v-if="property.more.type !== 'icon'"> {{ property.more.text }} </span>
40-
<Icon icon="ep:arrow-right" v-if="property.more.type !== 'text'" />
48+
<Icon v-if="property.more.type !== 'text'" icon="ep:arrow-right" />
4149
</div>
4250
</div>
4351
</template>
44-
<script setup lang="ts">
52+
<script lang="ts" setup>
4553
import { TitleBarProperty } from './config'
4654
4755
/** 标题栏 */
4856
defineOptions({ name: 'TitleBar' })
4957
5058
defineProps<{ property: TitleBarProperty }>()
5159
</script>
52-
<style scoped lang="scss">
60+
<style lang="scss" scoped>
5361
.title-bar {
5462
position: relative;
5563
width: 100%;
Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
<template>
22
<ComponentContainerProperty v-model="formData.style">
3-
<el-form label-width="85px" :model="formData" :rules="rules">
4-
<el-card header="风格" class="property-group" shadow="never">
5-
<el-form-item label="背景图片" prop="bgImgUrl">
6-
<UploadImg v-model="formData.bgImgUrl" width="100%" height="40px">
7-
<template #tip>建议尺寸 750*80</template>
8-
</UploadImg>
9-
</el-form-item>
3+
<el-form :model="formData" :rules="rules" label-width="85px">
4+
<el-card class="property-group" header="风格" shadow="never">
105
<el-form-item label="标题位置" prop="textAlign">
116
<el-radio-group v-model="formData!.textAlign">
127
<el-tooltip content="居左" placement="top">
@@ -22,65 +17,65 @@
2217
</el-radio-group>
2318
</el-form-item>
2419
</el-card>
25-
<el-card header="主标题" class="property-group" shadow="never">
26-
<el-form-item label="文字" prop="title" label-width="40px">
20+
<el-card class="property-group" header="主标题" shadow="never">
21+
<el-form-item label="文字" label-width="40px" prop="title">
2722
<InputWithColor
2823
v-model="formData.title"
2924
v-model:color="formData.titleColor"
30-
show-word-limit
3125
maxlength="20"
26+
show-word-limit
3227
/>
3328
</el-form-item>
34-
<el-form-item label="大小" prop="titleSize" label-width="40px">
29+
<el-form-item label="大小" label-width="40px" prop="titleSize">
3530
<el-slider
3631
v-model="formData.titleSize"
3732
:max="60"
3833
:min="10"
39-
show-input
4034
input-size="small"
35+
show-input
4136
/>
4237
</el-form-item>
43-
<el-form-item label="粗细" prop="titleWeight" label-width="40px">
38+
<el-form-item label="粗细" label-width="40px" prop="titleWeight">
4439
<el-slider
4540
v-model="formData.titleWeight"
46-
:min="100"
4741
:max="900"
42+
:min="100"
4843
:step="100"
49-
show-input
5044
input-size="small"
45+
show-input
5146
/>
5247
</el-form-item>
5348
</el-card>
54-
<el-card header="副标题" class="property-group" shadow="never">
55-
<el-form-item label="文字" prop="description" label-width="40px">
49+
<el-card class="property-group" header="副标题" shadow="never">
50+
<el-form-item label="文字" label-width="40px" prop="description">
5651
<InputWithColor
5752
v-model="formData.description"
5853
v-model:color="formData.descriptionColor"
59-
show-word-limit
6054
maxlength="50"
55+
show-word-limit
6156
/>
6257
</el-form-item>
63-
<el-form-item label="大小" prop="descriptionSize" label-width="40px">
58+
<el-form-item label="大小" label-width="40px" prop="descriptionSize">
6459
<el-slider
6560
v-model="formData.descriptionSize"
6661
:max="60"
6762
:min="10"
68-
show-input
6963
input-size="small"
64+
show-input
7065
/>
7166
</el-form-item>
72-
<el-form-item label="粗细" prop="descriptionWeight" label-width="40px">
67+
<el-form-item label="粗细" label-width="40px" prop="descriptionWeight">
7368
<el-slider
7469
v-model="formData.descriptionWeight"
75-
:min="100"
7670
:max="900"
71+
:min="100"
7772
:step="100"
78-
show-input
7973
input-size="small"
74+
show-input
8075
/>
8176
</el-form-item>
8277
</el-card>
83-
<el-card header="查看更多" class="property-group" shadow="never">
78+
<el-card class="property-group" header="查看更多" shadow="never">
8479
<el-form-item label="是否显示" prop="more.show">
8580
<el-checkbox v-model="formData.more.show" />
8681
</el-form-item>
@@ -93,7 +88,7 @@
9388
<el-radio value="all">文字+图标</el-radio>
9489
</el-radio-group>
9590
</el-form-item>
96-
<el-form-item label="更多文字" prop="more.text" v-show="formData.more.type !== 'icon'">
91+
<el-form-item v-show="formData.more.type !== 'icon'" label="更多文字" prop="more.text">
9792
<el-input v-model="formData.more.text" />
9893
</el-form-item>
9994
<el-form-item label="跳转链接" prop="more.url">
@@ -104,7 +99,7 @@
10499
</el-form>
105100
</ComponentContainerProperty>
106101
</template>
107-
<script setup lang="ts">
102+
<script lang="ts" setup>
108103
import { TitleBarProperty } from './config'
109104
import { usePropertyForm } from '@/components/DiyEditor/util'
110105
// 导航栏属性面板
@@ -118,4 +113,4 @@ const { formData } = usePropertyForm(props.modelValue, emit)
118113
const rules = {}
119114
</script>
120115

121-
<style scoped lang="scss"></style>
116+
<style lang="scss" scoped></style>

0 commit comments

Comments
 (0)