feat: 更新作业纸 footer

This commit is contained in:
R524809
2026-10-26 18:29:47 +08:00
parent 98dc338848
commit 49467c1e3d
7 changed files with 124 additions and 15 deletions
@@ -174,7 +174,11 @@ export default class PaperDrawService extends BaseDrawService {
ctx.globalAlpha = 0.35;
ctx.textAlign = 'center';
ctx.textBaseline = 'bottom';
ctx.fillText('涂鸦丫小程序', canvasWidth / 2, canvasHeight - 16);
ctx.fillText(
'© 涂鸦丫小程序 | 原创出品',
canvasWidth / 2,
canvasHeight - 16,
);
ctx.restore();
}
@@ -106,12 +106,19 @@ createPage(
// 草稿在公开详情中固定为 404;开发版使用本地注册配置,不通过失败请求判断预览权限。
if (!this.data.isDevEnv) {
const remote = await getWorksheet(entry.id);
if (
entry.id !== PAPER_SHEET_WORKSHEET_ID &&
(remote.rendering?.rendererKey !== entry.rendererKey ||
remote.rendering?.paperType !== paperType)
) {
throw new Error('作业纸配置暂不可用,请更新小程序');
if (entry.id !== PAPER_SHEET_WORKSHEET_ID) {
// 旧服务端可能未下发 rendering。仅对本地已注册 ID、且公开路由一致的条目使用固定配置。
// 显式下发的配置仍须匹配;404、网络异常及未知条目不进入此兼容分支。
const matches =
remote.rendering === undefined
? remote.path ===
getPublishMetaByMode(entry.id)?.path
: remote.rendering?.rendererKey ===
entry.rendererKey &&
remote.rendering?.paperType === paperType;
if (!matches) {
throw new Error('作业纸配置异常,请稍后重试');
}
}
}
if (request !== this._entryRequest) return;