liyongli vor 3 Jahren
Ursprung
Commit
d8b9541ecd

+ 1 - 1
src/views/BoutiqueColumn/BoutiqueColumn.vue

@@ -70,7 +70,7 @@ export default {
       let warn = allheight - scroll.scrollTop;
       if (now - lastMoreDate < 1000 || warn > 10) return;
       lastMoreDate = now;
-      return this.$refs.child.changePage();
+      return this.$refs.child.changePage(this.$refs.child.current);
     },
     selectTab(tab) {
       try {

+ 8 - 7
src/views/BoutiqueColumn/views/dialogueSecretary.vue

@@ -68,7 +68,7 @@
       style="margin: 5px auto;display: block"
       v-if="total > tableData.length"
       :loading="load"
-      @click="changePage"
+      @click="()=>changePage(current)"
       size="mini"
     >
       {{ load ? "加载中..." : "加载更多" }}
@@ -127,10 +127,9 @@ export default {
   },
   computed: {},
   methods: {
-    changePage() {
-      //   this.current = newPage;
-      if (this.load || this.total <= this.current*this.size) return;
-      this.current++;
+    changePage(num) {
+      if (this.load || this.total <= num * this.size) return;
+      this.current = ++num;
       this.load = true;
       const p = {
         programId: this.item.id,
@@ -141,7 +140,9 @@ export default {
       direction && (p.order = direction);
       epgResult(p).then(programList => {
         this.total = programList.total;
-        this.tableData = [...this.tableData, ...programList.data];
+        if (num === 1) {
+            this.tableData =programList.data;
+        } else this.tableData = [...this.tableData, ...programList.data];
         this.load = false;
       });
     },
@@ -342,7 +343,7 @@ export default {
     sortFun(column) {
       direction = column.order ? config.order[column.order] : "DESC";
       type = column.prop ? column.prop.toUpperCase() : "WATCHRATE";
-      this.changePage(1);
+      this.changePage(0);
     },
     exportfun() {
       let xhttp,

+ 8 - 7
src/views/BoutiqueColumn/views/huashanlunjian.vue

@@ -67,7 +67,7 @@
       style="margin: 5px auto;display: block"
       v-if="total > tableData.length"
       :loading="load"
-      @click="changePage"
+      @click="()=>changePage(current)"
       size="mini"
     >
       {{ load ? "加载中..." : "加载更多" }}
@@ -128,10 +128,9 @@ export default {
   },
   computed: {},
   methods: {
-    changePage() {
-      //   this.current = newPage;
-      if (this.load || this.total <= this.current*this.size) return;
-      this.current++;
+    changePage(num) {
+      if (this.load || this.total <= num * this.size) return;
+      this.current = ++num;
       this.load = true;
       const p = {
         programId: this.item.id,
@@ -142,7 +141,9 @@ export default {
       direction && (p.order = direction);
       epgResult(p).then(programList => {
         this.total = programList.total;
-        this.tableData = [...this.tableData, ...programList.data];
+        if (num === 1) {
+            this.tableData =programList.data;
+        } else this.tableData = [...this.tableData, ...programList.data];
         this.load = false;
       });
     },
@@ -339,7 +340,7 @@ export default {
     sortFun(column) {
       direction = column.order ? config.order[column.order] : "DESC";
       type = column.prop ? column.prop.toUpperCase() : "WATCHRATE";
-      this.changePage(1);
+      this.changePage(0);
     },
     exportfun() {
       // window.open(config.base.url2 + '/epg-export?programId=' + this.item.id)

+ 8 - 7
src/views/BoutiqueColumn/views/hundredBrokenPlays.vue

@@ -68,7 +68,7 @@
       style="margin: 5px auto;display: block"
       v-if="total > tableData.length"
       :loading="load"
-      @click="changePage"
+      @click="()=>changePage(current)"
       size="mini"
     >
       {{ load ? "加载中..." : "加载更多" }}
@@ -128,10 +128,9 @@ export default {
   },
   computed: {},
   methods: {
-    changePage() {
-      //   this.current = newPage;
-      if (this.load || this.total <= this.current*this.size) return;
-      this.current++;
+    changePage(num) {
+      if (this.load || this.total <= num * this.size) return;
+      this.current = ++num;
       this.load = true;
       const p = {
         programId: this.item.id,
@@ -142,7 +141,9 @@ export default {
       direction && (p.order = direction);
       epgResult(p).then(programList => {
         this.total = programList.total;
-        this.tableData = [...this.tableData, ...programList.data];
+        if (num === 1) {
+            this.tableData =programList.data;
+        } else this.tableData = [...this.tableData, ...programList.data];
         this.load = false;
       });
     },
@@ -343,7 +344,7 @@ export default {
     sortFun(column) {
       direction = column.order ? config.order[column.order] : "DESC";
       type = column.prop ? column.prop.toUpperCase() : "WATCHRATE";
-      this.changePage(1);
+      this.changePage(0);
     },
     exportfun() {
       let xhttp,

+ 10 - 8
src/views/BoutiqueColumn/views/policeStory.vue

@@ -68,7 +68,7 @@
       style="margin: 5px auto;display: block"
       v-if="total > tableData.length"
       :loading="load"
-      @click="changePage"
+      @click="()=>changePage(current)"
       size="mini"
     >
       {{ load ? "加载中..." : "加载更多" }}
@@ -127,21 +127,23 @@ export default {
   },
   computed: {},
   methods: {
-    changePage() {
-      //   this.current = newPage;
-      if (this.load || this.total <= this.current*this.size) return;
-      this.current++;
+    changePage(num) {
+        console.log(num)
+      if (this.load || this.total <= num * this.size) return;
+      this.current = ++num;
       this.load = true;
       const p = {
         programId: this.item.id,
-        page: this.current,
+        page: num,
         pageSize: this.size,
       };
       type && (p.sort = type);
       direction && (p.order = direction);
       epgResult(p).then(programList => {
         this.total = programList.total;
-        this.tableData = [...this.tableData, ...programList.data];
+        if (num === 1) {
+            this.tableData =programList.data;
+        } else this.tableData = [...this.tableData, ...programList.data];
         this.load = false;
       });
     },
@@ -342,7 +344,7 @@ export default {
     sortFun(column) {
       direction = column.order ? config.order[column.order] : "DESC";
       type = column.prop ? column.prop.toUpperCase() : "WATCHRATE";
-      this.changePage(1);
+      this.changePage(0);
     },
     exportfun() {
       let xhttp,

+ 8 - 7
src/views/BoutiqueColumn/views/shaanxiNewsSimulcast.vue

@@ -68,7 +68,7 @@
       style="margin: 5px auto;display: block"
       v-if="total > tableData.length"
       :loading="load"
-      @click="changePage"
+      @click="()=>changePage(current)"
       size="mini"
     >
       {{ load ? "加载中..." : "加载更多" }}
@@ -127,10 +127,9 @@ export default {
   },
   computed: {},
   methods: {
-    changePage() {
-      //   this.current = newPage;
-      if (this.load || this.total <= this.current*this.size) return;
-      this.current++;
+    changePage(num) {
+      if (this.load || this.total <= num * this.size) return;
+      this.current = ++num;
       this.load = true;
       const p = {
         programId: this.item.id,
@@ -141,7 +140,9 @@ export default {
       direction && (p.order = direction);
       epgResult(p).then(programList => {
         this.total = programList.total;
-        this.tableData = [...this.tableData, ...programList.data];
+        if (num === 1) {
+            this.tableData =programList.data;
+        } else this.tableData = [...this.tableData, ...programList.data];
         this.load = false;
       });
     },
@@ -342,7 +343,7 @@ export default {
     sortFun(column) {
       direction = column.order ? config.order[column.order] : "DESC";
       type = column.prop ? column.prop.toUpperCase() : "WATCHRATE";
-      this.changePage(1);
+      this.changePage(0);
     },
     exportfun() {
       let xhttp,

+ 8 - 7
src/views/BoutiqueColumn/views/urbanExpressNews.vue

@@ -68,7 +68,7 @@
       style="margin: 5px auto;display: block"
       v-if="total > tableData.length"
       :loading="load"
-      @click="changePage"
+      @click="()=>changePage(current)"
       size="mini"
     >
       {{ load ? "加载中..." : "加载更多" }}
@@ -127,10 +127,9 @@ export default {
   },
   computed: {},
   methods: {
-    changePage() {
-      //   this.current = newPage;
-      if (this.load || this.total <= this.current*this.size) return;
-      this.current++;
+    changePage(num) {
+      if (this.load || this.total <= num * this.size) return;
+      this.current = ++num;
       this.load = true;
       const p = {
         programId: this.item.id,
@@ -141,7 +140,9 @@ export default {
       direction && (p.order = direction);
       epgResult(p).then(programList => {
         this.total = programList.total;
-        this.tableData = [...this.tableData, ...programList.data];
+        if (num === 1) {
+            this.tableData =programList.data;
+        } else this.tableData = [...this.tableData, ...programList.data];
         this.load = false;
       });
     },
@@ -342,7 +343,7 @@ export default {
     sortFun(column) {
       direction = column.order ? config.order[column.order] : "DESC";
       type = column.prop ? column.prop.toUpperCase() : "WATCHRATE";
-      this.changePage(1);
+      this.changePage(0);
     },
     exportfun() {
       let xhttp,