<div class="followingGift">
<div class="text" style="margin-top: 32px">(2)向对方赠送以下礼物可额外获得经验值</div>
<table>
<tr style="height: 30px;">
<td>礼物</td>
<td>获得经验值</td>
</tr>
<tr v-for="(item,key) in expGiftTreemapShow" :key="key">
<td>
<div class="td-container">
<div class="expGiftTable" v-for="(expGiftShow) in item" :key=expGiftShow.propId>
<img :src="expGiftShow.pic">
<div class="expGiftName">{{ expGiftShow.name }}</div>
<div class="expGiftCoins">
<img :src="resource.coin">
<span>{{ expGiftShow.price }}</span>
</div>
</div>
</div>
</td>
<td>{{key}}</td>
</tr>
</table>
<div class="empty"></div>
</div>
这是后台的返回请求函数
async init() {
// 开始活动逻辑
const res = await this.$req('/UserLoveManor.RankingInfo')
if (res) {
this.rankingShow = 'Lv.' + res.data.ranking
this.rankingName = res.data.rankingName
this.gradeValue = res.data.startNum
this.totalExp = res.data.totalExp
this.rewards = res.data.rewards
this.expGiftTreemap = res.data.expGiftTreemap
this.expGiftTreemapShow = res.data.expGiftTreemap
this.showInfoList = res.data.showInfoList
for (let i = 0; i < res.data.rewards.length; i++) {
this.rewards.price = res.data.rewards[i].price
this.rewards.name = res.data.rewards[i].name
}
}
},
}