Browse Source

fix: 修改bug

wuguojie 11 months ago
parent
commit
62b59e1ccc
1 changed files with 14 additions and 9 deletions
  1. 14 9
      src/views/commodityCenter/commodityManage/list.vue

+ 14 - 9
src/views/commodityCenter/commodityManage/list.vue

@@ -56,8 +56,6 @@ export default {
       queryform: {
         productName: "",//商品名称
         productStatus: "",//上架状态
-        pageNum: 1,
-        pageSize: 10,
       },//页面检索对象
       form: {},//提交表单
       rules: {
@@ -72,7 +70,10 @@ export default {
       },
 
       Result: {
-
+          rows: [],
+          total: 100,
+          pageNum: 1,
+          pageSize: 10,
       },
       Columns: [
         { prop: "productName", label: "商品名称", minWidth: 180, },
@@ -126,14 +127,18 @@ export default {
         this.$message.success('复制成功!')
       }
     },
-    async findPage(data) {
-      if (data && data.pageRequest) {
-        this.queryform.pageNum = data.pageRequest.pageNum;
-        this.queryform.pageSize = data.pageRequest.pageSize;
-      }
+    async findPage() {
+      // if (data && data.pageRequest) {
+      //   this.queryform.pageNum = data.pageRequest.pageNum;
+      //   this.queryform.pageSize = data.pageRequest.pageSize;
+      // }
       try {
         const res = await axios.get('https://test.baoxianzhanggui.com/locallive-java/customer/product/getPageProductList', {
-          params: this.queryform,
+          params: {
+              ...this.queryform,
+              pageNum: this.Result.pageNum,
+              pageSize: this.Result.pageSize
+          }
         });
         this.Result = {
           rows: res.data.rows,