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
d1efcde1
Commit
d1efcde1
authored
Feb 27, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设计稿问题优化
parent
5c220466
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
60 deletions
+52
-60
index.vue
take-order/pages/exam/index.vue
+32
-49
start.vue
take-order/pages/exam/start.vue
+7
-4
base.vue
take-order/pages/settle/base.vue
+5
-4
index.vue
take-order/pages/settle/index.vue
+6
-1
prompt.vue
take-order/pages/settle/prompt.vue
+1
-1
sign-contract.vue
take-order/pages/settle/sign-contract.vue
+1
-1
No files found.
take-order/pages/exam/index.vue
View file @
d1efcde1
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
template
v-if=
"isStart==true"
>
<
template
v-if=
"isStart==true
&& currentItem
"
>
<view
class=
"bottom-padding"
>
<view
class=
"bottom-padding"
>
<view
class=
"numberView"
>
<view
class=
"numberView"
>
<text
class=
"numberText"
>
{{
progress
}}
</text>
<text
class=
"numberText"
>
{{
progress
}}
</text>
...
@@ -21,11 +21,13 @@
...
@@ -21,11 +21,13 @@
</view>
</view>
<view
class=
"itemBackView"
v-for=
"(item,ikey) in currentItem.answerList"
:key=
"ikey"
>
<view
class=
"itemBackView"
v-for=
"(item,ikey) in currentItem.answerList"
:key=
"ikey"
>
<view
class=
"itemView
"
@
click=
"itemClick(item,ikey)"
>
<view
:class=
"['itemView',item.isSelect ? 'active':'']
"
@
click=
"itemClick(item,ikey)"
>
<view
:class=
"item.isSelect ? 'itemIndexView' : 'itemIndexView grayBorder' "
>
<view
:class=
"item.isSelect ? 'itemIndexView' : 'itemIndexView grayBorder' "
>
<text
:class=
"item.isSelect ? 'itemIndexText whiteColor selectBackColor' : 'itemIndexText defaultColor' "
>
A
</text>
<text
:class=
"item.isSelect ? 'itemIndexText whiteColor selectBackColor' : 'itemIndexText defaultColor' "
>
{{
alphaArr
[
ikey
]
}}
</text>
</view>
</view>
<text
:class=
"item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' "
>
{{
item
.
content
}}
</text>
<text
:class=
"item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' "
>
{{
contentFilter
(
item
.
content
)
}}
</text>
<!--view>
</view-->
<!--view>
</view-->
</view>
</view>
...
@@ -74,6 +76,8 @@
...
@@ -74,6 +76,8 @@
isStop
:
false
,
isStop
:
false
,
clock_url
:
'https://qn-static.banshouhui.com/clock_exam.png'
,
clock_url
:
'https://qn-static.banshouhui.com/clock_exam.png'
,
examScore
:
1
,
examScore
:
1
,
alphaArr
:[
'A'
,
'B'
,
'C'
,
'D'
,
'E'
],
timer
:
null
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
...
@@ -84,7 +88,14 @@
...
@@ -84,7 +88,14 @@
},
},
methods
:
{
methods
:
{
contentFilter
(
txt
){
if
(
!
txt
){
return
txt
}
let
reg
=
/
\w
+
\.?
/
;
const
result
=
txt
.
replace
(
reg
,
''
)
return
result
},
//开始考试 点击
//开始考试 点击
startClick
:
function
()
{
startClick
:
function
()
{
this
.
isStart
=
true
this
.
isStart
=
true
...
@@ -127,7 +138,6 @@
...
@@ -127,7 +138,6 @@
})
})
return
return
}
}
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
if
(
res
.
data
.
data
.
examStatus
==
2
)
{
if
(
res
.
data
.
data
.
examStatus
==
2
)
{
...
@@ -139,8 +149,6 @@
...
@@ -139,8 +149,6 @@
that
.
userExamId
=
res
.
data
.
data
.
id
that
.
userExamId
=
res
.
data
.
data
.
id
that
.
getNext
()
that
.
getNext
()
}
}
// console.log('code=200')
//this.handleList(res)
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -159,8 +167,6 @@
...
@@ -159,8 +167,6 @@
icon
:
'none'
,
icon
:
'none'
,
title
:
'获取考试信息失败'
title
:
'获取考试信息失败'
})
})
// console.log('获取下单列表 失败')
// console.log(e)
}
}
})
})
...
@@ -188,8 +194,6 @@
...
@@ -188,8 +194,6 @@
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
console
.
log
(
'申请考试 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
401
)
{
if
(
res
.
statusCode
==
401
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
...
@@ -204,8 +208,6 @@
...
@@ -204,8 +208,6 @@
that
.
userExamId
=
res
.
data
.
data
.
userExamId
that
.
userExamId
=
res
.
data
.
data
.
userExamId
that
.
getNext
()
that
.
getNext
()
}
}
// console.log('code=200')
//this.handleList(res)
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -224,8 +226,6 @@
...
@@ -224,8 +226,6 @@
icon
:
'none'
,
icon
:
'none'
,
title
:
'申请考试 失败'
title
:
'申请考试 失败'
})
})
// console.log('获取下单列表 失败')
// console.log(e)
}
}
})
})
},
},
...
@@ -264,9 +264,6 @@
...
@@ -264,9 +264,6 @@
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
console
.
log
(
'获取下一题 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
401
)
{
if
(
res
.
statusCode
==
401
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/login/wxlogin'
url
:
'/pages/login/wxlogin'
...
@@ -277,7 +274,7 @@
...
@@ -277,7 +274,7 @@
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
that
.
currentItem
=
res
.
data
.
data
that
.
currentItem
=
res
.
data
.
data
that
.
progress
=
res
.
data
.
data
.
progress
that
.
progress
=
res
.
data
.
data
.
progress
if
(
res
.
data
.
data
.
answerList
)
{
if
(
res
.
data
.
data
.
answerList
)
{
that
.
handleData
()
that
.
handleData
()
that
.
currentTime
=
100
that
.
currentTime
=
100
...
@@ -285,13 +282,10 @@
...
@@ -285,13 +282,10 @@
that
.
startCounting
()
that
.
startCounting
()
}
else
{
}
else
{
that
.
isSelect
=
true
that
.
isSelect
=
true
clearTimeout
(
this
.
timer
)
that
.
bottomTitle
=
'完成考试,现在签约'
that
.
bottomTitle
=
'完成考试,现在签约'
}
}
// console.log('code=200')
//this.handleList(res)
}
else
{
}
else
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
'none'
,
icon
:
'none'
,
...
@@ -309,8 +303,7 @@
...
@@ -309,8 +303,7 @@
icon
:
'none'
,
icon
:
'none'
,
title
:
'获取下一题 失败'
title
:
'获取下一题 失败'
})
})
// console.log('获取下单列表 失败')
// console.log(e)
}
}
})
})
...
@@ -319,14 +312,9 @@
...
@@ -319,14 +312,9 @@
handleData
:
function
()
{
handleData
:
function
()
{
this
.
currentItem
.
answerList
.
forEach
(
item
=>
{
this
.
currentItem
.
answerList
.
forEach
(
item
=>
{
item
.
isSelect
=
false
item
.
isSelect
=
false
})
})
console
.
log
(
this
.
currentItem
)
},
},
startCounting
:
function
()
{
startCounting
:
function
()
{
...
@@ -338,7 +326,7 @@
...
@@ -338,7 +326,7 @@
this
.
currentTime
=
this
.
currentTime
-
1
this
.
currentTime
=
this
.
currentTime
-
1
if
(
this
.
currentTime
>
0
)
{
if
(
this
.
currentTime
>
0
)
{
setTimeout
(
this
.
startCounting
,
1000
);
this
.
timer
=
setTimeout
(
this
.
startCounting
,
1000
);
}
else
{
}
else
{
this
.
currentTime
=
100
this
.
currentTime
=
100
this
.
nextClick
()
this
.
nextClick
()
...
@@ -349,9 +337,6 @@
...
@@ -349,9 +337,6 @@
itemClick
:
function
(
currentItem
,
ikey
)
{
itemClick
:
function
(
currentItem
,
ikey
)
{
this
.
isSelect
=
true
this
.
isSelect
=
true
//answerType 题目类型,1单选,2多选,3简答,
//answerType 题目类型,1单选,2多选,3简答,
...
@@ -388,10 +373,8 @@
...
@@ -388,10 +373,8 @@
//下一题
//下一题
nextClick
:
function
()
{
nextClick
:
function
()
{
console
.
log
(
this
.
bottomTitle
)
if
(
this
.
bottomTitle
==
'完成考试,现在签约'
)
{
if
(
this
.
bottomTitle
==
'完成考试,现在签约'
)
{
clearTimeout
(
this
.
timer
)
this
.
postResult
()
this
.
postResult
()
// uni.navigateTo({
// uni.navigateTo({
// url: '/pages/settle/prompt'
// url: '/pages/settle/prompt'
...
@@ -421,8 +404,6 @@
...
@@ -421,8 +404,6 @@
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
console
.
log
(
'上传考试结果 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
401
)
{
if
(
res
.
statusCode
==
401
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
...
@@ -454,8 +435,7 @@
...
@@ -454,8 +435,7 @@
icon
:
'none'
,
icon
:
'none'
,
title
:
'上传考试结果失败'
title
:
'上传考试结果失败'
})
})
// console.log('获取下单列表 失败')
// console.log(e)
}
}
})
})
},
},
...
@@ -494,9 +474,6 @@
...
@@ -494,9 +474,6 @@
})
})
console
.
log
(
'所选答案:'
)
console
.
log
(
this
.
userAnswerIds
)
this
.
getNext
()
this
.
getNext
()
},
},
...
@@ -511,7 +488,7 @@
...
@@ -511,7 +488,7 @@
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"scss"
>
.backView
{
.backView
{
background-color
:
#F3F3F3
;
background-color
:
#F3F3F3
;
position
:
absolute
;
position
:
absolute
;
...
@@ -581,6 +558,10 @@
...
@@ -581,6 +558,10 @@
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
border
:
2rpx
solid
transparent
;
&
.active
{
border
:
2rpx
solid
#2272FF
;
}
}
}
.itemIndexView
{
.itemIndexView
{
...
@@ -588,6 +569,7 @@
...
@@ -588,6 +569,7 @@
width
:
40rpx
;
width
:
40rpx
;
height
:
40rpx
;
height
:
40rpx
;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
overflow
:
hidden
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -598,10 +580,11 @@
...
@@ -598,10 +580,11 @@
}
}
.itemIndexText
{
.itemIndexText
{
width
:
40
rpx
;
border-radius
:
8rpx
;
height
:
40
rpx
;
width
:
36rpx
;
height
:
36rpx
;
display
:
block
;
display
:
block
;
line-height
:
40
rpx
;
line-height
:
36
rpx
;
text-align
:
center
;
text-align
:
center
;
font-size
:
28rpx
;
font-size
:
28rpx
;
}
}
...
...
take-order/pages/exam/start.vue
View file @
d1efcde1
...
@@ -50,11 +50,10 @@
...
@@ -50,11 +50,10 @@
<
style
>
<
style
>
.backView
{
.backView
{
overflow
:
hidden
;
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100vh
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
...
@@ -107,12 +106,16 @@
...
@@ -107,12 +106,16 @@
}
}
.image
{
.image
{
padding-left
:
44
rpx
;
width
:
706
rpx
;
margin-left
:
44
rpx
;
margin-right
:
0
;
margin-right
:
0
;
height
:
766
rpx
;
height
:
766
rpx
;
}
}
.bottomView
{
.bottomView
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
padding-top
:
64
rpx
;
padding-top
:
64
rpx
;
padding-bottom
:
68
rpx
;
padding-bottom
:
68
rpx
;
width
:
100%
;
width
:
100%
;
...
...
take-order/pages/settle/base.vue
View file @
d1efcde1
...
@@ -527,14 +527,15 @@
...
@@ -527,14 +527,15 @@
// bottom: px2rem(36);
// bottom: px2rem(36);
height
:
104rpx
;
height
:
104rpx
;
line-height
:
104rpx
;
line-height
:
104rpx
;
border-radius
:
52rpx
;
background
:
#2272ff
;
background
:
#2272ff
;
font-size
:
32rpx
;
font-size
:
32rpx
;
color
:
#fff
;
color
:
#fff
;
&
:disabled
{
&
[
disabled
]
{
border
:
2rpx
solid
#999
;
border
:
none
;
background-color
:
#
f3f3f3
;
background-color
:
#
999999
;
color
:
#
999
;
color
:
#
fff
;
}
}
}
}
}
}
...
...
take-order/pages/settle/index.vue
View file @
d1efcde1
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"scss"
>
.back_view
{
.back_view
{
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
...
@@ -117,10 +117,15 @@
...
@@ -117,10 +117,15 @@
margin-top
:
30rpx
;
margin-top
:
30rpx
;
width
:
600rpx
;
width
:
600rpx
;
height
:
104rpx
;
height
:
104rpx
;
line-height
:
96rpx
;
border-radius
:
54rpx
;
border
:
4rpx
solid
#FFFFFF
;
border
:
4rpx
solid
#FFFFFF
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
&
.apply_color
{
border
:
4rpx
solid
#2272FF
;
}
}
}
.bottom_title
{
.bottom_title
{
...
...
take-order/pages/settle/prompt.vue
View file @
d1efcde1
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
statusName
:
'已通过'
,
statusName
:
'已通过'
,
txtArr
:[
'您已通过'
,
'“充电桩安装入驻审核”'
],
txtArr
:[
'您已通过'
,
'“充电桩安装入驻审核”'
],
btnTxt
:
'去考试'
,
btnTxt
:
'去考试'
,
url
:
'/pages/exam/
index
'
url
:
'/pages/exam/
start
'
},{
},{
status
:
3
,
status
:
3
,
statusName
:
'备选'
,
statusName
:
'备选'
,
...
...
take-order/pages/settle/sign-contract.vue
View file @
d1efcde1
...
@@ -592,7 +592,7 @@
...
@@ -592,7 +592,7 @@
height
:
104rpx
;
height
:
104rpx
;
line-height
:
104rpx
;
line-height
:
104rpx
;
border-radius
:
52rpx
;
border-radius
:
52rpx
;
background
:
#
fff
;
background
:
#
2272FF
;
font-size
:
32rpx
;
font-size
:
32rpx
;
color
:
#fff
;
color
:
#fff
;
...
...
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