mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-14 21:36:42 +08:00
实现显示用户累计U币。
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
<div class="u-currency" >
|
<div class="u-currency" >
|
||||||
<div class="myubi">
|
<div class="myubi">
|
||||||
<div class="ubi-hear">
|
<div class="ubi-hear">
|
||||||
<h6>我的U币:367</h6><span class="pointer" @click="dialogVisible = true">U币规则 <i class="el-icon-arrow-right"></i> </span>
|
<h6>我的U币:{{uinfo.uCurrency}}</h6><span class="pointer" @click="dialogVisible = true">U币规则 <i class="el-icon-arrow-right"></i> </span>
|
||||||
<el-button @click="exportRecord()">导出记录</el-button>
|
<el-button icon="el-icon-search" @click="exportRecord()">导出记录</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div style="max-height:600px;overflow-y:auto;padding-right:50px">
|
<div style="max-height:600px;overflow-y:auto;padding-right:50px">
|
||||||
<div class="Ubi-hist">
|
<div class="Ubi-hist">
|
||||||
@@ -14,18 +14,18 @@
|
|||||||
<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>
|
||||||
<div class="Recording-info" v-for="info in day.list">
|
<div class="Recording-info" v-for="info in day.list">
|
||||||
<div class="info-tit">{{getUType(info.eventKey)}}</div>
|
<div class="info-tit">{{info.content}}</div>
|
||||||
<div class="info-Gold"><img src="../../../public/images/Uimg.png" alt="">{{info.uvalue > 0? '+':''}} {{info.uvalue}}</div>
|
<div class="info-Gold"><img src="../../../public/images/Uimg.png" alt="">{{info.uvalue > 0? '+':''}} {{info.uvalue}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else class="home-no-list">
|
<div v-else class="home-no-list">
|
||||||
<img class="img" style="width:76px;height:76px" src="/images/homeWu/u-wu.png" alt="" srcset="">
|
<img class="img" style="width:76px;height:76px" src="/images/homeWu/u-wu.png" alt="" srcset="">
|
||||||
<p class="text">最近7天你可能太忙了,快开始 努力获得U币吧</p>
|
<p class="text">最近7天你可能太忙了,快开始 努力获得U币吧</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="experience">
|
<div class="experience">
|
||||||
<div class="exp-hear">
|
<div class="exp-hear">
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<el-dropdown-item command="months">本月</el-dropdown-item>
|
<el-dropdown-item command="months">本月</el-dropdown-item>
|
||||||
<el-dropdown-item command="years">本年</el-dropdown-item>
|
<el-dropdown-item command="years">本年</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="myselftext">
|
<div class="myselftext">
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
<div style="font-size: 18px;color: #333333;font-weight: 600;color: #0059FF;">{{currentUserRankingData.total}}</div>
|
<div style="font-size: 18px;color: #333333;font-weight: 600;color: #0059FF;">{{currentUserRankingData.total}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dialog-close" @click="dialogVisible=false">
|
<div class="dialog-close" @click="dialogVisible=false">
|
||||||
<img style="width:86px;height:86px" src="/images/homeWu/u-close.png" alt="">
|
<img style="width:86px;height:86px" src="/images/homeWu/u-close.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
export default{
|
export default{
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
|
|
||||||
},
|
},
|
||||||
components: {authorImg,author},
|
components: {authorImg,author},
|
||||||
data(){
|
data(){
|
||||||
@@ -225,15 +225,19 @@
|
|||||||
uCoinRecord:[],
|
uCoinRecord:[],
|
||||||
chart:null,
|
chart:null,
|
||||||
currentUserRankingData:{},
|
currentUserRankingData:{},
|
||||||
rankingData:[]
|
rankingData:[],
|
||||||
|
uinfo:{
|
||||||
|
uCurrency:0 // 用户累计U币
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getRanking();
|
this.getRanking();
|
||||||
|
this.getLevel();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
|
||||||
handleCommand(e) {
|
handleCommand(e) {
|
||||||
this.cycle = e;
|
this.cycle = e;
|
||||||
this.name = this.translate(e)
|
this.name = this.translate(e)
|
||||||
@@ -271,7 +275,7 @@
|
|||||||
this.current = this.experienceValue(res.result.currentUserRankingData.years);
|
this.current = this.experienceValue(res.result.currentUserRankingData.years);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const ids= [];
|
const ids= [];
|
||||||
res.result.rankingData.forEach(item=>{
|
res.result.rankingData.forEach(item=>{
|
||||||
ids.push(item.aid)
|
ids.push(item.aid)
|
||||||
@@ -381,7 +385,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
let chatData = [];
|
let chatData = [];
|
||||||
|
|
||||||
for(let key in res.result.chatData){
|
for(let key in res.result.chatData){
|
||||||
chatData.push({
|
chatData.push({
|
||||||
value:res.result.chatData[key],
|
value:res.result.chatData[key],
|
||||||
@@ -391,14 +395,21 @@
|
|||||||
this.initChat(chatData);
|
this.initChat(chatData);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
getLevel(){//获取用户累计U币
|
||||||
|
apiStat.getUserStatTotalInfo(this.userInfo.aid).then(res=>{
|
||||||
|
if(res.status == 200) {
|
||||||
|
this.uinfo.uCurrency = res.result.coinValue;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .el-dialog{
|
::v-deep .el-dialog{
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
||||||
}
|
}
|
||||||
::v-deep .el-dialog__header{
|
::v-deep .el-dialog__header{
|
||||||
display: none;
|
display: none;
|
||||||
@@ -550,8 +561,8 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.myselftext{
|
.myselftext{
|
||||||
height: 75px;
|
height: 75px;
|
||||||
@@ -618,21 +629,21 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.tab-rank{
|
.tab-rank{
|
||||||
|
|
||||||
|
|
||||||
img{
|
img{
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.experience{
|
.experience{
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-right: 118px;
|
margin-right: 118px;
|
||||||
|
|
||||||
.exp-hear{
|
.exp-hear{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 65px;
|
height: 65px;
|
||||||
@@ -665,7 +676,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.exp-bar{
|
.exp-bar{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
h6{
|
h6{
|
||||||
@@ -710,6 +721,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
Reference in New Issue
Block a user