2023-07-15 17:51:20 +08:00
|
|
|
<template>
|
2023-07-18 17:10:34 +08:00
|
|
|
<view class="my">
|
|
|
|
<view class="head_box">
|
|
|
|
<image class="head_img" src="../../static/img/home/head-bg.png"></image>
|
2023-07-20 16:32:30 +08:00
|
|
|
<!-- #ifdef APP-PLUS||H5 -->
|
|
|
|
<view style="height: var(--status-bar-height);"></view>
|
2023-07-21 14:49:21 +08:00
|
|
|
<view style="height: 100rpx"></view>
|
2023-07-20 16:32:30 +08:00
|
|
|
<!-- #endif -->
|
2023-07-21 17:17:37 +08:00
|
|
|
<!-- <view v-if="!$store.state.app.token" class="my_head">
|
2023-07-18 17:10:34 +08:00
|
|
|
<view class="department flex_a_c">
|
|
|
|
<view class="section">产品技术部</view>
|
|
|
|
<view class="" @click="login">去登陆</view>
|
2023-07-15 17:51:20 +08:00
|
|
|
</view>
|
2023-07-21 17:17:37 +08:00
|
|
|
</view> -->
|
|
|
|
<view class="personage">
|
2023-07-18 17:10:34 +08:00
|
|
|
<view class="my_msg flex_a_c_j_sb">
|
|
|
|
<view class="flex_a_c">
|
2023-07-21 17:17:37 +08:00
|
|
|
<u--image :showLoading="true" :src="oaUserInfo.avatar||'../../static/img/public/avatar.png'" width="112.28rpx" height="112.28rpx" shape="circle">
|
2023-07-18 17:10:34 +08:00
|
|
|
</u--image>
|
2023-07-21 17:17:37 +08:00
|
|
|
<view v-if="!$store.state.app.token" @click="login" class="name_work">
|
2023-07-18 17:10:34 +08:00
|
|
|
<view class="name">
|
2023-07-21 17:17:37 +08:00
|
|
|
<text class="nickname">立即登录</text>
|
|
|
|
</view>
|
|
|
|
<view class="work">
|
|
|
|
登录后可查看更多
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view v-else class="name_work">
|
|
|
|
<view class="name">
|
2023-07-22 17:23:34 +08:00
|
|
|
<text class="nickname">姓名:{{ oaUserInfo.nickname }}</text>
|
2023-07-22 17:53:04 +08:00
|
|
|
<!-- <text class="omit" v-if="oaUserInfo.admin.company">所属公司:{{ oaUserInfo.admin.company.company_name }}</text> -->
|
2023-07-18 17:10:34 +08:00
|
|
|
</view>
|
|
|
|
<view class="work">
|
2023-07-23 23:18:26 +08:00
|
|
|
电话:{{oaUserInfo.account}}
|
|
|
|
|
|
|
|
<!-- 所属公司:<text class="omit" v-if="oaUserInfo.admin.company">{{ oaUserInfo.admin.company.company_name }}</text> -->
|
2023-07-22 17:53:04 +08:00
|
|
|
<!-- {{ oaUserInfo.did_name }}({{ oaUserInfo.label_name }}) -->
|
2023-07-18 17:10:34 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
2023-07-15 17:51:20 +08:00
|
|
|
</view>
|
2023-07-22 16:55:34 +08:00
|
|
|
<view v-if="$store.state.app.token" class="compile" @click="naviTo()">
|
2023-07-18 17:10:34 +08:00
|
|
|
<view class="iconfont icon-bianji"></view>
|
2023-07-25 08:11:50 +08:00
|
|
|
<!-- <view class="">编辑</view> -->
|
2023-07-15 17:51:20 +08:00
|
|
|
</view>
|
2023-07-18 17:10:34 +08:00
|
|
|
</view>
|
|
|
|
<view class="assess">
|
|
|
|
<view class="ass_cent flex_a_c_j_sb">
|
2023-07-19 11:48:36 +08:00
|
|
|
<view class="cent_item" @click="naviTo('/subpkg/finance/finance')">
|
2023-07-18 17:10:34 +08:00
|
|
|
<!-- <view class="num">{{ oaUserInfo.achievements_money }}</view> -->
|
2023-07-21 17:17:37 +08:00
|
|
|
<view class="num" v-if="!$store.state.app.token">*</view>
|
|
|
|
<view class="num" v-else-if="eyeType">{{oaUserInfo.user_money||'0.00'}}</view>
|
2023-07-21 15:35:53 +08:00
|
|
|
<view class="num" v-if="!eyeType">****</view>
|
2023-07-21 14:57:11 +08:00
|
|
|
<view class="name">账户余额(元)</view>
|
2023-07-18 17:10:34 +08:00
|
|
|
</view>
|
2023-07-21 14:49:21 +08:00
|
|
|
<!-- <view class="cent_item" @click="naviTo('/subpkg/finance/finance')">
|
|
|
|
<view class="num">0.00</view>
|
2023-07-19 11:48:36 +08:00
|
|
|
<view class="name">冻结金额</view>
|
2023-07-21 14:49:21 +08:00
|
|
|
</view> -->
|
2023-07-20 16:32:30 +08:00
|
|
|
<view class="cent_item" @click="naviTo('/subpkg/finance/finance')">
|
2023-07-18 17:10:34 +08:00
|
|
|
<!-- <view class="num">{{ oaUserInfo.company_money }}</view> -->
|
2023-07-21 17:17:37 +08:00
|
|
|
<view class="num" v-if="!$store.state.app.token">*</view>
|
|
|
|
<view class="num" v-else-if="eyeType">{{oaUserInfo.income||'0.00'}}</view>
|
2023-07-21 15:35:53 +08:00
|
|
|
<view class="num" v-if="!eyeType">****</view>
|
2023-07-21 14:57:11 +08:00
|
|
|
<view class="name">收益金额(元)</view>
|
2023-07-18 17:10:34 +08:00
|
|
|
</view>
|
2023-07-15 17:51:20 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="other_guide">
|
|
|
|
<block v-for="(item,i) in myOaData" :key="i">
|
|
|
|
<view class="other_item flex_a_c_j_sb" @click="naviTo(item.url)">
|
2023-07-25 09:47:43 +08:00
|
|
|
<view class="flex_a_c left">
|
|
|
|
<!-- <view class="iconfont2" :class="item.icon"></view> -->
|
|
|
|
<image :src="item.icon"></image>
|
2023-07-15 17:51:20 +08:00
|
|
|
<view class="text">{{ item.name }}</view>
|
|
|
|
</view>
|
2023-07-25 09:47:43 +08:00
|
|
|
<uni-icons type="forward"></uni-icons>
|
2023-07-15 17:51:20 +08:00
|
|
|
</view>
|
|
|
|
</block>
|
|
|
|
</view>
|
2023-07-21 14:49:21 +08:00
|
|
|
<view class="log_out" v-if="$store.state.app.token" @click="logout">退出登录</view>
|
2023-07-21 17:17:37 +08:00
|
|
|
<view class="log_out" v-else @click="login">登录账号</view>
|
2023-07-15 17:51:20 +08:00
|
|
|
<!-- <tabbar></tabbar> -->
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { mapActions } from 'vuex'
|
|
|
|
import { getUserIndexAPI } from '@/api/oaApi.js'
|
2023-07-20 10:22:50 +08:00
|
|
|
import { userInfo } from '@/api/oaUser.js'
|
2023-07-15 17:51:20 +08:00
|
|
|
import { Toast } from '@/libs/uniApi.js'
|
|
|
|
import { myOaData } from '@/static/server/server.js'
|
|
|
|
// import tabbar from '../components/tabbar'
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
// tabbar
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
myOaData: myOaData,
|
|
|
|
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onReady() {
|
|
|
|
uni.setNavigationBarColor({
|
|
|
|
frontColor: '#ffffff',
|
|
|
|
backgroundColor: '#3175f9'
|
|
|
|
})
|
|
|
|
},
|
2023-07-21 17:17:37 +08:00
|
|
|
onLoad() {},
|
|
|
|
onShow() {
|
|
|
|
this.getOaUserInfo();
|
2023-07-15 17:51:20 +08:00
|
|
|
},
|
2023-07-21 15:35:53 +08:00
|
|
|
computed:{
|
|
|
|
eyeType(){
|
|
|
|
return this.$store.state.config.eyeType;
|
2023-07-21 17:45:27 +08:00
|
|
|
},
|
|
|
|
oaUserInfo(){
|
2023-07-24 09:17:00 +08:00
|
|
|
return this.$store.state.app.userInfo||{avatar:'',admin:{company:{company_name:''}}};
|
2023-07-21 15:35:53 +08:00
|
|
|
}
|
|
|
|
},
|
2023-07-15 17:51:20 +08:00
|
|
|
methods: {
|
|
|
|
...mapActions(['getWxLogin']),
|
|
|
|
login() {
|
2023-07-21 14:49:21 +08:00
|
|
|
uni.navigateTo({
|
|
|
|
url:'/pages/oaLogin/oaLogin'
|
|
|
|
})
|
2023-07-15 17:51:20 +08:00
|
|
|
},
|
2023-07-20 13:48:26 +08:00
|
|
|
logout(){
|
|
|
|
let that = this;
|
|
|
|
uni.showModal({
|
|
|
|
content:'确定要退出登录吗',
|
|
|
|
success: (e) => {
|
|
|
|
if(e.confirm){
|
2023-07-21 17:45:27 +08:00
|
|
|
that.$store.commit('SET_USERINFO',{
|
|
|
|
user: null,
|
|
|
|
token: null
|
|
|
|
})
|
2023-07-20 13:48:26 +08:00
|
|
|
that.$store.commit('LOGOUT');
|
|
|
|
uni.navigateTo({
|
|
|
|
url:'/pages/oaLogin/oaLogin'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
2023-07-15 17:51:20 +08:00
|
|
|
async getOaUserInfo() {
|
2023-07-21 17:17:37 +08:00
|
|
|
const res = await userInfo();
|
2023-07-21 17:45:27 +08:00
|
|
|
this.$store.commit('setUserInfo', res.data);
|
2023-07-15 17:51:20 +08:00
|
|
|
},
|
|
|
|
naviTo(url) {
|
|
|
|
url ?
|
|
|
|
uni.navigateTo({
|
2023-07-25 10:12:05 +08:00
|
|
|
url: url,
|
|
|
|
fail(e) {
|
|
|
|
uni.switchTab({
|
|
|
|
url: url
|
|
|
|
})
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
}) : Toast('暂未开放')
|
|
|
|
},
|
|
|
|
alterMyInfo() {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/views/personal_center'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onPullDownRefresh() {
|
|
|
|
this.getOaUserInfo()
|
|
|
|
uni.stopPullDownRefresh()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2023-07-18 17:10:34 +08:00
|
|
|
.my {
|
|
|
|
.head_box {
|
|
|
|
position: relative;
|
|
|
|
width: 100vw;
|
|
|
|
padding-top: 30rpx;
|
|
|
|
margin-bottom: 30rpx;
|
|
|
|
|
|
|
|
.head_img {
|
|
|
|
position: absolute;
|
|
|
|
// z-index: -1;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2023-07-15 17:51:20 +08:00
|
|
|
.my_head {
|
|
|
|
padding: 0 28.07rpx;
|
2023-07-18 17:10:34 +08:00
|
|
|
height: 90.39rpx;
|
|
|
|
position: relative;
|
|
|
|
// z-index: 1;
|
|
|
|
// top: 20rpx;
|
|
|
|
// background-color: $theme-oa-color;
|
|
|
|
// background-image: url('../../static/img/home/head-bg.png');
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
|
|
.department {
|
2023-07-18 17:10:34 +08:00
|
|
|
// padding-top: 38.6rpx;
|
2023-07-15 17:51:20 +08:00
|
|
|
font-size: 31.58rpx;
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
.section {
|
|
|
|
margin-right: 57.89rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.personage {
|
2023-07-18 17:10:34 +08:00
|
|
|
// position: relative;
|
2023-07-21 14:49:21 +08:00
|
|
|
padding: 42.11rpx 0 28.07rpx 0;
|
2023-07-15 17:51:20 +08:00
|
|
|
border-radius: 12px;
|
2023-07-18 17:10:34 +08:00
|
|
|
// background-color: #fff;
|
|
|
|
color: #fff;
|
2023-07-15 17:51:20 +08:00
|
|
|
width: 694.74rpx;
|
|
|
|
margin-left: 50%;
|
|
|
|
transform: translate(-50%, -43.86rpx);
|
|
|
|
|
|
|
|
.name_work {
|
|
|
|
margin-left: 31.58rpx;
|
|
|
|
font-size: 28.07rpx;
|
2023-07-21 17:17:37 +08:00
|
|
|
.name{
|
|
|
|
.nickname{
|
|
|
|
font-size: 32rpx;
|
|
|
|
font-weight: 500;
|
|
|
|
margin-right: 30rpx;
|
|
|
|
}
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
.work {
|
|
|
|
margin-top: 14.04rpx;
|
|
|
|
}
|
2023-07-22 17:53:04 +08:00
|
|
|
.omit{
|
|
|
|
white-space: nowrap;
|
|
|
|
/* 禁止换行 */
|
|
|
|
overflow: hidden;
|
|
|
|
/* 溢出隐藏 */
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
/* 使用省略号代表被截断的文本 */
|
|
|
|
}
|
2023-07-15 17:51:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.my_msg {
|
|
|
|
.compile {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.assess {
|
|
|
|
height: 170.18rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ass_cent {
|
|
|
|
width: 100%;
|
|
|
|
padding: 31.58rpx 66.67rpx;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
height: 170.18rpx;
|
|
|
|
border-radius: 12px;
|
2023-07-18 17:10:34 +08:00
|
|
|
background-color: rgba(#fff, 0.18);
|
2023-07-21 14:49:21 +08:00
|
|
|
justify-content: space-around;
|
2023-07-15 17:51:20 +08:00
|
|
|
|
|
|
|
.cent_item {
|
|
|
|
font-size: 24.56rpx;
|
|
|
|
color: #fff;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
.num {
|
|
|
|
font-size: 38.6rpx;
|
|
|
|
margin-bottom: 21.05rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.other_guide {
|
|
|
|
width: 694.74rpx;
|
|
|
|
margin: 0 auto;
|
|
|
|
padding: 28.07rpx;
|
|
|
|
background-color: #fff;
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
|
|
.other_item {
|
|
|
|
height: 87.72rpx;
|
|
|
|
border-bottom: 1px solid #F0F5F7;
|
|
|
|
|
|
|
|
.text {
|
|
|
|
font-size: 28.07rpx;
|
2023-07-25 09:47:43 +08:00
|
|
|
margin-left: 20.56rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.left{
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
image{
|
|
|
|
width: 42rpx;
|
|
|
|
height: 42rpx;
|
2023-07-15 17:51:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.iconfont2 {
|
|
|
|
font-size: 42.11rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.log_out {
|
|
|
|
color: #fff;
|
|
|
|
border-radius: 100px;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 84.21rpx;
|
|
|
|
margin: 0 auto;
|
|
|
|
margin-top: 84.21rpx;
|
|
|
|
width: 614.04rpx;
|
|
|
|
height: 84.21rpx;
|
|
|
|
background: #3274F9;
|
|
|
|
box-shadow: 0px 9px 26px 1px #E9EFF5;
|
|
|
|
}
|
2023-07-18 17:10:34 +08:00
|
|
|
</style>
|