Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
7b240b93
Commit
7b240b93
authored
Jan 27, 2021
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考试界面 原型图搭建 交互 100%
parent
4fd4b830
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
293 additions
and
34 deletions
+293
-34
pages.json
take-order/pages.json
+9
-34
index.vue
take-order/pages/exam/index.vue
+284
-0
No files found.
take-order/pages.json
View file @
7b240b93
...
@@ -7,6 +7,14 @@
...
@@ -7,6 +7,14 @@
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/exam/index"
,
"style"
:
{
"navigationBarTitleText"
:
"入驻考试"
}
},
{
{
"path"
:
"pages/index/index"
,
"path"
:
"pages/index/index"
,
"style"
:
{
"style"
:
{
...
@@ -26,15 +34,6 @@
...
@@ -26,15 +34,6 @@
{
{
"path"
:
"pages/take/detail"
,
"path"
:
"pages/take/detail"
,
"style"
:
{
"style"
:
{
...
@@ -105,20 +104,6 @@
...
@@ -105,20 +104,6 @@
//
{
//
"path"
:
"pages/photo/index"
,
//
"style"
:
{
//
"navigationBarTitleText"
:
"拍照"
//
}
//
},
{
{
"path"
:
"pages/index/success"
,
"path"
:
"pages/index/success"
,
"style"
:
{
"style"
:
{
...
@@ -128,16 +113,6 @@
...
@@ -128,16 +113,6 @@
//
{
//
"path"
:
"pages/take/try"
,
//
"style"
:
{
//
"navigationBarTitleText"
:
"接单"
,
//
"enablePullDownRefresh"
:
true
//
}
//
},
{
{
"path"
:
"pages/login/wxlogin"
,
"path"
:
"pages/login/wxlogin"
,
"style"
:
{
"style"
:
{
...
...
take-order/pages/exam/index.vue
0 → 100644
View file @
7b240b93
<
template
>
<view
class=
"backView"
>
<template
v-if=
"isStart==false"
>
<view
class=
"noticeView"
>
<text
class=
"noticeText"
>
规则:系统随机出现20道考试题目,每道题5分,每题答题时间100秒,在规定时间内答对题目的记分。
</text>
</view>
<view
class=
"bottomView"
>
<view
class=
"bottomBtn"
@
click=
"startClick()"
>
<text
class=
"bottomTitle"
>
开始考试答题
</text>
</view>
</view>
</
template
>
<
template
v-if=
"isStart==true"
>
<view
class=
"numberView"
>
<text
class=
"numberText"
>
第
{{
currentNumber
}}
题,共20题
</text>
</view>
<view
class=
"topicView"
>
<text
class=
"topicText"
>
{{
currentItem
.
topic
}}
</text>
</view>
<view
class=
"itemView"
v-for=
"(item,ikey) in currentItem.list"
:key=
"ikey"
>
<text
:class=
"item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' "
@
click=
"itemClick(item,ikey)"
>
{{
item
.
answer
}}
</text>
</view>
<view
class=
"answerBottomView"
>
<image
class=
"timeIcon"
src=
""
mode=
""
></image>
<text
class=
"timeText"
>
{{
currentTime
}}
</text>
<view
:class=
"isSelect ? 'nextBtn selectedColor' : 'nextBtn defaultColor' "
@
click=
"nextClick()"
>
<text
class=
"bottomTitle"
>
下一题
</text>
</view>
</view>
</
template
>
</view>
</template>
<
script
>
export
default
{
data
()
{
return
{
isStart
:
false
,
currentNumber
:
1
,
currentItem
:
null
,
isSelect
:
false
,
currentTime
:
30
}
},
onLoad
(
e
)
{
},
methods
:
{
//开始考试 点击
startClick
:
function
()
{
this
.
isStart
=
true
this
.
getData
()
},
getData
:
function
()
{
this
.
currentItem
=
{
'topic'
:
'这是第一道题的题目这是第一道题的题目'
,
'list'
:[
{
'answer'
:
'这是选项一这是选项一这是选项一这是选项一'
,
'isSelect'
:
false
,
},
{
'answer'
:
'这是选项二这是选项二这是选项二这是选项二'
,
'isSelect'
:
false
,
},
{
'answer'
:
'这是选项三这是选项三这是选项三这是选项三'
,
'isSelect'
:
false
,
},
],
'isMulti'
:
true
,
}
this
.
startCounting
()
},
startCounting
:
function
()
{
this
.
currentTime
=
this
.
currentTime
-
1
if
(
this
.
currentTime
>
0
){
setTimeout
(
this
.
startCounting
,
1000
);
}
else
{
this
.
currentTime
=
30
this
.
nextClick
()
}
},
itemClick
:
function
(
currentItem
,
ikey
)
{
this
.
isSelect
=
true
for
(
let
i
=
0
;
i
<
this
.
currentItem
.
list
.
length
;
i
++
)
{
var
item
=
this
.
currentItem
.
list
[
i
]
if
(
this
.
currentItem
.
isMulti
){
if
(
ikey
==
i
){
item
.
isSelect
=
!
item
.
isSelect
}
}
else
{
if
(
ikey
==
i
){
item
.
isSelect
=
!
item
.
isSelect
}
else
{
item
.
isSelect
=
false
}
}
}
var
isSelect
=
false
this
.
currentItem
.
list
.
forEach
(
item
=>
{
if
(
item
.
isSelect
){
isSelect
=
true
}
})
this
.
isSelect
=
isSelect
},
//下一题
nextClick
:
function
()
{
this
.
currentNumber
=
this
.
currentNumber
+
1
this
.
getData
()
},
}
}
</
script
>
<
style
>
.backView
{
background-color
:
#FFFFFF
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
.noticeView
{
margin-top
:
100
rpx
;
width
:
100%
;
display
:
flex
;
}
.noticeText
{
font-size
:
32
rpx
;
color
:
#555555
;
padding-left
:
40
rpx
;
padding-right
:
40
rpx
;
}
.numberView
{
margin-top
:
100
rpx
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.numberText
{
font-size
:
28
rpx
;
font-weight
:
bold
;
}
.topicView
{
margin-top
:
100
rpx
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.topicText
{
font-size
:
28
rpx
;
padding-left
:
40
rpx
;
padding-right
:
40
rpx
;
}
.itemView
{
margin-top
:
100
rpx
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.itemText
{
font-size
:
28
rpx
;
padding-top
:
40
rpx
;
padding-bottom
:
40
rpx
;
padding-left
:
40
rpx
;
padding-right
:
40
rpx
;
}
.bottomView
{
background-color
:
#FFFFFF
;
width
:
100%
;
height
:
140
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
position
:
fixed
;
bottom
:
0
;
}
.bottomBtn
{
background-color
:
#007AFF
;
width
:
60%
;
height
:
80
rpx
;
border-radius
:
40
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.bottomTitle
{
font-size
:
32
rpx
;
color
:
#FFFFFF
;
}
.answerBottomView
{
background-color
:
#FFFFFF
;
width
:
100%
;
height
:
140
rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
position
:
fixed
;
bottom
:
0
;
}
.timeIcon
{
background-color
:
#999999
;
margin-left
:
80
rpx
;
width
:
80
rpx
;
height
:
80
rpx
;
border-radius
:
40
rpx
;
}
.timeText
{
margin-left
:
20
rpx
;
font-size
:
32
rpx
;
color
:
#999999
;
}
.nextBtn
{
width
:
400
rpx
;
height
:
80
rpx
;
border-radius
:
40
rpx
;
margin-left
:
40
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.defaultColor
{
background-color
:
#999999
;
}
.selectedColor
{
background-color
:
#007AFF
;
}
</
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