fix: make audit

This commit is contained in:
zzc
2026-02-03 09:47:25 +08:00
parent b6091de037
commit b2e41c9a7b
3 changed files with 48 additions and 4 deletions

View File

@@ -197,7 +197,6 @@
<!-- 文字编辑 -->
<view v-if="activeTool === 'text'" class="section text-edit-section">
<!-- 祝贺对象 -->
<view class="form-item">
<text class="label">祝福对象</text>
<input
@@ -206,6 +205,7 @@
placeholder="请输入称呼"
placeholder-style="color:#ccc"
maxlength="10"
@blur="handleTargetNameBlur"
/>
</view>
@@ -251,6 +251,7 @@
placeholder="请输入署名"
placeholder-style="color:#ccc"
maxlength="5"
@blur="handleSignatureBlur"
/>
<text class="edit-icon"></text>
</view>
@@ -405,7 +406,12 @@ import {
getCardTemplateContentList,
getCardTemplateTitleList,
} from "@/api/make";
import { createShareToken, abilityCheck, getShareReward } from "@/api/system";
import {
createShareToken,
abilityCheck,
getShareReward,
msgCheckApi,
} from "@/api/system";
import {
onShareAppMessage,
onLoad,
@@ -546,7 +552,38 @@ const handleTitleTouchMove = (e) => {
};
const targetName = ref("祝您");
const oldTargetName = ref("祝您");
const signatureName = ref(userStore?.userInfo?.nickName || "xxx");
const oldSignatureName = ref(userStore?.userInfo?.nickName || "xxx");
const handleTargetNameBlur = async () => {
if (!targetName.value || targetName.value === oldTargetName.value) return;
const res = await msgCheckApi(targetName.value);
if (!res.success) {
uni.showToast({
title: res.message || "消息不符合发布规范,请稍作修改后再试",
icon: "none",
});
targetName.value = oldTargetName.value;
} else {
oldTargetName.value = targetName.value;
}
};
const handleSignatureBlur = async () => {
if (!signatureName.value || signatureName.value === oldSignatureName.value)
return;
const res = await msgCheckApi(signatureName.value);
if (!res.success) {
uni.showToast({
title: res.message || "消息不符合发布规范,请稍作修改后再试",
icon: "none",
});
signatureName.value = oldSignatureName.value;
} else {
oldSignatureName.value = signatureName.value;
}
};
const userAvatar = ref(
userStore?.userInfo?.avatarUrl ||
"https://file.lihailezzc.com/resource/96023631c6ab9c3496b7620097af3d6f.png",