From c58aff5b2a349c6b1fc8a4a3f474f7f8cc529e09 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期五, 12 七月 2024 14:05:58 +0800
Subject: [PATCH] update 花农端首次上架

---
 mixin/mixin.js |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/mixin/mixin.js b/mixin/mixin.js
index 7459a6f..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 || {}
@@ -255,13 +255,21 @@
 			}
 			return true
 		},
-		async getList() {
+		async refreshList(){
+			this.page.current = 1
+			await this.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
 					}
@@ -288,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