Files
dvcp_v2_wechat_app/src/project/fengdu/AppMine/myHarvestQR.vue

125 lines
2.5 KiB
Vue
Raw Normal View History

2023-03-16 13:49:00 +08:00
<template>
<div class="AppHarvestQR">
2023-03-17 09:42:16 +08:00
<div class="card">
<div class="myself">
2023-03-20 11:11:00 +08:00
<img class="avatar" :src="user.avatarUrl" alt="" v-if="user.avatarUrl">
<img class="avatar" src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" v-else>
2023-03-17 09:42:16 +08:00
<div class="info">
2023-03-20 11:11:00 +08:00
<div class="name">{{ user.nickName }}</div>
<div class="area">{{ user.areaName }}</div>
2023-03-17 09:42:16 +08:00
</div>
</div>
<div class="qr">
2023-07-18 17:26:12 +08:00
<img :src="user.qrCode" alt="">
2023-03-17 09:42:16 +08:00
</div>
<div class="my-qr">我的丰收码</div>
<div class="pic">
2023-03-20 10:41:37 +08:00
<img src="https://cdn.cunwuyun.cn/fengdu/img-zhuangshi.png" alt="">
2023-03-17 09:42:16 +08:00
</div>
</div>
2023-03-16 13:49:00 +08:00
</div>
</template>
<script>
2023-03-20 11:11:00 +08:00
import { mapState } from 'vuex'
2023-03-16 13:49:00 +08:00
export default {
name: "AppHarvestQR",
data() {
return {
2023-03-20 11:11:00 +08:00
qrCode: '',
2023-03-16 13:49:00 +08:00
}
},
methods: {
2023-03-20 11:11:00 +08:00
getQrCode() {
this.$instance.post('/app/appwechatuserqujing/queryMyQrCode').then(res=> {
if(res?.data) {
this.qrCode = res.data
}
})
}
2023-03-16 13:49:00 +08:00
},
2023-03-20 11:11:00 +08:00
computed: {
...mapState(['user'])
2023-03-17 09:42:16 +08:00
},
2023-03-20 11:11:00 +08:00
onLoad() {
2023-07-18 17:26:12 +08:00
// this.getQrCode()
2023-03-20 14:54:29 +08:00
uni.setNavigationBarTitle({
title: '我的丰收码'
})
2023-03-20 11:11:00 +08:00
}
2023-03-16 13:49:00 +08:00
}
</script>
<style lang="scss" scoped>
.AppHarvestQR {
2023-03-17 09:42:16 +08:00
padding: 32px;
box-sizing: border-box;
.card {
width: 100%;
height: 100%;
box-sizing: border-box;
border-radius: 16px;
2023-03-20 14:54:29 +08:00
background: #FFF;
2023-03-16 13:49:00 +08:00
2023-03-17 09:42:16 +08:00
.myself {
padding: 72px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
.avatar {
width: 108px;
height: 108px;
border-radius: 16px;
}
.info {
width: calc(100% - 128px);
height: 100%;
.name {
color: #333333;
font-size: 34px;
font-weight: 500;
margin-top: 10px;
}
.area {
color: #999999;
font-size: 28px;
font-weight: 400;
margin-top: 10px;
}
}
}
.qr {
margin: 10% auto 24px;
width: 542px;
height: 542px;
border-radius: 32px;
border: 8px solid #f6f5f8;
padding: 36px;
box-sizing: border-box;
img {
width: 100%;
height: 100%;
}
}
.my-qr {
color: #999999;
font-size: 32px;
font-weight: 400;
text-align: center;
}
.pic {
margin-top: 10%;
width: 100%;
height: 234px;
img {
width: 100%;
height: 234px;
}
}
}
2023-03-16 13:49:00 +08:00
}
</style>