Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-dj-oss-equity
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 669c0232
authored
Aug 27, 2021
by
zhouzy
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug
1 parent
126f417f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
src/views/customer/rightsCardManagement/index.vue
src/views/customer/rightsCardManagement/index.vue
View file @
669c023
...
@@ -102,7 +102,8 @@
...
@@ -102,7 +102,8 @@
class=
'download-qrcode'
class=
'download-qrcode'
@
click=
"downloadImg"
@
click=
"downloadImg"
:download=
"downloadFilename"
:download=
"downloadFilename"
>
下载二维码
</div>
>
下载二维码
</div>
<span
class=
"prompt"
>
若无法直接下载,请点击鼠标右键下载二维码
</span>
</div>
</div>
<el-form-item
<el-form-item
label=
"领取链接"
label=
"领取链接"
...
@@ -277,7 +278,7 @@
...
@@ -277,7 +278,7 @@
<el-switch
<el-switch
v-model=
"value"
v-model=
"value"
active-color=
"#13ce66"
active-color=
"#13ce66"
inactive-color=
"#
ff4949
"
inactive-color=
"#
d3d3d3
"
>
>
</el-switch>
</el-switch>
</el-form-item>
</el-form-item>
...
@@ -592,12 +593,13 @@ export default {
...
@@ -592,12 +593,13 @@ export default {
// },
// },
downloadImg
()
{
downloadImg
()
{
var
img
=
document
.
getElementById
(
'qrCode'
);
// 获取要下载的图片
var
img
=
document
.
getElementById
(
'qrCode'
);
// 获取要下载的图片
var
url
=
img
.
src
+
'?response-content-type=application/octet-stream '
;
// 获取图片地址
var
url
=
img
.
src
;
// 获取图片地址
console
.
log
(
url
)
console
.
log
(
url
)
var
a
=
document
.
createElement
(
'a'
);
// 创建一个a节点插入的document
//
var a = document.createElement('a'); // 创建一个a节点插入的document
var
event
=
new
MouseEvent
(
'click'
)
// 模拟鼠标click点击事件
var
event
=
new
MouseEvent
(
'click'
)
// 模拟鼠标click点击事件
a
.
download
=
'二维码'
// 设置a节点的download属性值
// a.download = '二维码' // 设置a节点的download属性值
a
.
href
=
url
;
// 将图片的src赋值给a节点的href
//
window
.
open
(
url
)
// 将图片的src赋值给a节点的href
a
.
dispatchEvent
(
event
)
a
.
dispatchEvent
(
event
)
},
},
...
@@ -957,5 +959,10 @@ export default {
...
@@ -957,5 +959,10 @@ export default {
padding-left
:
20px
;
padding-left
:
20px
;
margin-left
:
100px
;
margin-left
:
100px
;
}
}
.prompt
{
margin-left
:
20px
;
font-size
:
8px
;
color
:
#8c939d
;
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
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