mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 19:36:47 +08:00
我的u币页面
This commit is contained in:
@@ -6,62 +6,78 @@
|
|||||||
<image src="../../static/images/wenhao.png" mode=""></image>
|
<image src="../../static/images/wenhao.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="top-content">
|
<view class="top-content">
|
||||||
<view>367</view>
|
<view>{{uinfo.uCurrency}}</view>
|
||||||
统计时间:2022–10-14
|
统计时间:2022.11.4
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ub-list">
|
<view class="ub-list" v-for="(day, index) in uCoinRecord" :key="index">
|
||||||
<text>2022年9月</text>
|
<text>{{day.dayNmae}}</text>
|
||||||
<view class="list-info">
|
<view class="list-info" v-for="info in day.list">
|
||||||
<view class="info-left">
|
<view class="info-left">
|
||||||
<view>试听学习 10 分钟</view>
|
<view>{{info.content}}</view>
|
||||||
2022-09-20 14:38
|
{{ info.recordTime }}
|
||||||
</view>
|
</view>
|
||||||
<view class="info-right">
|
<view class="info-right">
|
||||||
+10
|
{{info.uvalue > 0? '+':''}}
|
||||||
</view>
|
{{info.uvalue}}
|
||||||
</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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user