Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
1bf1bedf
Commit
1bf1bedf
authored
Aug 03, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改没授权的时候不能保存图片
parent
7e3b1ece
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
183 additions
and
31 deletions
+183
-31
style1.vue
pages/goods/components/draw/style1.vue
+37
-6
style2.vue
pages/goods/components/draw/style2.vue
+36
-6
style3.vue
pages/goods/components/draw/style3.vue
+36
-6
style4.vue
pages/goods/components/draw/style4.vue
+36
-6
share-qrcode.vue
pages/share-qrcode/share-qrcode.vue
+38
-7
No files found.
pages/goods/components/draw/style1.vue
View file @
1bf1bedf
...
@@ -126,12 +126,43 @@ export default {
...
@@ -126,12 +126,43 @@ export default {
title
:
"保存成功"
title
:
"保存成功"
});
});
},
},
fail
:
function
(
e
)
{
fail
:
function
(
err
)
{
that
.
$refs
.
uTips
.
show
({
if
(
err
.
errMsg
===
"saveImageToPhotosAlbum:fail auth deny"
)
{
title
:
"保存失败,请稍后重试"
,
uni
.
authorize
({
type
:
"error"
,
scope
:
'scope.writePhotosAlbum'
,
duration
:
"2300"
success
:
(
res
)
=>
{
});
console
.
log
(
'11111'
);
},
fail
:
(
res
)
=>
{
uni
.
showModal
({
content
:
'检测到您没打开保存到相册权限,是否去设置打开?'
,
confirmText
:
"确认"
,
cancelText
:
'取消'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
){
uni
.
openSetting
({
success
:
(
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
authSetting
[
'scope.writePhotosAlbum'
]){
that
.
saveImage
()
}
}
})
}
else
{
console
.
log
(
'取消'
);
}
}
})
}
})
}
else
{
that
.
$refs
.
uTips
.
show
({
title
:
"保存失败,请稍后重试"
,
type
:
"error"
,
duration
:
"2300"
});
}
},
},
complete
:
function
()
{
complete
:
function
()
{
uni
.
hideLoading
();
uni
.
hideLoading
();
...
...
pages/goods/components/draw/style2.vue
View file @
1bf1bedf
...
@@ -132,12 +132,42 @@ export default {
...
@@ -132,12 +132,42 @@ export default {
title
:
"保存成功"
,
title
:
"保存成功"
,
});
});
},
},
fail
:
function
(
e
)
{
fail
:
function
(
err
)
{
that
.
$refs
.
uTips
.
show
({
if
(
err
.
errMsg
===
"saveImageToPhotosAlbum:fail auth deny"
)
{
title
:
"保存失败,请稍后重试"
,
uni
.
authorize
({
type
:
"error"
,
scope
:
'scope.writePhotosAlbum'
,
duration
:
"2300"
,
success
:
(
res
)
=>
{
});
console
.
log
(
'11111'
);
},
fail
:
(
res
)
=>
{
uni
.
showModal
({
content
:
'检测到您没打开保存到相册权限,是否去设置打开?'
,
confirmText
:
"确认"
,
cancelText
:
'取消'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
){
uni
.
openSetting
({
success
:
(
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
authSetting
[
'scope.writePhotosAlbum'
]){
that
.
saveImage
()
}
}
})
}
else
{
console
.
log
(
'取消'
);
}
}
})
}
})
}
else
{
that
.
$refs
.
uTips
.
show
({
title
:
"保存失败,请稍后重试"
,
type
:
"error"
,
duration
:
"2300"
});
}
},
},
complete
:
function
()
{
complete
:
function
()
{
uni
.
hideLoading
();
uni
.
hideLoading
();
...
...
pages/goods/components/draw/style3.vue
View file @
1bf1bedf
...
@@ -132,12 +132,42 @@ export default {
...
@@ -132,12 +132,42 @@ export default {
title
:
"保存成功"
,
title
:
"保存成功"
,
});
});
},
},
fail
:
function
(
e
)
{
fail
:
function
(
err
)
{
that
.
$refs
.
uTips
.
show
({
if
(
err
.
errMsg
===
"saveImageToPhotosAlbum:fail auth deny"
)
{
title
:
"保存失败,请稍后重试"
,
uni
.
authorize
({
type
:
"error"
,
scope
:
'scope.writePhotosAlbum'
,
duration
:
"2300"
,
success
:
(
res
)
=>
{
});
console
.
log
(
'11111'
);
},
fail
:
(
res
)
=>
{
uni
.
showModal
({
content
:
'检测到您没打开保存到相册权限,是否去设置打开?'
,
confirmText
:
"确认"
,
cancelText
:
'取消'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
){
uni
.
openSetting
({
success
:
(
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
authSetting
[
'scope.writePhotosAlbum'
]){
that
.
saveImage
()
}
}
})
}
else
{
console
.
log
(
'取消'
);
}
}
})
}
})
}
else
{
that
.
$refs
.
uTips
.
show
({
title
:
"保存失败,请稍后重试"
,
type
:
"error"
,
duration
:
"2300"
});
}
},
},
complete
:
function
()
{
complete
:
function
()
{
uni
.
hideLoading
();
uni
.
hideLoading
();
...
...
pages/goods/components/draw/style4.vue
View file @
1bf1bedf
...
@@ -132,12 +132,42 @@ export default {
...
@@ -132,12 +132,42 @@ export default {
title
:
"保存成功"
,
title
:
"保存成功"
,
});
});
},
},
fail
:
function
(
e
)
{
fail
:
function
(
err
)
{
that
.
$refs
.
uTips
.
show
({
if
(
err
.
errMsg
===
"saveImageToPhotosAlbum:fail auth deny"
)
{
title
:
"保存失败,请稍后重试"
,
uni
.
authorize
({
type
:
"error"
,
scope
:
'scope.writePhotosAlbum'
,
duration
:
"2300"
,
success
:
(
res
)
=>
{
});
console
.
log
(
'11111'
);
},
fail
:
(
res
)
=>
{
uni
.
showModal
({
content
:
'检测到您没打开保存到相册权限,是否去设置打开?'
,
confirmText
:
"确认"
,
cancelText
:
'取消'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
){
uni
.
openSetting
({
success
:
(
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
authSetting
[
'scope.writePhotosAlbum'
]){
that
.
saveImage
()
}
}
})
}
else
{
console
.
log
(
'取消'
);
}
}
})
}
})
}
else
{
that
.
$refs
.
uTips
.
show
({
title
:
"保存失败,请稍后重试"
,
type
:
"error"
,
duration
:
"2300"
});
}
},
},
complete
:
function
()
{
complete
:
function
()
{
uni
.
hideLoading
();
uni
.
hideLoading
();
...
...
pages/share-qrcode/share-qrcode.vue
View file @
1bf1bedf
...
@@ -216,13 +216,44 @@
...
@@ -216,13 +216,44 @@
title
:
"保存成功"
,
title
:
"保存成功"
,
});
});
},
},
fail
:
function
(
e
)
{
fail
:
function
(
err
)
{
that
.
$refs
.
uTips
.
show
({
if
(
err
.
errMsg
===
"saveImageToPhotosAlbum:fail auth deny"
)
{
title
:
"保存失败,请稍后重试"
,
uni
.
authorize
({
type
:
"error"
,
scope
:
'scope.writePhotosAlbum'
,
duration
:
"2300"
,
success
:
(
res
)
=>
{
});
console
.
log
(
'11111'
);
},
},
fail
:
(
res
)
=>
{
uni
.
showModal
({
content
:
'检测到您没打开保存到相册权限,是否去设置打开?'
,
confirmText
:
"确认"
,
cancelText
:
'取消'
,
success
:
(
res
)
=>
{
if
(
res
.
confirm
){
uni
.
openSetting
({
success
:
(
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
authSetting
[
'scope.writePhotosAlbum'
]){
that
.
preservation
()
}
}
})
}
else
{
console
.
log
(
'取消'
);
}
}
})
}
})
}
else
{
that
.
$refs
.
uTips
.
show
({
title
:
"保存失败,请稍后重试"
,
type
:
"error"
,
duration
:
"2300"
,
});
}
},
complete
:
function
()
{
complete
:
function
()
{
uni
.
hideLoading
();
uni
.
hideLoading
();
},
},
...
...
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