231 lines
5.5 KiB
Vue
231 lines
5.5 KiB
Vue
<template>
|
||
<view class="container">
|
||
<view>
|
||
<!-- 顶部导航栏 -->
|
||
<u-navbar leftText=" " title=" " :placeholder="true" :safeAreaInsetTop="true" :bgColor="bgColor">
|
||
<template #left>
|
||
<view class="text1">个人信息</view>
|
||
</template>
|
||
<template #right>
|
||
<view class="text1" @click="gotoSetting">设置</view>
|
||
</template>
|
||
</u-navbar>
|
||
</view>
|
||
|
||
<view class="bj"></view>
|
||
<view class="cardss">
|
||
<up-avatar :src="avatar" size="150rpx"></up-avatar>
|
||
<view class="userinfo">
|
||
<view class="utext">{{ nickInfo(nickName) }}</view>
|
||
<view class="utext">账号:{{ name }}</view>
|
||
<view class="utext">管理地区:{{ deptManageName }}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<image :src="wave" class="wave"></image>
|
||
<view class="btn " @click="handleLogout">
|
||
<view class="textbtn">退出登录</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script setup>
|
||
import { useStore } from 'vuex'
|
||
import { useRouter } from 'vue-router'
|
||
import { ref, getCurrentInstance } from 'vue';
|
||
import { getDicts } from "@/api/system/dict/data";
|
||
import { onShow, onLoad, onPullDownRefresh } from '@dcloudio/uni-app'
|
||
import image from 'uview-plus/libs/config/props/image';
|
||
const { proxy } = getCurrentInstance();
|
||
const QNDomain = proxy.$store.state.user.QNDomain
|
||
const bgColor = ref('rgba(170, 0, 0, 0)');
|
||
const isOfficial = ref(true)
|
||
const kfopen = ref(false)
|
||
const iconConfig = proxy.iconConfig;
|
||
const wave = iconConfig.wave;
|
||
|
||
|
||
|
||
const auditInfo = ref(proxy.$store.state.userInfo.auditInfo)//审核状态
|
||
const name = ref(proxy.$store.state.user.name)
|
||
const deptManage = ref(proxy.$store.state.user.deptManage)
|
||
const deptManageName = ref(proxy.$store.state.user.deptManageName)
|
||
const nickName = ref(proxy.$store.state.user.nickName)
|
||
const sex = ref(uni.getStorageSync("SET_SEX"))
|
||
|
||
const infoSchool = ref(proxy.$store.state.userInfo.infoSchool)//学校
|
||
const area = ref(proxy.$store.state.userInfo.area)//学校
|
||
const backgroundImage = ref(proxy.$store.state.userInfo.backgroundImage)//背景
|
||
const infoRank = ref(proxy.$store.state.userInfo.infoRank)
|
||
const remark = ref(proxy.$store.state.userInfo.remark)//签名
|
||
const infoAssist = ref(proxy.$store.state.userInfo.infoAssist)//获赞
|
||
const followCount = ref(proxy.$store.state.userInfo.followCount)//关注
|
||
const fanCount = ref(proxy.$store.state.userInfo.fanCount)//粉丝
|
||
const qm = (e) => {
|
||
if (e === "" | e === null) {
|
||
return "这个人很懒什么都没有留下……"
|
||
} else {
|
||
return e
|
||
}
|
||
}
|
||
const dictSexInfo = ref('')
|
||
const nickInfo = (nickName) => {
|
||
if (nickName.length > 10) {
|
||
return nickName.substring(0, 10) + "...";
|
||
} else {
|
||
return nickName;
|
||
}
|
||
}
|
||
onLoad((options) => {
|
||
proxy.$store.dispatch('GetUserInfo');
|
||
console.log("xinxi1:", deptManageName);
|
||
getDicts('sys_user_sex').then(e => {
|
||
dictSexInfo.value = e.data
|
||
})
|
||
|
||
})
|
||
const dictSex = (state) => {
|
||
const dict = dictSexInfo.value.find((dict) => dict.dictValue == state);
|
||
return dict ? dict.dictLabel : '未知状态';
|
||
}
|
||
|
||
const version = ref(getApp().globalData.config.appInfo.version)
|
||
const avatar = ref(proxy.$store.state.user.avatar)
|
||
function handleLogout() {
|
||
proxy.$modal.confirm('确定注销并退出系统吗?').then(() => {
|
||
proxy.$store.dispatch('LogOut').then(() => {
|
||
proxy.$tab.reLaunch('/pages/index')
|
||
})
|
||
})
|
||
}
|
||
|
||
onPullDownRefresh((options) => {
|
||
proxy.$router.go(0)
|
||
})
|
||
|
||
|
||
const gotoSetting =() => {
|
||
proxy.$tab.navigateTo('/pages/mine/setting/index')
|
||
}
|
||
|
||
const zxkf = () => {
|
||
console.log("在线客服");
|
||
}
|
||
const phonekf = () => {
|
||
console.log("电话客服");
|
||
}
|
||
|
||
function handleToLogin() {
|
||
proxy.$tab.reLaunch('/pages/login')
|
||
}
|
||
const handleToUserInfo = () => {
|
||
proxy.$tab.navigateTo('/pages/mine/info/userInfo')
|
||
}
|
||
|
||
function windowHeight() {
|
||
return uni.getSystemInfoSync().windowHeight - 50
|
||
}
|
||
|
||
function handleToInfo() {
|
||
proxy.$tab.navigateTo('/pages/mine/info/index')
|
||
}
|
||
function handleToEditInfo() {
|
||
proxy.$tab.navigateTo('/pages/mine/info/edit')
|
||
}
|
||
function handleToSetting() {
|
||
proxy.$tab.navigateTo('/pages/mine/setting/index')
|
||
}
|
||
|
||
function handleToAvatar() {
|
||
proxy.$tab.navigateTo('/pages/mine/avatar/index')
|
||
}
|
||
|
||
function handleHelp() {
|
||
proxy.$tab.navigateTo('/pages/mine/help/index')
|
||
}
|
||
function handleAbout() {
|
||
proxy.$tab.navigateTo('/pages/mine/about/index')
|
||
}
|
||
function handleJiaoLiuQun() {
|
||
proxy.$modal.showToast('QQ群:①133713780、②146013835')
|
||
}
|
||
function handleBuilding() {
|
||
proxy.$modal.showToast('模块建设中~')
|
||
}
|
||
const imageInfo = () => {
|
||
let info = QNDomain + backgroundImage.value
|
||
return info
|
||
}
|
||
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
page {
|
||
background-color: #ffffff;
|
||
}
|
||
|
||
.text1 {
|
||
font-weight: 400;
|
||
|
||
font-size: 36rpx;
|
||
|
||
color: #FFFFFF;
|
||
}
|
||
|
||
.container {
|
||
position: relative;
|
||
}
|
||
|
||
.bj {
|
||
position: fixed;
|
||
top: 0rpx;
|
||
left: 0rpx;
|
||
width: 750rpx;
|
||
height: 390rpx;
|
||
background-color: #6aa2ff;
|
||
}
|
||
|
||
.cardss {
|
||
position: relative;
|
||
margin-top: 64rpx;
|
||
margin-left: 32rpx;
|
||
display: flex;
|
||
|
||
align-items: center;
|
||
|
||
.userinfo {
|
||
margin-left: 24rpx;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: space-between;
|
||
.utext {
|
||
font-weight: 400;
|
||
font-size: 36rpx;
|
||
color: #FFFFFF;
|
||
}
|
||
}
|
||
}
|
||
|
||
.wave {
|
||
width: 750rpx;
|
||
height: 200rpx;
|
||
}
|
||
|
||
.btn {
|
||
margin: 110rpx auto;
|
||
|
||
width: 686rpx;
|
||
height: 88rpx;
|
||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||
background: #6aa2ff;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
|
||
.textbtn {
|
||
font-weight: 400;
|
||
font-size: 30rpx;
|
||
color: #FFFFFF;
|
||
}
|
||
}
|
||
</style>
|