Ver código fonte

修改阅读完成

aaa 4 anos atrás
pai
commit
d374535174

+ 3 - 1
src/api/modules/user.js

@@ -15,6 +15,8 @@ export default {
     // 收藏
     JTXT_POST_FAVORITE_MATERIALID: "/user/{userName}/favorites",
     // 删除收藏
-    JTXT_DELETE_REMOVE_FAVORITE_MATERIALID: "user/{userName}/favorites"
+    JTXT_DELETE_REMOVE_FAVORITE_MATERIALID: "user/{userName}/favorites",
+    // 查看总榜
+    JTXT_GET_LEADERBOARD: "leaderboard"
   }
 };

+ 1 - 1
src/views/home/learn/page-learn-content.vue

@@ -301,7 +301,7 @@ export default {
           params
         })
         .then(res => {
-          this.isReadable = res;
+          this.isReadable = res.data;
           console.log(this.isReadable);
         })
         .catch(() => {

+ 7 - 11
src/views/home/person/rank.vue

@@ -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"
@@ -108,19 +108,15 @@ export default {
     // 查询:排行榜信息
     getRankListFun() {
       this.$store.commit("toggleLoading", true);
-      let path = {
-        userName: this.user.userInfo.userName
+      let params = {
+        type: "ZongBang"
       };
       this.$_http
-        .get(this.$pathParams(this.$_API.JTXT_GET_USER_FAVORITES, path))
+        .get(this.$_API.JTXT_GET_LEADERBOARD, { params })
         .then(res => {
-          res.data.materials.forEach((item, index) => {
-            this.getFavoritesItemDeitalFun(
-              item,
-              index,
-              index + 1 === res.data.materials.length
-            );
-          });
+          console.log(res);
+          this.finished = true;
+          this.loading = false;
         })
         .catch(() => {
           this.$store.commit("toggleLoading", false);