feat: 修改两处海报logo-text图片、修改创建球局后跳转详情页打开分享弹窗位置、修改分享二维码接口取值、修改ntrp修改弹窗的初始值、增加复制链接功能

This commit is contained in:
2026-02-07 17:37:07 +08:00
parent 42025d49f8
commit ff864fe64d
10 changed files with 194 additions and 168 deletions

View File

@@ -87,7 +87,7 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
gameType: play_type,
skillLevel: `NTRP ${genNTRPRequirementText(
skill_level_min,
skill_level_max
skill_level_max,
)}`,
gameDate: `${startTime.format("M月D日")} (${dayofWeek})`,
gameTime: `${startTime.format("ah")}${gameLength}`,
@@ -133,9 +133,10 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
page: "game_pages/detail/index",
scene: `id=${id}`,
});
const qrCodeUrl = await base64ToTempFilePath(
qrCodeUrlRes.data.qr_code_base64
);
// const qrCodeUrl = await base64ToTempFilePath(
// qrCodeUrlRes.data.qr_code_base64
// );
const qrCodeUrl = qrCodeUrlRes.data.ossPath;
await delay(100);
// Taro.showLoading({ title: "生成中..." });
const url = await generatePosterImage({
@@ -165,6 +166,18 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
setVisible(false);
}
async function handleCopyLink() {
const linkUrlRes = await DetailService.getLinkUrl({
path: "game_pages/detail/index",
query: `id=${id}`,
});
await Taro.setClipboardData({
data: linkUrlRes.data.url_link,
});
Taro.showToast({ title: "链接已复制到剪贴板", icon: "success" });
setVisible(false);
}
function onClose() {
setVisible(false);
setPublishFlag(false);
@@ -201,7 +214,7 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
catchMove
className={classnames(
styles.title,
publishFlag ? styles.publishTitle : ""
publishFlag ? styles.publishTitle : "",
)}
>
{publishFlag ? (
@@ -255,7 +268,7 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
</View>
</View>
<View className={styles.customBtnWrapper}>
<Button className={styles.button}>
<Button className={styles.button} onClick={handleCopyLink}>
<View className={styles.icon}>
<Image className={styles.linkIcon} src={LinkIcon} />
</View>