Commit c2e7535e by chenwq

默认头像显示隐藏

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