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
7e495175
Commit
7e495175
authored
Jan 11, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/xiangwei/educationstu
parents
ddee382d
71a3111f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
115 additions
and
93 deletions
+115
-93
Pronunciation.vue
src/components/word/Pronunciation.vue
+1
-1
index.vue
src/pages/index/index.vue
+4
-7
index.vue
src/pages/study/index.vue
+110
-84
index.js
src/utils/index.js
+0
-1
No files found.
src/components/word/Pronunciation.vue
View file @
7e495175
<
template
>
<
template
>
<view
class=
"wordPronItem"
>
<view
class=
"wordPronItem"
>
<view
class=
"num"
>
<view
class=
"num"
>
{{
cur
}}
/
{{
total
}}
<text
style=
"margin-left: 6rpx;"
>
{{
type
==
0
?
''
:
"复习"
}}
</text>
{{
cur
}}
/
{{
total
}}
<text
style=
"margin-left: 6rpx;
font-size: 20rpxs;
"
>
{{
type
==
0
?
''
:
"复习"
}}
</text>
</view>
</view>
<view
class=
"meaning"
>
<view
class=
"meaning"
>
{{
item
.
ChineseMean
}}
{{
item
.
ChineseMean
}}
...
...
src/pages/index/index.vue
View file @
7e495175
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
<view
class=
"gardenCon"
v-for=
"(item1,index1) in item.List"
:key=
"index1"
id=
"img"
>
<view
class=
"gardenCon"
v-for=
"(item1,index1) in item.List"
:key=
"index1"
id=
"img"
>
<image
:src=
"item1.Img"
mode=
"aspectFill"
<image
:src=
"item1.Img"
mode=
"aspectFill"
style=
"width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"
></image>
style=
"width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"
></image>
<view
class=
"gardenTextBox"
:style=
"
{'background':`linear-gradient(to bottom,
rgb(255,255,255,0) 0% ,${item1.bgcolor} , ${item1.bgcolor2})
` }">
<view
class=
"gardenTextBox"
:style=
"
{'background':`linear-gradient(to bottom,
${item1.bgcolor},${item1.bgcolor1} , ${item1.bgcolor2})
` }">
<view
class=
"gardenTitle one_line"
>
<view
class=
"gardenTitle one_line"
>
{{
item1
.
Title
}}
{{
item1
.
Title
}}
</view>
</view>
...
@@ -124,7 +124,6 @@
...
@@ -124,7 +124,6 @@
{{
item1
.
Digest
}}
{{
item1
.
Digest
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -196,9 +195,8 @@
...
@@ -196,9 +195,8 @@
if
(
x
.
List
.
length
>
0
){
if
(
x
.
List
.
length
>
0
){
x
.
List
.
forEach
((
item
,
index
)
=>
{
x
.
List
.
forEach
((
item
,
index
)
=>
{
this
.
getColor
(
item
.
Img
,
index
,
y
).
then
(
v
=>
{
this
.
getColor
(
item
.
Img
,
index
,
y
).
then
(
v
=>
{
console
.
log
(
v
)
// item.bgcolor = v;
data
.
pageData
.
LearningGardenList
[
v
.
y
].
List
[
v
.
index
].
bgcolor
=
v
.
formatres
;
data
.
pageData
.
LearningGardenList
[
v
.
y
].
List
[
v
.
index
].
bgcolor
=
v
.
formatres
;
data
.
pageData
.
LearningGardenList
[
v
.
y
].
List
[
v
.
index
].
bgcolor1
=
v
.
formatres1
;
data
.
pageData
.
LearningGardenList
[
v
.
y
].
List
[
v
.
index
].
bgcolor2
=
v
.
formatres2
;
data
.
pageData
.
LearningGardenList
[
v
.
y
].
List
[
v
.
index
].
bgcolor2
=
v
.
formatres2
;
})
})
...
@@ -208,15 +206,14 @@
...
@@ -208,15 +206,14 @@
}
}
})
})
},
},
async
getColor
(
src
,
index
,
y
)
{
async
getColor
(
src
,
index
,
y
)
{
let
res
=
await
getImageColor
(
'myCanvas'
,
'img'
,
src
)
let
res
=
await
getImageColor
(
'myCanvas'
,
'img'
,
src
)
let
obj
=
{}
let
obj
=
{}
obj
.
formatres
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
,0.4)`
obj
.
formatres
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
,0.01)`
obj
.
formatres1
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
,0.6)`
obj
.
formatres2
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
,1)`
obj
.
formatres2
=
`rgba(
${
res
.
r
}
,
${
res
.
g
}
,
${
res
.
b
}
,1)`
obj
.
index
=
index
obj
.
index
=
index
obj
.
y
=
y
obj
.
y
=
y
// console.log(168, formatres)
return
obj
return
obj
},
},
againdata
()
{
againdata
()
{
...
...
src/pages/study/index.vue
View file @
7e495175
...
@@ -217,6 +217,14 @@
...
@@ -217,6 +217,14 @@
.status-red
{
.status-red
{
color
:
#ff3816
;
color
:
#ff3816
;
}
}
.reviewcenter
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
margin-top
:
100
rpx
;
}
</
style
>
</
style
>
<
template
>
<
template
>
<view
class=
"studyindex"
>
<view
class=
"studyindex"
>
...
@@ -266,7 +274,7 @@
...
@@ -266,7 +274,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"box_review"
v-if=
'InfoData'
>
<view
class=
"box_review"
v-if=
'InfoData'
:style=
"
{height:InfoData.Review
&&
InfoData.Review.length>0?'660rpx':'300rpx'}"
>
<view
class=
"row"
style=
"justify-content: space-between;height: 50rpx;"
>
<view
class=
"row"
style=
"justify-content: space-between;height: 50rpx;"
>
<view
class=
"row"
style=
"color: #111111;font-size: 14px;font-weight: bold;"
>
<view
class=
"row"
style=
"color: #111111;font-size: 14px;font-weight: bold;"
>
<view
>
课程回顾
</view>
<view
>
课程回顾
</view>
...
@@ -274,7 +282,11 @@
...
@@ -274,7 +282,11 @@
</view>
</view>
<view
style=
"font-size: 11px;color: #4C50E7;"
@
click=
"gourl()"
>
所有课程
</view>
<view
style=
"font-size: 11px;color: #4C50E7;"
@
click=
"gourl()"
>
所有课程
</view>
</view>
</view>
<view
class=
"box_review_date row"
style=
"margin-top: 40rpx;"
v-if=
'InfoData.Review'
>
<view
class=
"reviewcenter"
v-if=
'InfoData.Review && InfoData.Review.length==0'
>
<view
style=
"font-size: 13px;font-family: PingFang SC;font-weight: bold;color: #111111;"
>
暂无课程
</view>
<view
style=
"font-size: 10px;font-family: PingFang SC;font-weight: 400;color: #888888;margin-top: 10px;"
>
购买课程后可回顾
</view>
</view>
<view
class=
"box_review_date row"
style=
"margin-top: 40rpx;"
v-if=
'InfoData.Review && InfoData.Review.length>0'
>
<view
v-for=
"(x,y) in InfoData.Review"
:key=
'y'
>
<view
v-for=
"(x,y) in InfoData.Review"
:key=
'y'
>
<view
:class=
"
{'box_review_date_item2':current==y}" class="box_review_date_item" @click="goreview(x,y)">
<view
:class=
"
{'box_review_date_item2':current==y}" class="box_review_date_item" @click="goreview(x,y)">
<text>
{{
getdate
(
x
,
1
)
}}
</text>
<text>
{{
getdate
(
x
,
1
)
}}
</text>
...
@@ -283,7 +295,7 @@
...
@@ -283,7 +295,7 @@
</view>
</view>
</view>
</view>
<view
class=
"box_review_sp"
>
<view
class=
"box_review_sp"
v-if=
'InfoData.Review && InfoData.Review.length>0'
>
<view
class=
"box_review_box"
v-if=
"loading"
>
<view
class=
"box_review_box"
v-if=
"loading"
>
<van-loading
size=
"24px"
vertical
color=
"#FFF"
text-color=
"#FFF"
>
加载中...
</van-loading>
<van-loading
size=
"24px"
vertical
color=
"#FFF"
text-color=
"#FFF"
>
加载中...
</van-loading>
</view>
</view>
...
@@ -310,99 +322,113 @@
...
@@ -310,99 +322,113 @@
<view
style=
"font-size: 14px;color: #4C50E7;"
@
click=
"gourlkaoshilist()"
>
更多试题
</view>
<view
style=
"font-size: 14px;color: #4C50E7;"
@
click=
"gourlkaoshilist()"
>
更多试题
</view>
</view>
</view>
</view>
</view>
<view
class=
"reviewcenter"
style=
"height: 300rpx;margin-top: 0;align-items: center;justify-content: center;"
v-if=
"InfoData.ExamList.length==0"
>
<view
v-for=
"(x,y) in InfoData.ExamList"
:key=
'y'
>
<view
style=
"font-size: 13px;
<view
class=
"examination-box"
>
font-family: PingFang SC;
<view
style=
"padding: 20px;"
>
font-weight: bold;
<view
style=
"font-size: 18px;font-weight: bold;color: #111111;"
>
{{x.PaperName}}
</view>
color: #111111;
<view
style=
"font-size: 12px;font-weight: 500;color: #999999;margin-top: 9px;"
>
测评次数:5次
</view>
line-height: 35px;"
>
暂无记录
</view>
</view>
<view
style=
"font-size: 10px;margin-top: 10px;
<view
>
font-family: PingFang SC;
<view
class=
"examination-box-c"
>
font-weight: 500;
<div
class=
'examination-boxb'
>
color: #999999;"
>
参与考试后可查看
</view>
<view
class=
"examination-box-c-item"
>
</view>
<text
class=
"item_o"
>
我的排名
</text>
<view
v-if=
"InfoData.ExamList.length>0"
>
<text
class=
"item_t"
>
#{{x.MyRank}}
</text>
<view
v-for=
"(x,y) in InfoData.ExamList"
:key=
'y'
>
<text
class=
""
>
分数
</text>
<view
class=
"examination-box"
>
</view>
<view
style=
"padding: 20px;"
>
<view
style=
"font-size: 18px;font-weight: bold;color: #111111;"
>
{{x.PaperName}}
</view>
</div>
<view
style=
"font-size: 12px;font-weight: 500;color: #999999;margin-top: 9px;"
>
测评次数:5次
</view>
<!-- 这个竖线不知道咋回事弄不出来 如果有好的方案麻烦改下 -->
</view>
<view
class=
"shuxian"
>
<view
>
<view
class=
"examination-box-c-item"
style=
"border-left: 1px solid #E2E2E2;"
>
<view
class=
"examination-box-c"
>
<text
class=
"item_o"
></text>
<div
class=
'examination-boxb'
>
<text
class=
"item_t"
></text>
<view
class=
"examination-box-c-item"
>
<text
class=
""
style=
"opacity: 0;height: 34rpx;"
>
.
</text>
<text
class=
"item_o"
>
我的排名
</text>
</view>
<text
class=
"item_t"
>
#{{x.MyRank}}
</text>
</view>
<text
class=
""
>
分数
</text>
<div
class=
'examination-boxb'
>
</view>
<view
class=
"examination-box-c-item"
>
<text
class=
"item_o"
>
我的得分
</text>
<text
class=
"item_t"
>
{{x.TotalScore}}
</text>
<text
class=
""
>
分
</text>
</view>
</div>
<view
class=
"shuxian"
>
<view
class=
"examination-box-c-item"
style=
"border-left: 1px solid #E2E2E2;"
>
<text
class=
"item_o"
></text>
<text
class=
"item_t"
></text>
<text
class=
""
style=
"opacity: 0;height: 34rpx;"
>
.
</text>
</view>
</view>
<div
class=
'examination-boxb'
>
<view
class=
"examination-box-c-item"
>
<text
class=
"item_o"
>
考试状态
</text>
<text
class=
""
style=
"opacity: 0;height: 34rpx;"
>
.
</text>
<text
style=
"font-size: 14px;font-weight: bold"
:class=
"{
'status-blue': x.ExamStatusStr == '未开始',
'status-green': x.ExamStatusStr == '已开始',
'status-black': x.ExamStatusStr == '完成',
'status-red': x.ExamStatusStr == '缺考',
}"
>
{{x.ExamStatusStr}}
</text>
</div>
<!-- 这个竖线不知道咋回事弄不出来 如果有好的方案麻烦改下 -->
<view
class=
"shuxian"
>
<view
class=
"examination-box-c-item"
style=
"border-left: 1px solid #E2E2E2;"
>
<text
class=
"item_o"
></text>
<text
class=
"item_t"
></text>
<text
class=
""
style=
"opacity: 0;height: 34rpx;"
>
.
</text>
</view>
</view>
</view>
</div>
<div
class=
'examination-boxb'
>
<view
class=
"shuxian"
>
<view
class=
"examination-box-c-item"
>
<view
class=
"examination-box-c-item"
style=
"border-left: 1px solid #E2E2E2;"
>
<text
class=
"item_o"
>
我的得分
</text>
<text
class=
"item_o"
></text>
<text
class=
"item_t"
>
{{x.TotalScore}}
</text>
<text
class=
"item_t"
></text>
<text
class=
""
>
分
</text>
<text
class=
""
style=
"opacity: 0;height: 34rpx;"
>
.
</text>
</view>
</div>
<view
class=
"shuxian"
>
<view
class=
"examination-box-c-item"
style=
"border-left: 1px solid #E2E2E2;"
>
<text
class=
"item_o"
></text>
<text
class=
"item_t"
></text>
<text
class=
""
style=
"opacity: 0;height: 34rpx;"
>
.
</text>
</view>
</view>
</view>
</view>
<div
class=
'examination-boxb'
>
<div
class=
'examination-boxb'
>
<view
class=
"examination-box-c-item"
>
<view
class=
"examination-box-c-item"
>
<text
class=
"item_o"
>
考试状态
</text>
<text
class=
"item_o"
>
我的耗时
</text>
<text
class=
""
style=
"opacity: 0;height: 34rpx;"
>
.
</text>
<text
class=
"item_t"
>
{{getTimems(x.ExamSecondTime) }}
</text>
<text
style=
"font-size: 14px;font-weight: bold"
:class=
"{
<text
class=
""
>
秒
</text>
'status-blue': x.ExamStatusStr == '未开始',
'status-green': x.ExamStatusStr == '已开始',
'status-black': x.ExamStatusStr == '完成',
'status-red': x.ExamStatusStr == '缺考',
}"
>
{{x.ExamStatusStr}}
</text>
</view>
</div>
<view
class=
"shuxian"
>
<view
class=
"examination-box-c-item"
style=
"border-left: 1px solid #E2E2E2;"
>
<text
class=
"item_o"
></text>
<text
class=
"item_t"
></text>
<text
class=
""
style=
"opacity: 0;height: 34rpx;"
>
.
</text>
</view>
</view>
</view>
</div>
<div
class=
'examination-boxb'
>
<view
class=
"shuxian"
>
<view
class=
"examination-box-c-item"
>
<view
class=
"examination-box-c-item"
style=
"border-left: 1px solid #E2E2E2;"
>
<text
class=
"item_o"
>
我的耗时
</text>
<text
class=
"item_o"
></text>
<text
class=
"item_t"
>
{{getTimems(x.ExamSecondTime) }}
</text>
<text
class=
"item_t"
></text>
<text
class=
""
>
秒
</text>
<text
class=
""
style=
"opacity: 0;height: 34rpx;"
>
.
</text>
</view>
</div>
<view
class=
"shuxian"
>
<view
class=
"examination-box-c-item"
style=
"border-left: 1px solid #E2E2E2;"
>
<text
class=
"item_o"
></text>
<text
class=
"item_t"
></text>
<text
class=
""
style=
"opacity: 0;height: 34rpx;"
>
.
</text>
</view>
</view>
</view>
<div
class=
'examination-boxb'
>
<view
class=
"examination-box-c-item"
>
<text
class=
"item_o"
>
最高等分
</text>
<text
class=
"item_t"
>
{{x.MaxScore}}
</text>
<text
class=
""
>
分
</text>
</view>
</div>
</view>
</view>
<div
class=
'examination-boxb'
>
<view
class=
"examination-box-c-item"
>
<text
class=
"item_o"
>
最高等分
</text>
<text
class=
"item_t"
>
{{x.MaxScore}}
</text>
<text
class=
""
>
分
</text>
</view>
</div>
</view>
</view>
</view
>
<view
class=
"examination-box-btnbox"
>
<view
class=
"examination-box-btnbox
"
>
<view
class=
"examination-btn"
@
click=
"gourlkaoshixq(x)
"
>
<view
class=
"examination-btn"
@
click=
"gourlkaoshixq(x)"
>
开始测试
开始测试
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
...
...
src/utils/index.js
View file @
7e495175
...
@@ -265,7 +265,6 @@ export let getImageColor = async (canvasID, imgID, imgSrc) => {
...
@@ -265,7 +265,6 @@ export let getImageColor = async (canvasID, imgID, imgSrc) => {
// 取所有像素的平均值
// 取所有像素的平均值
for
(
var
row
=
0
;
row
<
imgHeight
;
row
++
)
{
for
(
var
row
=
0
;
row
<
imgHeight
;
row
++
)
{
for
(
var
col
=
0
;
col
<
imgWidth
;
col
++
)
{
for
(
var
col
=
0
;
col
<
imgWidth
;
col
++
)
{
// console.log(data[((img.width * row) + col) * 4])
if
(
row
==
0
)
{
if
(
row
==
0
)
{
r
+=
data
[((
imgWidth
*
row
)
+
col
)];
r
+=
data
[((
imgWidth
*
row
)
+
col
)];
g
+=
data
[((
imgWidth
*
row
)
+
col
)
+
1
];
g
+=
data
[((
imgWidth
*
row
)
+
col
)
+
1
];
...
...
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