Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b86f0823
authored
Dec 19, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📖
code review:店铺装修逻辑
parent
df1c565c
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
23 additions
and
23 deletions
+23
-23
src/components/AppLinkInput/data.ts
+0
-19
src/components/DiyEditor/components/ComponentContainer.vue
+3
-0
src/components/DiyEditor/components/mobile/CouponCard/component.tsx
+1
-0
src/components/DiyEditor/components/mobile/CouponCard/config.ts
+1
-0
src/components/DiyEditor/components/mobile/HotZone/config.ts
+1
-0
src/components/DiyEditor/components/mobile/MagicCube/config.ts
+2
-0
src/components/DiyEditor/components/mobile/MenuGrid/config.ts
+1
-0
src/components/DiyEditor/components/mobile/MenuList/config.ts
+1
-0
src/components/DiyEditor/components/mobile/NoticeBar/property.vue
+0
-1
src/components/DiyEditor/components/mobile/ProductCard/config.ts
+1
-0
src/components/DiyEditor/components/mobile/ProductCard/index.vue
+1
-0
src/components/DiyEditor/components/mobile/ProductList/config.ts
+1
-0
src/components/DiyEditor/components/mobile/PromotionArticle/index.vue
+1
-0
src/components/DiyEditor/components/mobile/PromotionCombination/config.ts
+2
-0
src/components/DiyEditor/components/mobile/SearchBar/config.ts
+1
-0
src/components/DiyEditor/components/mobile/VideoPlayer/config.ts
+1
-0
src/components/DiyEditor/util.ts
+1
-0
src/views/mall/promotion/diy/template/decorate.vue
+3
-2
src/views/mall/promotion/diy/template/index.vue
+1
-1
No files found.
src/components/AppLinkInput/data.ts
View file @
b86f0823
...
...
@@ -35,8 +35,6 @@ export const enum APP_LINK_TYPE_ENUM {
PRODUCT_DETAIL_NORMAL
,
// 拼团商品详情
PRODUCT_DETAIL_COMBINATION
,
// 积分商品详情
PRODUCT_DETAIL_POINT
,
// 秒杀商品详情
PRODUCT_DETAIL_SECKILL
}
...
...
@@ -81,10 +79,6 @@ export const APP_LINK_GROUP_LIST = [
path
:
'/pages/public/setting'
},
{
name
:
'问题反馈'
,
path
:
'/pages/public/feedback'
},
{
name
:
'常见问题'
,
path
:
'/pages/public/faq'
}
...
...
@@ -112,11 +106,6 @@ export const APP_LINK_GROUP_LIST = [
name
:
'秒杀商品详情'
,
path
:
'/pages/goods/seckill'
,
type
:
APP_LINK_TYPE_ENUM
.
PRODUCT_DETAIL_SECKILL
},
{
name
:
'积分商品详情'
,
path
:
'/pages/goods/score'
,
type
:
APP_LINK_TYPE_ENUM
.
PRODUCT_DETAIL_POINT
}
]
},
...
...
@@ -146,10 +135,6 @@ export const APP_LINK_GROUP_LIST = [
path
:
'/pages/app/sign'
},
{
name
:
'积分商城'
,
path
:
'/pages/app/score-shop'
},
{
name
:
'优惠券中心'
,
path
:
'/pages/coupon/list'
},
...
...
@@ -243,10 +228,6 @@ export const APP_LINK_GROUP_LIST = [
path
:
'/pages/user/address/list'
},
{
name
:
'发票管理'
,
path
:
'/pages/user/invoice/list'
},
{
name
:
'用户佣金'
,
path
:
'/pages/user/wallet/commission'
},
...
...
src/components/DiyEditor/components/ComponentContainer.vue
View file @
b86f0823
...
...
@@ -100,6 +100,7 @@ const emits = defineEmits<{
(
e
:
'copy'
):
void
(
e
:
'delete'
):
void
}
>
()
/**
* 移动组件
* @param direction 移动方向
...
...
@@ -107,12 +108,14 @@ const emits = defineEmits<{
const
handleMoveComponent
=
(
direction
:
number
)
=>
{
emits
(
'move'
,
direction
)
}
/**
* 复制组件
*/
const
handleCopyComponent
=
()
=>
{
emits
(
'copy'
)
}
/**
* 删除组件
*/
...
...
src/components/DiyEditor/components/mobile/CouponCard/component.tsx
View file @
b86f0823
...
...
@@ -4,6 +4,7 @@ import { floatToFixed2 } from '@/utils'
import
{
formatDate
}
from
'@/utils/formatTime'
// 优惠值
// TODO @疯狂:idea 有告警
export
const
CouponDiscount
=
defineComponent
({
name
:
'CouponDiscount'
,
props
:
{
...
...
src/components/DiyEditor/components/mobile/CouponCard/config.ts
View file @
b86f0823
...
...
@@ -24,6 +24,7 @@ export interface CouponCardProperty {
}
// 定义组件
// TODO @疯狂:idea 有告警
export
const
component
=
{
id
:
'CouponCard'
,
name
:
'优惠券'
,
...
...
src/components/DiyEditor/components/mobile/HotZone/config.ts
View file @
b86f0823
...
...
@@ -9,6 +9,7 @@ export interface HotZoneProperty {
// 组件样式
style
:
ComponentStyle
}
/** 热区项目属性 */
export
interface
HotZoneItemProperty
{
// 链接的名称
...
...
src/components/DiyEditor/components/mobile/MagicCube/config.ts
View file @
b86f0823
...
...
@@ -13,6 +13,7 @@ export interface MagicCubeProperty {
// 组件样式
style
:
ComponentStyle
}
/** 广告魔方项目属性 */
export
interface
MagicCubeItemProperty
{
// 图标链接
...
...
@@ -30,6 +31,7 @@ export interface MagicCubeItemProperty {
}
// 定义组件
// TODO @疯狂:有 idea 爆红告警
export
const
component
=
{
id
:
'MagicCube'
,
name
:
'广告魔方'
,
...
...
src/components/DiyEditor/components/mobile/MenuGrid/config.ts
View file @
b86f0823
...
...
@@ -10,6 +10,7 @@ export interface MenuGridProperty {
// 组件样式
style
:
ComponentStyle
}
/** 宫格导航项目属性 */
export
interface
MenuGridItemProperty
{
// 图标链接
...
...
src/components/DiyEditor/components/mobile/MenuList/config.ts
View file @
b86f0823
...
...
@@ -8,6 +8,7 @@ export interface MenuListProperty {
// 组件样式
style
:
ComponentStyle
}
/** 列表导航项目属性 */
export
interface
MenuListItemProperty
{
// 图标链接
...
...
src/components/DiyEditor/components/mobile/NoticeBar/property.vue
View file @
b86f0823
...
...
@@ -12,7 +12,6 @@
<el-form-item
label=
"文字颜色"
prop=
"文字颜色"
>
<ColorInput
v-model=
"formData.textColor"
/>
</el-form-item>
<el-card
header=
"公告内容"
class=
"property-group"
shadow=
"never"
>
<Draggable
v-model=
"formData.contents"
>
<
template
#
default=
"{ element }"
>
...
...
src/components/DiyEditor/components/mobile/ProductCard/config.ts
View file @
b86f0823
...
...
@@ -59,6 +59,7 @@ export interface ProductCardFieldProperty {
}
// 定义组件
// TODO @疯狂:idea 有告警
export
const
component
=
{
id
:
'ProductCard'
,
name
:
'商品卡片'
,
...
...
src/components/DiyEditor/components/mobile/ProductCard/index.vue
View file @
b86f0823
...
...
@@ -134,6 +134,7 @@ watch(
deep
:
true
}
)
/**
* 计算商品的间距
* @param index 商品索引
...
...
src/components/DiyEditor/components/mobile/ProductList/config.ts
View file @
b86f0823
...
...
@@ -38,6 +38,7 @@ export interface ProductListFieldProperty {
}
// 定义组件
// TODO @疯狂:idea 有告警
export
const
component
=
{
id
:
'ProductList'
,
name
:
'商品栏'
,
...
...
src/components/DiyEditor/components/mobile/PromotionArticle/index.vue
View file @
b86f0823
...
...
@@ -6,6 +6,7 @@ import { PromotionArticleProperty } from './config'
import
*
as
ArticleApi
from
'@/api/mall/promotion/article/index'
/** 营销文章 */
// TODO @疯狂:idea 有告警
defineOptions
({
name
:
'PromotionArticle'
})
// 定义属性
const
props
=
defineProps
<
{
property
:
PromotionArticleProperty
}
>
()
...
...
src/components/DiyEditor/components/mobile/PromotionCombination/config.ts
View file @
b86f0823
...
...
@@ -29,6 +29,7 @@ export interface PromotionCombinationProperty {
// 组件样式
style
:
ComponentStyle
}
// 商品字段
export
interface
PromotionCombinationFieldProperty
{
// 是否显示
...
...
@@ -38,6 +39,7 @@ export interface PromotionCombinationFieldProperty {
}
// 定义组件
// TODO @疯狂:idea 有告警
export
const
component
=
{
id
:
'PromotionCombination'
,
name
:
'拼团'
,
...
...
src/components/DiyEditor/components/mobile/SearchBar/config.ts
View file @
b86f0823
...
...
@@ -17,6 +17,7 @@ export interface SearchProperty {
export
type
PlaceholderPosition
=
'left'
|
'center'
// 定义组件
// TODO @疯狂:idea 这里爆红,可以卡看咋优化下哇:is missing the following properties from type DiyComponent<SearchProperty>: uid, position
export
const
component
=
{
id
:
'SearchBar'
,
name
:
'搜索框'
,
...
...
src/components/DiyEditor/components/mobile/VideoPlayer/config.ts
View file @
b86f0823
...
...
@@ -19,6 +19,7 @@ export interface VideoPlayerStyle extends ComponentStyle {
}
// 定义组件
// TODO @疯狂:idea 有告警
export
const
component
=
{
id
:
'VideoPlayer'
,
name
:
'视频播放'
,
...
...
src/components/DiyEditor/util.ts
View file @
b86f0823
...
...
@@ -103,6 +103,7 @@ export function usePropertyForm<T>(modelValue: T, emit: Function): { formData: R
}
)
// TODO @疯狂:这个 idea 爆红,看看怎么可以解决哈
return
{
formData
}
}
...
...
src/views/mall/promotion/diy/template/decorate.vue
View file @
b86f0823
...
...
@@ -27,10 +27,11 @@
</DiyEditor>
</template>
<
script
setup
lang=
"ts"
>
// TODO @疯狂:要不要建个 decorate 目录,然后挪进去,改成 index.vue,这样可以更明确看到是个独立界面哈,更好找
import
*
as
DiyTemplateApi
from
'@/api/mall/promotion/diy/template'
import
*
as
DiyPageApi
from
'@/api/mall/promotion/diy/page'
import
{
useTagsViewStore
}
from
'@/store/modules/tagsView'
import
{
DiyComponentLibrary
,
PAGE_LIBS
}
from
'@/components/DiyEditor/util'
import
{
DiyComponentLibrary
,
PAGE_LIBS
}
from
'@/components/DiyEditor/util'
// 商城的 DIY 组件,在 DiyEditor 目录下
import
{
toNumber
}
from
'lodash-es'
/** 装修模板表单 */
...
...
@@ -51,7 +52,7 @@ const formData = ref<DiyTemplateApi.DiyTemplatePropertyVO>()
const
formRef
=
ref
()
// 表单 Ref
// 当前编辑的属性
const
currentFormData
=
ref
<
DiyTemplateApi
.
DiyTemplatePropertyVO
|
DiyPageApi
.
DiyPageVO
>
()
// 商城
H5
预览地址
// 商城
H5
预览地址
const
previewUrl
=
ref
(
''
)
// 获取详情
...
...
src/views/mall/promotion/diy/template/index.vue
View file @
b86f0823
...
...
@@ -205,7 +205,7 @@ const handleUse = async (row: DiyTemplateApi.DiyTemplateVO) => {
// 使用模板的二次确认
await
message
.
confirm
(
`是否使用模板“
${
row
.
name
}
”?`
)
// 发起删除
await
DiyTemplateApi
.
useDiyTemplate
(
row
.
id
)
await
DiyTemplateApi
.
useDiyTemplate
(
row
.
id
!
)
message
.
success
(
'使用成功'
)
// 刷新列表
await
getList
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment