Commit e47af53f authored by linwenqing's avatar linwenqing

feat:添加我的题库页面

parent 260e73cb
...@@ -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
}
} }
] ]
} }
......
<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
<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