Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
4015d4f1
Commit
4015d4f1
authored
Oct 27, 2021
by
黑潮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 图片
parent
51715cbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
form.vue
src/views/game/dzp/form.vue
+12
-2
No files found.
src/views/game/dzp/form.vue
View file @
4015d4f1
...
...
@@ -119,7 +119,7 @@
<
template
slot
-
scope
=
"scope"
v
-
if
=
"scope.row.prizeType !== 3"
>
<
template
v
-
if
=
"isAdd || scope.row.inOpt"
>
<
el
-
row
type
=
"flex"
align
=
"middle"
>
<
el
-
upload
action
=
"http://gicdev.demogic.com/api-marketing/upload-game-image
"
:
disabled
=
"!!scope.row.prizeImage"
:
data
=
"{ requestProject: 'marketing'
}
"
with
-
credentials
accept
=
"jpg,png"
class
=
"avatar-uploader"
:
show
-
file
-
list
=
"false"
:
before
-
upload
=
"beforeUpload"
:
on
-
success
=
"onUploaded(scope.row)"
:
on
-
error
=
"onUploadError"
>
<
el
-
upload
:
action
=
"`${getHost()
}
/api-marketing/upload-game-image`
"
:
disabled
=
"!!scope.row.prizeImage"
:
data
=
"{ requestProject: 'marketing'
}
"
with
-
credentials
accept
=
"jpg,png"
class
=
"avatar-uploader"
:
show
-
file
-
list
=
"false"
:
before
-
upload
=
"beforeUpload"
:
on
-
success
=
"onUploaded(scope.row)"
:
on
-
error
=
"onUploadError"
>
<
img
v
-
if
=
"scope.row.prizeImage"
:
src
=
"scope.row.prizeImage"
style
=
"width:30px;height:30px;object-fit:contain"
/>
<
i
v
-
else
class
=
"el-icon-plus avatar-uploader-icon"
><
/i
>
<
i
class
=
"el-icon-error"
v
-
if
=
"scope.row.prizeImage"
@
click
=
"scope.row.prizeImage = ''"
><
/i
>
...
...
@@ -332,6 +332,14 @@ export default {
}
}
,
methods
:
{
getHost
()
{
const
host
=
window
.
location
.
origin
;
if
(
host
.
indexOf
(
'localhost'
)
!=
'-1'
)
{
return
'http://gicdev.demogic.com'
;
}
else
{
return
host
;
}
}
,
beforeUpload
(
file
)
{
if
(
!
[
'image/jpeg'
,
'image/png'
].
includes
(
file
.
type
))
{
this
.
$message
.
warning
(
'图片格式错误'
);
...
...
@@ -344,7 +352,8 @@ export default {
onUploaded
(
row
)
{
return
function
(
res
,
file
,
fileList
)
{
if
(
res
.
errorCode
===
0
)
{
row
.
prizeImage
=
res
.
result
.
qcloudImageUrl
;
this
.
$set
(
row
,
'prizeImage'
,
res
.
result
.
qcloudImageUrl
);
// row.prizeImage = res.result.qcloudImageUrl;
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
...
...
@@ -675,6 +684,7 @@ export default {
}
);
}
else
if
(
v
.
prizeType
===
2
)
{
list
.
push
({
prizeImage
:
v
.
prizeImage
,
prizeCardId
:
v
.
prizeCardId
,
// 奖项设置: 所选卡券的主键ID coupCardId
prizeCount
:
v
.
prizeCount
,
// 奖品数量
prizeRate
:
0
,
...
...
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