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
e47af53f
Commit
e47af53f
authored
Jul 14, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:添加我的题库页面
parent
260e73cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
180 additions
and
67 deletions
+180
-67
pages.json
src/pages.json
+18
-0
mine.vue
src/pages/index/mine.vue
+81
-67
bank.vue
src/pages/mine/bank.vue
+81
-0
No files found.
src/pages.json
View file @
e47af53f
...
@@ -120,6 +120,24 @@
...
@@ -120,6 +120,24 @@
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
"disableScroll"
:
true
}
}
},
{
"path"
:
"info"
,
"name"
:
"mineInfo"
,
"style"
:
{
"navigationBarTitleText"
:
"个人信息"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
},
{
"path"
:
"bank"
,
"name"
:
"mineBank"
,
"style"
:
{
"navigationBarTitleText"
:
"我的题库"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
}
}
]
]
}
}
...
...
src/pages/index/mine.vue
View file @
e47af53f
<
template
>
<
template
>
<view>
<view>
<view
class=
"u-flex user-box u-p-l-30 u-p-t-30 u-p-r-20 u-p-b-30"
@
tap=
"login"
>
<view
<view
class=
"u-m-r-10"
>
class=
"u-flex user-box u-p-l-30 u-p-t-30 u-p-r-20 u-p-b-30"
<u-avatar
:src=
"avatar"
size=
"140"
></u-avatar>
@
tap=
"login"
</view>
>
<view
class=
"u-flex-1"
>
<view
class=
"u-m-r-10"
>
<view
class=
"u-font-18 u-p-b-20"
>
{{
nikeName
}}
</view>
<u-avatar
:src=
"avatar"
size=
"140"
></u-avatar>
<view
class=
"u-font-14 u-tips-color"
>
累计刷题俩999次
</view>
</view>
</view>
<view
class=
"u-flex-1"
>
</view>
<view
class=
"u-font-18 u-p-b-20"
>
{{
nikeName
}}
</view>
<view
class=
"u-font-14 u-tips-color"
>
累计刷题俩999次
</view>
<view
class=
"u-m-t-20"
>
</view>
<u-cell-group>
</view>
<u-cell-item
icon=
"star"
title=
"个人信息"
value=
"完善度40%"
></u-cell-item>
<u-cell-item
icon=
"photo"
title=
"我的题库"
></u-cell-item>
<view
class=
"u-m-t-20"
>
<u-cell-item
icon=
"coupon"
title=
"联系客服"
@
tap=
"toUrl('pages/mine/customer')"
></u-cell-item>
<u-cell-group>
<u-cell-item
icon=
"coupon"
title=
"退出登录"
@
tap=
"logout"
></u-cell-item>
<u-cell-item
</u-cell-group>
icon=
"star"
</view>
title=
"个人信息"
</view>
value=
"完善度40%"
@
tap=
"toUrl('pages/mine/info')"
></u-cell-item>
<u-cell-item
icon=
"photo"
title=
"我的题库"
@
tap=
"toUrl('pages/mine/bank')"
></u-cell-item>
<u-cell-item
icon=
"coupon"
title=
"联系客服"
@
tap=
"toUrl('pages/mine/customer')"
></u-cell-item>
<u-cell-item
icon=
"coupon"
title=
"退出登录"
@
tap=
"logout"
></u-cell-item>
</u-cell-group>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
pic
:
'https://uviewui.com/common/logo.png'
,
pic
:
'https://uviewui.com/common/logo.png'
,
show
:
true
show
:
true
,
}
}
},
},
computed
:
{
computed
:
{
avatar
()
{
avatar
()
{
return
this
.
userInfo
.
avatarUrl
||
this
.
pic
return
this
.
userInfo
.
avatarUrl
||
this
.
pic
},
},
nikeName
()
{
nikeName
()
{
return
this
.
userInfo
.
nickName
||
'未登录'
return
this
.
userInfo
.
nickName
||
'未登录'
}
},
},
},
onLoad
()
{
onLoad
()
{},
methods
:
{
},
login
()
{
methods
:
{
this
.
$u
.
route
({
login
()
{
url
:
'pages/login/index'
,
this
.
$u
.
route
({
})
url
:
'pages/login/index'
},
})
toUrl
(
url
)
{
},
this
.
$u
.
route
({
toUrl
(
url
)
{
url
:
url
,
this
.
$u
.
route
({
})
url
:
url
},
})
logout
()
{
},
this
.
$u
.
vuex
(
'vuex_token'
,
''
)
logout
()
{
this
.
$u
.
vuex
(
'userInfo'
,
{})
this
.
$u
.
vuex
(
'vuex_token'
,
''
)
},
this
.
$u
.
vuex
(
'userInfo'
,
{})
},
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
page
{
page
{
background-color
:
#ededed
;
background-color
:
#ededed
;
}
}
.camera
{
.camera
{
width
:
54px
;
width
:
54px
;
height
:
44px
;
height
:
44px
;
&
:active
{
&
:active
{
background-color
:
#ededed
;
background-color
:
#ededed
;
}
}
}
}
.user-box
{
.user-box
{
background-color
:
#fff
;
background-color
:
#fff
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/pages/mine/bank.vue
0 → 100644
View file @
e47af53f
<
template
>
<view
class=
"content"
>
<!--
<text
class=
"title"
>
{{
title
}}
</text>
-->
<my-subject
class=
"subject-item"
v-for=
"(item, index) in lists"
:key=
"index"
:time=
"item.time"
:status=
"item.status"
:title=
"item.title"
:subtitle=
"item.subtitle"
></my-subject>
</view>
</
template
>
<
script
>
import
mySubject
from
'@/components/my-subject/index.vue'
export
default
{
components
:
{
mySubject
,
},
data
()
{
return
{
title
:
'我的题库'
,
lists
:
[
{
time
:
'2021.06.25 18:06'
,
status
:
'已激活'
,
title
:
'高处安装、维护、拆除作业人员'
,
subtitle
:
'题库将于48天后到期'
,
},
{
time
:
'2021.05.25 14:05'
,
status
:
'已绑定'
,
title
:
'高处安装、维护、拆除作业人员'
,
subtitle
:
'题库将于88天后到期'
,
},
{
time
:
'2021.07.25 11:06'
,
status
:
'已失效'
,
title
:
'高处安装、维护、拆除作业人员'
,
subtitle
:
'题库已过期'
,
},
],
}
},
onLoad
()
{},
methods
:
{},
}
</
script
>
<
style
>
.content
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
padding
:
30
rpx
;
}
.subject-item
{
width
:
100%
;
margin-bottom
:
30
rpx
;
}
.logo
{
height
:
200
rpx
;
width
:
200
rpx
;
margin
:
200
rpx
auto
50
rpx
auto
;
}
.text-area
{
display
:
flex
;
justify-content
:
center
;
}
.title
{
font-size
:
36
rpx
;
color
:
#8f8f94
;
}
</
style
>
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