Commit 970defd3 authored by Xuguangxing's avatar Xuguangxing

feat: 处理头像组的问题

parent 32640d29
<template> <template>
<div class="avator-group"> <div class="avator-group">
<div v-for="(item, index) in avators" :key="index" class="avator-item" :style="widthStyle"> <div v-for="(item, index) in avators" :key="index" class="avator-item" :style="widthStyle">
<cr-image :class="{ avator: index == 0 }" width="44px" :src="item" /> <cr-image :class="{ avator: index == 0 }" width="44px" height="44px" :src="item" />
<div v-if="index == 0" class="is-leader"> <div v-if="index == 0" class="is-leader">
<cr-image width="48px" src="@/assets/images/leader.png" /> <cr-image width="22px" src="@/assets/images/leaderIcon.png" />
</div>
<div v-if="index == 0" class="leader-name">
<cr-image width="35px" height="17px" src="@/assets/images/leader-name.png" />
</div> </div>
<div v-else class="is-new"> <div v-else class="is-new">
<cr-image width="25px" src="@/assets/images/new-user.png" /> <cr-image width="25px" src="@/assets/images/new-user.png" />
</div> </div>
</div> </div>
<div class="placeholder" :style="widthStyle">
<div class="content">?</div>
</div>
<div class="more" />
</div> </div>
</template> </template>
<script> <script>
...@@ -25,8 +32,8 @@ export default { ...@@ -25,8 +32,8 @@ export default {
'https://activitystatic.lkbang.net/mall-free-ui/img/avator_06.png', 'https://activitystatic.lkbang.net/mall-free-ui/img/avator_06.png',
'https://activitystatic.lkbang.net/mall-free-ui/img/avator_07.png', 'https://activitystatic.lkbang.net/mall-free-ui/img/avator_07.png',
'https://activitystatic.lkbang.net/mall-free-ui/img/avator_09.png', 'https://activitystatic.lkbang.net/mall-free-ui/img/avator_09.png',
'https://activitystatic.lkbang.net/mall-free-ui/img/avator_10.png',
'https://activitystatic.lkbang.net/mall-free-ui/img/avator_10.png' 'https://activitystatic.lkbang.net/mall-free-ui/img/avator_10.png'
// 'https://activitystatic.lkbang.net/mall-free-ui/img/avator_10.png'
] ]
}, },
desc: { desc: {
...@@ -63,26 +70,66 @@ export default { ...@@ -63,26 +70,66 @@ export default {
justify-content: center; justify-content: center;
background: @white; background: @white;
.avator-item { .avator-item {
display: flex;
justify-content: center;
flex-shrink: 0; flex-shrink: 0;
position: relative; position: relative;
width: 20%; width: 20%;
height: 44px; height: 44px;
margin-top: @padding-lg; margin-top: @padding-lg;
.avator { .avator {
border: 2px solid #ffd93d; background: url('../assets/images/leaderBorder.png');
// border: px solid rgba(255, 212, 0, 0.24); // border: px solid rgba(255, 212, 0, 0.24);
background-size: cover;
border-radius: 50%; border-radius: 50%;
box-sizing: border-box; box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
/deep/ img {
width: 37px;
height: 37px;
}
} }
.is-new { .is-new {
position: absolute; position: absolute;
top: 0; top: 0;
right: @padding-unit * 2; right: -@padding-unit;
} }
.is-leader { .is-leader {
position: absolute; position: absolute;
left: 2px; right: 4px;
top: -11px; top: -9px;
}
.leader-name {
width: 35px;
height: 17px;
position: absolute;
left: 50%;
bottom: -6px;
transform: translateX(-50%);
}
}
.placeholder {
display: flex;
justify-content: center;
flex-shrink: 0;
position: relative;
width: 20%;
height: 44px;
margin-top: @padding-lg;
color: @red;
.text-18();
.content {
display: flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
border-radius: 50%;
background: #ffe1e1;
box-sizing: border-box;
border: 1px dashed #ff9393;
} }
} }
} }
......
...@@ -78,7 +78,7 @@ const mutations = { ...@@ -78,7 +78,7 @@ const mutations = {
}, },
[types.CHANGE_SHOW_MINI_APP_GUIDE](state, { bool, pointer }) { [types.CHANGE_SHOW_MINI_APP_GUIDE](state, { bool, pointer }) {
state.isPrimordialBrowser = bool; state.isPrimordialBrowser = bool;
if (bool) { if (!bool) {
// 如果非app webview并且非小程序webview,直接拦截提示,到小程序操作 // 如果非app webview并且非小程序webview,直接拦截提示,到小程序操作
pointer.$dialog({ pointer.$dialog({
message: '请在微信小程序中参与此活动哦~', message: '请在微信小程序中参与此活动哦~',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment