qa-regulatory-gwj-app/pages/mine/index/index.vue

258 lines
5.8 KiB
Vue
Raw Permalink Normal View History

2023-11-07 10:08:37 +08:00
<template>
<view class="main_container">
<view class="mytop">
<view class="mytop_main">
<view class="mytop_main_info">
<view class="mytop_main_info_tx">
<u-avatar :src="userInfo.USER_SIGN_FILE_PATH || 'account-fill'" size="50"></u-avatar>
</view>
<view class="mytop_main_test">
<view class="mytop_main_test_name">
{{ userInfo.NAME }}
</view>
<view class="mytop_main_test_p">
{{ userInfo.DEPARTMENT_NAME }}
</view>
</view>
</view>
</view>
</view>
<view class="my_main">
<view class="my_main_info">
<view class="my_main_info_wrap" v-for="item in list" :key="item.name" @click="clickItem(item.name)">
<view class="my_main_info_wrap_img">
2024-07-27 15:13:42 +08:00
<u--image :src="item.img" width="40rpx" height="40rpx"></u--image>
2023-11-07 10:08:37 +08:00
</view>
<view class="my_main_info_wrap_info">
<view class="my_main_info_wrap_info_lable">
{{ item.name }}
</view>
<view class="">
<u-icon name="arrow-right" color="#999" size="14"></u-icon>
</view>
</view>
</view>
</view>
</view>
<view class="layout_btner" @click="logOut">
<view class="layout_btn">
退出登录
</view>
</view>
<u-modal :show="updateVersion.modalShow" title="温馨提示" :showConfirmButton="updateVersion.showConfirmButton"
:showCancelButton="updateVersion.showCancelButton" :confirmText="updateVersion.confirmText" :cancelText="updateVersion.cancelText"
@cancel="modalCancel" @confirm="modalConfirm">
<view style="text-align: center;color:#606266">
<rich-text :nodes="updateVersion.modalContent"></rich-text>
</view>
</u-modal>
</view>
</template>
<script>
import updateVersion from '../../../utils/updateVersion'
export default {
mixins:[updateVersion],
data() {
return {
list:[
{
img: require('../../../static/images/my_ico1.png'),
name:'个人信息',
},
{
img: require('../../../static/images/my_ico3.png'),
name:'问题反馈',
},
{
img: require('../../../static/images/my_ico7.png'),
name:'安全承诺',
},
{
img: require('../../../static/images/my_ico4.png'),
name:'修改密码',
},
2024-07-27 15:13:42 +08:00
// #ifdef APP-PLUS
2023-11-07 10:08:37 +08:00
{
img: require('../../../static/images/my_ico5.png'),
name:'版本更新',
},
2024-07-27 15:13:42 +08:00
// #endif
2023-11-07 10:08:37 +08:00
{
img: require('../../../static/images/my_ico6.png'),
name:'关于我们',
},
],
}
},
computed: {
userInfo() {
return this.$store.getters.getUserInfo
}
},
methods: {
logOut() {
uni.showModal({
title: '提示',
content: '确定退出登录吗?',
success: (result) => {
if (result.confirm) {
let userInfo = {}
for (const userInfoKey in this.userInfo) {
if (this.userInfo.hasOwnProperty(userInfoKey)) {
userInfo[userInfoKey] = ''
}
}
this.$store.dispatch('setUserInfo', userInfo)
uni.redirectTo({
url: '/pages/login/login'
})
}
}
})
},
goabout() {
uni.navigateTo({
url: '/pages/mine/info/info'
})
},
feedbackclick() {
uni.navigateTo({
url: '/pages/mine/feedback/feedback'
})
},
pwdclick() {
uni.navigateTo({
url: '/pages/mine/change-password/change-password'
})
},
aboutcick() {
uni.navigateTo({
url: '/pages/mine/about-us/about-us'
})
},
promiseclick() {
uni.navigateTo({
url: '/pages/mine/promise/promise'
})
},
clickItem(name){
if(name === '个人信息') this.goabout()
if(name === '问题反馈') this.feedbackclick()
if(name === '安全承诺') this.promiseclick()
if(name === '修改密码') this.pwdclick()
2024-07-27 15:13:42 +08:00
// #ifdef APP-PLUS
2023-11-07 10:08:37 +08:00
if(name === '版本更新') this.fnUpdateVersion()
2024-07-27 15:13:42 +08:00
// #endif
2023-11-07 10:08:37 +08:00
if(name === '关于我们') this.aboutcick()
}
}
}
</script>
<style lang="scss" scoped>
.main_container {
width: 100%;
.mytop {
width: 100%;
background: url(/static/images/mybannerbg.png);
2024-07-27 15:13:42 +08:00
height: 400rpx;
2023-11-07 10:08:37 +08:00
background-size: 100% 100%;
2024-07-27 15:13:42 +08:00
padding: 20rpx;
2023-11-07 10:08:37 +08:00
box-sizing: border-box;
.mytop_main_info {
width: 80%;
margin: 0 auto;
2024-07-27 15:13:42 +08:00
margin-top: 150rpx;
2023-11-07 10:08:37 +08:00
display: flex;
align-items: center;
.mytop_main_info_tx {
2024-07-27 15:13:42 +08:00
margin-right: 20rpx;
2023-11-07 10:08:37 +08:00
}
.mytop_main_test_name {
color: #fff;
2024-07-27 15:13:42 +08:00
font-size: 36rpx;
2023-11-07 10:08:37 +08:00
font-weight: 600;
}
.mytop_main_test_p {
color: #fff;
2024-07-27 15:13:42 +08:00
font-size: 26rpx;
2023-11-07 10:08:37 +08:00
opacity: 0.6;
2024-07-27 15:13:42 +08:00
margin-top: 5rpx;
2023-11-07 10:08:37 +08:00
}
}
}
.my_main {
width: 100%;
2024-07-27 15:13:42 +08:00
padding: 40rpx;
margin-top: -120rpx;
2023-11-07 10:08:37 +08:00
box-sizing: border-box;
.my_main_info {
width: 100%;
background: #fff;
2024-07-27 15:13:42 +08:00
padding: 20rpx 40rpx;
2023-11-07 10:08:37 +08:00
box-sizing: border-box;
2024-07-27 15:13:42 +08:00
border-radius: 10rpx;
box-shadow: 0 0 20rpx #eee;
2023-11-07 10:08:37 +08:00
.my_main_info_wrap {
width: 100%;
display: flex;
align-items: center;
.my_main_info_wrap_img {
2024-07-27 15:13:42 +08:00
width: 50rpx;
height: 50rpx;
margin-top: 10rpx;
2023-11-07 10:08:37 +08:00
}
.my_main_info_wrap_info {
flex: 1;
2024-07-27 15:13:42 +08:00
border-bottom: 1rpx solid #eee;
2023-11-07 10:08:37 +08:00
display: flex;
justify-content: space-between;
align-items: center;
2024-07-27 15:13:42 +08:00
padding: 30rpx 0rpx;
padding-left: 10rpx;
2023-11-07 10:08:37 +08:00
.my_main_info_wrap_info_lable {
}
}
}
.my_main_info_wrap:last-child .my_main_info_wrap_info {
border-bottom: none;
}
}
}
}
.layout_btner {
width: 100%;
text-align: center;
2024-07-27 15:13:42 +08:00
padding: 0rpx 40rpx;
2023-11-07 10:08:37 +08:00
box-sizing: border-box;
.layout_btn {
width: 100%;
text-align: center;
2024-07-27 15:13:42 +08:00
padding: 20rpx;
2023-11-07 10:08:37 +08:00
background: #e72f2f;
box-sizing: border-box;
color: #fff;
2024-07-27 15:13:42 +08:00
box-shadow: 0 0 20rpx #eee;
2023-11-07 10:08:37 +08:00
border-radius: 10rpx;
}
}
</style>