From bc10b50fefa1f778bc333e905501b63f3b679d90 Mon Sep 17 00:00:00 2001 From: zsk <710162063@qq.com> Date: Thu, 15 May 2025 17:03:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=91=E9=81=93=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base.js | 7 ++ src/utils/request.js | 14 +-- src/views/homePage/channel.vue | 260 ++++++++++++++++++++--------------------- src/views/homePage/index.vue | 3 + 4 files changed, 141 insertions(+), 143 deletions(-) diff --git a/src/api/base.js b/src/api/base.js index a7694fb..978d992 100644 --- a/src/api/base.js +++ b/src/api/base.js @@ -11,6 +11,13 @@ export function uploadImage(data) { method: "get", }); } +// 图片上传 改个名字 +export function getOssPolicy(data) { + return request({ + url: "/oss/policy", + method: "get", + }); +} // 检查token信息 export function checkTokenApi(data) { diff --git a/src/utils/request.js b/src/utils/request.js index fcf75ae..73f996d 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -8,15 +8,15 @@ import { } from 'ant-design-vue'; import commonJS from './common.js'; const router = useRouter() -// const baseURL = "https://admin.ibocai.com.cn/api_prod"; // 正式环境线上 -const baseURL = "http://192.168.3.83:8003"; // 正式环境线上 +const baseURL = "https://admin.ibocai.com.cn/api_prod"; // 正式环境线上 +// const baseURL = "http://192.168.3.83:8003"; // 正式环境线上 // const baseURL2 = "https://a.matripe.com.cn/api_stock"; // 正式环境线上 -let protocol = location.protocol -let trueUrl = protocol == 'http:' ? baseURL : baseURL2 -console.log(protocol); +// let protocol = location.protocol +// let trueUrl = protocol == 'http:' ? baseURL : baseURL2 +// console.log(protocol); axios.defaults.withCredentials = true; //添加这行代码 const service = axios.create({ - baseURL: trueUrl, // baseURL: "/api", // url = base url + request url 正式 + baseURL: baseURL, // baseURL: "/api", // url = base url + request url 正式 withCredentials: true, // send cookies when cross-domain requests timeout: 60000, // request timeout crossDomain: true, @@ -100,5 +100,5 @@ service.interceptors.response.use( console.log(error); } ); -service.userCustom = trueUrl +// service.userCustom = trueUrl export default service; diff --git a/src/views/homePage/channel.vue b/src/views/homePage/channel.vue index d3bef98..4eea06c 100644 --- a/src/views/homePage/channel.vue +++ b/src/views/homePage/channel.vue @@ -68,7 +68,7 @@
-
+ +
+
+ Banner +
+
+ +
上传图片
+
+
-
资源选择
+
资源选择
/ 上传图片
@@ -283,12 +293,12 @@