细节修改
This commit is contained in:
@@ -85,7 +85,7 @@ const drawRoundImage = async (
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function drawRingCircle(ctx, x, y, text, diameter = 12) {
|
function drawRingCircle(ctx, x, y, text, diameter = 9) {
|
||||||
const fillColor = "#ff4444";
|
const fillColor = "#ff4444";
|
||||||
const borderColor = "#ffffff";
|
const borderColor = "#ffffff";
|
||||||
const borderWidth = 1;
|
const borderWidth = 1;
|
||||||
@@ -114,7 +114,7 @@ function drawRingCircle(ctx, x, y, text, diameter = 12) {
|
|||||||
ctx.strokeStyle = borderColor;
|
ctx.strokeStyle = borderColor;
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
|
|
||||||
const fontSize = 9;
|
const fontSize = 7;
|
||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.translate(cx, cy);
|
ctx.translate(cx, cy);
|
||||||
ctx.textAlign = "center";
|
ctx.textAlign = "center";
|
||||||
@@ -328,7 +328,7 @@ export const generateShareImage = async (canvasId, data) => {
|
|||||||
renderText(ctx, arrowData.tenRings, 15, "#000", 262, 133);
|
renderText(ctx, arrowData.tenRings, 15, "#000", 262, 133);
|
||||||
|
|
||||||
renderText(ctx, "平均环数", 13, "#999", 25, 175);
|
renderText(ctx, "平均环数", 13, "#999", 25, 175);
|
||||||
renderText(ctx, "总换数", 13, "#999", 145, 175);
|
renderText(ctx, "总环数", 13, "#999", 145, 175);
|
||||||
renderText(
|
renderText(
|
||||||
ctx,
|
ctx,
|
||||||
Number(arrowData.averageRing.toFixed(2)),
|
Number(arrowData.averageRing.toFixed(2)),
|
||||||
@@ -356,8 +356,8 @@ export const generateShareImage = async (canvasId, data) => {
|
|||||||
arrowData.list
|
arrowData.list
|
||||||
.filter((arrow) => arrow?.x && arrow?.y)
|
.filter((arrow) => arrow?.x && arrow?.y)
|
||||||
.forEach((arrow, index) => {
|
.forEach((arrow, index) => {
|
||||||
const px = 375 * 0.08 + 375 * 0.84 * arrow.x;
|
const px = 375 * 0.08 + (375 * 0.84 + 20) * arrow.x;
|
||||||
const py = 250 + 375 * 0.84 * arrow.y;
|
const py = 250 + (375 * 0.84 + 20) * arrow.y;
|
||||||
drawRingCircle(ctx, px, py, index + 1);
|
drawRingCircle(ctx, px, py, index + 1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ const onClose = () => {
|
|||||||
v-if="step === 0"
|
v-if="step === 0"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
src="https://static.shelingxingqiu.com/attachment/2025-07-01/db0ehpzl8hfzeswfrf.png"
|
src="https://static.shelingxingqiu.com/attachment/2025-11-17/deas80ef1sf9td0leq.png"
|
||||||
class="try-tip"
|
class="try-tip"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
v-if="step === 3"
|
v-if="step === 3"
|
||||||
|
|||||||
@@ -62,16 +62,10 @@ const onSelect = (index) => {
|
|||||||
|
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
const pages = getCurrentPages();
|
const pages = getCurrentPages();
|
||||||
if (pages.length > 1) {
|
const lastPage = pages[pages.length - 2];
|
||||||
const currentPage = pages[pages.length - 2];
|
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: currentPage.route === "pages/point-book" ? 1 : 2,
|
delta: lastPage.route === "pages/point-book-edit" ? 2 : 1,
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: "/pages/index",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const ringRates = computed(() => {
|
const ringRates = computed(() => {
|
||||||
@@ -94,7 +88,7 @@ const shareImage = async () => {
|
|||||||
|
|
||||||
onLoad(async (options) => {
|
onLoad(async (options) => {
|
||||||
if (options.id) {
|
if (options.id) {
|
||||||
const result = await getPointBookDetailAPI(options.id || 243);
|
const result = await getPointBookDetailAPI(options.id || 247);
|
||||||
record.value = result;
|
record.value = result;
|
||||||
const arrowData =
|
const arrowData =
|
||||||
record.value.groups && record.value.groups[0]
|
record.value.groups && record.value.groups[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user