Commit e47af53f authored by linwenqing's avatar linwenqing

feat:添加我的题库页面

parent 260e73cb
......@@ -120,6 +120,24 @@
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
"path": "info",
"name": "mineInfo",
"style": {
"navigationBarTitleText": "个人信息",
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
"path": "bank",
"name": "mineBank",
"style": {
"navigationBarTitleText": "我的题库",
"enablePullDownRefresh": false,
"disableScroll": true
}
}
]
}
......
<template>
<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 class="u-m-r-10">
<u-avatar :src="avatar" size="140"></u-avatar>
</view>
<view class="u-flex-1">
<view class="u-font-18 u-p-b-20">{{ nikeName }}</view>
<view class="u-font-14 u-tips-color">累计刷题俩999次</view>
</view>
</view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="star" title="个人信息" value="完善度40%"></u-cell-item>
<u-cell-item icon="photo" title="我的题库"></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>
<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 class="u-m-r-10">
<u-avatar :src="avatar" size="140"></u-avatar>
</view>
<view class="u-flex-1">
<view class="u-font-18 u-p-b-20">{{ nikeName }}</view>
<view class="u-font-14 u-tips-color">累计刷题俩999次</view>
</view>
</view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item
icon="star"
title="个人信息"
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>
<script>
export default {
data() {
return {
pic:'https://uviewui.com/common/logo.png',
show:true
}
},
computed: {
avatar() {
return this.userInfo.avatarUrl || this.pic
},
nikeName() {
return this.userInfo.nickName || '未登录'
}
},
onLoad() {
},
methods: {
login() {
this.$u.route({
url: 'pages/login/index'
})
},
toUrl(url) {
this.$u.route({
url: url
})
},
logout() {
this.$u.vuex('vuex_token', '')
this.$u.vuex('userInfo', {})
}
}
}
export default {
data() {
return {
pic: 'https://uviewui.com/common/logo.png',
show: true,
}
},
computed: {
avatar() {
return this.userInfo.avatarUrl || this.pic
},
nikeName() {
return this.userInfo.nickName || '未登录'
},
},
onLoad() {},
methods: {
login() {
this.$u.route({
url: 'pages/login/index',
})
},
toUrl(url) {
this.$u.route({
url: url,
})
},
logout() {
this.$u.vuex('vuex_token', '')
this.$u.vuex('userInfo', {})
},
},
}
</script>
<style lang="scss">
page{
background-color: #ededed;
page {
background-color: #ededed;
}
.camera{
width: 54px;
height: 44px;
&:active{
background-color: #ededed;
}
.camera {
width: 54px;
height: 44px;
&:active {
background-color: #ededed;
}
}
.user-box{
background-color: #fff;
.user-box {
background-color: #fff;
}
</style>
\ No newline at end of file
</style>
<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: 30rpx;
}
.subject-item {
width: 100%;
margin-bottom: 30rpx;
}
.logo {
height: 200rpx;
width: 200rpx;
margin: 200rpx auto 50rpx auto;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment