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
276e6eea
Commit
276e6eea
authored
Jan 11, 2022
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/xiangwei/educationstu
into master
# Conflicts: # src/pages/index/index.vue
parents
e7ab9789
a379dcda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
9 deletions
+19
-9
indexassembly.vue
src/pages/index/components/indexassembly.vue
+1
-1
index.vue
src/pages/index/index.vue
+18
-8
No files found.
src/pages/index/components/indexassembly.vue
View file @
276e6eea
...
...
@@ -227,7 +227,7 @@
}
.btn
{
width
:
100%
;
width
:
60vw
;
height
:
60
rpx
;
border-radius
:
30
rpx
;
background
:
#4C50E7
;
...
...
src/pages/index/index.vue
View file @
276e6eea
...
...
@@ -7,7 +7,10 @@
首页
</view>
<view
class=
"loginBox"
>
<indexassembly
@
success=
'againdata'
v-if=
"!userData.AccountId||userData.AccountId==0"
>
<view
class=
""
v-if=
"userData && userData.AccountName && userData.AccountId>0"
>
{{
userData
.
AccountName
}}
</view>
<indexassembly
@
success=
'againdata'
v-else
>
<view
class=
"flex_start_center"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/login2x.png"
...
...
@@ -15,9 +18,6 @@
登录
</view>
</indexassembly>
<view
class=
""
v-else
>
{{
userData
.
AccountName
}}
</view>
</view>
<view
class=
"scanBox"
>
...
...
@@ -116,7 +116,7 @@
<view
class=
"gardenCon"
v-for=
"(item1,index1) in item.List"
:key=
"index1"
id=
"img"
>
<image
:src=
"item1.Img"
mode=
"aspectFill"
style=
"width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"
></image>
<view
class=
"gardenTextBox"
:style=
"
{background:'linear-gradient(
0deg,'+getColor(item1.Img)
}">
<view
class=
"gardenTextBox"
:style=
"
{background:'linear-gradient(
to bottom,0deg,'+item1.bgcolor+')'
}">
<view
class=
"gardenTitle one_line"
>
{{
item1
.
Title
}}
</view>
...
...
@@ -192,13 +192,23 @@
getIndexData
()
{
proxy
.
$request
(
"/AppletIndex/GetIndexInfo_V2"
,
{}).
then
(
res
=>
{
data
.
pageData
=
res
.
Data
uni
.
setStorageSync
(
"indexData"
,
res
.
Data
);
if
(
data
.
pageData
.
LearningGardenList
.
length
>
0
){
data
.
pageData
.
LearningGardenList
.
forEach
(
x
=>
{
if
(
x
.
List
.
length
>
0
){
x
.
List
.
forEach
((
item
,
index
)
=>
{
this
.
getColor
(
item
.
Img
).
then
(
v
=>
{
item
.
bgcolor
=
v
;
})
})
}
})
}
})
},
async
getColor
(
src
)
{
let
res
=
await
getImageColor
(
'myCanvas'
,
'img'
,
src
)
const
formatres
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
)`
console
.
log
(
168
,
formatres
)
const
formatres
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
,1
)`
//
console.log(168, formatres)
return
formatres
},
againdata
()
{
...
...
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