我的u币页面

This commit is contained in:
lmj
2022-11-04 17:27:41 +08:00
parent 823d00870d
commit 10bee9d994

View File

@@ -6,62 +6,78 @@
<image src="../../static/images/wenhao.png" mode=""></image>
</view>
<view class="top-content">
<view>367</view>
统计时间202210-14
<view>{{uinfo.uCurrency}}</view>
统计时间2022.11.4
</view>
</view>
<view class="ub-list">
<text>2022年9月</text>
<view class="list-info">
<view class="ub-list" v-for="(day, index) in uCoinRecord" :key="index">
<text>{{day.dayNmae}}</text>
<view class="list-info" v-for="info in day.list">
<view class="info-left">
<view>试听学习 10 分钟</view>
2022-09-20 14:38
<view>{{info.content}}</view>
{{ info.recordTime }}
</view>
<view class="info-right">
+10
{{info.uvalue > 0? '+':''}}
{{info.uvalue}}
</view>
</view>
<view class="list-info">
<view class="info-left">
<view>试听学习 10 分钟</view>
2022-09-20 14:38
</view>
<view class="info-right">
+10
</view>
</view>
<view class="list-info">
<view class="info-left">
<view>试听学习 10 分钟</view>
2022-09-20 14:38
</view>
<view class="info-right">
+10
</view>
</view>
<view class="list-info">
<view class="info-left">
<view>试听学习 10 分钟</view>
2022-09-20 14:38
</view>
<view class="info-right">
+10
</view>
</view>
<view class="list-info">
<view class="info-left">
<view>试听学习 10 分钟</view>
2022-09-20 14:38
</view>
<view class="info-right">
+10
</view>
</view>
</view>
</view>
</template>
<script>
import { mapGetters } from 'vuex'
import apiStat from '@/api/phase2/stat.js';
export default {
computed: {
...mapGetters(['userInfo']),
avatarText(){
return userAvatarText(this.userInfo.name);
}
},
data() {
return {
uCoinRecord:[],
uinfo: {
uCurrency: 0 ,// 用户累计U币
timestamp:'',
},
}
},
mounted() {
this.getlist();
this.getLevel()
},
methods:{
getlist(){
apiStat.userCoinList(this.userInfo.aid, 7).then(res =>{
console.log(res);
if (res.status == 200) {
this.uCoinRecord = [];
for (let key in res.result.uCoinRecord) {
this.uCoinRecord.push({
dayNmae: key,
list: res.result.uCoinRecord[key]
})
}
}
})
},
getLevel() { //获取用户累计U币
apiStat.getUserStatTotalInfo(this.userInfo.aid).then(res => {
if (res.status == 200) {
this.uinfo.uCurrency = res.result.uvalue;
}
});
},
}
}
</script>
<style lang="scss" scoped>