Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
fe348df8
Commit
fe348df8
authored
Jan 13, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
bede69b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
index.vue
src/pages/index/index.vue
+0
-1
index.js
src/utils/index.js
+7
-2
No files found.
src/pages/index/index.vue
View file @
fe348df8
...
...
@@ -235,7 +235,6 @@
},
async
getColor
(
src
,
index
,
y
)
{
let
res
=
await
getImageColor
(
'myCanvas'
,
'img'
+
index
,
src
)
// console.log(index, res)
let
obj
=
{}
obj
.
formatres
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
,0.01)`
obj
.
formatres1
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
,0.6)`
...
...
src/utils/index.js
View file @
fe348df8
...
...
@@ -299,10 +299,15 @@ export let getImageColor = async (canvasID, imgID, imgSrc) => {
}
// 网络图片转base64
export
let
netUrlTobase64
=
async
(
url
,
suc
)
=>
{
let
toBase64Url
=
""
let
toBase64Url
=
""
;
let
newUrl
=
url
let
flag
=
url
.
indexOf
(
'https'
)
if
(
flag
==-
1
){
newUrl
=
url
.
replace
(
/http/
,
'https'
)
}
toBase64Url
=
await
new
Promise
(
resolve
=>
{
uni
.
request
({
url
:
u
rl
,
url
:
newU
rl
,
method
:
'GET'
,
responseType
:
'arraybuffer'
,
success
(
res
)
{
...
...
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