|
@@ -21,7 +21,7 @@
|
|
|
contentItemTopRowChild: true,
|
|
|
contentItemTopRowOne: index === 0,
|
|
|
contentItemTopRowTwo: index === 1,
|
|
|
- contentItemTopRowThree: index === 2,
|
|
|
+ contentItemTopRowThree: index === 2
|
|
|
}"
|
|
|
v-for="(item, index) in rankListTopThree"
|
|
|
:key="index"
|
|
@@ -42,12 +42,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="contentItemTopRowChildName">
|
|
|
- {{ item.name || "userName" + (index + 1) }}
|
|
|
+ {{ item.userName || "userName" + (index + 1) }}
|
|
|
</div>
|
|
|
<span class="contentItemTopRowChildPoints">
|
|
|
- {{ item.ponits || "undefind" }}
|
|
|
+ {{ item.points }}
|
|
|
</span>
|
|
|
- <span class="contentItemTopRowChildSteps">Steps</span>
|
|
|
+ <span class="contentItemTopRowChildSteps">积分</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-cell>
|
|
@@ -64,11 +64,11 @@
|
|
|
:show-error="true"
|
|
|
:error-icon="maleAvatar"
|
|
|
/>
|
|
|
- <div>{{ item.name || "未知" }}</div>
|
|
|
+ <div>{{ item.userName || "未知" }}</div>
|
|
|
</div>
|
|
|
<div class="userPonits">
|
|
|
- {{ item.points || "undefind" }}
|
|
|
- <span>Steps</span>
|
|
|
+ {{ item.points }}
|
|
|
+ <span>积分</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -114,41 +114,25 @@ export default {
|
|
|
this.$_http
|
|
|
.get(this.$_API.JTXT_GET_LEADERBOARD, { params })
|
|
|
.then(res => {
|
|
|
- console.log(res);
|
|
|
+ console.log(res.data);
|
|
|
+ if (res.data && res.data.users) {
|
|
|
+ res.data.users.forEach((item, index) => {
|
|
|
+ if (index < 3) {
|
|
|
+ this.rankListTopThree[index] = item;
|
|
|
+ } else {
|
|
|
+ this.rankListOthers.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ console.log(this.rankListTopThree, this.rankListOthers);
|
|
|
this.finished = true;
|
|
|
this.loading = false;
|
|
|
+ this.$store.commit("toggleLoading", false);
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.$store.commit("toggleLoading", false);
|
|
|
});
|
|
|
},
|
|
|
- // 查询:排行榜单条数据ID对应的详情
|
|
|
- getFavoritesItemDeitalFun(item, index, isLast) {
|
|
|
- // this.$_http
|
|
|
- // .get(this.$pathParams(this.$_API.接口名字, path))
|
|
|
- // .then(res => {
|
|
|
- if (index < 3) {
|
|
|
- // this.rankListTopThree[index] = res.data;
|
|
|
- this.rankListTopThree[index] = item;
|
|
|
- } else {
|
|
|
- // this.rankListOthers.push(res.data);
|
|
|
- this.rankListOthers.push(item);
|
|
|
- }
|
|
|
- this.rankListOthers = this.rankListTopThree;
|
|
|
- if (isLast) {
|
|
|
- console.log(
|
|
|
- "--collection--",
|
|
|
- this.rankListTopThree,
|
|
|
- this.rankListOthers
|
|
|
- );
|
|
|
- this.finished = true;
|
|
|
- this.$store.commit("toggleLoading", false);
|
|
|
- }
|
|
|
- // })
|
|
|
- // .catch(() => {
|
|
|
- // this.$store.commit("toggleLoading", false);
|
|
|
- // });
|
|
|
- },
|
|
|
// 操作:返回
|
|
|
onClickLeft() {
|
|
|
this.$router.back();
|
|
@@ -159,6 +143,13 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
+<style lang="scss">
|
|
|
+.contentBody {
|
|
|
+ .van-tabs__line {
|
|
|
+ background-color: #0088e9;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|
|
|
<style lang="scss" scoped>
|
|
|
.contentBody {
|
|
|
font-size: 0.6rem;
|