feat: 修改两处海报logo-text图片、修改创建球局后跳转详情页打开分享弹窗位置、修改分享二维码接口取值、修改ntrp修改弹窗的初始值、增加复制链接功能
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -81,9 +81,9 @@ function Index() {
|
||||
// 位置更新后,重新获取详情页数据(因为距离等信息可能发生变化)
|
||||
// 注意:这里不调用 fetchDetail,避免与 useDidShow 中的调用重复
|
||||
// 如果需要更新距离信息,可以在 fetchDetail 成功后根据当前位置重新计算
|
||||
if (from === "publish") {
|
||||
handleShare(true);
|
||||
}
|
||||
// if (from === "publish") {
|
||||
// handleShare(true);
|
||||
// }
|
||||
} catch (error) {
|
||||
console.error("用户位置更新失败", error);
|
||||
}
|
||||
@@ -105,6 +105,10 @@ function Index() {
|
||||
fetchUserInfoById(res.data.publisher_id);
|
||||
}
|
||||
|
||||
if (from === "publish") {
|
||||
handleShare(true);
|
||||
}
|
||||
|
||||
// Taro.hideLoading();
|
||||
};
|
||||
|
||||
@@ -161,7 +165,7 @@ function Index() {
|
||||
navto(
|
||||
userId === myInfo.id
|
||||
? "/user_pages/myself/index"
|
||||
: `/user_pages/other/index?userid=${userId}`
|
||||
: `/user_pages/other/index?userid=${userId}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -195,7 +199,7 @@ function Index() {
|
||||
<View
|
||||
className={classnames(
|
||||
styles["custom-navbar"],
|
||||
glass ? styles.glass : ""
|
||||
glass ? styles.glass : "",
|
||||
)}
|
||||
style={{
|
||||
height: `${totalHeight}px`,
|
||||
|
||||
@@ -5,7 +5,7 @@ import Taro, { useRouter } from "@tarojs/taro";
|
||||
import classnames from "classnames";
|
||||
import dayjs from "dayjs";
|
||||
import "dayjs/locale/zh-cn";
|
||||
import { generatePosterImage, base64ToTempFilePath, delay } from "@/utils";
|
||||
import { generatePosterImage, delay } from "@/utils";
|
||||
import { withAuth } from "@/components";
|
||||
import GeneralNavbar from "@/components/GeneralNavbar";
|
||||
import DetailService from "@/services/detailService";
|
||||
@@ -59,10 +59,11 @@ function SharePoster(props) {
|
||||
page: "game_pages/detail/index",
|
||||
scene: `id=${id}`,
|
||||
});
|
||||
const qrCodeUrl = await base64ToTempFilePath(
|
||||
qrCodeUrlRes.data.qr_code_base64
|
||||
);
|
||||
debugger
|
||||
const qrCodeUrl = qrCodeUrlRes.data.ossPath;
|
||||
// const qrCodeUrl = await base64ToTempFilePath(
|
||||
// qrCodeUrlRes.data.qr_code_base64
|
||||
// );
|
||||
// debugger
|
||||
await delay(100);
|
||||
const url = await generatePosterImage({
|
||||
playType: play_type,
|
||||
|
||||
Reference in New Issue
Block a user