Files
dvcp_v2_wxcp_app/src/project/saas/AppHome/components/My.vue

152 lines
3.6 KiB
Vue
Raw Normal View History

2022-08-08 11:55:32 +08:00
<template>
<div class="My">
<div class="content">
<div class="user-info">
<img src="../img/my/my-bg-user.png" alt="" class="bg-img">
<div class="top">
2022-08-16 15:38:38 +08:00
<div>
<AiOpenData v-if="user.wxUserId" type="userName" :openid="user.wxUserId"></AiOpenData>
</div>
2022-08-09 11:38:42 +08:00
<img :src="user.avatar" alt="" v-if="user.avatar">
<img src="../img/user-icon.png" alt="" v-else>
2022-08-08 11:55:32 +08:00
</div>
2022-08-09 11:38:42 +08:00
<div class="bottom">{{ user.corpName }}</div>
2022-08-08 11:55:32 +08:00
</div>
2022-08-11 10:04:21 +08:00
<div class="link" v-for="(item, index) in linkList" :key="index" @click="linkTo(item.linkUrl)">
2022-08-08 11:55:32 +08:00
<div class="left">
<img :src="item.img" alt="">{{ item.title }}
</div>
<img src="../img/right-icon-999.png" alt="" class="right-icon">
</div>
</div>
</div>
</template>
<script>
2022-08-11 10:04:21 +08:00
import { mapActions, mapState } from 'vuex'
2022-08-08 11:55:32 +08:00
export default {
name: "My",
data() {
return {
linkList: [
{
title: '头像上传',
2022-08-11 10:04:21 +08:00
img: require('../img/my/my-txsc.png'),
linkUrl: './UploadPhoto'
2022-08-08 11:55:32 +08:00
},
{
title: '意见反馈',
2022-08-11 10:04:21 +08:00
img: require('../img/my/my-yjfk.png'),
linkUrl: './FeedBack'
2022-08-08 11:55:32 +08:00
},
{
title: '联系我们',
2022-08-11 10:04:21 +08:00
img: require('../img/my/my-lxwm.png'),
linkUrl: 'contact'
2022-08-08 11:55:32 +08:00
},
{
title: '帮助文档',
2022-08-11 10:04:21 +08:00
img: require('../img/my/my-bzwd.png'),
linkUrl: './HelpDocs'
2022-08-08 11:55:32 +08:00
}
]
}
},
2022-08-09 11:38:42 +08:00
computed: { ...mapState(['user']) },
2022-08-08 11:55:32 +08:00
methods: {
2022-08-11 10:04:21 +08:00
...mapActions(['wxInvoke', 'injectJWeixin']),
2022-08-09 11:38:42 +08:00
linkTo(url) {
2022-08-11 10:04:21 +08:00
if(url == 'contact') { //联系我们
this.wxInvoke(["openThirdAppServiceChat", {}, res => {
if (res.err_msg == "openThirdAppServiceChat:fail") {
window.open("https://work.weixin.qq.com/kfid/kfcc23927b18d1ad4f4")
}
}])
}else {
console.log(url)
uni.navigateTo({ url })
}
2022-08-09 11:38:42 +08:00
}
2022-08-08 11:55:32 +08:00
},
created() {
2022-08-11 10:04:21 +08:00
this.injectJWeixin('openThirdAppServiceChat')
2022-08-08 11:55:32 +08:00
},
}
</script>
<style lang="scss" scoped>
.My {
.content {
padding: 32px 32px 0;
.user-info{
2022-08-10 09:45:51 +08:00
width: 100%;
2022-08-08 11:55:32 +08:00
height: 248px;
border-radius: 8px;
background-color: #fff;
position: relative;
margin-bottom: 32px;
.bg-img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.top {
display: flex;
justify-content: space-between;
padding: 28px 32px 36px;
border-bottom: 1px solid #eee;
div {
font-size: 40px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
2022-08-16 15:38:38 +08:00
line-height: 96px;
2022-08-08 11:55:32 +08:00
}
img {
width: 96px;
height: 96px;
2022-08-08 14:37:30 +08:00
border-radius: 50%;
2022-08-08 11:55:32 +08:00
border: 1px solid #DDD;
}
}
.bottom {
padding: 24px 32px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999;
line-height: 40px;
}
}
.link {
display: flex;
justify-content: space-between;
padding: 32px;
background-color: #fff;
border-radius: 8px;
margin-bottom: 24px;
.left {
font-size: 30px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 42px;
img {
width: 48px;
height: 48px;
margin-right: 16px;
vertical-align: middle;
}
}
.right-icon {
width: 40px;
height: 40px;
}
}
}
}
</style>