Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
Project
Project
Details
Activity
Releases
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
刘文虎
account-book
Commits
d26e7519
Commit
d26e7519
authored
Aug 05, 2022
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:名片保存
parent
02705b63
Pipeline
#3071
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
29 deletions
+30
-29
index.vue
components/cell-card/index.vue
+30
-29
No files found.
components/cell-card/index.vue
View file @
d26e7519
...
@@ -80,12 +80,18 @@
...
@@ -80,12 +80,18 @@
</view>
</view>
</
template
>
</
template
>
<l-painter
<l-painter
:board=
"poster"
:board=
"poster
Save
"
isCanvasToTempFilePath
isCanvasToTempFilePath
@
success=
"handleCanvasSuccess"
@
success=
"handleCanvasSuccess
Save
"
custom-style=
"position: fixed; left: 200%"
custom-style=
"position: fixed; left: 200%"
/>
/>
<QRCodeView
:url=
"shareUrl"
@
canvas=
"handleCanvas"
/>
<l-painter
:board=
"posterShare"
isCanvasToTempFilePath
@
success=
"handleCanvasSuccessShare"
custom-style=
"position: fixed; right: 200%"
/>
<QRCodeView
:url=
"codeShareUrl"
@
canvas=
"handleCanvas"
/>
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</template>
</template>
...
@@ -112,10 +118,10 @@ export default {
...
@@ -112,10 +118,10 @@ export default {
size
:
60
,
size
:
60
,
img
:
''
,
img
:
''
,
codeUrl
:
''
,
codeUrl
:
''
,
poster
:
{},
posterShare
:
{},
posterSave
:
{},
saveUrl
:
''
,
saveUrl
:
''
,
currentBlock
:
()
=>
{},
currentBlock
:
()
=>
{},
type
:
'share'
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -131,7 +137,7 @@ export default {
...
@@ -131,7 +137,7 @@ export default {
isBlack
()
{
isBlack
()
{
return
this
.
info
.
coverUrl
==
'black'
return
this
.
info
.
coverUrl
==
'black'
},
},
s
hareUrl
()
{
codeS
hareUrl
()
{
return
card_share_url
+
`?cardId=
${
this
.
info
.
id
}
`
return
card_share_url
+
`?cardId=
${
this
.
info
.
id
}
`
},
},
// green 绿;blue 蓝;black 黑;
// green 绿;blue 蓝;black 黑;
...
@@ -154,8 +160,7 @@ export default {
...
@@ -154,8 +160,7 @@ export default {
}
}
}
}
},
},
currentPoster
()
{
currentPosterSave
()
{
if
(
this
.
isSave
)
{
switch
(
this
.
info
.
coverUrl
)
{
switch
(
this
.
info
.
coverUrl
)
{
case
'green'
:
case
'green'
:
return
{
return
{
...
@@ -277,7 +282,7 @@ export default {
...
@@ -277,7 +282,7 @@ export default {
},
},
{
{
type
:
'qrcode'
,
type
:
'qrcode'
,
text
:
this
.
s
hareUrl
,
text
:
this
.
codeS
hareUrl
,
css
:
{
css
:
{
position
:
'absolute'
,
position
:
'absolute'
,
width
:
'120rpx'
,
width
:
'120rpx'
,
...
@@ -411,7 +416,7 @@ export default {
...
@@ -411,7 +416,7 @@ export default {
},
},
{
{
type
:
'qrcode'
,
type
:
'qrcode'
,
text
:
this
.
s
hareUrl
,
text
:
this
.
codeS
hareUrl
,
css
:
{
css
:
{
position
:
'absolute'
,
position
:
'absolute'
,
width
:
'120rpx'
,
width
:
'120rpx'
,
...
@@ -519,7 +524,7 @@ export default {
...
@@ -519,7 +524,7 @@ export default {
},
},
{
{
type
:
'qrcode'
,
type
:
'qrcode'
,
text
:
this
.
s
hareUrl
,
text
:
this
.
codeS
hareUrl
,
css
:
{
css
:
{
position
:
'absolute'
,
position
:
'absolute'
,
width
:
'120rpx'
,
width
:
'120rpx'
,
...
@@ -562,7 +567,8 @@ export default {
...
@@ -562,7 +567,8 @@ export default {
],
],
}
}
}
}
}
else
if
(
this
.
isShare
)
{
},
currentPosterShare
()
{
switch
(
this
.
info
.
coverUrl
)
{
switch
(
this
.
info
.
coverUrl
)
{
case
'green'
:
case
'green'
:
return
{
return
{
...
@@ -697,7 +703,7 @@ export default {
...
@@ -697,7 +703,7 @@ export default {
},
},
{
{
type
:
'qrcode'
,
type
:
'qrcode'
,
text
:
this
.
s
hareUrl
,
text
:
this
.
codeS
hareUrl
,
css
:
{
css
:
{
position
:
'absolute'
,
position
:
'absolute'
,
width
:
'120rpx'
,
width
:
'120rpx'
,
...
@@ -845,7 +851,7 @@ export default {
...
@@ -845,7 +851,7 @@ export default {
},
},
{
{
type
:
'qrcode'
,
type
:
'qrcode'
,
text
:
this
.
s
hareUrl
,
text
:
this
.
codeS
hareUrl
,
css
:
{
css
:
{
position
:
'absolute'
,
position
:
'absolute'
,
width
:
'120rpx'
,
width
:
'120rpx'
,
...
@@ -968,7 +974,7 @@ export default {
...
@@ -968,7 +974,7 @@ export default {
},
},
{
{
type
:
'qrcode'
,
type
:
'qrcode'
,
text
:
this
.
s
hareUrl
,
text
:
this
.
codeS
hareUrl
,
css
:
{
css
:
{
position
:
'absolute'
,
position
:
'absolute'
,
width
:
'120rpx'
,
width
:
'120rpx'
,
...
@@ -1013,7 +1019,6 @@ export default {
...
@@ -1013,7 +1019,6 @@ export default {
],
],
}
}
}
}
}
},
},
isSave
()
{
isSave
()
{
return
this
.
type
==
'save'
return
this
.
type
==
'save'
...
@@ -1029,14 +1034,14 @@ export default {
...
@@ -1029,14 +1034,14 @@ export default {
handleCanvas
(
url
)
{
handleCanvas
(
url
)
{
this
.
codeUrl
=
url
this
.
codeUrl
=
url
},
},
handleCanvasSuccess
(
url
)
{
handleCanvasSuccessShare
(
url
)
{
if
(
this
.
isSave
)
{
this
.
$emit
(
'update'
,
url
)
this
.
saveUrl
=
url
},
}
handleCanvasSuccessSave
(
url
)
{
this
.
saveUrl
=
url
this
.
currentBlock
(
url
)
this
.
currentBlock
(
url
)
},
},
saveImage
(
type
=
'save'
)
{
saveImage
(
type
=
'save'
)
{
this
.
type
=
type
this
.
currentBlock
=
(
url
)
=>
{
this
.
currentBlock
=
(
url
)
=>
{
uni
.
saveImageToPhotosAlbum
({
uni
.
saveImageToPhotosAlbum
({
filePath
:
url
,
filePath
:
url
,
...
@@ -1068,16 +1073,12 @@ export default {
...
@@ -1068,16 +1073,12 @@ export default {
if
(
this
.
saveUrl
)
{
if
(
this
.
saveUrl
)
{
this
.
currentBlock
(
this
.
saveUrl
)
this
.
currentBlock
(
this
.
saveUrl
)
}
else
{
}
else
{
console
.
log
(
'------currentPoster-------'
,
this
.
currentPoster
)
this
.
posterSave
=
this
.
currentPosterSave
this
.
poster
=
this
.
currentPoster
}
}
},
},
updateImage
(
type
=
'share'
)
{
updateImage
()
{
this
.
type
=
type
console
.
log
(
'----updateImage-------'
)
this
.
currentBlock
=
(
url
)
=>
{
this
.
posterShare
=
this
.
currentPosterShare
this
.
$emit
(
'update'
,
url
)
}
this
.
poster
=
this
.
currentPoster
},
},
},
},
}
}
...
...
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