Merge branch 'master' into feat/liujie

This commit is contained in:
2026-02-07 18:11:15 +08:00
20 changed files with 197 additions and 113 deletions

View File

@@ -2,7 +2,7 @@
"miniprogramRoot": "dist/",
"projectname": "playBallTogether",
"description": "playBallTogether",
"appid": "wx915ecf6c01bea4ec",
"appid": "wx815b533167eb7b53",
"setting": {
"urlCheck": true,

View File

@@ -19,8 +19,7 @@ page {
@font-face {
font-family: "Quicksand";
// 注意:此路径来自 @/config/api.ts 中的 OSS_BASE_URL 配置
// 如需修改,请更新配置文件中的 OSS_BASE_URL
src: url("https://youchang2026.oss-cn-shanghai.aliyuncs.com/front/ball/other/57dc951f-f10e-45b7-9157-0b1e468187fd.ttf") format("truetype");
// 注意:此路径对应 @/config/api.ts 中的 OSS_BASE
src: url("https://bimwe-oss.oss-cn-shanghai.aliyuncs.com/front/ball/other/57dc951f-f10e-45b7-9157-0b1e468187fd.ttf") format("truetype");
font-display: swap;
}

View File

@@ -62,7 +62,7 @@ const NTRPEvaluatePopup = (props: NTRPEvaluatePopupProps, ref) => {
showGuide = false,
} = props;
const [visible, setVisible] = useState(false);
const [ntrp, setNtrp] = useState<string>("");
const [ntrp, setNtrp] = useState<string>("1.5");
const [guideShow, setGuideShow] = useState(() => showGuide);
const { updateUserInfo } = useUserActions();
const userInfo = useUserInfo();

View File

@@ -8,7 +8,7 @@ import {
useLastTestResult,
} from "@/store/userStore";
// import { getCurrentFullPath } from "@/utils";
import { OSS_BASE_URL } from "@/config/api";
import { OSS_BASE } from "@/config/api";
import { StageType } from "@/services/evaluateService";
import { waitForAuthInit } from "@/utils/authInit";
import DocCopy from "@/static/ntrp/ntrp_doc_copy.svg";
@@ -148,7 +148,7 @@ function NTRPTestEntryCard(props: {
<View
className={styles.lines}
style={{
backgroundImage: `url(${OSS_BASE_URL}/images/215f1ce1-be52-4a92-8250-5a4a69e7f2b3.png)`,
backgroundImage: `url(${OSS_BASE}/front/ball/images/215f1ce1-be52-4a92-8250-5a4a69e7f2b3.png)`,
}}
/>
<View className={styles.desc}>
@@ -188,7 +188,7 @@ function NTRPTestEntryCard(props: {
<View
className={styles.lines}
style={{
backgroundImage: `url(${OSS_BASE_URL}/images/215f1ce1-be52-4a92-8250-5a4a69e7f2b3.png)`,
backgroundImage: `url(${OSS_BASE}/front/ball/images/215f1ce1-be52-4a92-8250-5a4a69e7f2b3.png)`,
}}
/>
<View className={styles.desc}>

View File

@@ -3,7 +3,7 @@ import { View, Canvas } from "@tarojs/components";
import { forwardRef, useImperativeHandle } from "react";
import shareLogoSvg from "@/static/ntrp/ntrp_share_logo.png";
import docCopyPng from "@/static/ntrp/ntrp_doc_copy.png";
import { OSS_BASE_URL } from "@/config/api";
import { OSS_BASE } from "@/config/api";
interface RadarChartV2Props {
data: [string, number][];
@@ -233,7 +233,7 @@ const RadarChartV2 = forwardRef<RadarChartV2Ref, RadarChartV2Props>((props, ref)
// 绘制背景 - 使用 share_bg.png 背景图,撑满整个画布(从 OSS 动态加载)
try {
const shareBgUrl = `${OSS_BASE_URL}/images/share_bg.png`;
const shareBgUrl = `${OSS_BASE}/front/ball/images/share_bg.png`;
const bgImg = await loadImage(canvas, shareBgUrl);
ctx.drawImage(bgImg, 0, 0, width, height);
} catch (error) {

View File

@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react'
import { View, Canvas } from '@tarojs/components'
import Taro from '@tarojs/taro'
import { OSS_BASE_URL } from "@/config/api";
import { OSS_BASE } from "@/config/api";
// 分享卡片数据接口
export interface ShareCardData {
@@ -506,7 +506,7 @@ const ShareCardCanvas: React.FC<ShareCardCanvasProps> = ({
const textX = iconX + iconSize + 20
// 绘制网球图标
const tennisBallPath = await loadImage(`${OSS_BASE_URL}/images/b3eaf45e-ef28-4e45-9195-823b832e0451.jpg`, canvasNode)
const tennisBallPath = await loadImage(`${OSS_BASE}/front/ball/images/b3eaf45e-ef28-4e45-9195-823b832e0451.jpg`, canvasNode)
ctx.drawImage(tennisBallPath, iconX, gameInfoY, iconSize, iconSize)
// 绘制"单打"标签
@@ -542,7 +542,7 @@ const ShareCardCanvas: React.FC<ShareCardCanvasProps> = ({
const dateX = danDaX
const timeInfoY = infoStartY + infoSpacing
const timeInfoFontSize = scale * 24 * dpr
const calendarPath = await loadImage(`${OSS_BASE_URL}/images/ea792a5d-b105-4c95-bfc4-8af558f2b33b.jpg`, canvasNode)
const calendarPath = await loadImage(`${OSS_BASE}/front/ball/images/ea792a5d-b105-4c95-bfc4-8af558f2b33b.jpg`, canvasNode)
ctx.drawImage(calendarPath, iconX, timeInfoY, iconSize, iconSize)
// 绘制日期(绿色)
@@ -556,7 +556,7 @@ const ShareCardCanvas: React.FC<ShareCardCanvasProps> = ({
// 绘制地点
const locationInfoY = infoStartY + infoSpacing * 2
const locationFontSize = scale * 22 * dpr
const locationPath = await loadImage(`${OSS_BASE_URL}/images/adc9a167-2ea9-4e3b-b963-6a894a1fd91b.jpg`, canvasNode)
const locationPath = await loadImage(`${OSS_BASE}/front/ball/images/adc9a167-2ea9-4e3b-b963-6a894a1fd91b.jpg`, canvasNode)
ctx.drawImage(locationPath, iconX, locationInfoY, iconSize, iconSize)
drawBoldText(ctx, data.venueName, danDaX, locationInfoY + 10, locationFontSize, '#000000')

View File

@@ -1,7 +1,10 @@
import envConfig from './env'// API配置
// OSS 基础路径配置
export const OSS_BASE_URL = 'https://youchang2026.oss-cn-shanghai.aliyuncs.com/front/ball'
// OSS 配置:仅域名,调用处拼接 /front/ball 及后续路径
export const OSS_BASE = "https://bimwe-oss.oss-cn-shanghai.aliyuncs.com";
// 因乐驰OSS 配置:仅域名,调用处拼接 /front/ball 及后续路径
// export const OSS_BASE = "https://youchang2026.oss-cn-shanghai.aliyuncs.com";
export const API_CONFIG = {
// 基础URL

View File

@@ -15,7 +15,7 @@ import CrossIcon from "@/static/detail/cross.svg";
import { genNTRPRequirementText, navto } from "@/utils/helper";
import { waitForAuthInit } from "@/utils/authInit";
import { useUserActions } from "@/store/userStore";
import { OSS_BASE_URL } from "@/config/api";
import { OSS_BASE } from "@/config/api";
import { generatePosterImage, base64ToTempFilePath, delay } from "@/utils";
import { DayOfWeekMap } from "../../config";
import styles from "./index.module.scss";
@@ -148,7 +148,7 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
mainCoursal:
image_list[0] && image_list[0].startsWith("http")
? image_list[0]
: `${OSS_BASE_URL}/images/0621b8cf-f7d6-43ad-b852-7dc39f29a782.png`,
: `${OSS_BASE}/front/ball/images/0621b8cf-f7d6-43ad-b852-7dc39f29a782.png`,
nickname,
avatarUrl: avatar_url,
title,
@@ -210,7 +210,7 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
<View
className={styles.contentContainer}
style={{
backgroundImage: `url(${OSS_BASE_URL}/images/215f1ce1-be52-4a92-8250-5a4a69e7f2b3.png)`,
backgroundImage: `url(${OSS_BASE}/front/ball/images/215f1ce1-be52-4a92-8250-5a4a69e7f2b3.png)`,
}}
>
<View

View File

@@ -16,7 +16,7 @@ import { useUserActions } from "@/store/userStore";
import { DayOfWeekMap } from "../detail/config";
import { genNTRPRequirementText } from "@/utils/helper";
import { waitForAuthInit } from "@/utils/authInit";
import { OSS_BASE_URL } from "@/config/api";
import { OSS_BASE } from "@/config/api";
import styles from "./index.module.scss";
dayjs.locale("zh-cn");
@@ -71,7 +71,7 @@ function SharePoster(props) {
mainCoursal:
image_list[0] && image_list[0].startsWith("http")
? image_list[0]
: `${OSS_BASE_URL}/images/0621b8cf-f7d6-43ad-b852-7dc39f29a782.png`,
: `${OSS_BASE}/front/ball/images/0621b8cf-f7d6-43ad-b852-7dc39f29a782.png`,
nickname,
avatarUrl: avatar_url,
title,

View File

@@ -37,6 +37,7 @@ const MyselfPageContent: React.FC<MyselfPageContentProps> = ({ isActive = true }
const [hasLoaded, setHasLoaded] = useState(false); // 记录是否已经加载过数据
const [collapseProfile, setCollapseProfile] = useState(false);
const [refreshing, setRefreshing] = useState(false);
useEffect(() => {
pickerOption.getCities();
@@ -169,6 +170,23 @@ const MyselfPageContent: React.FC<MyselfPageContentProps> = ({ isActive = true }
setActiveTab(tab);
};
// 下拉刷新:刷新用户信息和球局数据
const handle_refresh = async () => {
setRefreshing(true);
try {
await Promise.all([fetchUserInfo(), load_game_data()]);
} catch (error) {
console.error("刷新失败:", error);
(Taro as any).showToast({
title: "刷新失败,请重试",
icon: "none",
duration: 2000,
});
} finally {
setRefreshing(false);
}
};
// const handleScroll = (event: any) => {
// const scrollData = event.detail;
// setCollapseProfile(scrollData.scrollTop > 1);
@@ -178,6 +196,9 @@ const MyselfPageContent: React.FC<MyselfPageContentProps> = ({ isActive = true }
<ScrollView
scrollY
refresherBackground="#FAFAFA"
refresherEnabled
refresherTriggered={refreshing}
onRefresherRefresh={handle_refresh}
className={styles.myselfPage}
>
<View

View File

@@ -26,7 +26,7 @@ import { useGlobalStore } from "@/store/global";
import { useOrder } from "@/store/orderStore";
import detailService, { GameData } from "@/services/detailService";
import { withAuth, RefundPopup, GeneralNavbar } from "@/components";
import { OSS_BASE_URL } from "@/config/api";
import { OSS_BASE } from "@/config/api";
import img from "@/config/images";
import CustomerIcon from "@/static/order/customer.svg";
import { handleCustomerService } from "@/services/userService";
@@ -301,7 +301,7 @@ function GameInfo(props) {
<View className={styles.locationMessageIcon}>
<Image
className={styles.locationMessageIconImage}
src={`${OSS_BASE_URL}/images/3ee5c89c-fe58-4a56-9471-1295da09c743.png`}
src={`${OSS_BASE}/front/ball/images/3ee5c89c-fe58-4a56-9471-1295da09c743.png`}
/>
</View>
{/* location message */}

View File

@@ -69,6 +69,7 @@ function generateTimeMsg(game_info) {
const OrderList = () => {
const [list, setList] = useState<any[][]>([]);
const [total, setTotal] = useState(0);
const [refreshing, setRefreshing] = useState(false);
const refundRef = useRef(null);
const end = list.length * PAGESIZE >= total;
@@ -114,6 +115,22 @@ const OrderList = () => {
}
}
// 下拉刷新:重新加载第一页订单
async function handle_refresh() {
setRefreshing(true);
try {
await getOrders(1);
} catch (error) {
Taro.showToast({
title: "刷新失败,请重试",
icon: "none",
duration: 2000,
});
} finally {
setRefreshing(false);
}
}
async function handlePayNow(item) {
// 检查登录状态和手机号
if (!requireLoginWithPhone()) {
@@ -285,6 +302,10 @@ const OrderList = () => {
scrollWithAnimation
lowerThreshold={20}
onScrollToLower={handleFetchNext}
refresherBackground="#FAFAFA"
refresherEnabled
refresherTriggered={refreshing}
onRefresherRefresh={handle_refresh}
enhanced
showScrollbar={false}
className={styles.list}

View File

@@ -1,6 +1,6 @@
export default definePageConfig({
navigationBarTitleText: '开启消息通知',
navigationStyle: 'custom',
enablePullDownRefresh: false,
backgroundColor:"#FAFAFA"
});

View File

@@ -1,7 +1,7 @@
.enable_notification_page {
width: 100%;
// min-height: 100vh;
background: radial-gradient(circle at 50% 0%, rgba(191, 255, 239, 1) 0%, rgba(255, 255, 255, 1) 37%);
// background: radial-gradient(circle at 50% 0%, rgba(191, 255, 239, 1) 0%, rgba(255, 255, 255, 1) 37%);
display: flex;
flex-direction: column;
@@ -29,7 +29,6 @@
align-items: center;
gap: 8px;
padding: 10px 16px;
background: #ffffff;
border: 0.5px solid rgba(0, 0, 0, 0.08);
border-radius: 20px;
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.08);

View File

@@ -18,7 +18,7 @@ import { formatNtrpDisplay } from "@/utils/helper";
import { waitForAuthInit } from "@/utils/authInit";
import httpService from "@/services/httpService";
import DetailService from "@/services/detailService";
import { OSS_BASE_URL } from "@/config/api";
import { OSS_BASE } from "@/config/api";
import CloseIcon from "@/static/ntrp/ntrp_close_icon.svg";
import DocCopy from "@/static/ntrp/ntrp_doc_copy.svg";
import ArrowRight from "@/static/ntrp/ntrp_arrow_right.svg";
@@ -225,7 +225,7 @@ function Intro() {
<View
className={styles.introContainer}
style={{
backgroundImage: `url(${OSS_BASE_URL}/images/215f1ce1-be52-4a92-8250-5a4a69e7f2b3.png)`,
backgroundImage: `url(${OSS_BASE}/front/ball/images/215f1ce1-be52-4a92-8250-5a4a69e7f2b3.png)`,
}}
>
<CommonGuideBar />
@@ -252,7 +252,7 @@ function Intro() {
<View className={styles.tip}>
<Image
className={styles.tipImage}
src={`${OSS_BASE_URL}/images/b7cb47aa-b609-4112-899f-3fde02ed2431.png`}
src={`${OSS_BASE}/front/ball/images/b7cb47aa-b609-4112-899f-3fde02ed2431.png`}
mode="aspectFit"
/>
</View>
@@ -310,7 +310,7 @@ function Intro() {
<View className={styles.tip}>
<Image
className={styles.tipImage}
src={`${OSS_BASE_URL}/images/b7cb47aa-b609-4112-899f-3fde02ed2431.png`}
src={`${OSS_BASE}/front/ball/images/b7cb47aa-b609-4112-899f-3fde02ed2431.png`}
mode="aspectFit"
/>
</View>
@@ -318,7 +318,7 @@ function Intro() {
<View className={styles.radar}>
<Image
className={styles.radarImage}
src={`${OSS_BASE_URL}/images/a2e1b639-82a9-4ab8-b767-8605556eafcb.png`}
src={`${OSS_BASE}/front/ball/images/a2e1b639-82a9-4ab8-b767-8605556eafcb.png`}
mode="aspectFit"
/>
</View>
@@ -427,7 +427,7 @@ function Test() {
<View
className={styles.testContainer}
style={{
backgroundImage: `url(${OSS_BASE_URL}/images/215f1ce1-be52-4a92-8250-5a4a69e7f2b3.png)`,
backgroundImage: `url(${OSS_BASE}/front/ball/images/215f1ce1-be52-4a92-8250-5a4a69e7f2b3.png)`,
}}
>
<CommonGuideBar confirm title={`${index + 1} / ${questions.length}`} />
@@ -720,7 +720,7 @@ function Result() {
<View
className={styles.card}
style={{
backgroundImage: `url(${OSS_BASE_URL}/images/f5b45cea-5015-41d6-aaf4-83b2e76678e1.png)`,
backgroundImage: `url(${OSS_BASE}/front/ball/images/f5b45cea-5015-41d6-aaf4-83b2e76678e1.png)`,
}}
>
<View className={styles.avatarWrap}>

View File

@@ -68,6 +68,7 @@ const OtherUserPage: React.FC = () => {
);
const [collapseProfile, setCollapseProfile] = useState(false);
const [refreshing, setRefreshing] = useState(false);
// 进入页面时检查 user_id只在组件挂载时执行一次
useEffect(() => {
@@ -82,56 +83,52 @@ const OtherUserPage: React.FC = () => {
}
}, []); // 空依赖数组,确保只在进入时执行一次
// 页面加载时获取用户信息
useEffect(() => {
const load_user_data = async () => {
if (user_id) {
try {
// const user_data = await UserService.get_user_info(user_id);
const res = await LoginService.getUserInfoById(user_id);
const { data: userData } = res;
// setUserInfo({...res.data as UserInfo, avatar: data.avatar_url || require("@/static/userInfo/default_avatar.svg")});
setUserInfo({
id: parseInt(user_id || "") || 0,
nickname: userData.nickname || "",
avatar_url: userData.avatar_url || "",
join_date: userData.subscribe_time
? `${new Date(userData.subscribe_time).getFullYear()}${
new Date(userData.subscribe_time).getMonth() + 1
}月加入`
: "",
stats: {
following_count: userData.stats?.following_count || 0,
followers_count: userData.stats?.followers_count || 0,
hosted_games_count: userData.stats?.hosted_games_count || 0,
participated_games_count:
userData.stats?.participated_games_count || 0,
},
personal_profile: userData.personal_profile || "",
province: userData.province || "",
city: userData.city || "",
district: userData.district || "",
occupation: userData.occupation || "",
ntrp_level: "",
phone: userData.phone || "",
gender: userData.gender || "",
birthday: userData.birthday || "",
});
setIsFollowing(userData.is_following || false);
} catch (error) {
console.error("加载用户数据失败:", error);
Taro.showToast({
title: "加载失败",
icon: "none",
});
}
}
};
load_user_data();
// 加载用户信息(使用 useCallback 便于下拉刷新复用)
const load_user_data = useCallback(async () => {
if (!user_id) return;
try {
const res = await LoginService.getUserInfoById(user_id);
const { data: userData } = res;
setUserInfo({
id: parseInt(user_id || "") || 0,
nickname: userData.nickname || "",
avatar_url: userData.avatar_url || "",
join_date: userData.subscribe_time
? `${new Date(userData.subscribe_time).getFullYear()}${
new Date(userData.subscribe_time).getMonth() + 1
}月加入`
: "",
stats: {
following_count: userData.stats?.following_count || 0,
followers_count: userData.stats?.followers_count || 0,
hosted_games_count: userData.stats?.hosted_games_count || 0,
participated_games_count:
userData.stats?.participated_games_count || 0,
},
personal_profile: userData.personal_profile || "",
province: userData.province || "",
city: userData.city || "",
district: userData.district || "",
occupation: userData.occupation || "",
ntrp_level: "",
phone: userData.phone || "",
gender: userData.gender || "",
birthday: userData.birthday || "",
});
setIsFollowing(userData.is_following || false);
} catch (error) {
console.error("加载用户数据失败:", error);
Taro.showToast({
title: "加载失败",
icon: "none",
});
}
}, [user_id]);
useEffect(() => {
load_user_data();
}, [load_user_data]);
// 分类球局数据(使用 useCallback 包装,避免每次渲染都创建新函数)
const classifyGameRecords = useCallback(
(
@@ -232,6 +229,18 @@ const OtherUserPage: React.FC = () => {
setCollapseProfile(scrollData.scrollTop > 1);
}, []);
// 下拉刷新:刷新用户信息和球局数据
const handle_refresh = useCallback(async () => {
setRefreshing(true);
try {
await Promise.all([load_user_data(), load_game_data()]);
} catch (error) {
console.error("刷新失败:", error);
} finally {
setRefreshing(false);
}
}, [load_user_data, load_game_data]);
// 处理球局详情
// const handle_game_detail = (game_id: string) => {
// Taro.navigateTo({
@@ -244,6 +253,9 @@ const OtherUserPage: React.FC = () => {
scrollY
className="other_user_page"
refresherBackground="#FAFAFA"
refresherEnabled
refresherTriggered={refreshing}
onRefresherRefresh={handle_refresh}
>
{/* <CustomNavbar>
<View className="navbar_content">

View File

@@ -1,12 +1,19 @@
// @use '../../scss/common.scss' as *;
.wallet_page {
display: flex;
flex-direction: column;
height: 100vh;
overflow-y: auto;
overflow: hidden;
background-color: #fafafa;
padding-bottom: 5px;
box-sizing: border-box;
.wallet_scroll {
flex: 1;
height: 0;
padding-bottom: 5px;
}
&::-webkit-scrollbar {
display: none;
width: 0;

View File

@@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react";
import { View, Text, Input, Button, Image } from "@tarojs/components";
import Taro, { useDidShow, useReachBottom } from "@tarojs/taro";
import React, { useEffect, useState, useCallback } from "react";
import { View, Text, Input, Button, Image, ScrollView } from "@tarojs/components";
import Taro, { useDidShow } from "@tarojs/taro";
import "./index.scss";
import { CommonPopup, EmptyState } from "@/components";
import httpService from "@/services/httpService";
@@ -109,16 +109,6 @@ const WalletPage: React.FC = () => {
const pageConfig = currentPage.page?.config;
const pageTitle = pageConfig?.navigationBarTitleText;
useReachBottom(() => {
if (load_transactions_params.page >= totalPages) return;
// 加载更多方法
set_load_transactions_params((prev) => {
return {
...prev,
page: prev.page + 1,
};
});
});
// 钱包信息状态
const [wallet_info, set_wallet_info] = useState<WalletInfo>({
balance: 0,
@@ -158,6 +148,7 @@ const WalletPage: React.FC = () => {
});
const [totalPages, setTotalPages] = useState(1);
const [refreshing, setRefreshing] = useState(false);
useEffect(() => {
load_transactions();
@@ -452,6 +443,33 @@ const WalletPage: React.FC = () => {
setShowFilterPopup(true);
};
// 下拉刷新:刷新钱包余额和交易记录
const handle_refresh = useCallback(async () => {
setRefreshing(true);
try {
await load_wallet_data();
set_transactions([]);
set_load_transactions_params((prev) => ({ ...prev, page: 1 }));
} catch (error) {
Taro.showToast({
title: "刷新失败,请重试",
icon: "none",
duration: 2000,
});
} finally {
setRefreshing(false);
}
}, []);
// 滚动到底部加载更多交易记录
const handle_scroll_to_lower = useCallback(() => {
if (load_transactions_params.page >= totalPages) return;
set_load_transactions_params((prev) => ({
...prev,
page: prev.page + 1,
}));
}, [load_transactions_params.page, totalPages]);
const handleFilterCancel = () => {
setShowFilterPopup(false);
setFilterParams({
@@ -488,6 +506,16 @@ const WalletPage: React.FC = () => {
Taro.navigateBack();
}}
/>
<ScrollView
scrollY
refresherBackground="#FAFAFA"
refresherEnabled
refresherTriggered={refreshing}
onRefresherRefresh={handle_refresh}
lowerThreshold={50}
onScrollToLower={handle_scroll_to_lower}
className="wallet_scroll"
>
{/* 钱包主卡片 */}
<View
className="wallet_main_card"
@@ -649,6 +677,7 @@ const WalletPage: React.FC = () => {
)}
</View>
</View>
</ScrollView>
{/* 提现弹窗 */}
<CommonPopup

View File

@@ -1,18 +1,11 @@
import Taro from "@tarojs/taro";
import { OSS_BASE_URL } from "@/config/api";
import { OSS_BASE } from "@/config/api";
const bgUrl = `${OSS_BASE_URL}/images/5e2c85ab-fb0c-4026-974d-1e0725181542.png`;
const ringUrl = `${OSS_BASE_URL}/images/b635164f-ecec-434a-a00b-69614a918f2f.png`;
const dateIcon = `${OSS_BASE_URL}/images/1b49476e-0eda-42ff-b08c-002ce510df82.jpg`;
const mapIcon = `${OSS_BASE_URL}/images/06b994fa-9227-4708-8555-8a07af8d0c3b.jpg`;
// const logo = `${OSS_BASE_URL}/images/fb732da6-11b9-4022-a524-a377b17635eb.jpg`
// const logoText = `${OSS_BASE_URL}/images/9d8cbc9d-9601-4e2d-ab23-76420a4537d6.png`;
const logoText = `${OSS_BASE_URL}/system/youchang_tip_text.png`
const bgUrl = `${OSS_BASE}/front/ball/images/5e2c85ab-fb0c-4026-974d-1e0725181542.png`;
const ringUrl = `${OSS_BASE}/front/ball/images/b635164f-ecec-434a-a00b-69614a918f2f.png`;
const dateIcon = `${OSS_BASE}/front/ball/images/1b49476e-0eda-42ff-b08c-002ce510df82.jpg`;
const mapIcon = `${OSS_BASE}/front/ball/images/06b994fa-9227-4708-8555-8a07af8d0c3b.jpg`;
const logoText = `${OSS_BASE}/front/ball/system/youchang_tip_text.png`;
export function base64ToTempFilePath(base64Data: string): Promise<string> {
return new Promise((resolve, reject) => {

View File

@@ -1,5 +1,5 @@
import Taro from '@tarojs/taro'
import { OSS_BASE_URL } from "@/config/api";
import { OSS_BASE } from "@/config/api";
export interface ShareCardData {
userAvatar: string
@@ -481,7 +481,7 @@ const drawShareCard = async (ctx: any, data: ShareCardData, offscreen: any): Pro
const textX = iconX + iconSize + 20
// 绘制网球图标
const tennisBallPath = await loadImage(`${OSS_BASE_URL}/images/b3eaf45e-ef28-4e45-9195-823b832e0451.jpg`)
const tennisBallPath = await loadImage(`${OSS_BASE}/front/ball/images/b3eaf45e-ef28-4e45-9195-823b832e0451.jpg`)
ctx.drawImage(tennisBallPath, iconX, gameInfoY, iconSize, iconSize)
// 绘制"单打"标签
@@ -517,7 +517,7 @@ const drawShareCard = async (ctx: any, data: ShareCardData, offscreen: any): Pro
const dateX = danDaX
const timeInfoY = infoStartY + infoSpacing
const timeInfoFontSize = scale * 24 * dpr
const calendarPath = await loadImage(`${OSS_BASE_URL}/images/ea792a5d-b105-4c95-bfc4-8af558f2b33b.jpg`)
const calendarPath = await loadImage(`${OSS_BASE}/front/ball/images/ea792a5d-b105-4c95-bfc4-8af558f2b33b.jpg`)
ctx.drawImage(calendarPath, iconX, timeInfoY, iconSize, iconSize)
// 绘制日期(绿色,非描边粗体)
@@ -530,7 +530,7 @@ const drawShareCard = async (ctx: any, data: ShareCardData, offscreen: any): Pro
// 绘制地点
const locationInfoY = infoStartY + infoSpacing * 2
const locationFontSize = scale * 22 * dpr
const locationPath = await loadImage(`${OSS_BASE_URL}/images/adc9a167-2ea9-4e3b-b963-6a894a1fd91b.jpg`)
const locationPath = await loadImage(`${OSS_BASE}/front/ball/images/adc9a167-2ea9-4e3b-b963-6a894a1fd91b.jpg`)
ctx.drawImage(locationPath, iconX, locationInfoY, iconSize, iconSize)
drawBoldText(ctx, data.venueName, danDaX, locationInfoY + 10, locationFontSize, '#000000')