This commit is contained in:
zoujiandong
2025-08-03 17:46:42 +08:00
parent 6e320c3944
commit e5979f605e
24 changed files with 162 additions and 101 deletions
@@ -25,11 +25,16 @@ const _sfc_main = {
const useImg = common_vendor.ref("");
const goBack = () => {
common_vendor.index.navigateBack({
delta: 1
delta: 1,
fail() {
common_vendor.index.redirectTo({
url: "/pages/index/index"
});
}
});
};
const goHome = () => {
common_vendor.index.__f__("log", "at components/backDetailNav/backDetailNav.vue:62", props.navName);
common_vendor.index.__f__("log", "at components/backDetailNav/backDetailNav.vue:67", props.navName);
if (props.navName == "肝胆相照病例交流园地") {
common_vendor.index.reLaunch({
url: "/pages/caseTalk/caseTalk"
@@ -22,7 +22,12 @@ const _sfc_main = {
setup(__props) {
const goBack = () => {
common_vendor.index.navigateBack({
delta: 1
delta: 1,
fail() {
common_vendor.index.redirectTo({
url: "/pages/index/index"
});
}
});
};
return (_ctx, _cache) => {
+6 -1
View File
@@ -19,7 +19,12 @@ const _sfc_main = {
setup(__props) {
const goBack = () => {
common_vendor.index.navigateBack({
delta: 1
delta: 1,
fail() {
common_vendor.index.redirectTo({
url: "/pages/index/index"
});
}
});
};
return (_ctx, _cache) => {
@@ -64,7 +64,12 @@ const _sfc_main = {
};
const goBack = () => {
common_vendor.index.navigateBack({
delta: 1
delta: 1,
fail() {
common_vendor.index.redirectTo({
url: "/pages/index/index"
});
}
});
};
common_vendor.onLoad(() => {
+21 -21
View File
@@ -172,11 +172,11 @@ const _sfc_main = {
let imgHeight, imgWidth;
let font = "";
let fontColor = "#fff";
let strokeWidth = 3;
let strokeWidth = 10;
common_vendor.index.getImageInfo({
src: base64,
success: (imageRes) => {
let scale = 28;
let scale = imageRes.width / 800 * 30 > 12 ? imageRes.width / 800 * 30 : 12;
font = scale + "px Arial";
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:360", imageRes);
canvas.width = imageRes.width;
@@ -188,8 +188,8 @@ const _sfc_main = {
image.src = base64;
image.onload = () => {
ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
let posXmargin = 10;
let posYmargin = 10;
let posXmargin = 20;
let posYmargin = 20;
let randomNumber = 3;
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:378", "randomNumber:" + randomNumber);
switch (randomNumber) {
@@ -197,8 +197,7 @@ const _sfc_main = {
let lt_x = posXmargin;
let lt_y = posYmargin + textHeight;
ctx.font = font;
ctx.fillStyle = fontColor;
ctx.storkStyle = "black";
ctx.storkStyle = "#000";
ctx.strokeWidth = strokeWidth;
ctx.fillStyle = "#fff";
ctx.fillText(maskText, lt_x, lt_y);
@@ -218,7 +217,7 @@ const _sfc_main = {
let rt_y = posYmargin + textHeight * 2;
ctx.font = font;
ctx.fillStyle = fontColor;
ctx.strokeStyle = "black";
ctx.strokeStyle = "#000";
ctx.strokeWidth = strokeWidth;
ctx.fillStyle = "#fff";
ctx.fillText(maskText, rt_x, rt_y);
@@ -226,14 +225,16 @@ const _sfc_main = {
ctx.save();
break;
case 3:
let rb_x = imgWidth - textWidth * 6 - posXmargin <= 0 ? 10 : imgWidth - 276 - posXmargin;
let rb_x = imgWidth - scale * 10 - posXmargin <= 0 ? 10 : imgWidth - scale * 10 - posXmargin;
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:426", rb_x);
let rb_y = imgHeight - posYmargin;
ctx.font = font;
ctx.fillStyle = fontColor;
ctx.strokeStyle = "black";
ctx.strokeWidth = strokeWidth;
ctx.strokeStyle = "#000";
ctx.fillStyle = "#fff";
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:433", "rb_x");
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:434", rb_x);
ctx.strokeText(maskText, rb_x, rb_y);
ctx.fillText(maskText, rb_x, rb_y);
break;
}
@@ -243,7 +244,7 @@ const _sfc_main = {
resolve(res2.tempFilePath);
},
fail: function(res2) {
common_vendor.index.__f__("error", "at components/pEditor/pEditor.vue:452", res2);
common_vendor.index.__f__("error", "at components/pEditor/pEditor.vue:456", res2);
}
});
};
@@ -257,7 +258,7 @@ const _sfc_main = {
return randomNumber;
};
const getImageFormat = (imageUrl) => {
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:544", imageUrl);
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:549", imageUrl);
const lastDotIndex = imageUrl.lastIndexOf(".");
if (lastDotIndex !== -1) {
return imageUrl.substring(lastDotIndex + 1);
@@ -294,7 +295,7 @@ const _sfc_main = {
}
},
fail: (err) => {
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:584", err);
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:589", err);
}
});
});
@@ -306,7 +307,7 @@ const _sfc_main = {
title: "正在上传图片...",
mask: true
});
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:597", localIds);
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:602", localIds);
let promiseFun = [];
for (var i = 0; i < localIds.length; i++) {
let img = null;
@@ -315,8 +316,7 @@ const _sfc_main = {
}
Promise.all(promiseFun).then((res) => {
common_vendor.index.showToast({
duration: 1e3,
message: "上传成功",
title: "上传成功",
icon: "none"
});
});
@@ -378,7 +378,7 @@ const _sfc_main = {
}
},
fail: (err) => {
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:678", err);
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:682", err);
}
});
});
@@ -401,7 +401,7 @@ const _sfc_main = {
//从相册选择
extension: [".mp4", ".webm", ".ogg"],
success: function(res) {
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:700", res.tempFilePath);
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:704", res.tempFilePath);
HandleAddVideo(res.tempFilePath);
}
});
@@ -413,12 +413,12 @@ const _sfc_main = {
showTitle.value = true;
};
const alertTitle = () => {
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:714", "qqqqqq");
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:718", "qqqqqq");
showTitle.value = true;
};
const initData = (data) => {
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:718", "init");
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:719", data);
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:722", "init");
common_vendor.index.__f__("log", "at components/pEditor/pEditor.vue:723", data);
htmlContent.value = data;
};
__expose({ initData });