Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f32597b5
authored
Mar 23, 2023
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update
1 parent
617a7828
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
34 deletions
linkwe-pc/src/components/UploadToCos.vue
linkwe-pc/src/views/application/shortLinkPopularize/components/IdentityAttachment.vue
linkwe-pc/src/views/application/shortLinkPopularize/index.vue
linkwe-pc/src/components/UploadToCos.vue
View file @
f32597b
...
...
@@ -192,7 +192,7 @@
this
.
aliOss
()
}
},
aliOss
()
{
a
sync
a
liOss
()
{
this
.
loading
=
true
let
file
=
undefined
if
(
!
this
.
multiple
||
this
.
limit
==
1
)
{
...
...
@@ -210,47 +210,44 @@
return
}
let
name
=
`/
${
dateFormat
(
date
,
'yyyy-MM-dd'
)}
/t
${
date
.
getTime
()}
-
${
uuid
()}${
format
}
`
t
his
.
ossObj
.
multipartUpload
(
name
,
file
,
{
t
ry
{
const
data
=
await
this
.
ossObj
.
multipartUpload
(
name
,
file
,
{
progress
:
(
progressData
)
=>
{
console
.
log
(
progressData
)
this
.
percentage
=
progressData
.
percent
*
100
this
.
speed
=
(
progressData
.
speed
/
1024
/
1024
).
toFixed
(
2
)
}
})
.
then
((
err1
,
data
)
=>
{
if
(
data
)
{
console
.
log
(
data
)
this
.
percentage
=
this
.
speed
=
0
if
(
err1
)
{
this
.
loading
=
false
this
.
$message
.
error
(
'上传失败,请稍后再试'
)
}
else
{
let
location
=
'https://'
+
data
.
Location
this
.
$emit
(
'upSuccess'
,
location
)
this
.
type
==
2
?
//获取视频第一帧画面
getVideoPic
({
url
:
location
}).
then
((
res
)
=>
{
this
.
loading
=
false
this
.
$emit
(
'getPicUrl'
,
res
.
data
.
url
)
})
:
(
this
.
loading
=
false
)
let
location
=
'https://'
+
data
.
Location
this
.
$emit
(
'upSuccess'
,
location
)
this
.
type
==
2
?
//获取视频第一帧画面
getVideoPic
({
url
:
location
}).
then
((
res
)
=>
{
this
.
loading
=
false
this
.
$emit
(
'getPicUrl'
,
res
.
data
.
url
)
})
:
(
this
.
loading
=
false
)
// 使用本地链接提供预览,避免上传后下载的问题
let
url
=
window
.
URL
.
createObjectURL
(
file
)
// 使用本地链接提供预览,避免上传后下载的问题
let
url
=
window
.
URL
.
createObjectURL
(
file
)
let
name
=
file
.
name
if
(
!
this
.
multiple
)
{
this
.
fileUrlWatch
=
url
this
.
$emit
(
'update:fileUrl'
,
location
)
this
.
$emit
(
'update:fileName'
,
(
this
.
fileNameWatch
=
name
))
}
else
{
this
.
fileListWatch
=
this
.
fileListWatch
.
concat
({
name
,
url
})
this
.
$emit
(
'update:fileList'
,
this
.
fileList
.
concat
({
name
,
url
:
location
}))
}
let
name
=
file
.
name
if
(
!
this
.
multiple
)
{
this
.
fileUrlWatch
=
url
this
.
$emit
(
'update:fileUrl'
,
location
)
this
.
$emit
(
'update:fileName'
,
(
this
.
fileNameWatch
=
name
))
}
else
{
this
.
fileListWatch
=
this
.
fileListWatch
.
concat
({
name
,
url
})
this
.
$emit
(
'update:fileList'
,
this
.
fileList
.
concat
({
name
,
url
:
location
}))
}
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
}
catch
(
e
)
{
this
.
loading
=
false
this
.
$message
.
error
(
'上传失败,请稍后再试'
)
}
},
tencentFn
()
{
this
.
loading
=
true
...
...
@@ -290,7 +287,6 @@
},
(
err1
,
data
)
=>
{
this
.
percentage
=
this
.
speed
=
0
console
.
log
(
data
)
if
(
err1
)
{
this
.
loading
=
false
this
.
$message
.
error
(
'上传失败,请稍后再试'
)
...
...
linkwe-pc/src/views/application/shortLinkPopularize/components/IdentityAttachment.vue
View file @
f32597b
...
...
@@ -7,7 +7,7 @@
<TextareaExtend
:disabled=
"isDetail"
v-model=
"talkForm.templateInfo"
:toolbar=
"['emoji'
, 'insertCustomerNickName'
]"
:toolbar=
"['emoji']"
maxlength=
"2000"
show-word-limit
placeholder=
"请输入"
...
...
@@ -300,6 +300,9 @@
baseData
(
val
)
{
if
(
val
.
templateInfo
)
{
this
.
form
.
templateInfo
=
val
.
templateInfo
console
.
log
(
222222
)
console
.
log
(
val
)
console
.
log
(
3333333
)
this
.
form
.
attachments
=
val
.
attachments
if
(
this
.
form
.
templateInfo
)
{
// this.form.templateInfo = this.baseData.templateInfo
...
...
linkwe-pc/src/views/application/shortLinkPopularize/index.vue
View file @
f32597b
...
...
@@ -258,6 +258,12 @@
},
created
()
{
this
.
getList
()
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
`
<div>通过群发、朋友圈、应用消息等多种推广形式快捷推广智能短链,触达客户</div>
`
)
}
}
</
script
>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment