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 | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mixin/mixin.js b/mixin/mixin.js index e3db599..0435a8b 100644 --- a/mixin/mixin.js +++ b/mixin/mixin.js @@ -13,7 +13,7 @@ return state.hasLogin || false }, selftype: state => { - return state.type || '' + return (state.currentInfo || {}).type || '' }, currentInfo: state => { return state.currentInfo || {} @@ -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