123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- <template>
- <view class="page_view">
- <top-return text="孩子名片" color="#FFF"></top-return>
- <view class="detail_image"
- :style="{backgroundImage:`linear-gradient(to top, #f3f4f9, rgba(255, 255, 255, 0) 60%),url(${image})`}"></view>
- <!-- 孩子头部信息 -->
- <view class="top_info">
- <image class="top_avatar" v-if="childInfo.avatar === '默认'"
- :src="childInfo.gender==='男'?'/static/default_icons/boy_avatar.svg':'/static/default_icons/girl_avatar.svg'">
- </image>
- <image class="top_avatar" v-if="childInfo.avatar != '默认'" :src="childInfo.avatar"></image>
- <view class="top_name">
- <view class="flex_baseline">
- <text class="name">{{childInfo.name}}</text>
- <view class="tag_fill"
- style="background-color: #d8deff;width:fit-content;z-index: 99;margin-left: 30rpx;">
- <view class="t-icon t-icon-xueshengziliao"
- style="width: 32rpx;height: 32rpx;margin-right: 5rpx;"></view>
- <view class="tag_text" style="color: #4169E1;font-size: 28rpx;">{{childInfo.gender}}</view>
- </view>
- <view class="tag_fill"
- style="background-color: #d8deff;width:fit-content;z-index: 99;margin-left: 10rpx;">
- <view class="t-icon t-icon-nongyekeji2" style="width: 32rpx;height: 32rpx;margin-right: 5rpx;">
- </view>
- <view class="tag_text" style="color: #4169E1;font-size: 28rpx;">{{childInfo.age}}岁</view>
- </view>
- </view>
- <view class="tag_fill" style="background-color: #d8deff;width:fit-content;z-index: 99;">
- <view class="t-icon t-icon-xuewei1" style="width: 32rpx;height: 32rpx;margin-right: 5rpx;"></view>
- <view class="tag_text" style="color: #4169E1;font-size: 28rpx;">{{childInfo.tmdid}} 绑定学号</view>
- </view>
- </view>
- </view>
- <!-- 卡片信息 -->
- <view class="main_card">
- <view class="flex_row">
- <view class="t-icon t-icon-biaoqian"></view>
- <view class="flex_cloumn">
- <view class="subtitle">就读学校</view>
- <view class="title" style="margin-top: 10rpx;">{{childInfo.school}}</view>
- </view>
- </view>
- <view class="flex_row" style="margin-top: 50rpx;">
- <view class="t-icon t-icon-fenlei1"></view>
- <view class="flex_cloumn">
- <view class="subtitle">所在班级</view>
- <view class="title">{{childInfo.class}}</view>
- </view>
- </view>
- <view class="flex_row" style="margin-top: 50rpx;">
- <view class="t-icon t-icon-jiaoyu"></view>
- <view class="flex_cloumn">
- <view class="subtitle">当前学期</view>
- <view class="title">{{childInfo.semester}}</view>
- </view>
- </view>
- <view class="card_view" style="margin-top: 40rpx;">
- <view class="flex_cloumn_box" style="margin:0 auto 0 -40rpx;">
- <view class="cloumn_title">勋章卡片</view>
- <view class="bottom_tag"></view>
- </view>
- </view>
- <u-avatar-group :urls="medals" size="40" gap="0.2"></u-avatar-group>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex'
- export default {
- computed: {
- ...mapState('m_parent', ['childrenData']),
- },
- data() {
- return {
- image: 'https://image.meiye.art/pic_1628493302098',
- medals: [
- ],
- childInfo: ''
- };
- },
- onLoad(param) {
- this.childInfo = this.childrenData[param.index]
- },
- methods: {
- updateAvatar() {
- uni.chooseImage({
- count: 1, //默认1个图片
- sourceType: ['album'], //从相册选择
- success: function(res) {
- console.log(JSON.stringify(res.tempFilePaths));
- }
- })
- },
- },
- }
- </script>
- <style lang="scss">
- .flex_cloumn {
- display: flex;
- flex-direction: column;
- height: 80rpx;
- justify-content: space-between;
- }
- .page_view {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- overflow: hidden;
- }
- .detail_image {
- position: fixed;
- width: 100%;
- height: 800rpx;
- }
- .top_info {
- display: flex;
- align-items: center;
- margin-top: 180rpx;
- .top_avatar {
- margin-left: 50rpx;
- width: 140rpx;
- height: 140rpx;
- border-radius: 100%;
- border: 6rpx solid #FFF;
- box-shadow: 0 10rpx 20rpx rgba(0, 0, 0, 0.2);
- z-index: 55;
- }
- .top_name {
- margin-left: 50rpx;
- height: 130rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- font-weight: bold;
- .name {
- color: $title;
- font-size: 45rpx;
- font-weight: bold;
- z-index: 55;
- }
- }
- }
- .main_card {
- display: flex;
- flex-direction: column;
- padding: 80rpx 80rpx 200rpx 80rpx;
- position: relative;
- background-color: #FFF;
- top: 80rpx;
- left: 50rpx;
- border-radius: 50rpx;
- height: 1200rpx;
- z-index: 55;
- .title {
- line-height: 32rpx;
- font-size: 32rpx;
- font-weight: 400;
- color: $title;
- }
- .subtitle {
- line-height: 28rpx;
- font-size: 28rpx;
- color: $subtitle;
- font-weight: 400;
- }
- .t-icon {
- margin-right: 30rpx;
- width: 80rpx;
- height: 80rpx;
- }
- }
- .box_title {
- line-height: 35rpx;
- font-size: 35rpx;
- font-weight: bold;
- color: $title;
- }
- .flex_cloumn_box {
- display: flex;
- flex-direction: column;
- .cloumn_title {
- line-height: 35rpx;
- font-size: 32rpx;
- font-weight: bold;
- color: $title;
- }
- }
- </style>
|