YNUtdPlatform/pages/realName/my/my.vue

161 lines
4.0 KiB
Vue
Raw Normal View History

2024-09-02 18:17:17 +08:00
<template>
<view class="page">
2024-09-29 10:19:21 +08:00
<u-navbar title="我的" placeholder bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
<scroll-view class="content" scroll-y="true">
<view class="view-box">
<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>
2024-09-29 10:19:21 +08:00
<view class="view-item" @click="goNews">
<image class="imgBox" src="../../../static/realName/news.png" mode=""></image>
<text class="textBox">我的消息</text>
</view>
<view class="view-item">
<image class="imgBox" src="../../../static/realName/reset_pass.png" mode=""></image>
<text class="textBox">修改密码</text>
</view>
<view class="view-item">
<image class="imgBox" src="../../../static/realName/my_upload.png" mode=""></image>
<text class="textBox">上传情况</text>
</view>
<view class="view-item">
<image class="imgBox" src="../../../static/realName/my_download.png" mode=""></image>
<text class="textBox">下载情况</text>
</view>
2024-09-29 10:19:21 +08:00
<view class="view-item">
<image class="imgBox" src="../../../static/realName/icon_update_data.png" mode=""></image>
<text class="textBox">更新数据</text>
</view>
2024-09-29 10:19:21 +08:00
<!-- <view class="view-item">
<image class="imgBox" src="../../../static/realName/my_update.png" mode=""></image>
<text class="textBox">更新系统</text>
</view> -->
<view class="view-item">
<image class="imgBox" src="../../../static/realName/my_about.png" mode=""></image>
<text class="textBox">关于我们</text>
</view>
<view class="view-item">
<image class="imgBox" src="../../../static/realName/icon_logout.png" mode=""></image>
<text class="textBox">退出</text>
</view>
2024-09-29 10:19:21 +08:00
</scroll-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,
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() {
console.log(this.userData)
this.getPro()
2024-09-02 18:17:17 +08:00
},
methods: {
// 获取工程名称
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-29 10:19:21 +08:00
goNews(){
uni.navigateTo({
url: `/pages/realName/my/news`
})
},
2024-09-02 18:17:17 +08:00
}
}
</script>
<style lang="scss">
.page {
width: 100vw;
height: 100vh;
2024-09-29 10:19:21 +08:00
background-color: #f8f8f8;
// box-sizing: border-box;
// padding: 15vh 8vw;
2024-09-29 10:19:21 +08:00
.content{
width: 100%;
height: 84vh;
margin-top: 20rpx;
background-color: #f8f8f8;
padding-bottom: 40rpx;
}
.view-box{
width: 100%;
padding: 20rpx 0;
margin-bottom: 30rpx;
height: auto;
background-color: #F2F6F9;
}
.view-item{
width: 100%;
padding: 20rpx 0;
margin-bottom: 30rpx;
height: auto;
background-color: #F2F6F9;
display: flex;
align-items: center;
}
.imgBox{
width: 40rpx;
height: 40rpx;
margin: 0 40rpx;
}
.textBox{
width: 200rpx;
height: 60rpx;
line-height: 60rpx;
}
2024-09-02 18:17:17 +08:00
}
</style>