dl_uniapp/pages/mine/card/my-card.vue

181 lines
3.6 KiB
Vue
Raw Normal View History

2025-04-01 10:18:22 +08:00
<template>
<view class="my-card-box">
2025-04-01 10:54:00 +08:00
<view class="card-dom click">
2025-04-01 10:18:22 +08:00
<view class="card-title">
2025-04-01 10:54:00 +08:00
<!-- 需要根据平台code取对应的图片 TODO -->
2025-04-01 10:18:22 +08:00
<image src="@/static/platform/xiaohongshu.png" mode="aspectFit"></image>
<text>小红书博主</text>
2025-04-01 10:54:00 +08:00
<view class="edit-text" @click="edit()">
<image style="margin-right: 10rpx;width: 30rpx;height: 30rpx;" src="@/static/mine/edit.png"
mode="aspectFit">
2025-04-01 10:18:22 +08:00
</image>
编辑
</view>
</view>
2025-04-01 10:54:00 +08:00
<view class="card-content">
<image src="@/static/images/profile.jpg" mode="aspectFit"></image>
<view class="card-person-info">
<view style="font-weight: bold;">
<view>李林 <image src="@/static/mine/sex_boy.png" mode="aspectFit"></image>
<!-- 需要判断用户性别 TODO -->
<!-- <image src="@/static/mine/sex_girl.png" mode="aspectFit"></image> -->
</view>
</view>
<view class="detail-text">
粉丝1000
</view>
<view class="detail-text">
昵称爱是大会
</view>
</view>
</view>
<image class="choosed" src="@/static/mine/choosed.png" mode="aspectFit"></image>
</view>
<view class="add-new-card" @click="addCard()">
<image src="@/static/mine/new.png" mode="aspectFit"></image>
<view>添加新的名片</view>
2025-04-01 10:18:22 +08:00
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
2025-04-01 10:54:00 +08:00
//名片编辑
edit() {
this.$tab.navigateTo('/pages/mine/card/card-detail')
},
addCard() {
this.$tab.navigateTo('/pages/mine/card/card-detail')
}
2025-04-01 10:18:22 +08:00
}
}
</script>
<style lang="scss">
.my-card-box {
border-top: 1rpx solid #F4F4F4;
padding: 30rpx;
width: 100%;
color: #363636;
font-size: 30rpx;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
2025-04-01 10:54:00 +08:00
.click {
background-color: #FFF4F6 !important;
border: 2rpx solid #FC1F3E !important;
position: relative;
.choosed {
width: 80rpx;
height: 80rpx;
position: absolute;
right: 0;
bottom: -4rpx;
}
}
2025-04-01 10:18:22 +08:00
.card-dom {
width: 100%;
2025-04-01 10:54:00 +08:00
border: 2rpx solid white;
padding: 25rpx;
border-radius: 40rpx;
2025-04-01 10:18:22 +08:00
background-color: white;
position: relative;
z-index: 10;
font-size: 26rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
2025-04-01 10:54:00 +08:00
margin-bottom: 20rpx;
2025-04-01 10:18:22 +08:00
.card-title {
2025-04-01 10:54:00 +08:00
width: 100%;
2025-04-01 10:18:22 +08:00
display: flex;
align-items: center;
justify-content: center;
image {
2025-04-01 10:54:00 +08:00
width: 40rpx;
height: 40rpx;
2025-04-01 10:18:22 +08:00
}
text {
2025-04-01 10:54:00 +08:00
padding-left: 15rpx;
2025-04-01 10:18:22 +08:00
flex: 1;
}
.edit-text {
2025-04-01 10:54:00 +08:00
display: flex;
align-items: center;
justify-content: flex-end;
width: 150rpx;
}
}
.card-content {
margin-top: 20rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: flex-start;
image {
width: 120rpx;
height: 120rpx;
border-radius: 15rpx;
2025-04-01 10:18:22 +08:00
}
2025-04-01 10:54:00 +08:00
.card-person-info {
padding-left: 20rpx;
flex: 1;
display: flex;
align-items: self-start;
justify-content: center;
flex-direction: column;
image {
margin-left: 10rpx;
width: 20rpx;
height: 20rpx;
}
.detail-text {
font-size: 20rpx;
padding: 5rpx 0;
}
}
}
}
.add-new-card {
width: 100%;
padding: 90rpx;
border-radius: 40rpx;
background-color: white;
position: relative;
z-index: 10;
font-size: 26rpx;
display: flex;
align-items: center;
justify-content: center;
image {
margin-right: 20rpx;
width: 50rpx;
height: 50rpx;
2025-04-01 10:18:22 +08:00
}
}
}
</style>