From d1bb68d9f9054bbf87cd84956d3240c71d8e370c Mon Sep 17 00:00:00 2001
From: xuxy <1059738716@qq.com>
Date: 星期二, 25 六月 2024 16:55:44 +0800
Subject: [PATCH] update 商品管理和花农的

---
 plugins/http.js |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/plugins/http.js b/plugins/http.js
index 58e3162..7d532e9 100644
--- a/plugins/http.js
+++ b/plugins/http.js
@@ -191,7 +191,7 @@
 		let header = {
 			Authorization: token ? `Bearer ${token}` : null,
 		}
-		var url = environments.httpBaseUri + '/wxkj/upload/file'
+		var url = environments.httpBaseUri + '/api/upload/file'
 		if (environments.type == 'prod') {
 			//需要拼接
 			var year = utils.toYear(new Date())
@@ -210,11 +210,12 @@
 				filePath: filePath,
 				name: 'file',
 				success: (res) => {
-					console.log('res', res)
+					console.log('res debug', res)
 					message.hideLoading()
 					if (res.statusCode === 200) {
 						const obj = JSON.parse(res.data)
-						if (obj.code.startsWith('200')) {
+						console.log('res debug2', obj)
+						if (obj.code.startsWith('200')||obj.code==='0') {
 							resolve({
 								data: obj.data,
 								code: 0,
@@ -257,6 +258,7 @@
 		try {
 			return await http.uploadTemp(filePath, dto)
 		} catch (e) {
+			console.log('error',e)
 			return e
 		}
 	},

--
Gitblit v1.9.3