From d93ed5c5aadcf3d49f824339c26ebfac911be06d Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 07 十一月 2025 14:39:38 +0800
Subject: [PATCH] 测试完成
---
src/views/knowledge/education/compilequer/index.vue | 38 +++++++++++++++++++++++++++++---------
1 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue
index 7a7e4c9..f5c3f3f 100644
--- a/src/views/knowledge/education/compilequer/index.vue
+++ b/src/views/knowledge/education/compilequer/index.vue
@@ -357,7 +357,7 @@
// 缂栬緫鍣ㄦā寮�
mode: "default",
-fileList:[],
+ fileList: [],
// 宸ュ叿鏍忛厤缃�
toolbarConfig: {
excludeKeys: [
@@ -400,9 +400,13 @@
if (response.data && response.data.url) {
let imgUrl = response.data.url;
+ // imgUrl = imgUrl.replace(
+ // "http://218.108.11.22:8093/profile-api/upload",
+ // "http://192.88.117.236:8090/prod-api/profile/upload"
+ // );
imgUrl = imgUrl.replace(
- "http://218.108.11.22:8093/profile-api/upload",
- "http://192.168.191.181:8095/profile/upload"
+ "http://m.zjtongde.com:13871/prod-api/profile/upload",
+ "http://192.88.117.236:8090/prod-api/profile/upload"
);
insertFn(imgUrl);
}
@@ -480,11 +484,13 @@
options: [],
optionstag: [],
// 鍐呯綉鐨勯儴鍒嗭紙鏂囦欢锛�
- oldPattern: "http://192.168.191.181:8095/profile/upload",
+ // oldPattern: "http://192.168.191.181:8095/profile/upload",
+ oldPattern: "http://192.88.117.236:8090/prod-api/profile/upload",
// 鍐呯綉鐨勯儴鍒嗭紙鏂囦欢锛�
- oldPatternhtml: "/http:\/\/192\.168\.191\.181:8095\/profile\/upload\//g",
+ oldPatternhtml: "/http:\/\/192\.88\.117\.236:8095\/profile\/upload\//g",
// 澶栫綉閮ㄥ垎锛堟枃浠讹級
- newPattern: "http://218.108.11.22:8093/profile-api/upload",
+ // newPattern: "http://218.108.11.22:8093/profile-api/upload",銆併�佹柊鍗�
+ newPattern: "http://m.zjtongde.com:13871/prod-api/profile/upload",
xjxsoptions: [
{
@@ -630,7 +636,7 @@
// ------------------
// let html =
- // '<p>娴嬭瘯</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.168.191.181:8095/profile/upload/vadio/钀ュ吇娉典粙缁�.mp4"></video><p>娴嬭瘯111</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.168.191.181:8095/profile/upload/vadio/娉ㄥ皠鍣ㄦ帹娉�.mp4"></video><p><br></p>';
+ // '<p>娴嬭瘯</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.88.117.236:8090/prod-api/profile/upload/vadio/钀ュ吇娉典粙缁�.mp4"></video><p>娴嬭瘯111</p><video class="ql-video" controls="controls" controlslist="nofullscreen" type="video/mp4" style="object-fit:fill;width: 100%;" preload="auto" playsinline="true" x-webkit-airplay="allow" x5-video-orientation="portraint" x5-playsinline="true" x5-video-player-fullscreen="true" src="http://192.88.117.236:8090/prod-api/profile/upload/vadio/娉ㄥ皠鍣ㄦ帹娉�.mp4"></video><p><br></p>';
// // html = html.parserdom(this.oldPattern, this.newPattern);
// html = this.parserdom(html);
// console.log(html, "html");
@@ -645,17 +651,27 @@
var doc = parser.parseFromString(html, "text/html");
// 瀹氫箟瑕佹浛鎹㈢殑鏂版棫URL
- var oldUrlBase = "http://192.168.191.181:8095/profile/upload";
- var newUrlBase = "http://218.108.11.22:8093/profile-api/upload";
+ var oldUrlBase = this.oldPattern;
+ // var newUrlBase = "http://218.108.11.22:8093/profile-api/upload";
+ var newUrlBase = this.newPattern;
// 鑾峰彇鎵�鏈夌殑video鍏冪礌
var videos = doc.querySelectorAll("video");
+ var images = doc.querySelectorAll("img");
// 閬嶅巻鎵�鏈夌殑video鍏冪礌骞舵浛鎹rc灞炴��
videos.forEach(function (video) {
var src = video.getAttribute("src");
if (src.startsWith(oldUrlBase)) {
video.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
+ }
+ });
+ console.log(images,'images');
+
+ images.forEach(function (img) {
+ var src = img.getAttribute("src");
+ if (src.startsWith(oldUrlBase)) {
+ img.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
}
});
@@ -685,6 +701,10 @@
fileName: this.generateRandomHtmlFilename(),
}).then((res) => {
this.ruleForm.richText = res.msg;
+ this.ruleForm.richText = res.msg.replace(
+ this.oldPattern,
+ this.newPattern
+ );
console.log(this.ruleForm.richText, "this.ruleForm.richText");
// 澶勭悊鍐呯綉html
addrichText({
--
Gitblit v1.9.3