flying-monkey/pagesB/electronic-certificate/electronic-certificate.vue

70 lines
2.3 KiB
Vue
Raw Permalink Normal View History

<template>
<view>
<status-nav navBarTitle="电子证件" returnColor="#c2c2c2"></status-nav>
<container-subgroup>
<view slot="content">
2022-03-18 01:05:21 +00:00
<view class="mar-s20 mar-zy10" style="box-shadow: 0rpx 0rpx 20rpx rgba(0,0,0,.3);">
<view class="bacf" style="padding: 4rpx;border-radius: 30rpx;">
<view class="electronic-head disjcac fc">
2022-05-13 09:39:50 +00:00
<image src="/static/public/icon-electronic-logo.png" mode="widthFix" lazy-load style="width: 347rpx;height: 85rpx;"></image>
<view class="colf fon52 mar-sx30" style="letter-spacing: 6rpx;">ID{{userId}}</view>
2022-05-13 09:39:50 +00:00
<image class="mar-s10 electronic-userImg" :src="userImg || '/static/deleteImg/flying-img06.png'" mode="aspectFill"></image>
</view>
<view class="pad-s140 mar-s30 disjcac fc">
<view class="col3 fon68">{{userName}}</view>
<view class="fon32 col6 mar-sx30">{{userContent}}</view>
<view class="fon22 col3 tcenter line-h36" style="margin: 60rpx 0 60rpx 0;">
2022-05-13 09:39:50 +00:00
<view v-if="userPhone">+86 {{userPhone}}</view>
<view>{{userEmail}}</view>
<view>{{website}}</view>
</view>
</view>
</view>
</view>
</view>
</container-subgroup>
</view>
</template>
<script>
export default {
data() {
return {
2022-05-13 09:39:50 +00:00
userImg:'',//用户头像
userId:'',//用户id
userName:'',//用户昵称
userContent:'',//用户单位
userPhone:'',//用户电话
userEmail:'',//用户邮箱
website:''//用户网址
}
},
2022-03-30 10:04:40 +00:00
onLoad() {
this.getEletronic()
},
methods: {
2022-03-30 10:04:40 +00:00
getEletronic(){
this.$requst.get('/universal/api.user/electronic_badge').then(res=>{
2022-04-02 12:08:56 +00:00
if(res.code){
let userData = res.data;
if(userData.avatar) {
this.userImg = userData.avatar;
2022-04-02 12:08:56 +00:00
}
2022-05-13 09:39:50 +00:00
this.userId = userData.id;//用户id
this.userName = userData.name;//用户昵称
this.userContent = userData.affiliation;//用户单位
this.userPhone = userData.phone;//用户电话
this.userEmail = userData.email;//用户邮箱
this.website = userData.website;//用户网址
2022-03-30 10:04:40 +00:00
}
})
}
}
}
</script>
<style>
2022-05-13 09:39:50 +00:00
.electronic-userImg{width: 258rpx;height: 258rpx;border-radius: 100%;margin-bottom: -130rpx;border: 6rpx solid #edf1ff;background-color: #edf1ff;}
</style>