细节修改

This commit is contained in:
kron
2025-11-17 15:49:53 +08:00
parent 77f0460dd3
commit 115f270ed1
3 changed files with 11 additions and 17 deletions

View File

@@ -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 borderColor = "#ffffff";
const borderWidth = 1;
@@ -114,7 +114,7 @@ function drawRingCircle(ctx, x, y, text, diameter = 12) {
ctx.strokeStyle = borderColor;
ctx.stroke();
const fontSize = 9;
const fontSize = 7;
ctx.save();
ctx.translate(cx, cy);
ctx.textAlign = "center";
@@ -328,7 +328,7 @@ export const generateShareImage = async (canvasId, data) => {
renderText(ctx, arrowData.tenRings, 15, "#000", 262, 133);
renderText(ctx, "平均环数", 13, "#999", 25, 175);
renderText(ctx, "总数", 13, "#999", 145, 175);
renderText(ctx, "总数", 13, "#999", 145, 175);
renderText(
ctx,
Number(arrowData.averageRing.toFixed(2)),
@@ -356,8 +356,8 @@ export const generateShareImage = async (canvasId, data) => {
arrowData.list
.filter((arrow) => arrow?.x && arrow?.y)
.forEach((arrow, index) => {
const px = 375 * 0.08 + 375 * 0.84 * arrow.x;
const py = 250 + 375 * 0.84 * arrow.y;
const px = 375 * 0.08 + (375 * 0.84 + 20) * arrow.x;
const py = 250 + (375 * 0.84 + 20) * arrow.y;
drawRingCircle(ctx, px, py, index + 1);
});
}

View File

@@ -212,7 +212,7 @@ const onClose = () => {
v-if="step === 0"
/>
<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"
mode="widthFix"
v-if="step === 3"

View File

@@ -62,16 +62,10 @@ const onSelect = (index) => {
const goBack = () => {
const pages = getCurrentPages();
if (pages.length > 1) {
const currentPage = pages[pages.length - 2];
uni.navigateBack({
delta: currentPage.route === "pages/point-book" ? 1 : 2,
});
} else {
uni.redirectTo({
url: "/pages/index",
});
}
const lastPage = pages[pages.length - 2];
uni.navigateBack({
delta: lastPage.route === "pages/point-book-edit" ? 2 : 1,
});
};
const ringRates = computed(() => {
@@ -94,7 +88,7 @@ const shareImage = async () => {
onLoad(async (options) => {
if (options.id) {
const result = await getPointBookDetailAPI(options.id || 243);
const result = await getPointBookDetailAPI(options.id || 247);
record.value = result;
const arrowData =
record.value.groups && record.value.groups[0]