Эх сурвалжийг харах

解决 upload 回调路径错误问题

icssoa 4 жил өмнө
parent
commit
5de3c2ccdd

+ 1 - 1
src/cool/modules/base/pages/login/index.vue

@@ -122,7 +122,7 @@ export default {
 	height: 100vh;
 	height: 100vh;
 	width: 100vw;
 	width: 100vw;
 	position: relative;
 	position: relative;
-	background-color: $color-primary;
+	background-color: #2f3447;
 
 
 	.box {
 	.box {
 		display: flex;
 		display: flex;

+ 2 - 2
src/cool/modules/demo/views/demo.vue

@@ -158,7 +158,7 @@ export default {
 			font-size: 12px;
 			font-size: 12px;
 
 
 			span {
 			span {
-				background-color: $color-primary;
+				background-color: #2f3447;
 				color: #fff;
 				color: #fff;
 				border-radius: 3px;
 				border-radius: 3px;
 				padding: 2px 5px;
 				padding: 2px 5px;
@@ -190,7 +190,7 @@ export default {
 						position: absolute;
 						position: absolute;
 						bottom: -2px;
 						bottom: -2px;
 						left: 0;
 						left: 0;
-						background-color: $color-primary;
+						background-color: #2f3447;
 					}
 					}
 				}
 				}
 			}
 			}

+ 1 - 1
src/cool/modules/task/views/task.vue

@@ -925,7 +925,7 @@ export default {
 						.date {
 						.date {
 							font-size: 12px;
 							font-size: 12px;
 							color: #fff;
 							color: #fff;
-							background-color: $color-primary;
+							background-color: #2f3447;
 							border-radius: 2px;
 							border-radius: 2px;
 							margin-left: 40px;
 							margin-left: 40px;
 							padding: 1px 3px;
 							padding: 1px 3px;

+ 4 - 4
src/cool/modules/upload/components/index.vue

@@ -447,7 +447,7 @@ export default {
 						// 上传
 						// 上传
 						this.$service.common
 						this.$service.common
 							.request({
 							.request({
-								url: res.host,
+								url: res._host || res.host,
 								method: "POST",
 								method: "POST",
 								headers: {
 								headers: {
 									"Content-Type": "multipart/form-data"
 									"Content-Type": "multipart/form-data"
@@ -460,9 +460,9 @@ export default {
 									}
 									}
 								}
 								}
 							})
 							})
-							.then(res => {
+							.then(url => {
 								if (mode === "local") {
 								if (mode === "local") {
-									resolve(res);
+									resolve(url);
 								} else {
 								} else {
 									resolve(`${res.host}/app/${fileName}`);
 									resolve(`${res.host}/app/${fileName}`);
 								}
 								}
@@ -481,7 +481,7 @@ export default {
 							.upload()
 							.upload()
 							.then(res => {
 							.then(res => {
 								if (isDev) {
 								if (isDev) {
-									res.host = "@/oss-upload";
+									res._host = "@/oss-upload";
 								}
 								}
 
 
 								next(res);
 								next(res);