@ -1,100 +1,100 @@ |
|||||
<template> |
<template> |
||||
<view> |
<view> |
||||
<!-- 头部 --> |
<!-- 头部 --> |
||||
<view class="cu-card flex bg-white" v-if="user && user.wxInfo"> |
<view class="cu-card flex bg-white" v-if="user && user.wxInfo"> |
||||
<view class="flex flex-sub align-center padding-xl"> |
<view class="flex flex-sub align-center padding-xl"> |
||||
<view class="round xl cu-avatar portrait"> |
<view class="round xl cu-avatar portrait bg-white"> |
||||
<image class="xl cu-avatar" :src="user.wxInfo.headImgUrl"></image> |
<image class="xl cu-avatar" :src="user.wxInfo.headImgUrl"></image> |
||||
</view> |
</view> |
||||
<view class="flex-sub padding-left"> |
<view class="flex-sub padding-left"> |
||||
<view class="text-xxl">{{ user.wxInfo.nickname }}</view> |
<view class="text-xxl">{{ user.wxInfo.nickname }}</view> |
||||
<!-- <view class="text-df padding-top-xs">{{ user.wxInfo.classes }}</view> --> |
<!-- <view class="text-df padding-top-xs">{{ user.wxInfo.classes }}</view> --> |
||||
</view> |
</view> |
||||
|
|
||||
<image class="healthy-code" :src="healthCode" @tap="getPreviewImg(healthCode)"></image> |
|
||||
</view> |
|
||||
</view> |
|
||||
<view class="cu-card flex bg-white" v-else> |
|
||||
<view class="flex flex-sub align-center padding-xl"> |
|
||||
<view class="round xl cu-avatar portrait"> |
|
||||
<image class="xl cu-avatar" :src="userInfo.avatarUrl"></image> |
|
||||
</view> |
|
||||
<view class="flex-sub padding-left"> |
|
||||
<view class="text-xxl">{{ userInfo.nickName }}</view> |
|
||||
<!-- <view class="text-df padding-top-sm">{{ userInfo.classes }}</view> --> |
|
||||
</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
<!-- 列表 --> |
|
||||
<view class="bg-white margin-top"> |
|
||||
<view class="cu-list menu margin-lr"> |
|
||||
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/basic-info/basic-info')"> |
|
||||
<text class="text-xl">个人信息</text> |
|
||||
<view class="iconfont icon-right more"></view> |
|
||||
</view> |
|
||||
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/my-code/my-code')"> |
|
||||
<text class="text-xl">我的健康打卡</text> |
|
||||
<view class="iconfont icon-right more"></view> |
|
||||
</view> |
|
||||
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/my-trips/my-trips')"> |
|
||||
<text class="text-xl">我的行程</text> |
|
||||
<view class="iconfont icon-right more"></view> |
|
||||
</view> |
|
||||
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/my-signs/my-signs')"> |
|
||||
<text class="text-xl">我的校园打卡</text> |
|
||||
<view class="iconfont icon-right more"></view> |
|
||||
</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
|
|
||||
|
<image class="healthy-code" :src="healthCode" @tap="getPreviewImg(healthCode)"></image> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="cu-card flex bg-white" v-else> |
||||
|
<view class="flex flex-sub align-center padding-xl"> |
||||
|
<view class="round xl cu-avatar portrait"> |
||||
|
<image class="xl cu-avatar" :src="userInfo.avatarUrl"></image> |
||||
|
</view> |
||||
|
<view class="flex-sub padding-left"> |
||||
|
<view class="text-xxl">{{ userInfo.nickName }}</view> |
||||
|
<!-- <view class="text-df padding-top-sm">{{ userInfo.classes }}</view> --> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<!-- 列表 --> |
||||
|
<view class="bg-white margin-top"> |
||||
|
<view class="cu-list menu margin-lr"> |
||||
|
<view |
||||
|
class="cu-item" |
||||
|
hover-class="cc-active" |
||||
|
@tap="openPage('/pages/basic-info/basic-info')" |
||||
|
> |
||||
|
<text class="text-xl">个人信息</text> |
||||
|
<view class="iconfont icon-right more"></view> |
||||
|
</view> |
||||
|
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/my-code/my-code')"> |
||||
|
<text class="text-xl">我的健康打卡</text> |
||||
|
<view class="iconfont icon-right more"></view> |
||||
|
</view> |
||||
|
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/my-trips/my-trips')"> |
||||
|
<text class="text-xl">我的行程</text> |
||||
|
<view class="iconfont icon-right more"></view> |
||||
|
</view> |
||||
|
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/my-signs/my-signs')"> |
||||
|
<text class="text-xl">我的校园打卡</text> |
||||
|
<view class="iconfont icon-right more"></view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { |
import { mapState } from 'vuex'; |
||||
mapState |
export default { |
||||
} from 'vuex'; |
name: 'Mine', |
||||
export default { |
data() { |
||||
name: 'Mine', |
return { |
||||
data() { |
userInfo: { |
||||
return { |
avatarUrl: '/static/head-portrait.png', |
||||
userInfo: { |
nickName: '健康码', |
||||
avatarUrl: '../../../static/head-portrait.jpg', |
// classes: '计算机19级软工二班', |
||||
nickName: '健康码', |
}, |
||||
// classes: '计算机19级软工二班', |
}; |
||||
}, |
}, |
||||
}; |
|
||||
}, |
computed: mapState('user', ['healthCode', 'user']), |
||||
|
|
||||
computed: mapState('user', ['healthCode', 'user']), |
methods: { |
||||
|
//预览图片 |
||||
methods: { |
getPreviewImg(image) { |
||||
//预览图片 |
var imgArr = []; |
||||
getPreviewImg(image) { |
imgArr.push(image); |
||||
var imgArr = []; |
uni.previewImage({ |
||||
imgArr.push(image); |
urls: imgArr, |
||||
uni.previewImage({ |
current: imgArr[0], |
||||
urls: imgArr, |
}); |
||||
current: imgArr[0] |
}, |
||||
}); |
}, |
||||
}, |
}; |
||||
|
|
||||
} |
|
||||
}; |
|
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
.portrait { |
.portrait { |
||||
overflow: hidden; |
overflow: hidden; |
||||
} |
} |
||||
|
|
||||
.healthy-code { |
.healthy-code { |
||||
width: 70rpx; |
width: 70rpx; |
||||
height: 70rpx; |
height: 70rpx; |
||||
} |
} |
||||
|
|
||||
.more { |
.more { |
||||
font-size: 18px; |
font-size: 18px; |
||||
color: $grey; |
color: $grey; |
||||
} |
} |
||||
</style> |
</style> |
||||
|
Before Width: | Height: | Size: 154 KiB |
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 207 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.9 KiB |