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
Hide 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"
>
<view
class=
"stuComTop"
>
<Navbar
bg=
"transparent"
>
<view
style=
"margin-left:20rpx;flex-shrink: 0;"
>
<view
class=
"stuComTop"
>
<van-icon
name=
"arrow-left"
color=
"#FFF"
@
click=
"goIndex"
/>
<!--
<view
style=
"margin-left:20rpx;flex-shrink: 0;"
>
<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"
>
<swiper
class=
"swiper"
@
change=
"changeSwiper"
:current=
"curTest"
>
交卷
<swiper-item
v-for=
"(item, index) in reviewGroupList"
:key=
"index"
class=
"swiper-item"
>
</button>
<Choice
v-if=
"item.QuestionTypeId == 1"
:item=
"item"
@
next=
"next($event, item)"
></Choice>
<swiper
class=
"swiper"
@
change=
"changeSwiper"
:current=
"curTest"
>
<FillIn
v-if=
"item.QuestionTypeId == 3"
:item=
"item"
@
next=
"next($event, item)"
></FillIn>
<swiper-item
</swiper-item>
v-for=
"(item, index) in reviewGroupList"
<swiper-item
v-for=
"(item, index) in prepGroupList"
:key=
"index"
class=
"swiper-item"
>
:key=
"index"
<Choice
v-if=
"item.QuestionTypeId == 1"
:item=
"item"
@
next=
"next($event, item)"
></Choice>
class=
"swiper-item"
<FillIn
v-if=
"item.QuestionTypeId == 3"
:item=
"item"
@
next=
"next($event, item)"
></FillIn>
>
</swiper-item>
<Choice
<swiper-item>
v-if=
"item.QuestionTypeId == 1"
<van-popup
:show=
"true"
position=
"center"
custom-style=
"background-color: transparent;"
>
:item=
"item"
<van-loading
size=
"50rpx"
type=
"spinner"
color=
"#ffffff"
>
<text
style=
"color:#ffffff"
>
交卷中...
</text></van-loading>
@
next=
"next($event, item)"
</van-popup>
></Choice>
</swiper-item>
<FillIn
</swiper>
v-if=
"item.QuestionTypeId == 3"
</view>
:item=
"item"
@
next=
"next($event, item)"
></FillIn>
</swiper-item>
<swiper-item
v-for=
"(item, index) in prepGroupList"
:key=
"index"
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>
</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
,
components
:
{
onMounted
Choice
,
}
from
"vue"
;
FillIn
,
import
{
},
getCurrentTime
setup
(
props
)
{
}
from
'../../utils/date.js'
let
{
proxy
}
=
getCurrentInstance
();
import
Choice
from
"../../components/word/choiceQuestion.vue"
;
let
data
=
reactive
({
import
FillIn
from
"../../components/word/fillInTheBlanks.vue"
;
msg
:
{
export
default
{
CourseId
:
0
,
components
:
{
ChapterId
:
0
,
Choice
,
NextChapterId
:
0
,
FillIn
,
},
},
startTime
:
""
,
setup
(
props
)
{
curTest
:
33
,
let
{
reviewGroupList
:
[],
proxy
prepGroupList
:
[],
}
=
getCurrentInstance
();
});
let
data
=
reactive
({
let
methods
=
{
msg
:
{
getList
()
{
CourseId
:
0
,
proxy
ChapterId
:
0
,
.
$request
(
"/AppletWords/CreateCourseExam"
,
data
.
msg
)
NextChapterId
:
0
,
.
then
((
res
)
=>
{
},
data
.
reviewGroupList
=
res
.
Data
.
reviewGroupList
;
startTime
:
""
,
data
.
prepGroupList
=
res
.
Data
.
prepGroupList
;
curTest
:
33
,
});
reviewGroupList
:
[],
},
prepGroupList
:
[],
changeSwiper
(
val
)
{
});
data
.
curTest
=
val
.
detail
.
current
;
let
methods
=
{
const
total
=
data
.
reviewGroupList
.
length
+
data
.
prepGroupList
.
length
getList
()
{
console
.
log
(
data
.
curTest
,
total
)
proxy
if
(
data
.
curTest
==
total
){
.
$request
(
"/AppletWords/CreateCourseExam"
,
data
.
msg
)
.
then
((
res
)
=>
{
// methods.submitWordsTest()
data
.
reviewGroupList
=
res
.
Data
.
reviewGroupList
;
data
.
curTest
=
total
-
1
data
.
prepGroupList
=
res
.
Data
.
prepGroupList
;
}
});
console
.
log
(
2
,
data
.
curTest
,
total
)
},
},
changeSwiper
(
val
)
{
next
(
val
,
item
)
{
data
.
curTest
=
val
.
detail
.
current
;
if
(
val
)
{
const
total
=
data
.
reviewGroupList
.
length
+
data
.
prepGroupList
.
length
item
.
IsTrue
=
val
;
}
if
(
data
.
curTest
==
total
)
{
data
.
curTest
+=
1
;
console
.
log
(
'wan'
,
data
.
curTest
,
total
)
},
methods
.
submitWordsTest
()
//提交单词测试
data
.
curTest
=
total
-
1
submitWordsTest
()
{
}
const
indexData
=
uni
.
getStorageSync
(
"indexData"
);
console
.
log
(
2
,
data
.
curTest
,
total
)
let
postMsg
=
{
},
ClassId
:
indexData
.
ClassId
,
next
(
val
,
item
)
{
CourseId
:
data
.
msg
.
CourseId
,
if
(
val
)
{
ChapterId
:
data
.
msg
.
ChapterId
,
item
.
IsTrue
=
val
;
ExamStartTime
:
data
.
startTime
,
}
Details
:
data
.
reviewGroupList
,
data
.
curTest
+=
1
;
};
},
proxy
.
$request
(
"/AppletWords/SubmitWordsExam"
,
postMsg
).
then
((
res
)
=>
{
//提交单词测试
console
.
log
(
"SubmitWordsExam"
,
res
);
submitWordsTest
()
{
const
obj
=
{
const
indexData
=
uni
.
getStorageSync
(
"indexData"
);
score
:
res
.
Data
.
Score
,
let
postMsg
=
{
time
:
2
ClassId
:
indexData
.
ClassId
,
}
CourseId
:
data
.
msg
.
CourseId
,
uni
.
navigateTo
({
ChapterId
:
data
.
msg
.
ChapterId
,
url
:
"/pages/word/studyComplete?data="
+
encodeURIComponent
(
JSON
.
stringify
(
obj
))
ExamStartTime
:
data
.
startTime
,
})
Details
:
data
.
reviewGroupList
,
});
};
},
proxy
.
$request
(
"/AppletWords/SubmitWordsExam"
,
postMsg
).
then
((
res
)
=>
{
};
const
obj
=
{
onMounted
(()
=>
{
score
:
res
.
Data
.
Score
,
data
.
startTime
=
getCurrentTime
()
time
:
res
.
Data
.
ExamMinutes
});
}
let
that
=
methods
;
uni
.
navigateTo
({
return
{
url
:
"/pages/word/studyComplete?data="
+
encodeURIComponent
(
JSON
.
stringify
(
...
toRefs
(
data
),
obj
))
...
methods
,
})
};
});
},
},
onLoad
(
options
)
{
};
uni
.
setNavigationBarTitle
({
onMounted
(()
=>
{
title
:
"单词测试"
,
data
.
startTime
=
getCurrentTime
()
});
});
const
userInfo
=
uni
.
getStorageSync
(
"userinfo"
);
let
that
=
methods
;
this
.
msg
.
CourseId
=
options
.
CourseId
;
return
{
this
.
msg
.
ChapterId
=
options
.
ChapterId
;
...
toRefs
(
data
),
this
.
msg
.
NextChapterId
=
options
.
NextChapterId
;
...
methods
,
this
.
getList
();
};
},
},
};
onLoad
(
options
)
{
uni
.
setNavigationBarTitle
({
title
:
"单词测试"
,
});
const
userInfo
=
uni
.
getStorageSync
(
"userinfo"
);
this
.
msg
.
CourseId
=
options
.
CourseId
;
this
.
msg
.
ChapterId
=
options
.
ChapterId
;
this
.
msg
.
NextChapterId
=
options
.
NextChapterId
;
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