学习问答
This commit is contained in:
@@ -2,44 +2,51 @@
|
||||
<div class="ranking">
|
||||
<div class="list-wrapper">
|
||||
<div class="item my" @click="linkTo">
|
||||
<span>113</span>
|
||||
<span>{{ info['积分排行'] }}</span>
|
||||
<div class="userinfo">
|
||||
<image :src="'https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png'" />
|
||||
<h3>且听风吟</h3>
|
||||
<image :src="user.avatar || 'https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png'" />
|
||||
<h3>{{ user.name }}</h3>
|
||||
</div>
|
||||
<i>20</i>
|
||||
<i>{{ info['累计获取积分'] }}</i>
|
||||
<image class="right" src="../img/right.png" />
|
||||
</div>
|
||||
<div class="item" v-for="(item, index) in 21" :key="index">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<span>{{ index + 1 }}</span>
|
||||
<div class="userinfo">
|
||||
<image :src="'https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png'" />
|
||||
<h3>且听风吟</h3>
|
||||
<image :src="item.avatar || 'https://cdn.cunwuyun.cn/wxmp/tianfuxing/avatar.png'" />
|
||||
<h3>{{ item.name }}</h3>
|
||||
</div>
|
||||
<i>20</i>
|
||||
<i>{{ item.score }}</i>
|
||||
</div>
|
||||
<!-- <AiEmpty v-if="!list.length"></AiEmpty> -->
|
||||
<AiEmpty v-if="!list.length && isMore"></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
title: '',
|
||||
size: 20
|
||||
size: 100
|
||||
},
|
||||
isMore: false,
|
||||
info: {},
|
||||
list: []
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$loading()
|
||||
this.getList()
|
||||
this.getInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -49,6 +56,14 @@
|
||||
})
|
||||
},
|
||||
|
||||
getInfo () {
|
||||
this.$http.post(`/app/applearningquestion/myScore`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getList () {
|
||||
if (this.isMore) return
|
||||
this.$http.post(`/app/applearningquestion/scoreRanking`, null, {
|
||||
@@ -65,7 +80,7 @@
|
||||
|
||||
uni.hideLoading()
|
||||
|
||||
if (res.data.records.length < 20) {
|
||||
if (res.data.records.length < 100) {
|
||||
this.isMore = true
|
||||
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user