我的u币样式修改

This commit is contained in:
zhaofang
2022-10-18 17:26:44 +08:00
parent 37588ad042
commit d0bb6c3970

View File

@@ -2,7 +2,6 @@
<div class="u-currency"> <div class="u-currency">
<div class="myubi"> <div class="myubi">
<div class="ubi-hear"> <div class="ubi-hear">
<h6>我的U币:{{uinfo.uCurrency}}</h6><span class="pointer" @click="dialogVisible = true">U币规则 <h6>我的U币:{{uinfo.uCurrency}}</h6><span class="pointer" @click="dialogVisible = true">U币规则
<i class="el-icon-arrow-right"></i> </span> <i class="el-icon-arrow-right"></i> </span>
<el-button icon="el-icon-document" @click="exportRecord()">导出记录</el-button> <el-button icon="el-icon-document" @click="exportRecord()">导出记录</el-button>
@@ -10,8 +9,11 @@
<div style="max-height:600px;overflow-y:auto;padding-right:30px"> <div style="max-height:600px;overflow-y:auto;padding-right:30px">
<div class="Ubi-hist"> <div class="Ubi-hist">
<h6>U币历史记录</h6><span>最多保留近7天的记录</span> <h6>U币历史记录</h6><span>最多保留近7天的记录</span>
<div v-show="isShowChart" >
<div style="height:290px;min-width: 350px;" ref="chart"></div> <div style="height:290px;min-width: 350px;" ref="chart"></div>
</div> </div>
</div>
<div v-if="uCoinRecord.length > 0"> <div v-if="uCoinRecord.length > 0">
<div class="my-Recording" v-for="(day, index) in uCoinRecord" :key="index"> <div class="my-Recording" v-for="(day, index) in uCoinRecord" :key="index">
<h3>{{day.dayNmae}}</h3> <h3>{{day.dayNmae}}</h3>
@@ -22,7 +24,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else class="home-no-list"> <div v-else class="home-no-list" style="margin-top:150px">
<img class="img" style="width:76px;height:76px" :src="`${webBaseUrl}/images/homeWu/u-wu.png`" alt="" <img class="img" style="width:76px;height:76px" :src="`${webBaseUrl}/images/homeWu/u-wu.png`" alt=""
srcset=""> srcset="">
<p class="text">最近7天你可能太忙了快开始 努力获得U币吧</p> <p class="text">最近7天你可能太忙了快开始 努力获得U币吧</p>
@@ -209,6 +211,8 @@
}, },
data() { data() {
return { return {
chatData:[],
isShowChart:false,
current: { current: {
percentage: 0 percentage: 0
}, },
@@ -295,6 +299,16 @@
this.getRanking(); this.getRanking();
this.getLevel(); this.getLevel();
}, },
watch:{
isShowChart(val) {
if(val) {
this.initChat(this.chatData);
}
}
},
updated() {
this.chart.resize();
},
methods: { methods: {
handleCommand(e) { handleCommand(e) {
@@ -456,13 +470,16 @@
}) })
} }
let chatData = []; let chatData = [];
for (let key in res.result.chatData) { for (let key in res.result.chatData) {
if(res.result.chatData[key] > 0) {
this.isShowChart = true;
}
chatData.push({ chatData.push({
value: res.result.chatData[key], value: res.result.chatData[key],
name: this.getUType(key) name: this.getUType(key)
}) })
} }
this.chatData = chatData;
this.initChat(chatData); this.initChat(chatData);
} }
}) })
@@ -479,14 +496,17 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.u-currency { .u-currency {
padding: 10px 18px; padding: 10px 18px;
display: flex; display: flex;
justify-content: space-between;
overflow-x: auto;
} }
.experience { .experience {
font-size: 16px; font-size: 16px;
min-width: 480px; min-width: 480px;
min-width: 480px; font-weight: 600;
color: #333333;
} }
.myubi { .myubi {