Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
29a29fc2
Commit
29a29fc2
authored
Jul 24, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of git.banshouhui.com:wuzhenzhe/study into dev-v1.0.0
parents
76aed41f
0f830ebb
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
33 deletions
+43
-33
learn.js
src/api/learn.js
+5
-1
index.vue
src/components/question-bank-cell/index.vue
+1
-1
index.vue
src/pages/index/index.vue
+21
-11
addExam.vue
src/pages/learn/addExam.vue
+1
-0
examSetting.vue
src/pages/learn/examSetting.vue
+1
-0
selectSpecial.vue
src/pages/learn/selectSpecial.vue
+1
-0
selectedList.vue
src/pages/learn/selectedList.vue
+13
-18
index.js
src/store/index.js
+0
-2
No files found.
src/api/learn.js
View file @
29a29fc2
...
...
@@ -75,6 +75,9 @@ let learnApiFun = function(vm) {
let
queryExamRecordOne
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
`/rest/question/queryExamRecord/
${
params
.
id
}
`
,
params
)
// 学员获取自己的题库
let
getMyQuestionWarehouseList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/rest/question/query/getMyQuestionWarehouseList'
,
params
)
const
learnApi
=
{
getQuestion
,
getQuestionTotal
,
...
...
@@ -92,7 +95,8 @@ let learnApiFun = function(vm) {
applyExam
,
submitExamRecord
,
queryExamRecord
,
queryExamRecordOne
queryExamRecordOne
,
getMyQuestionWarehouseList
,
}
return
learnApi
}
...
...
src/components/question-bank-cell/index.vue
View file @
29a29fc2
<
template
>
<view
class=
"question-bank-cell"
>
<view
class=
"label-normal"
>
<view>
{{
info
.
label
}}
</view>
<view>
{{
info
.
label
||
info
.
title
}}
</view>
<view
class=
"label-text"
>
共
<text
class=
"label-blue"
>
{{
info
.
number
}}
</text
...
...
src/pages/index/index.vue
View file @
29a29fc2
...
...
@@ -151,7 +151,10 @@ export default {
cardId
:
this
.
detail
.
questionWarehouse
&&
this
.
detail
.
questionWarehouse
.
cardId
,
provinceName
:
this
.
provinceName
,
experience
:
this
.
experience
,
experience
:
this
.
selected
.
state
&&
!
this
.
detail
.
questionWarehouse
.
cardId
?
true
:
false
,
pass
:
this
.
$u
.
random
(
95
,
99
)
+
'%'
,
days
:
this
.
detail
.
totalDayCount
||
0
,
today
:
this
.
detail
.
todayCount
||
0
,
...
...
@@ -248,12 +251,12 @@ export default {
})
this
.
data
=
res
||
{
questionWarehouse
:
{}
}
this
.
selected
=
this
.
data
.
questionWarehouse
this
.
$u
.
vuex
(
'experience'
,
this
.
selected
.
state
&&
!
this
.
detail
.
questionWarehouse
.
cardId
?
true
:
false
)
//
this.$u.vuex(
//
'experience',
//
this.selected.state && !this.detail.questionWarehouse.cardId
//
? true
//
: false
//
)
},
// 学生查询题库首页
async
queryMyQuestionWarehouseDetail
(
id
)
{
...
...
@@ -280,7 +283,7 @@ export default {
}
else
if
(
this
.
info
.
id
)
{
if
(
this
.
info
.
experience
)
{
this
.
selected
.
state
=
false
this
.
$u
.
vuex
(
'experience'
,
false
)
//
this.$u.vuex('experience', false)
// 体验
// 1.顺序答题 2.随机练习 3.模拟考试 4.收藏答题 5.错题答题 6.专项练习-单选 7.专项练习-多选 8.专项练习-判断 9.专项练习-答案是
this
.
$u
.
route
({
...
...
@@ -288,6 +291,8 @@ export default {
params
:
{
source
:
2
,
daily
:
true
,
experience
:
true
,
dailyCount
:
this
.
info
.
days
,
},
})
}
else
{
...
...
@@ -332,7 +337,7 @@ export default {
},
handleClickExperience
()
{
this
.
selected
.
state
=
false
this
.
$u
.
vuex
(
'experience'
,
false
)
//
this.$u.vuex('experience', false)
// 体验
// 1.顺序答题 2.随机练习 3.模拟考试 4.收藏答题 5.错题答题 6.专项练习-单选 7.专项练习-多选 8.专项练习-判断 9.专项练习-答案是
this
.
$u
.
route
({
...
...
@@ -340,6 +345,8 @@ export default {
params
:
{
source
:
2
,
daily
:
true
,
experience
:
true
,
dailyCount
:
this
.
info
.
days
,
},
})
},
...
...
@@ -364,8 +371,11 @@ export default {
// 已选题库
// 绑卡
this
.
type
=
'bound'
this
.
show
=
true
// this.type = 'bound'
// this.show = true
this
.
$u
.
route
({
url
:
'pages/learn/detail'
,
})
}
else
{
// 未选题库
this
.
$u
.
route
({
...
...
src/pages/learn/addExam.vue
View file @
29a29fc2
...
...
@@ -96,6 +96,7 @@ export default {
if
(
pages
.
length
>=
2
)
{
var
page
=
pages
[
pages
.
length
-
2
]
this
.
selected
=
page
.
info
page
.
info
=
null
}
},
},
...
...
src/pages/learn/examSetting.vue
View file @
29a29fc2
...
...
@@ -317,6 +317,7 @@ export default {
if
(
pages
.
length
>=
2
)
{
var
page
=
pages
[
pages
.
length
-
2
]
this
.
selected
=
page
.
info
page
.
info
=
null
}
},
// 获取报考类型
...
...
src/pages/learn/selectSpecial.vue
View file @
29a29fc2
...
...
@@ -82,6 +82,7 @@ export default {
if
(
pages
.
length
>=
2
)
{
var
page
=
pages
[
pages
.
length
-
2
]
this
.
info
=
page
.
info
page
.
info
=
null
}
},
// 点击了添加按钮
...
...
src/pages/learn/selectedList.vue
View file @
29a29fc2
...
...
@@ -12,7 +12,7 @@
<view
class=
"label-content"
>
<view
v-for=
"(label, index) in list"
:key=
"index"
class=
"label-item"
>
<QuestionBankCell
:info=
"label"
:info=
"label
&& label.echoMap && label.echoMap.questionWarehouseId
"
:type=
"type"
@
action=
"handleAction"
></QuestionBankCell>
...
...
@@ -84,24 +84,19 @@ export default {
})
},
// 获取题库列表
loadList
()
{
// async loadList() {
// this.loading = true;
// let res = await this.$u.api.fileLabel({categoryId: this.category.id});
// this.loading = false
// if (res && res.code == 200) {
// this.list = res.data || [];
for
(
var
i
=
0
;
i
<
10
;
i
++
)
{
// 测试模拟多条数据
this
.
list
.
push
({
name
:
'登高架设作业'
,
quantity
:
'80000'
,
pass
:
'98%'
,
id
:
i
,
async
loadList
()
{
this
.
loading
=
true
let
param
=
{}
let
res
=
await
this
.
$u
.
api
.
getMyQuestionWarehouseList
(
param
)
.
then
((
res
)
=>
{
this
.
loading
=
false
this
.
list
=
res
})
.
catch
((
err
)
=>
{
this
.
loading
=
false
console
.
log
(
err
)
})
}
// }
},
setPageInfo
(
info
)
{
var
pages
=
getCurrentPages
()
...
...
src/store/index.js
View file @
29a29fc2
...
...
@@ -19,7 +19,6 @@ let saveStateKeys = [
'lastIndex'
,
'tipStatus'
,
'questionWarehouseId'
,
'experience'
,
]
// 保存变量到本地存储中
...
...
@@ -42,7 +41,6 @@ const store = new Vuex.Store({
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
userInfo
:
lifeData
.
userInfo
?
lifeData
.
userInfo
:
{},
vuex_token
:
lifeData
.
vuex_token
?
lifeData
.
vuex_token
:
''
,
experience
:
lifeData
.
experience
?
lifeData
.
experience
:
false
,
openId
:
lifeData
.
openId
?
lifeData
.
openId
:
''
,
searchHistory
:
lifeData
.
searchHistory
?
lifeData
.
searchHistory
:
[],
// 搜索历史记录
questionList
:
lifeData
.
questionList
?
lifeData
.
questionList
:
[],
// 练习列表
...
...
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