2024-09-02 18:17:17 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="page">
|
|
|
|
|
<u-navbar title="我的" placeholder @leftClick="leftClick" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
2024-09-20 16:56:57 +08:00
|
|
|
<view style="width: 94%;margin: 20rpx auto;height: auto;">
|
|
|
|
|
<view style="margin-left: 40rpx;margin-bottom: 20rpx;">
|
|
|
|
|
<text>{{userData.userName}}</text> <text style="margin-left: 20rpx;">{{userData.phonenumber}}</text> <text style="margin-left: 20rpx;">{{userData.roleName}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="margin-left: 40rpx;margin-bottom: 20rpx;">
|
|
|
|
|
<text>{{userData.companyName}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="margin-left: 40rpx;margin-bottom: 20rpx;">
|
|
|
|
|
<text>{{proName}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<m-tabbar fixed fill :current="3" :tabbar="tabbar"></m-tabbar>
|
2024-09-02 18:17:17 +08:00
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import TabbarConfig from '../util/tabbar.js'
|
|
|
|
|
import config from '@/config'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
tabbar: TabbarConfig,
|
2024-09-20 16:56:57 +08:00
|
|
|
userData:uni.getStorageSync('realNameUser'),
|
|
|
|
|
proId:uni.getStorageSync('realNameUser').proId,
|
|
|
|
|
proName:""
|
2024-09-02 18:17:17 +08:00
|
|
|
// userName: uni.getStorageSync('userName'),
|
|
|
|
|
// className: uni.getStorageSync('className'),
|
|
|
|
|
// facePath: config.fileUrl + uni.getStorageSync('facePath'),
|
|
|
|
|
// token: uni.getStorageSync('access_token')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
2024-09-20 16:56:57 +08:00
|
|
|
console.log(this.userData)
|
|
|
|
|
this.getPro()
|
2024-09-02 18:17:17 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
2024-09-20 16:56:57 +08:00
|
|
|
// 获取工程名称
|
|
|
|
|
getPro(){
|
|
|
|
|
let param={
|
|
|
|
|
id:this.proId,
|
|
|
|
|
subId:-1
|
|
|
|
|
}
|
|
|
|
|
uni.request({
|
|
|
|
|
url: config.realAppUrl + '/offLine/getPro',
|
|
|
|
|
method: 'post',
|
|
|
|
|
data: param,
|
|
|
|
|
header: {
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
|
|
Authorization: uni.getStorageSync('realNameToken')
|
|
|
|
|
},
|
|
|
|
|
success: res => {
|
|
|
|
|
res = res.data;
|
|
|
|
|
if(res.code==200){
|
|
|
|
|
console.log(res)
|
|
|
|
|
this.proName = res.data[0].abbreviation||"";
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
fail: err => {
|
|
|
|
|
console.log(err)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-09-02 18:17:17 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.page {
|
|
|
|
|
width: 100vw;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
background: linear-gradient(#eaf0f7, #f8f8f8);
|
2024-09-20 16:56:57 +08:00
|
|
|
// box-sizing: border-box;
|
|
|
|
|
// padding: 15vh 8vw;
|
2024-09-02 18:17:17 +08:00
|
|
|
}
|
|
|
|
|
</style>
|