chenrong il y a 9 mois
Parent
commit
7caa811cf9
2 fichiers modifiés avec 6 ajouts et 8 suppressions
  1. 2 2
      src/views/profile/profileH5.vue
  2. 4 6
      src/views/profile/profilePC.vue

+ 2 - 2
src/views/profile/profileH5.vue

@@ -75,7 +75,7 @@ export default {
       selectObj: {},
       query: {
         pageSize: 10,
-        pageNum: 1,
+        pageNum: 0,
         type: 0
       },
       total: 0,
@@ -90,7 +90,7 @@ export default {
     }
   },
   mounted() {
-    this.initCharacterList()
+    // this.initCharacterList()
   },
   methods: {
     tabChange() {

+ 4 - 6
src/views/profile/profilePC.vue

@@ -158,7 +158,7 @@ export default {
     return {
       query: {
         pageSize: 10,
-        pageNum: 1,
+        pageNum: 0,
         type: 0
       },
       total: 0,
@@ -179,7 +179,7 @@ export default {
   },
   mounted() {
     this.getUserInfo()
-    this.initCharacterList()
+    // this.initCharacterList()
   },
   methods: {
     getUserInfo() {
@@ -321,10 +321,6 @@ export default {
       this.getCharacterList()
     },
     getCharacterList(query) {
-      let type = this.active
-      // if (type == 0) {
-      //   type = '0,2'
-      // }
       let params = this.query
       if (query) {
         params = {
@@ -333,6 +329,7 @@ export default {
 
         }
       }
+      console.log(this.query.pageNum * this.query.pageSize, 'this.query.pageNum * this.query.pageSize');
       queryCharacterAndSceneApi(params).then(res => {
         console.log(res, '角色列表');
         if (res.rows.length == 0) {
@@ -340,6 +337,7 @@ export default {
         }
         this.characterList = [...this.characterList, ...res.rows]
         if ((this.query.pageNum * this.query.pageSize) >= res.total) {
+          console.log('关闭加载');
           this.noMore = true
         }
         this.total = res.total