Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
e94cf462
Commit
e94cf462
authored
May 13, 2021
by
zhengzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
倒计时与题数bug
parent
05fe970c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
79 deletions
+105
-79
answer.vue
src/pages/learn/answer.vue
+6
-1
assessment.vue
src/pages/learn/assessment.vue
+99
-78
No files found.
src/pages/learn/answer.vue
View file @
e94cf462
...
...
@@ -75,7 +75,7 @@ export default {
timeDefine
:
{
"time-id-2"
:
1800
,
"time-id-3"
:
900
,
"time-id-4"
:
36
0
,
"time-id-4"
:
45
0
,
},
endTime
:
0
,
currentTime
:
100
,
...
...
@@ -407,6 +407,11 @@ export default {
if
(
this
.
everyTime
>
0
)
{
this
.
timer
=
setTimeout
(
this
.
startCounting
,
1000
);
console
.
log
(
"endTime:"
+
this
.
endTime
,
"everyTime:"
+
this
.
everyTime
,
"currentTime:"
+
this
.
currentTime
);
}
else
{
clearTimeout
(
this
.
timer
);
this
.
everyTime
=
90
;
...
...
src/pages/learn/assessment.vue
View file @
e94cf462
<
template
>
<view
class=
"content"
>
<u-navbar
back-icon-color=
"#FFFFFF"
:background=
"background"
title-color=
"#fff"
:border-bottom=
"false"
></u-navbar>
<u-navbar
back-icon-color=
"#FFFFFF"
:background=
"background"
title-color=
"#fff"
:border-bottom=
"false"
></u-navbar>
<view
class=
"title"
>
考试规则
</view>
<view
class=
"test"
>
<view
class=
"slogan"
>
这是一场严肃的考试,请认真查看 规则,预祝您顺利通过考试!
</view>
<view
class=
"text"
>
<text
class=
"left"
>
考试科目:
</text
><text
style=
"color: #007aff"
>
{{
desc
.
title
}}
</text>
<text
class=
"left"
>
考试科目:
</text><text
style=
"color: #007aff"
>
{{
desc
.
title
}}
</text>
</view>
<view
class=
"text"
>
<text
class=
"left"
>
合格条件:
</text><text>
{{
desc
.
score
}}
</text>
...
...
@@ -22,7 +16,7 @@
<text
class=
"left"
>
考试时间:
</text><text>
{{
desc
.
time
}}
</text>
</view>
<view
class=
"text"
>
<text
class=
"left"
>
题目来源:
</text><text>
系统随机
{{
desc
.
number
}}
题
</text>
<text
class=
"left"
>
题目来源:
</text><text>
{{
ruleDisc
}}
</text>
</view>
<button
@
click=
"getUserExamId()"
>
开始考试
</button>
</view>
...
...
@@ -31,66 +25,66 @@
<
script
>
let
condition
=
{
"dev"
:
{
dev
:
{
"id-2"
:
{
"score"
:
"60分"
,
"time"
:
"30分钟"
,
"number"
:
"20"
,
"title"
:
"服务规范"
score
:
"60分"
,
time
:
"30分钟"
,
number
:
"20"
,
title
:
"服务规范"
,
},
"id-3"
:
{
"score"
:
"30分"
,
"time"
:
"15分钟"
,
"number"
:
"10"
,
"title"
:
"服务规范"
score
:
"30分"
,
time
:
"15分钟"
,
number
:
"10"
,
title
:
"服务规范"
,
},
"id-4"
:
{
"score"
:
"15分"
,
"time"
:
"6分钟"
,
"number"
:
"4"
,
"title"
:
"交付规范"
}
score
:
"15分"
,
time
:
"6分钟"
,
number
:
"4"
,
title
:
"交付规范"
,
}
,
},
"test"
:
{
test
:
{
"id-2"
:
{
"score"
:
"60分"
,
"time"
:
"30分钟"
,
"number"
:
"20"
,
"title"
:
"服务规范"
score
:
"60分"
,
time
:
"30分钟"
,
number
:
"20"
,
title
:
"服务规范"
,
},
"id-3"
:
{
"score"
:
"30分"
,
"time"
:
"15分钟"
,
"number"
:
"10"
,
"title"
:
"服务规范"
score
:
"30分"
,
time
:
"15分钟"
,
number
:
"10"
,
title
:
"服务规范"
,
},
"id-4"
:
{
"score"
:
"15分"
,
"time"
:
"6分钟"
,
"number"
:
"4"
,
"title"
:
"交付规范"
}
score
:
"15分"
,
time
:
"6分钟"
,
number
:
"4"
,
title
:
"交付规范"
,
}
,
},
"prod"
:
{
prod
:
{
"id-2"
:
{
"score"
:
"60分"
,
"time"
:
"30分钟"
,
"number"
:
"20"
,
"title"
:
"服务规范"
score
:
"60分"
,
time
:
"30分钟"
,
number
:
"20"
,
title
:
"服务规范"
,
},
"id-3"
:
{
"score"
:
"30分"
,
"time"
:
"15分钟"
,
"number"
:
"10"
,
"title"
:
"服务规范"
score
:
"30分"
,
time
:
"15分钟"
,
number
:
"10"
,
title
:
"服务规范"
,
},
"id-4"
:
{
"score"
:
"15分"
,
"time"
:
"6分钟"
,
"number"
:
"4"
,
"title"
:
"交付规范"
}
}
score
:
"15分"
,
time
:
"6分钟"
,
number
:
"4"
,
title
:
"交付规范"
,
}
,
}
,
};
let
env
=
process
.
uniEnv
.
node_env
;
let
desc
=
condition
[
env
];
...
...
@@ -102,11 +96,13 @@ export default {
examId
:
null
,
exam
:
null
,
userExamId
:
null
,
ruleDisc
:
""
,
};
},
onLoad
(
param
)
{
this
.
examId
=
param
.
examId
this
.
desc
=
desc
[
"id-"
+
this
.
examId
]
this
.
examId
=
param
.
examId
;
this
.
desc
=
desc
[
"id-"
+
this
.
examId
];
this
.
getExamResult
();
// this.getUserExamInfo();
},
methods
:
{
...
...
@@ -119,33 +115,58 @@ export default {
},
getUserExamInfo
()
{
uni
.
request
({
url
:
process
.
uniEnv
.
systemUrl
.
apiUrl
+
"/wxh-worker-rest/rest/exam/serviceRule/"
+
this
.
vuex_token
+
"?examId="
+
this
.
examId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-from-urlencoded"
,
},
url
:
process
.
uniEnv
.
systemUrl
.
apiUrl
+
"/wxh-worker-rest/rest/exam/serviceRule/"
+
this
.
vuex_token
+
"?examId="
+
this
.
examId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-from-urlencoded"
,
},
success
:
(
res
)
=>
{
console
.
log
(
"标识符1"
,
res
.
data
);
uni
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
userExamId
)
{
this
.
userExamId
=
res
.
data
.
data
.
userExamId
;
console
.
log
(
"这个是个标识符"
,
this
.
userExamId
);
}
}
},
success
:
(
res
)
=>
{
console
.
log
(
"标识符1"
,
res
.
data
);
uni
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
userExamId
)
{
this
.
userExamId
=
res
.
data
.
data
.
userExamId
;
console
.
log
(
"这个是个标识符"
,
this
.
userExamId
);
}
}
},
});
setTimeout
(()
=>
{
wx
.
navigateTo
({
url
:
"/pages/learn/answer?userExamId="
+
this
.
userExamId
,
});
},
1000
);
wx
.
navigateTo
({
url
:
"/pages/learn/answer?userExamId="
+
this
.
userExamId
,
});
},
1000
);
},
getExamResult
()
{
uni
.
request
({
url
:
process
.
uniEnv
.
systemUrl
.
apiUrl
+
"/wxh-worker-rest/rest/exam/serviceRule/userExamInfo/"
+
this
.
vuex_token
+
"?examId="
+
this
.
examId
,
method
:
"POST"
,
header
:
{
"Content-Type"
:
"application/x-www-from-urlencoded"
,
},
success
:
(
res
)
=>
{
uni
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
ruleDisc
)
{
console
.
log
(
res
.
data
.
data
.
ruleDisc
);
var
str
=
res
.
data
.
data
.
ruleDisc
;
console
.
log
(
str
.
substring
(
0
,
11
));
this
.
ruleDisc
=
str
.
substring
(
0
,
11
);
}
}
},
});
},
},
};
...
...
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