2222
This commit is contained in:
+14
-15
@@ -402,11 +402,11 @@ const _sfc_main = {
|
||||
let imgHeight, imgWidth;
|
||||
let font = "";
|
||||
let fontColor = "#fff";
|
||||
let strokeWidth = 5;
|
||||
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 pages/detail/detail.vue:1051", imageRes);
|
||||
canvas.width = imageRes.width;
|
||||
@@ -418,8 +418,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 pages/detail/detail.vue:1069", "randomNumber:" + randomNumber);
|
||||
switch (randomNumber) {
|
||||
@@ -427,8 +427,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);
|
||||
@@ -456,16 +455,16 @@ const _sfc_main = {
|
||||
ctx.save();
|
||||
break;
|
||||
case 3:
|
||||
let rb_x = imgWidth - 276 - 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 pages/detail/detail.vue:1117", 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 pages/detail/detail.vue:1124", "rb_x");
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1125", rb_x);
|
||||
ctx.strokeText(maskText, rb_x, rb_y);
|
||||
ctx.fillText(maskText, rb_x, rb_y);
|
||||
break;
|
||||
}
|
||||
@@ -475,7 +474,7 @@ const _sfc_main = {
|
||||
resolve(res2.tempFilePath);
|
||||
},
|
||||
fail: function(res2) {
|
||||
common_vendor.index.__f__("error", "at pages/detail/detail.vue:1145", res2);
|
||||
common_vendor.index.__f__("error", "at pages/detail/detail.vue:1147", res2);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -485,7 +484,7 @@ const _sfc_main = {
|
||||
});
|
||||
};
|
||||
const readImages = async (localIds) => {
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1243", localIds);
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1245", localIds);
|
||||
let promiseFun = [];
|
||||
for (var i = 0; i < localIds.length; i++) {
|
||||
let img = null;
|
||||
@@ -525,12 +524,12 @@ const _sfc_main = {
|
||||
success(res) {
|
||||
if (res.statusCode === 204) {
|
||||
let url = host + "/" + dir + filename + imgType;
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1345", url);
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1347", url);
|
||||
imgList.value = [url];
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1350", err);
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1352", err);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -539,8 +538,8 @@ const _sfc_main = {
|
||||
};
|
||||
const handleUpload = (file) => {
|
||||
let File2 = file.file;
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1359", 111);
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1360", File2);
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1361", 111);
|
||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1362", File2);
|
||||
readImages(File2);
|
||||
};
|
||||
const generateRandomNumber = () => {
|
||||
|
||||
Reference in New Issue
Block a user