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
8bd125b4
Commit
8bd125b4
authored
Jul 23, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement: 首页UI变更
parent
b3fa6588
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
47 deletions
+48
-47
index.vue
src/components/notice-bar/index.vue
+3
-1
index.vue
src/components/subject-statistics/index.vue
+9
-2
index.vue
src/pages/index/index.vue
+36
-44
No files found.
src/components/notice-bar/index.vue
View file @
8bd125b4
...
@@ -129,9 +129,11 @@ export default {
...
@@ -129,9 +129,11 @@ export default {
initData
()
{
initData
()
{
var
a0
=
this
.
$u
.
random
(
0
,
49
)
var
a0
=
this
.
$u
.
random
(
0
,
49
)
var
a1
=
this
.
$u
.
random
(
0
,
49
)
var
a1
=
this
.
$u
.
random
(
0
,
49
)
if
(
a1
==
a0
)
a0
=
this
.
$u
.
random
(
0
,
49
)
var
a2
=
this
.
$u
.
random
(
0
,
49
)
var
a2
=
this
.
$u
.
random
(
0
,
49
)
if
([
a0
,
a1
].
indexOf
(
a2
)
!=
-
1
)
a2
=
this
.
$u
.
random
(
0
,
49
)
var
a3
=
this
.
$u
.
random
(
0
,
49
)
var
a3
=
this
.
$u
.
random
(
0
,
49
)
console
.
log
(
a0
,
a1
,
a2
,
a3
,
this
.
defaultUrl
)
if
([
a0
,
a1
,
a2
].
indexOf
(
a3
)
!=
-
1
)
a3
=
this
.
$u
.
random
(
0
,
49
)
this
.
avatars
=
[
this
.
avatars
=
[
this
.
defaultUrl
+
(
a0
>
9
?
'a'
:
'a0'
)
+
String
(
a0
)
+
'.jpeg'
,
this
.
defaultUrl
+
(
a0
>
9
?
'a'
:
'a0'
)
+
String
(
a0
)
+
'.jpeg'
,
this
.
defaultUrl
+
(
a1
>
9
?
'a'
:
'a0'
)
+
String
(
a1
)
+
'.jpeg'
,
this
.
defaultUrl
+
(
a1
>
9
?
'a'
:
'a0'
)
+
String
(
a1
)
+
'.jpeg'
,
...
...
src/components/subject-statistics/index.vue
View file @
8bd125b4
...
@@ -37,12 +37,12 @@
...
@@ -37,12 +37,12 @@
</view>
</view>
<view
class=
"bottom"
>
<view
class=
"bottom"
>
<view
<view
class=
"bottom-button
"
:class=
"['bottom-button',
{ experience: info.experience }]
"
type="primary"
type="primary"
shape="circle"
shape="circle"
@click="$u.throttle(answer, 500)"
@click="$u.throttle(answer, 500)"
>
<image
class=
"button-image"
:src=
"lianxianniuImage"
></image
>
<image
class=
"button-image"
:src=
"lianxianniuImage"
></image
>
每日一练
</view
>
{{
buttonText
}}
</view
>
>
</view>
</view>
</view>
</view>
...
@@ -68,6 +68,7 @@ export default {
...
@@ -68,6 +68,7 @@ export default {
dynamic
:
[],
dynamic
:
[],
avatar
:
[],
avatar
:
[],
selected
:
{},
selected
:
{},
experience
:
false
,
}
}
},
},
},
},
...
@@ -92,6 +93,9 @@ export default {
...
@@ -92,6 +93,9 @@ export default {
lianxianniuImage
()
{
lianxianniuImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'lianxianniu.png'
return
process
.
uniEnv
.
qn_base_url
+
'lianxianniu.png'
},
},
buttonText
()
{
return
this
.
info
.
experience
?
'免费体验答题'
:
'每日一练'
},
},
},
created
()
{},
created
()
{},
methods
:
{
methods
:
{
...
@@ -196,6 +200,9 @@ export default {
...
@@ -196,6 +200,9 @@ export default {
color
:
#2953ff
;
color
:
#2953ff
;
height
:
104rpx
;
height
:
104rpx
;
width
:
400rpx
;
width
:
400rpx
;
&
.experience
{
color
:
#fa5a49
;
}
.button-image
{
.button-image
{
width
:
400rpx
;
width
:
400rpx
;
height
:
104rpx
;
height
:
104rpx
;
...
...
src/pages/index/index.vue
View file @
8bd125b4
...
@@ -54,9 +54,12 @@
...
@@ -54,9 +54,12 @@
<image
class=
"exam-image"
:src=
"item.image"
></image>
<image
class=
"exam-image"
:src=
"item.image"
></image>
<view
class=
"right-view"
>
<view
class=
"right-view"
>
<view>
{{
item
.
name
}}
</view>
<view>
{{
item
.
name
}}
</view>
<view
class=
"label-view"
:style=
"
{ color: item.labelColor }">
{{
<view
class=
"label-view"
item
.
label
><text
class=
"left-label"
v-if=
"item.leftLabel"
>
{{
}}
</view>
item
.
leftLabel
}}
</text
><text>
{{
item
.
label
}}
</text></view
>
</view>
</view>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"line-view"
></view>
...
@@ -128,39 +131,40 @@ export default {
...
@@ -128,39 +131,40 @@ export default {
{
{
name
:
'全部试题'
,
name
:
'全部试题'
,
label
:
this
.
examText
,
label
:
this
.
examText
,
l
abelColor
:
this
.
labelColor
,
l
eftLabel
:
this
.
selected
.
count
,
// 已做题目数
image
:
process
.
uniEnv
.
qn_base_url
+
'quanbushiti.png'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'quanbushiti.png'
,
},
},
{
{
name
:
'模拟考试'
,
name
:
'模拟考试'
,
label
:
'真题模拟强化'
,
label
:
this
.
simulateText
,
labelColor
:
'#9EA5BB'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'monishiti.png'
,
image
:
process
.
uniEnv
.
qn_base_url
+
'monishiti.png'
,
},
},
]
]
},
},
labelColor
()
{
return
this
.
selected
.
state
?
'#FA5A49'
:
'#9EA5BB'
},
examText
()
{
examText
()
{
return
this
.
selected
.
state
return
this
.
selected
.
cardId
?
'免费体验1次'
?
'/'
+
this
.
selected
.
totalExam
:
this
.
selected
.
card
?
this
.
selected
.
count
+
'/'
+
this
.
selected
.
all
:
'题库进阶练习'
:
'题库进阶练习'
},
},
simulateText
()
{
return
this
.
selected
.
cardId
?
'上次成绩'
+
this
.
selected
.
totalExam
+
'分'
:
'真题模拟强化'
},
info
()
{
info
()
{
return
{
return
{
id
:
this
.
selected
.
id
,
id
:
this
.
selected
.
id
,
cardId
:
cardId
:
this
.
detail
.
questionWarehouse
&&
this
.
detail
.
questionWarehouse
.
cardId
,
this
.
detail
.
questionWarehouse
&&
this
.
detail
.
questionWarehouse
.
cardId
,
provinceName
:
this
.
provinceName
,
provinceName
:
this
.
provinceName
,
experience
:
this
.
selected
.
state
,
experience
:
this
.
selected
.
state
&&
!
this
.
detail
.
questionWarehouse
.
cardId
,
pass
:
this
.
$u
.
random
(
95
,
99
)
+
'%'
,
pass
:
this
.
$u
.
random
(
95
,
99
)
+
'%'
,
days
:
this
.
detail
.
totalDayCount
||
0
,
days
:
this
.
detail
.
totalDayCount
||
0
,
today
:
this
.
detail
.
todayCount
||
0
,
today
:
this
.
detail
.
todayCount
||
0
,
total
:
this
.
detail
.
totalCount
||
0
,
total
:
this
.
detail
.
totalCount
||
0
,
totalExam
:
this
.
data
.
totalCount
,
totalExam
:
this
.
data
.
totalCount
||
0
,
}
}
},
},
subItems
()
{
subItems
()
{
...
@@ -261,23 +265,6 @@ export default {
...
@@ -261,23 +265,6 @@ export default {
})
})
this
.
detail
=
res
||
{
questionWarehouse
:
{}
}
this
.
detail
=
res
||
{
questionWarehouse
:
{}
}
this
.
queryQuestionWarehouseById
(
res
.
questionWarehouse
.
questionWarehouseId
)
this
.
queryQuestionWarehouseById
(
res
.
questionWarehouse
.
questionWarehouseId
)
// this.detail = res || {
// questionWarehouse: {
// cardId: 0,
// createTime: '',
// createdBy: 0,
// echoMap: {},
// id: 0,
// institutionId: 0,
// questionWarehouseId: 0,
// studentId: 0,
// updateTime: '',
// updatedBy: 0,
// },
// todayCount: 100,
// totalCount: 100,
// totalDayCount: 100,
// }
},
},
handleSelect
()
{
handleSelect
()
{
...
@@ -289,12 +276,18 @@ export default {
...
@@ -289,12 +276,18 @@ export default {
// 每日一练
// 每日一练
handleAnswer
()
{
handleAnswer
()
{
if
(
this
.
selected
.
cardId
)
{
if
(
this
.
selected
.
cardId
)
{
// 练习
// ...
}
else
if
(
this
.
selected
.
id
)
{
}
else
if
(
this
.
selected
.
id
)
{
if
(
this
.
info
.
experience
)
{
this
.
selected
.
state
=
false
// 体验
}
else
{
// 绑卡提示
this
.
type
=
'bound'
this
.
type
=
'bound'
this
.
show
=
true
this
.
show
=
true
}
}
else
{
}
else
{
// this.type = 'select'
// this.show = true
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/learn/selectCategory'
,
url
:
'pages/learn/selectCategory'
,
})
})
...
@@ -345,14 +338,10 @@ export default {
...
@@ -345,14 +338,10 @@ export default {
}
}
}
else
if
(
this
.
selected
.
id
)
{
}
else
if
(
this
.
selected
.
id
)
{
// 已选题库
// 已选题库
if
(
index
==
0
&&
this
.
info
.
experience
)
{
// 体验
// ...
}
else
{
// 绑卡
// 绑卡
this
.
type
=
'bound'
this
.
type
=
'bound'
this
.
show
=
true
this
.
show
=
true
}
}
else
{
}
else
{
// 未选题库
// 未选题库
this
.
$u
.
route
({
this
.
$u
.
route
({
...
@@ -520,6 +509,9 @@ export default {
...
@@ -520,6 +509,9 @@ export default {
font-weight
:
400
;
font-weight
:
400
;
font-size
:
26rpx
;
font-size
:
26rpx
;
margin-top
:
4rpx
;
margin-top
:
4rpx
;
.left-label
{
color
:
#5a6073
;
}
}
}
}
}
}
}
...
...
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