Commit c2e7535e by chenwq

默认头像显示隐藏

1 parent d90d5d90
......@@ -2,22 +2,17 @@
<div :class="['share-item',{hideBorder}]">
<div class="content">
<div class="user-info flex">
<div class="sprite-icon icon-avatar"></div>
玩家{{num}}
<div>
<img v-if="showAvatarNicknameFlag == 2" class="icon-head" :src="item.imageUrl">
<div v-else class="sprite-icon icon-avatar"></div>
</div>
{{ showAvatarNicknameFlag == 2 ? item.name : '玩家' + num }}
</div>
<div
:class="['text',{'text-two-line':indexType}]"
v-text="item.experience"
>
<div :class="['text',{'text-two-line':indexType}]" v-text="item.experience">
</div>
<div :class="['img-box',{'four':indexType}]">
<template v-for="(i,index) in item.activityExperienceImgs">
<div
@click="jumpPreview(index)"
v-if="indexType?index < 4 :true"
class="img-item"
:key="index"
>
<div @click="jumpPreview(index)" v-if="indexType?index < 4 :true" class="img-item" :key="index">
<img :src="i.imageUrl" />
</div>
</template>
......@@ -36,16 +31,18 @@ export default {
type: Object,
default: () => { }
},
num: Number
num: Number,
// 显示默认或真实数据头像和昵称,1-默认;2-真实数据
showAvatarNicknameFlag: Number
},
data () {
data() {
return {
}
},
mounted () {
mounted() {
},
methods: {
jumpPreview (index) {
jumpPreview(index) {
let { activityExperienceImgs, experience } = this.item, item = []
activityExperienceImgs.map(e => item.push(e.imageUrl))
this.to('crowdfunding.imagePreview', { item, index, experience })
......@@ -65,6 +62,12 @@ export default {
margin-right: 8px;
}
}
.icon-head {
width: 36px;
height: 36px;
border-radius: 50%;
margin-right: 8px;
}
.text {
font-size: 14px;
color: #282829;
......@@ -92,4 +95,4 @@ export default {
height: 75px;
}
}
</style>
\ No newline at end of file
</style>
......@@ -6,7 +6,7 @@
<template v-if="evaList.length">
<div
class="sub-title flex"
@click="to('crowdfunding.evaluate',{list:evaList})"
@click="to('crowdfunding.evaluate',{ list: evaList, detail: detail })"
>
玩家心得({{evaList.length}})
<div class="all flex">
......@@ -19,6 +19,7 @@
:hideBorder="!faqList.length"
indexType
:num="1"
:showAvatarNicknameFlag="detail.showAvatarNicknameFlag"
>
</evaluate-item>
</template>
......@@ -63,6 +64,10 @@ export default {
faqList: {
type: Array,
default: () => []
},
detail: {
type: Object,
default: () => { }
}
},
data () {
......@@ -88,4 +93,4 @@ export default {
.faq-title {
margin-bottom: 10px;
}
</style>
\ No newline at end of file
</style>
......@@ -10,6 +10,7 @@
:item="i"
:hideBorder="index == list.length - 1"
:num="index + 1"
:showAvatarNicknameFlag="detail.showAvatarNicknameFlag"
/>
</div>
</template>
......@@ -21,14 +22,16 @@ export default {
name: 'evaluate',
data () {
return {
list: []
list: [],
detail: {}
}
},
activated () {
let { list } = this.getParams()
let { list, detail } = this.getParams()
if (list && list.length) this.list = list
else if (this.list.length) return
else this.to('crowdfunding')
if (detail) this.detail = detail
},
mounted () {
......@@ -46,4 +49,4 @@ export default {
padding: 0 16px;
}
}
</style>
\ No newline at end of file
</style>
......@@ -49,9 +49,9 @@
</div>
</template>
<!--👇 参团人数滚动显示 -->
<!-- <template v-if="detail.activityStatus != 1">
<move-group :groupInfo="groupInfo" />
</template> -->
<template v-if="detail.activityStatus != 1">
<move-group v-show="detail.showAvatarNicknameFlag == 2" :groupInfo="groupInfo" />
</template>
</div>
<template v-if="viewFlag">
<div class="activity">
......@@ -64,7 +64,7 @@
<div><span>{{ groupInfo.groupQuantity }}</span>人已参团</div>
<div> <span>{{ groupInfo.viewAmount }}</span>人已浏览</div>
</div>
<!-- <template v-if="groupInfo.arr && groupInfo.arr.length">
<template v-if="detail.showAvatarNicknameFlag == 2 && groupInfo.arr && groupInfo.arr.length">
<van-swipe
class="group-swipe"
vertical
......@@ -88,7 +88,7 @@
</van-swipe-item>
</template>
</van-swipe>
</template> -->
</template>
</div>
<!--👇 活动进度 -->
<div class="box progress-box" id="progress">
......@@ -124,7 +124,7 @@
<!-- 👇 服务说明 -->
<serve :list="detail.activityServices || []" />
<!-- 👇 玩家心得&商品答疑 -->
<share-goods :evaList="detail.activityExperienceDTOs || []" :faqList="detail.activityCommoditys || []" />
<share-goods :evaList="detail.activityExperienceDTOs || []" :faqList="detail.activityCommoditys || []" :detail="detail"/>
<!--👇 活动视频 -->
<template v-if="detail.activityVideos && detail.activityVideos.length">
<div :class="['video-box flex', { onlyone: detail.activityVideos.length == 1 }, { onlytwo: detail.activityVideos.length == 2 }]">
......@@ -323,6 +323,7 @@ export default {
if (this.detail.liveBroadcastRoomId) {
this.getLiveDetail(id)
}
console.log(this.detail, 'detail-----------')
})
},
getLiveDetail(id) {
......@@ -414,7 +415,7 @@ export default {
this.id = id
shopmallApi.getActivityGroup(this.id).then(data => {
let arr = [], items = []
console.log(JSON.parse(JSON.stringify(data)))
// console.log(JSON.parse(JSON.stringify(data)))
data.progress = data.fictitiousLadderQuantity != 0
? this.decimal((data.groupQuantity / data.fictitiousLadderQuantity) * 100, 2)
: this.decimal(data.groupQuantity * 100, 2)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!