修改 oss 路径
This commit is contained in:
@@ -19,6 +19,8 @@ page {
|
||||
|
||||
@font-face {
|
||||
font-family: "Quicksand";
|
||||
// 注意:此路径来自 @/config/api.ts 中的 OSS_BASE_URL 配置
|
||||
// 如需修改,请更新配置文件中的 OSS_BASE_URL
|
||||
src: url("https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/other/57dc951f-f10e-45b7-9157-0b1e468187fd.ttf") format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@@ -1,6 +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";
|
||||
|
||||
// 分享卡片数据接口
|
||||
export interface ShareCardData {
|
||||
@@ -553,7 +554,7 @@ const ShareCardCanvas: React.FC<ShareCardCanvasProps> = ({
|
||||
const textX = iconX + iconSize + 20
|
||||
|
||||
// 绘制网球图标
|
||||
const tennisBallPath = await loadImage('https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/b3eaf45e-ef28-4e45-9195-823b832e0451.jpg')
|
||||
const tennisBallPath = await loadImage(`${OSS_BASE_URL}/images/b3eaf45e-ef28-4e45-9195-823b832e0451.jpg`)
|
||||
ctx.drawImage(tennisBallPath, iconX, gameInfoY, iconSize, iconSize)
|
||||
|
||||
// 绘制"单打"标签
|
||||
@@ -580,7 +581,7 @@ const ShareCardCanvas: React.FC<ShareCardCanvasProps> = ({
|
||||
const dateX = danDaX
|
||||
const timeInfoY = infoStartY + infoSpacing
|
||||
const timeInfoFontSize = scale * 24 * dpr
|
||||
const calendarPath = await loadImage("https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/ea792a5d-b105-4c95-bfc4-8af558f2b33b.jpg")
|
||||
const calendarPath = await loadImage(`${OSS_BASE_URL}/images/ea792a5d-b105-4c95-bfc4-8af558f2b33b.jpg`)
|
||||
ctx.drawImage(calendarPath, iconX, timeInfoY, iconSize, iconSize)
|
||||
|
||||
// 绘制日期(绿色)
|
||||
@@ -593,7 +594,7 @@ const ShareCardCanvas: React.FC<ShareCardCanvasProps> = ({
|
||||
// 绘制地点
|
||||
const locationInfoY = infoStartY + infoSpacing * 2
|
||||
const locationFontSize = scale * 22 * dpr
|
||||
const locationPath = await loadImage("https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/adc9a167-2ea9-4e3b-b963-6a894a1fd91b.jpg")
|
||||
const locationPath = await loadImage(`${OSS_BASE_URL}/images/adc9a167-2ea9-4e3b-b963-6a894a1fd91b.jpg`)
|
||||
ctx.drawImage(locationPath, iconX, locationInfoY, iconSize, iconSize)
|
||||
drawText(ctx, data.venueName, danDaX, locationInfoY + 10, 600, locationFontSize, '#000000')
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import envConfig from './env'// API配置
|
||||
|
||||
// OSS 基础路径配置
|
||||
export const OSS_BASE_URL = 'https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball'
|
||||
|
||||
export const API_CONFIG = {
|
||||
// 基础URL
|
||||
BASE_URL: envConfig.apiBaseURL,
|
||||
|
||||
@@ -15,6 +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 { generatePosterImage, base64ToTempFilePath, delay } from "@/utils";
|
||||
import { DayOfWeekMap } from "../../config";
|
||||
import styles from "./index.module.scss";
|
||||
@@ -131,7 +132,7 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
|
||||
mainCoursal:
|
||||
image_list[0] && image_list[0].startsWith("http")
|
||||
? image_list[0]
|
||||
: "https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/0621b8cf-f7d6-43ad-b852-7dc39f29a782.png",
|
||||
: `${OSS_BASE_URL}/images/0621b8cf-f7d6-43ad-b852-7dc39f29a782.png`,
|
||||
nickname,
|
||||
avatarUrl: avatar_url,
|
||||
title,
|
||||
|
||||
@@ -16,6 +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 styles from "./index.module.scss";
|
||||
|
||||
dayjs.locale("zh-cn");
|
||||
@@ -68,7 +69,7 @@ function SharePoster(props) {
|
||||
mainCoursal:
|
||||
image_list[0] && image_list[0].startsWith("http")
|
||||
? image_list[0]
|
||||
: "https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/0621b8cf-f7d6-43ad-b852-7dc39f29a782.png",
|
||||
: `${OSS_BASE_URL}/images/0621b8cf-f7d6-43ad-b852-7dc39f29a782.png`,
|
||||
nickname,
|
||||
avatarUrl: avatar_url,
|
||||
title,
|
||||
|
||||
@@ -25,6 +25,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 img from "@/config/images";
|
||||
import CustomerIcon from "@/static/order/customer.svg";
|
||||
import { handleCustomerService } from "@/services/userService";
|
||||
@@ -299,7 +300,7 @@ function GameInfo(props) {
|
||||
<View className={styles.locationMessageIcon}>
|
||||
<Image
|
||||
className={styles.locationMessageIconImage}
|
||||
src="https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/3ee5c89c-fe58-4a56-9471-1295da09c743.png"
|
||||
src={`${OSS_BASE_URL}/images/3ee5c89c-fe58-4a56-9471-1295da09c743.png`}
|
||||
/>
|
||||
</View>
|
||||
{/* location message */}
|
||||
|
||||
@@ -19,6 +19,7 @@ import { waitForAuthInit } from "@/utils/authInit";
|
||||
import httpService from "@/services/httpService";
|
||||
import DetailService from "@/services/detailService";
|
||||
import { base64ToTempFilePath } from "@/utils/genPoster";
|
||||
import { OSS_BASE_URL } 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";
|
||||
@@ -229,7 +230,7 @@ function Intro() {
|
||||
<View className={styles.tip}>
|
||||
<Image
|
||||
className={styles.tipImage}
|
||||
src="https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/b7cb47aa-b609-4112-899f-3fde02ed2431.png"
|
||||
src={`${OSS_BASE_URL}/images/b7cb47aa-b609-4112-899f-3fde02ed2431.png`}
|
||||
mode="aspectFit"
|
||||
/>
|
||||
</View>
|
||||
@@ -281,7 +282,7 @@ function Intro() {
|
||||
<View className={styles.tip}>
|
||||
<Image
|
||||
className={styles.tipImage}
|
||||
src="https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/b7cb47aa-b609-4112-899f-3fde02ed2431.png"
|
||||
src={`${OSS_BASE_URL}/images/b7cb47aa-b609-4112-899f-3fde02ed2431.png`}
|
||||
mode="aspectFit"
|
||||
/>
|
||||
</View>
|
||||
@@ -289,7 +290,7 @@ function Intro() {
|
||||
<View className={styles.radar}>
|
||||
<Image
|
||||
className={styles.radarImage}
|
||||
src="https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/a2e1b639-82a9-4ab8-b767-8605556eafcb.png"
|
||||
src={`${OSS_BASE_URL}/images/a2e1b639-82a9-4ab8-b767-8605556eafcb.png`}
|
||||
mode="aspectFit"
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -13,7 +13,6 @@ export interface UploadFilesData {
|
||||
is_public?: 0 | 1,
|
||||
}
|
||||
|
||||
// {"code":0,"message":"请求成功!","data":{"tags":["test"],"create_time":"2025-08-24 22:51:03","last_modify_time":"2025-08-24 22:51:03","duration":"0","thumbnail_url":"","view_count":"0","download_count":"0","id":16,"user_id":1,"resource_type":"image","file_name":"front/ball/images/63f56978-ffe9-4397-b897-8aca6f4fdcd8.png","original_name":"QyoUvEsLG6ci57c7e25cca0845dafed3ee1fde07876d.png","file_path":"http://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/63f56978-ffe9-4397-b897-8aca6f4fdcd8.png","file_url":"http://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/63f56978-ffe9-4397-b897-8aca6f4fdcd8.png","file_size":17756,"mime_type":"image/png","description":"test","is_public":"1","status":"active","width":0,"height":0,"uploadInfo":{"success":true,"name":"front/ball/images/63f56978-ffe9-4397-b897-8aca6f4fdcd8.png","path":"http://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/63f56978-ffe9-4397-b897-8aca6f4fdcd8.png","ossPath":"http://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/63f56978-ffe9-4397-b897-8aca6f4fdcd8.png","fileType":"image/png","fileSize":17756,"originalName":"QyoUvEsLG6ci57c7e25cca0845dafed3ee1fde07876d.png","suffix":"png","storagePath":"front/ball/images/63f56978-ffe9-4397-b897-8aca6f4fdcd8.png"}}}
|
||||
|
||||
export interface uploadFileResponse {
|
||||
code: number,
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
import Taro from "@tarojs/taro";
|
||||
import { OSS_BASE_URL } from "@/config/api";
|
||||
|
||||
// const qrCodeUrl =
|
||||
// "https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/5e013195-fc79-4082-bf06-9aa79aea65ae.png";
|
||||
// const qrCodeUrl = `${OSS_BASE_URL}/images/5e013195-fc79-4082-bf06-9aa79aea65ae.png`;
|
||||
|
||||
const bgUrl = "https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/5e2c85ab-fb0c-4026-974d-1e0725181542.png";
|
||||
const bgUrl = `${OSS_BASE_URL}/images/5e2c85ab-fb0c-4026-974d-1e0725181542.png`;
|
||||
|
||||
const ringUrl =
|
||||
"https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/b635164f-ecec-434a-a00b-69614a918f2f.png";
|
||||
const ringUrl = `${OSS_BASE_URL}/images/b635164f-ecec-434a-a00b-69614a918f2f.png`;
|
||||
|
||||
const dateIcon =
|
||||
"https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/1b49476e-0eda-42ff-b08c-002ce510df82.jpg";
|
||||
const dateIcon = `${OSS_BASE_URL}/images/1b49476e-0eda-42ff-b08c-002ce510df82.jpg`;
|
||||
|
||||
const mapIcon =
|
||||
"https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/06b994fa-9227-4708-8555-8a07af8d0c3b.jpg";
|
||||
const mapIcon = `${OSS_BASE_URL}/images/06b994fa-9227-4708-8555-8a07af8d0c3b.jpg`;
|
||||
|
||||
// const logo = "http://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/fb732da6-11b9-4022-a524-a377b17635eb.jpg"
|
||||
// const logo = `${OSS_BASE_URL}/images/fb732da6-11b9-4022-a524-a377b17635eb.jpg`
|
||||
|
||||
const logoText =
|
||||
"https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/9d8cbc9d-9601-4e2d-ab23-76420a4537d6.png";
|
||||
const logoText = `${OSS_BASE_URL}/images/9d8cbc9d-9601-4e2d-ab23-76420a4537d6.png`;
|
||||
|
||||
export function base64ToTempFilePath(base64Data: string): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Taro from '@tarojs/taro'
|
||||
import { OSS_BASE_URL } from "@/config/api";
|
||||
|
||||
export interface ShareCardData {
|
||||
userAvatar: string
|
||||
@@ -595,7 +596,7 @@ const drawShareCard = async (ctx: any, data: ShareCardData, offscreen: any): Pro
|
||||
const textX = iconX + iconSize + 20
|
||||
|
||||
// 绘制网球图标
|
||||
const tennisBallPath = await loadImage('https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/b3eaf45e-ef28-4e45-9195-823b832e0451.jpg')
|
||||
const tennisBallPath = await loadImage(`${OSS_BASE_URL}/images/b3eaf45e-ef28-4e45-9195-823b832e0451.jpg`)
|
||||
ctx.drawImage(tennisBallPath, iconX, gameInfoY, iconSize, iconSize)
|
||||
|
||||
// 绘制"单打"标签
|
||||
@@ -622,7 +623,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("https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/ea792a5d-b105-4c95-bfc4-8af558f2b33b.jpg")
|
||||
const calendarPath = await loadImage(`${OSS_BASE_URL}/images/ea792a5d-b105-4c95-bfc4-8af558f2b33b.jpg`)
|
||||
ctx.drawImage(calendarPath, iconX, timeInfoY, iconSize, iconSize)
|
||||
|
||||
// 绘制日期(绿色)
|
||||
@@ -635,7 +636,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("https://bimwe.oss-cn-shanghai.aliyuncs.com/front/ball/images/adc9a167-2ea9-4e3b-b963-6a894a1fd91b.jpg")
|
||||
const locationPath = await loadImage(`${OSS_BASE_URL}/images/adc9a167-2ea9-4e3b-b963-6a894a1fd91b.jpg`)
|
||||
ctx.drawImage(locationPath, iconX, locationInfoY, iconSize, iconSize)
|
||||
drawText(ctx, data.venueName, danDaX, locationInfoY + 10, 600, locationFontSize, '#000000')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user