Просмотр исходного кода

供货商后台-花材列表-分页

jf 5 лет назад
Родитель
Сommit
742664413c
1 измененных файлов с 2 добавлено и 23 удалено
  1. 2 23
      ghs/src/views/item/list.vue

+ 2 - 23
ghs/src/views/item/list.vue

@@ -308,7 +308,6 @@ export default {
     addFn () {
       this.showItemModal = true
     },
-    uploadSuccess() {},
     selClassFn(val) {
 			let index = this.itemClassList.findIndex((e) => e.name == val);
 			this.replaceForm.classId = this.itemClassList[index].id;
@@ -329,29 +328,8 @@ export default {
       this.app.refresh({ classId: this.classId });
     },
     onLoad ({ ctx, app }) {
-
-      if (this.$route.query.classId) {
-        this.classId = Number(this.$route.query.classId)
-        this.className = this.$route.query.className
-        this.tabsData[0].text = this.className
-      }
-
       this.app = app
-
-      let getItem = () => {
-        return this.$service.product.list({ classId: this.classId, showPage: 1}).then(res => {
-          return {
-            ...res,
-            pagination: {
-              totalPage: res.totalPage,
-              total: parseInt(res.totalNum),
-            }
-			    };
-		    });
-      }
-      ctx.service({
-        page: getItem
-      })
+      ctx.service(this.$service.product)
         .set('table', {
           columns: [
             {
@@ -455,6 +433,7 @@ export default {
         ])
         .done();
       app.refresh({ classId: this.classId });
+      app.refresh({ showPage: 1 });
     },
     uploadSuccess() {
 			console.log(this.$refs['replaceForm'].validateField('cover'))