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
42977b7a
Commit
42977b7a
authored
Oct 14, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 已选题库列表加状态
parent
876e70cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
20 deletions
+88
-20
index.vue
src/components/question-bank-cell/index.vue
+82
-11
index.vue
src/pages/index/index.vue
+2
-5
detail.vue
src/pages/learn/detail.vue
+3
-3
selectedList.vue
src/pages/learn/selectedList.vue
+1
-1
No files found.
src/components/question-bank-cell/index.vue
View file @
42977b7a
<
template
>
<
template
>
<view
class=
"question-bank-cell"
>
<view
class=
"question-bank-cell"
>
<view
class=
"label-normal"
>
<view
class=
"label-normal"
>
<view
class=
"title-view"
>
{{
info
.
label
||
info
.
title
}}
</view>
<view
class=
"title-view"
>
{{
questionData
.
label
||
questionData
.
title
}}
</view>
<view
class=
"type-view"
v-if=
"!isAdd"
>
{{
<view
class=
"type-view"
v-if=
"!isAdd"
>
<text>
{{
provinceName
+
'-'
+
examTypeText
provinceName
+
'-'
+
examTypeText
}}
</view>
}}
</
text><text
:style=
"statusData.statusStyle"
>
{{
'('
+
statusData
.
status
+
statusData
.
subtitle
+
')'
}}
</text></
view>
<view
class=
"label-text"
>
<view
class=
"label-text"
>
共
共
<text
class=
"label-blue"
>
{{
info
.
number
||
0
}}
</text
<text
class=
"label-blue"
>
{{
questionData
.
number
||
0
}}
</text
>
道精编试题,通过率
>
道精编试题,通过率
<text
class=
"label-blue"
>
{{
info
.
version
||
info
.
key
}}
</text>
<text
class=
"label-blue"
>
{{
questionData
.
version
||
questionData
.
key
}}
</text>
</view>
</view>
</view>
</view>
<u-button
<u-button
...
@@ -43,22 +43,25 @@ export default {
...
@@ -43,22 +43,25 @@ export default {
return
{}
return
{}
},
},
computed
:
{
computed
:
{
questionData
()
{
return
this
.
isAdd
?
this
.
info
:
this
.
info
&&
this
.
info
.
echoMap
&&
this
.
info
.
echoMap
.
questionWarehouseId
},
examTypeText
()
{
examTypeText
()
{
var
str
=
this
.
info
.
echoMap
&&
this
.
info
.
echoMap
.
type
var
str
=
this
.
questionData
.
echoMap
&&
this
.
questionData
.
echoMap
.
type
return
str
||
''
return
str
||
''
},
},
provinceName
()
{
provinceName
()
{
var
str
=
var
str
=
this
.
info
.
echoMap
&&
this
.
questionData
.
echoMap
&&
this
.
info
.
echoMap
.
provinceId
&&
this
.
questionData
.
echoMap
.
provinceId
&&
this
.
info
.
echoMap
.
provinceId
.
fullName
this
.
questionData
.
echoMap
.
provinceId
.
fullName
return
str
||
''
return
str
||
''
},
},
isAdd
()
{
isAdd
()
{
return
this
.
type
==
'add'
return
this
.
type
==
'add'
},
},
isNone
()
{
isNone
()
{
return
this
.
type
==
'none'
||
this
.
questionWarehouseId
==
this
.
info
.
id
return
this
.
type
==
'none'
||
this
.
questionWarehouseId
==
this
.
questionData
.
id
},
},
buttonText
()
{
buttonText
()
{
var
text
=
''
var
text
=
''
...
@@ -85,10 +88,78 @@ export default {
...
@@ -85,10 +88,78 @@ export default {
borderRadius
:
'12rpx'
,
borderRadius
:
'12rpx'
,
}
}
},
},
statusData
()
{
var
data
=
{
status
:
''
,
statusStyle
:
''
,
subtitle
:
''
}
if
(
!
this
.
info
.
echoMap
||
!
this
.
info
.
echoMap
.
questionWarehouseId
||
!
this
.
info
.
echoMap
.
cardId
)
{
data
.
status
=
'未激活'
// 未绑卡
data
.
statusStyle
=
'color: #9EA5BB'
return
data
}
switch
(
this
.
info
.
echoMap
.
cardId
.
cardStatus
)
{
case
0
:
break
case
5
:
data
.
status
=
'已激活'
// 绑卡未激活
data
.
statusStyle
=
'color: #2953FF'
data
.
subtitle
=
'-未使用'
break
case
10
:
data
.
status
=
'已激活'
data
.
statusStyle
=
'color: #2953FF'
let
leaveDay
=
0
if
(
this
.
info
.
echoMap
.
cardId
&&
this
.
info
.
echoMap
.
cardId
.
activationTime
)
{
let
diff
=
this
.
datedifference
(
this
.
info
.
echoMap
.
cardId
.
activationTime
.
split
(
' '
)[
0
],
this
.
getTodayDate
()
)
leaveDay
=
this
.
info
.
echoMap
.
cardId
.
effectiveDay
-
diff
leaveDay
=
leaveDay
>
0
?
leaveDay
:
0
}
data
.
subtitle
=
'-'
+
leaveDay
+
'天后到期'
break
case
15
:
data
.
status
=
'已失效'
data
.
statusStyle
=
'color: #9EA5BB'
break
default
:
break
}
return
data
}
},
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
this
.
$emit
(
'action'
,
this
.
info
,
this
.
type
)
this
.
$emit
(
'action'
,
this
.
questionData
,
this
.
type
)
},
getTodayDate
()
{
let
day
=
new
Date
()
day
.
setTime
(
day
.
getTime
())
let
m
=
day
.
getMonth
()
+
1
let
d
=
day
.
getDate
()
return
(
day
.
getFullYear
()
+
'-'
+
(
String
(
m
).
length
<
2
?
'0'
+
m
:
m
)
+
'-'
+
(
String
(
d
).
length
<
2
?
'0'
+
d
:
d
)
)
},
datedifference
(
sDate1
,
sDate2
)
{
//2021-01-01,2020-02-01,31
var
dateSpan
,
tempDate
,
iDays
sDate1
=
Date
.
parse
(
sDate1
)
sDate2
=
Date
.
parse
(
sDate2
)
dateSpan
=
sDate2
-
sDate1
dateSpan
=
Math
.
abs
(
dateSpan
)
iDays
=
Math
.
floor
(
dateSpan
/
(
24
*
3600
*
1000
))
return
iDays
},
},
},
},
}
}
...
...
src/pages/index/index.vue
View file @
42977b7a
...
@@ -32,10 +32,7 @@
...
@@ -32,10 +32,7 @@
class=
"card-tip-view"
class=
"card-tip-view"
@
click=
"$u.throttle(handleSelectTip, 500)"
@
click=
"$u.throttle(handleSelectTip, 500)"
>
>
题库未激活,请通过
<text
class=
"blue-text"
>
“绑卡”
</text>
或
<text
题库未激活,
<text
class=
"blue-text"
>
激活
</text>
后可刷题模考
class=
"blue-text"
>
“购买”
</text
>
激活
</view>
</view>
<view
v-else
class=
"detail-view"
>
<view
v-else
class=
"detail-view"
>
<view
<view
...
@@ -155,7 +152,7 @@ export default {
...
@@ -155,7 +152,7 @@ export default {
return
this
.
orgId
return
this
.
orgId
},
},
title
()
{
title
()
{
return
this
.
selected
.
title
||
'
请
选择题库'
return
this
.
selected
.
title
||
'
点击
选择题库'
},
},
imageUrl
()
{
imageUrl
()
{
return
'/static/logo.png'
return
'/static/logo.png'
...
...
src/pages/learn/detail.vue
View file @
42977b7a
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<view
class=
"title-view"
>
{{
info
.
questionWarehouse
.
title
}}
</view>
<view
class=
"title-view"
>
{{
info
.
questionWarehouse
.
title
}}
</view>
<view
class=
"message-view"
>
8年题库沉淀,省时省力考高分
</view>
<view
class=
"message-view"
>
8年题库沉淀,省时省力考高分
</view>
<view
class=
"tip-view"
<view
class=
"tip-view"
>
• 有效期90天,
自购买或者绑卡后答题激活为起始日期
</view
>
• 有效期90天,
从首次刷题之日算起
</view
>
>
<view
class=
"price-view"
>
<view
class=
"price-view"
>
<view
class=
"left-view"
>
<view
class=
"left-view"
>
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
type=
"primary"
type=
"primary"
shape=
"circle"
shape=
"circle"
>
>
绑定学习卡
学习卡用户 绑卡激活
</u-button>
</u-button>
</view>
</view>
<MaskTip
<MaskTip
...
@@ -143,7 +143,7 @@ export default {
...
@@ -143,7 +143,7 @@ export default {
buttonStyle
()
{
buttonStyle
()
{
return
{
return
{
height
:
'104rpx'
,
height
:
'104rpx'
,
backgroundColor
:
'#
2953FF
'
,
backgroundColor
:
'#
FA5A4D
'
,
color
:
'#FFFFFF'
,
color
:
'#FFFFFF'
,
fontSize
:
'32rpx'
,
fontSize
:
'32rpx'
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
...
...
src/pages/learn/selectedList.vue
View file @
42977b7a
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<view
class=
"label-content"
>
<view
class=
"label-content"
>
<view
v-for=
"(label, index) in list"
:key=
"index"
class=
"label-item"
>
<view
v-for=
"(label, index) in list"
:key=
"index"
class=
"label-item"
>
<QuestionBankCell
<QuestionBankCell
:info=
"label
&& label.echoMap && label.echoMap.questionWarehouseId
"
:info=
"label"
:type=
"type"
:type=
"type"
@
action=
"handleAction"
@
action=
"handleAction"
></QuestionBankCell>
></QuestionBankCell>
...
...
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