Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
d31852ea
提交
d31852ea
authored
11月 14, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
2ec5186a
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
113 行增加
和
4 行删除
+113
-4
ChuangKitDesign.vue
src/components/ChuangKitDesign.vue
+1
-1
api.ts
src/modules/live/product/management/api.ts
+10
-0
ImageDesign.vue
...odules/live/product/management/components/ImageDesign.vue
+93
-0
Upload.vue
src/modules/live/product/management/components/Upload.vue
+2
-2
ImageDesign.vue
src/modules/material/all/components/ImageDesign.vue
+7
-1
没有找到文件。
src/components/ChuangKitDesign.vue
浏览文件 @
d31852ea
...
...
@@ -66,7 +66,7 @@ let cktInstance
function
openDesignPage
()
{
const
appId
=
'54d9adec77d0402794018d166110f3dd'
const
appSecret
=
'08097010E0EF4B85EE2B8CE438328249'
const
userFlag
=
userStore
.
user
.
id
+
props
.
kindId
.
toString
()
const
userFlag
=
userStore
.
user
.
id
const
expireTime
=
Date
.
now
()
const
sign
=
buildVersion2Sign
(
appId
,
expireTime
,
userFlag
,
appSecret
)
const
params
=
{
...
...
src/modules/live/product/management/api.ts
浏览文件 @
d31852ea
...
...
@@ -44,3 +44,13 @@ export function searchCategory(params: { name: string }) {
export
function
getAttrList
(
params
:
{
live_commodity_type_id
:
string
})
{
return
httpRequest
.
get
(
'/api/lab/v1/experiment/live-commodity-attr/search'
,
{
params
})
}
// 创客贴-查询我的设计(排序+筛选)
export
function
getChuanKitDesignList
(
data
:
{
user_flag
:
string
page_no
:
number
page_size
:
number
time_order
:
number
})
{
return
httpRequest
.
post
(
'/api/lab/v1/experiment/marketing-ai/chuangkit-designs'
,
data
)
}
src/modules/live/product/management/components/ImageDesign.vue
0 → 100644
浏览文件 @
d31852ea
<
script
setup
>
import
{
getChuanKitDesignList
}
from
'../api'
import
{
useUserStore
}
from
'@/stores/user'
import
{
uploadFileByUrl
}
from
'@/utils/upload'
const
ChuangKitDesign
=
defineAsyncComponent
(()
=>
import
(
'@/components/ChuangKitDesign.vue'
))
const
emit
=
defineEmits
([
'update'
,
'update:modelValue'
])
const
userStore
=
useUserStore
()
const
designVisible
=
ref
(
false
)
const
data
=
reactive
({
list
:
[],
count
:
0
,
})
async
function
fetchList
()
{
const
res
=
await
getChuanKitDesignList
({
user_flag
:
userStore
.
user
.
id
,
kind_id
:
29
,
page_no
:
1
,
page_size
:
1000
,
time_order
:
1
,
})
Object
.
assign
(
data
,
res
.
data
)
}
onMounted
(
fetchList
)
function
onClose
()
{
designVisible
.
value
=
false
fetchList
()
}
const
active
=
ref
(
null
)
async
function
handleClick
(
item
)
{
active
.
value
=
item
}
async
function
handleSubmit
()
{
const
url
=
await
uploadFileByUrl
(
active
.
value
.
thumbUrl
)
emit
(
'update'
,
url
)
emit
(
'update:modelValue'
,
false
)
}
</
script
>
<
template
>
<el-dialog
title=
"图库选择"
:close-on-click-modal=
"false"
@
closed=
"$emit('update:modelValue', false)"
width=
"860px"
>
<div
class=
"image-design"
>
<el-button
type=
"primary"
@
click=
"designVisible = true"
>
打开编辑器
</el-button>
<ul>
<li
v-for=
"item in data.list"
:key=
"item.designId"
:class=
"
{ active: item.designId === active?.designId }"
@click="handleClick(item)">
<img
:src=
"item.thumbUrl"
/>
</li>
</ul>
<ChuangKitDesign
:kindId=
"29"
@
close=
"onClose"
v-if=
"designVisible"
></ChuangKitDesign>
</div>
<template
#
footer
>
<el-row
justify=
"center"
>
<el-button
round
auto-insert-space
@
click=
"$emit('update:modelValue', false)"
>
关闭
</el-button>
<el-button
type=
"primary"
round
auto-insert-space
:disabled=
"!active"
@
click=
"handleSubmit"
>
确定
</el-button>
</el-row>
</
template
>
</el-dialog>
</template>
<
style
lang=
"scss"
>
.image-design
{
ul
{
margin
:
30px
auto
;
display
:
flex
;
flex-wrap
:
wrap
;
align-items
:
center
;
gap
:
30px
;
}
li
{
width
:
140px
;
border-radius
:
20px
;
overflow
:
hidden
;
cursor
:
pointer
;
box-sizing
:
border-box
;
&
.active
{
border
:
5px
solid
var
(
--
main-color
);
}
}
img
{
width
:
100%
;
}
}
</
style
>
src/modules/live/product/management/components/Upload.vue
浏览文件 @
d31852ea
...
...
@@ -3,7 +3,7 @@ import { Plus, UploadFilled, Picture } from '@element-plus/icons-vue'
import
{
useFileDialog
}
from
'@vueuse/core'
import
{
upload
}
from
'@/utils/upload'
import
dayjs
from
'dayjs'
const
ChuangKitDesign
=
defineAsyncComponent
(()
=>
import
(
'@/components/ChuangKit
Design.vue'
))
const
ImageDesign
=
defineAsyncComponent
(()
=>
import
(
'./Image
Design.vue'
))
const
props
=
defineProps
({
modelValue
:
{
type
:
[
Array
,
String
],
default
:
()
=>
[]
},
...
...
@@ -124,7 +124,7 @@ const handleDesignSave = (url) => {
</template>
</el-popover>
</template>
<
ChuangKitDesign
:kindId=
"29"
@
save=
"handleDesignSave"
@
close=
"designVisible = false"
v-if=
"designVisible"
></ChuangKit
Design>
<
ImageDesign
v-model=
"designVisible"
:kindId=
"29"
@
update=
"handleDesignSave"
v-if=
"designVisible"
></Image
Design>
</div>
</template>
...
...
src/modules/material/all/components/ImageDesign.vue
浏览文件 @
d31852ea
...
...
@@ -15,7 +15,13 @@ const data = reactive({
count
:
0
,
})
async
function
fetchList
()
{
const
res
=
await
getChuanKitDesignList
({
user_flag
:
userStore
.
user
.
id
,
page_no
:
1
,
page_size
:
1000
,
time_order
:
1
})
const
res
=
await
getChuanKitDesignList
({
user_flag
:
userStore
.
user
.
id
,
kind_id
:
447
,
page_no
:
1
,
page_size
:
1000
,
time_order
:
1
,
})
Object
.
assign
(
data
,
res
.
data
)
}
onMounted
(
fetchList
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论