Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
2ec5186a
提交
2ec5186a
authored
11月 14, 2024
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
629aa582
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
33 行增加
和
11 行删除
+33
-11
ChuangKitDesign.vue
src/components/ChuangKitDesign.vue
+10
-7
Upload.vue
src/modules/live/product/management/components/Upload.vue
+16
-1
ImageDesign.vue
src/modules/material/all/components/ImageDesign.vue
+7
-3
没有找到文件。
src/
modules/material/all/
components/ChuangKitDesign.vue
→
src/components/ChuangKitDesign.vue
浏览文件 @
2ec5186a
...
...
@@ -5,8 +5,9 @@ import md5 from 'blueimp-md5'
import
{
useUserStore
}
from
'@/stores/user'
import
{
uploadFileByUrl
}
from
'@/utils/upload'
const
props
=
defineProps
({
kindId
:
{
type
:
Number
,
default
:
447
}
})
const
model
=
defineModel
()
const
emit
=
defineEmits
([
'close'
])
const
emit
=
defineEmits
([
'close'
,
'save'
])
const
userStore
=
useUserStore
()
...
...
@@ -15,7 +16,7 @@ const userStore = useUserStore()
* @param obj 参数对象,对象中的所有属性全部参与签名的生成
* @returns {string} 签名
*/
const
buildSign
=
obj
=>
{
const
buildSign
=
(
obj
)
=>
{
const
signParameterArray
=
[]
for
(
const
key
in
obj
)
{
signParameterArray
.
push
(
`
${
key
}
=
${
obj
[
key
]}
`
)
...
...
@@ -38,13 +39,14 @@ const buildVersion2Sign = (appId, expireTime, userFlag, appSecret) => {
app_id
:
appId
,
expire_time
:
expireTime
,
user_flag
:
userFlag
,
app_secret
:
appSecret
app_secret
:
appSecret
,
}
return
buildSign
(
signParameterObj
)
}
window
.
chuangkitComplete
=
async
result
=>
{
window
.
chuangkitComplete
=
async
(
result
)
=>
{
console
.
log
(
result
)
if
(
!
result
.
cktMessage
)
{
return
}
...
...
@@ -53,6 +55,7 @@ window.chuangkitComplete = async result => {
const
uploadedURL
=
await
uploadFileByUrl
(
url
)
model
.
value
=
uploadedURL
}
emit
(
'save'
,
model
.
value
)
}
if
([
1
,
2
,
3
].
includes
(
result
.
kind
))
{
emit
(
'close'
)
...
...
@@ -63,7 +66,7 @@ let cktInstance
function
openDesignPage
()
{
const
appId
=
'54d9adec77d0402794018d166110f3dd'
const
appSecret
=
'08097010E0EF4B85EE2B8CE438328249'
const
userFlag
=
userStore
.
user
.
id
const
userFlag
=
userStore
.
user
.
id
+
props
.
kindId
.
toString
()
const
expireTime
=
Date
.
now
()
const
sign
=
buildVersion2Sign
(
appId
,
expireTime
,
userFlag
,
appSecret
)
const
params
=
{
...
...
@@ -71,13 +74,13 @@ function openDesignPage() {
expire_time
:
expireTime
,
user_flag
:
userFlag
,
device_type
:
1
,
kind_id
:
447
,
kind_id
:
props
.
kindId
,
version
:
'2.0'
,
sign
:
sign
,
enable_authorize
:
'1'
,
taxpayer_name
:
'chuangkit'
,
taxpayer_phone
:
'13820659475'
,
taxpayer_number
:
'91120116636067462H'
taxpayer_number
:
'91120116636067462H'
,
}
cktInstance
=
new
CktDesign
(
params
)
...
...
src/modules/live/product/management/components/Upload.vue
浏览文件 @
2ec5186a
...
...
@@ -3,6 +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/ChuangKitDesign.vue'
))
const
props
=
defineProps
({
modelValue
:
{
type
:
[
Array
,
String
],
default
:
()
=>
[]
},
...
...
@@ -47,6 +48,19 @@ const handleOpen = (i = 0) => {
const
getTitle
=
(
i
)
=>
(
i
===
0
&&
props
.
firstTitle
)
||
props
.
title
const
getTips
=
(
i
)
=>
(
i
===
0
&&
props
.
firstTips
)
||
props
.
tips
const
designVisible
=
ref
(
false
)
const
handleOpenDesign
=
(
i
=
0
)
=>
{
index
.
value
=
i
designVisible
.
value
=
true
}
const
handleDesignSave
=
(
url
)
=>
{
const
nowTime
=
dayjs
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
const
result
=
{
name
:
'未命名'
,
size
:
'未知'
,
type
:
'image/png'
,
url
,
upload_time
:
nowTime
}
const
updatedValue
=
[...
props
.
modelValue
]
updatedValue
[
index
.
value
]
=
result
emit
(
'update:modelValue'
,
updatedValue
)
}
</
script
>
<
template
>
<div
class=
"upload-wrapper"
>
...
...
@@ -57,7 +71,7 @@ const getTips = (i) => (i === 0 && props.firstTips) || props.tips
<li
@
click=
"handleOpen(i)"
>
<i
class=
"el-icon"
><UploadFilled
/></i>
本地上传
</li>
<li
v-if=
"!isVideo"
>
<li
@
click=
"handleOpenDesign(i)"
v-if=
"!isVideo"
>
<i
class=
"el-icon"
><Picture
/></i>
图库选择
</li>
</ul>
...
...
@@ -110,6 +124,7 @@ const getTips = (i) => (i === 0 && props.firstTips) || props.tips
</template>
</el-popover>
</template>
<ChuangKitDesign
:kindId=
"29"
@
save=
"handleDesignSave"
@
close=
"designVisible = false"
v-if=
"designVisible"
></ChuangKitDesign>
</div>
</template>
...
...
src/modules/material/all/components/ImageDesign.vue
浏览文件 @
2ec5186a
...
...
@@ -3,7 +3,7 @@ import { getChuanKitDesignList } from '../api'
import
{
useUserStore
}
from
'@/stores/user'
import
{
uploadFileByUrl
}
from
'@/utils/upload'
const
ChuangKitDesign
=
defineAsyncComponent
(()
=>
import
(
'
.
/ChuangKitDesign.vue'
))
const
ChuangKitDesign
=
defineAsyncComponent
(()
=>
import
(
'
@/components
/ChuangKitDesign.vue'
))
const
userStore
=
useUserStore
()
...
...
@@ -12,7 +12,7 @@ const active = ref('')
const
designVisible
=
ref
(
false
)
const
data
=
reactive
({
list
:
[],
count
:
0
count
:
0
,
})
async
function
fetchList
()
{
const
res
=
await
getChuanKitDesignList
({
user_flag
:
userStore
.
user
.
id
,
page_no
:
1
,
page_size
:
1000
,
time_order
:
1
})
...
...
@@ -35,7 +35,11 @@ function onClose() {
<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 }" @click="handleClick(item)">
<li
v-for=
"item in data.list"
:key=
"item.designId"
:class=
"
{ active: item.designId === active }"
@click="handleClick(item)">
<img
:src=
"item.thumbUrl"
/>
</li>
</ul>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论