From 28d72db591108c700e917253935dcc3bf538dca9 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期四, 11 七月 2024 17:30:37 +0800 Subject: [PATCH] ok商品的分类、列表,todo详情 --- mixin/mixin.js | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mixin/mixin.js b/mixin/mixin.js index 5551356..0435a8b 100644 --- a/mixin/mixin.js +++ b/mixin/mixin.js @@ -259,13 +259,17 @@ this.page.current = 1 await this.getList() }, - async getList() { + async getList(type='get') { if (this.listApi) { this.$message.showLoading() const { data - } = await this.$http.request('get', this.listApi, { + } = await this.$http.request(type, this.listApi, { params: { + ...this.query, + ...this.page + }, + data:{ ...this.query, ...this.page } @@ -292,10 +296,10 @@ } }, - async getMore() { + async getMore(type='get') { if (this.page.total > this.page.current * this.page.size) { this.page.current += 1 - await this.getList() + await this.getList(type) } }, backHome() { -- Gitblit v1.9.3