You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

130 lines
3.5 KiB

<style lang="scss">
.container{
min-height:100%;
background:#F6F6F6;
&>.head{
width:100%;
padding-top:var(--status-bar-height);
background:#10C176;
margin-bottom:-190rpx;
}
&>.card{
position:relative;
min-height:900rpx;
justify-content: flex-start;
z-index: 10;
margin:0;
display: flex;
flex-direction: column;
.u-transition{
margin:-120rpx auto 10rpx auto;
}
.name{
font-weight: bold;
font-size:32rpx;
margin:0 auto;
}
.phone{
font-size:26rpx;
color:#333;
margin: 10rpx auto 30rpx auto;
}
.item{
height:90rpx;
display:flex;
align-items: center;
border-bottom:2rpx solid rgba(216, 216, 216, 0.2);
text{
&:first-child{
color:#10C176;
font-size:36rpx;
margin-right:32rpx;
}
&:nth-child(2){
margin-right:auto;
}
&.number{
margin-right:10rpx;
color:#999;
font-weight: bold;
font-size:30rpx;
}
}
}
}
}
</style>
<template>
<view class="container">
<image class="head" src="@/static/my_head.png" mode="aspectFit"/>
<view class="card">
<u-image radius="50%" width="140rpx" height="140rpx" :src="`${host('imgUrl')}/${$store.getters['userInfo'].avatar}`" mode="aspectFill">
<image slot="error" style="width:140rpx;height:140rpx;border-radius:50%;" src="@/static/userHeader.png" mode="aspectFill"/>
</u-image>
<text class="name">{{$store.getters.userInfo.realname}}</text>
<text class="phone">{{$store.getters.userInfo.phone}}</text>
<view class="item" @click="$u.route({url:'/pages/stock/already'})">
<text class="plant-kufangguanli-lingyongguihuan"/> <text>领用记录</text> <text class="plant-youbian"/>
</view>
<view class="item" @click="$u.route({url:'/pages/stock/record'})">
<text class="plant-liulanjilu-tianchong"/> <text>出入库记录</text> <text class="plant-youbian"/>
</view>
<view class="item" @click="$u.route({url:'/pages/purchase/record'})">
<text class="plant-liulanjilu-tianchong"/> <text>采购记录</text> <text class="plant-youbian"/>
</view>
<view class="item" @click="$u.route({url:'/pages/home/news'})">
<text class="plant-xitongxiaoxi"/> <text>系统消息</text> <text class="number">{{$store.state.sysMsgNum}}</text> <text class="plant-youbian"/>
</view>
<view class="item" @click="$u.route({url:'pages/home/personalInfo'})">
<text class="plant-gerenzhongxinwode"/> <text>个人信息</text> <text class="plant-youbian"/>
</view>
<view class="item" @click="$u.route({url:'/pages/home/aboutMy'})">
<text class="plant-banbenhao"/> <text>关于我们</text> <text class="plant-youbian"/>
</view>
<view class="item" @click="outLogin">
<text class="plant-tuichu"/> <text>退出</text> <text class="plant-youbian"/>
</view>
</view>
</view>
</template>
<script>
import request,{host} from '@/common/request'
export default{
data(){
return{
host,
}
},
onLoad(options){
this.$nextTick(()=>{
if(options.toPage){
uni.navigateTo({url:`/pages/purchase/${options.toPage}`})
}
})
},
onShow(){
this.$store.commit("setSysMsgShow",false)
setTimeout(()=>{
uni.hideTabBarRedDot({index:2})
})
},
onHide(){
this.$store.commit("setSysMsgShow",true)
},
methods:{
outLogin(){
uni.showModal({
title:"提示",
content:"确定要退出吗?",
success:e=>{
if(e.confirm){
this.$store.commit('outLogin')
}
}
})
},
},
}
</script>