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
a9c231be
authored
Jan 11, 2024
by
owen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
营销:统一装修预览图片字段名称
parent
1fb7701e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
26 deletions
+26
-26
src/api/mall/promotion/diy/page.ts
+1
-1
src/api/mall/promotion/diy/template.ts
+1
-1
src/views/mall/promotion/diy/page/DiyPageForm.vue
+8
-8
src/views/mall/promotion/diy/page/decorate.vue
+1
-1
src/views/mall/promotion/diy/page/index.vue
+3
-3
src/views/mall/promotion/diy/template/DiyTemplateForm.vue
+8
-8
src/views/mall/promotion/diy/template/decorate.vue
+1
-1
src/views/mall/promotion/diy/template/index.vue
+3
-3
No files found.
src/api/mall/promotion/diy/page.ts
View file @
a9c231be
...
@@ -5,7 +5,7 @@ export interface DiyPageVO {
...
@@ -5,7 +5,7 @@ export interface DiyPageVO {
templateId
?:
number
templateId
?:
number
name
:
string
name
:
string
remark
:
string
remark
:
string
preview
Image
Urls
:
string
[]
preview
Pic
Urls
:
string
[]
property
:
string
property
:
string
}
}
...
...
src/api/mall/promotion/diy/template.ts
View file @
a9c231be
...
@@ -7,7 +7,7 @@ export interface DiyTemplateVO {
...
@@ -7,7 +7,7 @@ export interface DiyTemplateVO {
used
:
boolean
used
:
boolean
usedTime
?:
Date
usedTime
?:
Date
remark
:
string
remark
:
string
preview
Image
Urls
:
string
[]
preview
Pic
Urls
:
string
[]
property
:
string
property
:
string
}
}
...
...
src/views/mall/promotion/diy/page/DiyPageForm.vue
View file @
a9c231be
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"formData.remark"
placeholder=
"请输入备注"
/>
<el-input
v-model=
"formData.remark"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"预览图"
prop=
"preview
Image
Urls"
>
<el-form-item
label=
"预览图"
prop=
"preview
Pic
Urls"
>
<UploadImgs
v-model=
"formData.preview
Image
Urls"
/>
<UploadImgs
v-model=
"formData.preview
Pic
Urls"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<template
#
footer
>
<template
#
footer
>
...
@@ -40,7 +40,7 @@ const formData = ref({
...
@@ -40,7 +40,7 @@ const formData = ref({
id
:
undefined
,
id
:
undefined
,
name
:
undefined
,
name
:
undefined
,
remark
:
undefined
,
remark
:
undefined
,
preview
Image
Urls
:
[]
preview
Pic
Urls
:
[]
})
})
const
formRules
=
reactive
({
const
formRules
=
reactive
({
name
:
[{
required
:
true
,
message
:
'页面名称不能为空'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
'页面名称不能为空'
,
trigger
:
'blur'
}]
...
@@ -58,8 +58,8 @@ const open = async (type: string, id?: number) => {
...
@@ -58,8 +58,8 @@ const open = async (type: string, id?: number) => {
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
const
diyPage
=
await
DiyPageApi
.
getDiyPage
(
id
)
// 处理预览图
const
diyPage
=
await
DiyPageApi
.
getDiyPage
(
id
)
// 处理预览图
if
(
diyPage
?.
preview
Image
Urls
?.
length
>
0
)
{
if
(
diyPage
?.
preview
Pic
Urls
?.
length
>
0
)
{
diyPage
.
preview
ImageUrls
=
diyPage
.
previewImage
Urls
.
map
((
url
:
string
)
=>
{
diyPage
.
preview
PicUrls
=
diyPage
.
previewPic
Urls
.
map
((
url
:
string
)
=>
{
return
{
url
}
return
{
url
}
})
})
}
}
...
@@ -82,10 +82,10 @@ const submitForm = async () => {
...
@@ -82,10 +82,10 @@ const submitForm = async () => {
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
// 处理预览图
// 处理预览图
const
preview
ImageUrls
=
formData
.
value
.
previewImage
Urls
.
map
((
item
)
=>
{
const
preview
PicUrls
=
formData
.
value
.
previewPic
Urls
.
map
((
item
)
=>
{
return
item
[
'url'
]
?
item
[
'url'
]
:
item
return
item
[
'url'
]
?
item
[
'url'
]
:
item
})
})
const
data
=
{
...
formData
.
value
,
preview
Image
Urls
}
as
unknown
as
DiyPageApi
.
DiyPageVO
const
data
=
{
...
formData
.
value
,
preview
Pic
Urls
}
as
unknown
as
DiyPageApi
.
DiyPageVO
if
(
formType
.
value
===
'create'
)
{
if
(
formType
.
value
===
'create'
)
{
await
DiyPageApi
.
createDiyPage
(
data
)
await
DiyPageApi
.
createDiyPage
(
data
)
message
.
success
(
t
(
'common.createSuccess'
))
message
.
success
(
t
(
'common.createSuccess'
))
...
@@ -107,7 +107,7 @@ const resetForm = () => {
...
@@ -107,7 +107,7 @@ const resetForm = () => {
id
:
undefined
,
id
:
undefined
,
name
:
undefined
,
name
:
undefined
,
remark
:
undefined
,
remark
:
undefined
,
preview
Image
Urls
:
[]
preview
Pic
Urls
:
[]
}
}
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
}
}
...
...
src/views/mall/promotion/diy/page/decorate.vue
View file @
a9c231be
...
@@ -52,7 +52,7 @@ const resetForm = () => {
...
@@ -52,7 +52,7 @@ const resetForm = () => {
templateId
:
undefined
,
templateId
:
undefined
,
name
:
''
,
name
:
''
,
remark
:
''
,
remark
:
''
,
preview
Image
Urls
:
[],
preview
Pic
Urls
:
[],
property
:
''
property
:
''
}
as
DiyPageApi
.
DiyPageVO
}
as
DiyPageApi
.
DiyPageVO
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
...
...
src/views/mall/promotion/diy/page/index.vue
View file @
a9c231be
...
@@ -47,14 +47,14 @@
...
@@ -47,14 +47,14 @@
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"预览图"
align=
"center"
prop=
"preview
Image
Urls"
>
<el-table-column
label=
"预览图"
align=
"center"
prop=
"preview
Pic
Urls"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-image
<el-image
class=
"h-40px max-w-40px"
class=
"h-40px max-w-40px"
v-for=
"(url, index) in scope.row.preview
Image
Urls"
v-for=
"(url, index) in scope.row.preview
Pic
Urls"
:key=
"index"
:key=
"index"
:src=
"url"
:src=
"url"
:preview-src-list=
"scope.row.preview
Image
Urls"
:preview-src-list=
"scope.row.preview
Pic
Urls"
:initial-index=
"index"
:initial-index=
"index"
preview-teleported
preview-teleported
/>
/>
...
...
src/views/mall/promotion/diy/template/DiyTemplateForm.vue
View file @
a9c231be
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"formData.remark"
placeholder=
"请输入备注"
type=
"textarea"
/>
<el-input
v-model=
"formData.remark"
placeholder=
"请输入备注"
type=
"textarea"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"预览图"
prop=
"preview
Image
Urls"
>
<el-form-item
label=
"预览图"
prop=
"preview
Pic
Urls"
>
<UploadImgs
v-model=
"formData.preview
Image
Urls"
/>
<UploadImgs
v-model=
"formData.preview
Pic
Urls"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<template
#
footer
>
<template
#
footer
>
...
@@ -40,7 +40,7 @@ const formData = ref({
...
@@ -40,7 +40,7 @@ const formData = ref({
id
:
undefined
,
id
:
undefined
,
name
:
undefined
,
name
:
undefined
,
remark
:
undefined
,
remark
:
undefined
,
preview
Image
Urls
:
[]
preview
Pic
Urls
:
[]
})
})
const
formRules
=
reactive
({
const
formRules
=
reactive
({
name
:
[{
required
:
true
,
message
:
'模板名称不能为空'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
'模板名称不能为空'
,
trigger
:
'blur'
}]
...
@@ -59,8 +59,8 @@ const open = async (type: string, id?: number) => {
...
@@ -59,8 +59,8 @@ const open = async (type: string, id?: number) => {
try
{
try
{
const
diyTemplate
=
await
DiyTemplateApi
.
getDiyTemplate
(
id
)
const
diyTemplate
=
await
DiyTemplateApi
.
getDiyTemplate
(
id
)
// 处理预览图
// 处理预览图
if
(
diyTemplate
?.
preview
Image
Urls
?.
length
>
0
)
{
if
(
diyTemplate
?.
preview
Pic
Urls
?.
length
>
0
)
{
diyTemplate
.
preview
ImageUrls
=
diyTemplate
.
previewImage
Urls
.
map
((
url
:
string
)
=>
{
diyTemplate
.
preview
PicUrls
=
diyTemplate
.
previewPic
Urls
.
map
((
url
:
string
)
=>
{
return
{
url
}
return
{
url
}
})
})
}
}
...
@@ -83,10 +83,10 @@ const submitForm = async () => {
...
@@ -83,10 +83,10 @@ const submitForm = async () => {
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
// 处理预览图
// 处理预览图
const
preview
ImageUrls
=
formData
.
value
.
previewImage
Urls
.
map
((
item
)
=>
{
const
preview
PicUrls
=
formData
.
value
.
previewPic
Urls
.
map
((
item
)
=>
{
return
item
[
'url'
]
?
item
[
'url'
]
:
item
return
item
[
'url'
]
?
item
[
'url'
]
:
item
})
})
const
data
=
{
...
formData
.
value
,
preview
Image
Urls
}
as
unknown
as
DiyTemplateApi
.
DiyTemplateVO
const
data
=
{
...
formData
.
value
,
preview
Pic
Urls
}
as
unknown
as
DiyTemplateApi
.
DiyTemplateVO
if
(
formType
.
value
===
'create'
)
{
if
(
formType
.
value
===
'create'
)
{
await
DiyTemplateApi
.
createDiyTemplate
(
data
)
await
DiyTemplateApi
.
createDiyTemplate
(
data
)
message
.
success
(
t
(
'common.createSuccess'
))
message
.
success
(
t
(
'common.createSuccess'
))
...
@@ -108,7 +108,7 @@ const resetForm = () => {
...
@@ -108,7 +108,7 @@ const resetForm = () => {
id
:
undefined
,
id
:
undefined
,
name
:
undefined
,
name
:
undefined
,
remark
:
undefined
,
remark
:
undefined
,
preview
Image
Urls
:
[]
preview
Pic
Urls
:
[]
}
}
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
}
}
...
...
src/views/mall/promotion/diy/template/decorate.vue
View file @
a9c231be
...
@@ -118,7 +118,7 @@ const resetForm = () => {
...
@@ -118,7 +118,7 @@ const resetForm = () => {
used
:
false
,
used
:
false
,
usedTime
:
undefined
,
usedTime
:
undefined
,
remark
:
''
,
remark
:
''
,
preview
Image
Urls
:
[],
preview
Pic
Urls
:
[],
property
:
''
,
property
:
''
,
pages
:
[]
pages
:
[]
}
as
DiyTemplateApi
.
DiyTemplatePropertyVO
}
as
DiyTemplateApi
.
DiyTemplatePropertyVO
...
...
src/views/mall/promotion/diy/template/index.vue
View file @
a9c231be
...
@@ -47,14 +47,14 @@
...
@@ -47,14 +47,14 @@
<ContentWrap>
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
>
<el-table
v-loading=
"loading"
:data=
"list"
:stripe=
"true"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"预览图"
align=
"center"
prop=
"preview
Image
Urls"
>
<el-table-column
label=
"预览图"
align=
"center"
prop=
"preview
Pic
Urls"
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<el-image
<el-image
class=
"h-40px max-w-40px"
class=
"h-40px max-w-40px"
v-for=
"(url, index) in scope.row.preview
Image
Urls"
v-for=
"(url, index) in scope.row.preview
Pic
Urls"
:key=
"index"
:key=
"index"
:src=
"url"
:src=
"url"
:preview-src-list=
"scope.row.preview
Image
Urls"
:preview-src-list=
"scope.row.preview
Pic
Urls"
:initial-index=
"index"
:initial-index=
"index"
preview-teleported
preview-teleported
/>
/>
...
...
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