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
be795b78
Commit
be795b78
authored
Jan 12, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
5e7cb6e7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
156 additions
and
160 deletions
+156
-160
studyComplete.vue
src/pages/word/studyComplete.vue
+31
-22
test.vue
src/pages/word/test.vue
+125
-138
No files found.
src/pages/word/studyComplete.vue
View file @
be795b78
...
@@ -6,14 +6,15 @@
...
@@ -6,14 +6,15 @@
}
}
.stuComTop
{
.stuComTop
{
height
:
100%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
color
:
#FFFFFF
;
color
:
#FFFFFF
;
padding-top
:
60
rpx
;
}
}
.studyMain
{
.studyMain
{
width
:
85%
;
width
:
85%
;
height
:
65
vh
;
height
:
50
vh
;
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
24
rpx
;
border-radius
:
24
rpx
;
margin
:
auto
;
margin
:
auto
;
...
@@ -147,23 +148,26 @@
...
@@ -147,23 +148,26 @@
</
style
>
</
style
>
<
template
>
<
template
>
<view
class=
"studyCompleta"
>
<view
class=
"studyCompleta"
>
<Navbar
bg=
"transparent"
>
<view
class=
"stuComTop"
>
<view
class=
"stuComTop"
>
<view
style=
"margin-left:20rpx;flex-shrink: 0;"
>
<!--
<view
style=
"margin-left:20rpx;flex-shrink: 0;"
>
<van-icon
name=
"arrow-left"
color=
"#FFF"
@
click=
"goIndex"
/>
<van-icon
name=
"arrow-left"
color=
"#FFF"
@
click=
"goIndex"
/>
</view>
-->
<view
style=
"width:100%; font-size: 32rpx; text-align: center;font-weight: 500;"
>
学习小结
</view>
</view>
</view>
<view
style=
"width:100%;text-align: center;"
>
学习小结
</view
>
</Navbar
>
</view>
<view
class=
"studyMain"
>
<view
class=
"studyMain"
>
<view
class=
"starList"
>
<view
class=
"starList"
>
<van-rate
v-model=
"stars"
:size=
"40"
:disabled=
"true"
disabled-color=
"#FAC217"
color=
"#FAC217"
<van-rate
:value=
"score"
:size=
"40"
readonly
color=
"#FAC217"
void-color=
"#b2b2b2"
:count=
"3"
/>
void-color=
"#EBEBEB"
void-icon=
"star"
icon=
"star"
:count=
"3"
/>
</view>
</view>
<view
class=
"studyContra"
>
恭喜你
</view>
<view
class=
"studyContra"
>
恭喜你
</view>
<view
class=
"study_Success"
>
<view
class=
"study_Success"
>
成功获得
<text
class=
"study_Score"
>
3
</text>
个积分
成功获得
<text
class=
"study_Score"
>
{{
score
}}
</text>
个积分
</view>
</view>
<view
class=
"study_Time"
>
<view
class=
"study_Time"
>
2
<text
class=
"study_Danwei"
>
min
</text>
{{
time
}}
<text
class=
"study_Danwei"
>
min
</text>
</view>
</view>
<img
class=
"study_Piao"
<img
class=
"study_Piao"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/piao1.png"
alt=
""
/>
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/piao1.png"
alt=
""
/>
...
@@ -177,7 +181,8 @@
...
@@ -177,7 +181,8 @@
<view
class=
"study_Jiyi"
>
记忆时长
</view>
<view
class=
"study_Jiyi"
>
记忆时长
</view>
<!--
<view
class=
"study_GoCeshi"
@
click=
"goTest(url)"
>
马上去测试
</view>
<!--
<view
class=
"study_GoCeshi"
@
click=
"goTest(url)"
>
马上去测试
</view>
<view
class=
"study_GoLearn"
>
再学习一次
</view>
-->
<view
class=
"study_GoLearn"
>
再学习一次
</view>
-->
<view
class=
"studyBack"
@
click=
"goIndex"
>
返回首页
</view>
<!--
<view
class=
"studyBack"
@
click=
"goIndex"
>
返回首页
</view>
-->
<view
class=
"study_GoCeshi"
@
click=
"goIndex"
>
返回首页
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -194,14 +199,18 @@
...
@@ -194,14 +199,18 @@
onMounted
,
onMounted
,
provide
,
provide
,
}
from
"vue"
;
}
from
"vue"
;
import
Navbar
from
'../../components/navbar.vue'
export
default
{
export
default
{
components
:{
Navbar
},
setup
(
props
)
{
setup
(
props
)
{
let
{
let
{
proxy
proxy
}
=
getCurrentInstance
();
}
=
getCurrentInstance
();
let
data
=
reactive
({
let
data
=
reactive
({
s
tars
:
2
,
s
core
:
2
,
url
:
'
'
,
time
:
'1
'
,
})
})
let
methods
=
{
let
methods
=
{
back
()
{
back
()
{
...
@@ -214,11 +223,11 @@
...
@@ -214,11 +223,11 @@
url
:
'/pages/index/index'
url
:
'/pages/index/index'
});
});
},
},
goTest
(
url
)
{
//
goTest(url) {
uni
.
navigateTo
({
//
uni.navigateTo({
url
:
url
,
//
url: url,
});
//
});
},
//
},
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
...
@@ -230,9 +239,9 @@
...
@@ -230,9 +239,9 @@
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
// const obj=JSON.parse(
)
const
obj
=
JSON
.
parse
(
decodeURIComponent
(
options
.
data
)
)
this
.
score
=
obj
.
score
console
.
log
(
226
,
decodeURIComponent
(
options
.
data
))
this
.
time
=
obj
.
time
// this.url=`/pages/word/test?CourseId=${options.CourseId}&&ChapterId=${options.ChapterId} &&NextChapterId=${options.NextChapterId}`
// this.url=`/pages/word/test?CourseId=${options.CourseId}&&ChapterId=${options.ChapterId} &&NextChapterId=${options.NextChapterId}`
}
}
}
}
...
...
src/pages/word/test.vue
View file @
be795b78
<
template
>
<
template
>
<view
class=
"wordTest"
>
<view
class=
"wordTest"
>
<button
class=
""
@
click=
"submitWordsTest"
>
交卷
</button>
<swiper
class=
"swiper"
@
change=
"changeSwiper"
:current=
"curTest"
>
<swiper
class=
"swiper"
@
change=
"changeSwiper"
:current=
"curTest"
>
<swiper-item
<swiper-item
v-for=
"(item, index) in reviewGroupList"
:key=
"index"
class=
"swiper-item"
>
v-for=
"(item, index) in reviewGroupList"
<Choice
v-if=
"item.QuestionTypeId == 1"
:item=
"item"
@
next=
"next($event, item)"
></Choice>
:key=
"index"
<FillIn
v-if=
"item.QuestionTypeId == 3"
:item=
"item"
@
next=
"next($event, item)"
></FillIn>
class=
"swiper-item"
>
<Choice
v-if=
"item.QuestionTypeId == 1"
:item=
"item"
@
next=
"next($event, item)"
></Choice>
<FillIn
v-if=
"item.QuestionTypeId == 3"
:item=
"item"
@
next=
"next($event, item)"
></FillIn>
</swiper-item>
</swiper-item>
<swiper-item
<swiper-item
v-for=
"(item, index) in prepGroupList"
:key=
"index"
class=
"swiper-item"
>
v-for=
"(item, index) in prepGroupList"
<Choice
v-if=
"item.QuestionTypeId == 1"
:item=
"item"
@
next=
"next($event, item)"
></Choice>
:key=
"index"
<FillIn
v-if=
"item.QuestionTypeId == 3"
:item=
"item"
@
next=
"next($event, item)"
></FillIn>
class=
"swiper-item"
</swiper-item>
>
<swiper-item>
<Choice
<van-popup
:show=
"true"
position=
"center"
custom-style=
"background-color: transparent;"
>
v-if=
"item.QuestionTypeId == 1"
<van-loading
size=
"50rpx"
type=
"spinner"
color=
"#ffffff"
>
<text
style=
"color:#ffffff"
>
交卷中...
</text></van-loading>
:item=
"item"
</van-popup>
@
next=
"next($event, item)"
></Choice>
<FillIn
v-if=
"item.QuestionTypeId == 3"
:item=
"item"
@
next=
"next($event, item)"
></FillIn>
</swiper-item>
</swiper-item>
<swiper-item></swiper-item>
</swiper>
</swiper>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
getCurrentInstance
,
onMounted
}
from
"vue"
;
import
{
import
{
getCurrentTime
}
from
'../../utils/date.js'
ref
,
import
Choice
from
"../../components/word/choiceQuestion.vue"
;
reactive
,
import
FillIn
from
"../../components/word/fillInTheBlanks.vue"
;
toRefs
,
export
default
{
getCurrentInstance
,
onMounted
}
from
"vue"
;
import
{
getCurrentTime
}
from
'../../utils/date.js'
import
Choice
from
"../../components/word/choiceQuestion.vue"
;
import
FillIn
from
"../../components/word/fillInTheBlanks.vue"
;
export
default
{
components
:
{
components
:
{
Choice
,
Choice
,
FillIn
,
FillIn
,
},
},
setup
(
props
)
{
setup
(
props
)
{
let
{
proxy
}
=
getCurrentInstance
();
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
let
data
=
reactive
({
msg
:
{
msg
:
{
CourseId
:
0
,
CourseId
:
0
,
ChapterId
:
0
,
ChapterId
:
0
,
NextChapterId
:
0
,
NextChapterId
:
0
,
},
},
startTime
:
""
,
startTime
:
""
,
curTest
:
33
,
curTest
:
33
,
reviewGroupList
:
[],
reviewGroupList
:
[],
prepGroupList
:
[],
prepGroupList
:
[],
...
@@ -75,14 +62,14 @@ export default {
...
@@ -75,14 +62,14 @@ export default {
},
},
changeSwiper
(
val
)
{
changeSwiper
(
val
)
{
data
.
curTest
=
val
.
detail
.
current
;
data
.
curTest
=
val
.
detail
.
current
;
const
total
=
data
.
reviewGroupList
.
length
+
data
.
prepGroupList
.
length
const
total
=
data
.
reviewGroupList
.
length
+
data
.
prepGroupList
.
length
console
.
log
(
data
.
curTest
,
total
)
if
(
data
.
curTest
==
total
){
// methods.submitWordsTest()
if
(
data
.
curTest
==
total
)
{
data
.
curTest
=
total
-
1
console
.
log
(
'wan'
,
data
.
curTest
,
total
)
methods
.
submitWordsTest
()
data
.
curTest
=
total
-
1
}
}
console
.
log
(
2
,
data
.
curTest
,
total
)
console
.
log
(
2
,
data
.
curTest
,
total
)
},
},
next
(
val
,
item
)
{
next
(
val
,
item
)
{
if
(
val
)
{
if
(
val
)
{
...
@@ -101,19 +88,19 @@ export default {
...
@@ -101,19 +88,19 @@ export default {
Details
:
data
.
reviewGroupList
,
Details
:
data
.
reviewGroupList
,
};
};
proxy
.
$request
(
"/AppletWords/SubmitWordsExam"
,
postMsg
).
then
((
res
)
=>
{
proxy
.
$request
(
"/AppletWords/SubmitWordsExam"
,
postMsg
).
then
((
res
)
=>
{
console
.
log
(
"SubmitWordsExam"
,
res
);
const
obj
=
{
const
obj
=
{
score
:
res
.
Data
.
Score
,
score
:
res
.
Data
.
Score
,
time
:
res
.
Data
.
ExamMinutes
time
:
2
}
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/word/studyComplete?data="
+
encodeURIComponent
(
JSON
.
stringify
(
obj
))
url
:
"/pages/word/studyComplete?data="
+
encodeURIComponent
(
JSON
.
stringify
(
obj
))
})
})
});
});
},
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
data
.
startTime
=
getCurrentTime
()
data
.
startTime
=
getCurrentTime
()
});
});
let
that
=
methods
;
let
that
=
methods
;
return
{
return
{
...
@@ -131,17 +118,17 @@ export default {
...
@@ -131,17 +118,17 @@ export default {
this
.
msg
.
NextChapterId
=
options
.
NextChapterId
;
this
.
msg
.
NextChapterId
=
options
.
NextChapterId
;
this
.
getList
();
this
.
getList
();
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.wordTest
{
.wordTest
{
min-height
:
100vh
;
min-height
:
100vh
;
background-color
:
#f5f5f5
;
background-color
:
#f5f5f5
;
}
}
.wordTest
.swiper
{
.wordTest
.swiper
{
min-height
:
100vh
;
min-height
:
100vh
;
background-color
:
#f5f5f5
;
background-color
:
#f5f5f5
;
}
}
</
style
>
</
style
>
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