v3.5.4 规格主图、门店使用规则与收银台 logo

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-21 17:36:53 +08:00
parent 62e61a9e63
commit 4d434c9c67
16 changed files with 276 additions and 48 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

+2 -7
View File
@@ -16,10 +16,10 @@ import {
saveWechatLoginResult,
} from '../../lib/pay-wechat';
import { applyWechatLoginResult } from '../../lib/wechat-auth';
import { getBrandAssetsSync, loadBrandAssets } from '../../lib/brand-assets';
import { isWechatEnv } from '../../lib/weixin';
import { goLogin } from '../../lib/auth-nav';
import { request, toast } from '../../lib/api';
import payLogo from '../../assets/logo2.png';
export default function PayPage() {
const router = useRouter();
@@ -31,7 +31,6 @@ export default function PayPage() {
const [orderNo, setOrderNo] = useState('');
const [payAmount, setPayAmount] = useState('—');
const [deliveryType, setDeliveryType] = useState('');
const [brandMarkUrl, setBrandMarkUrl] = useState(() => getBrandAssetsSync().brandLogoMarkUrl);
const returnPath = orderId
? `/pages/pay/index?orderId=${orderId}`
@@ -51,10 +50,6 @@ export default function PayPage() {
void refreshPayReadiness();
});
useEffect(() => {
void loadBrandAssets().then((brand) => setBrandMarkUrl(brand.brandLogoMarkUrl));
}, []);
useEffect(() => {
if (!orderId) return;
if (process.env.TARO_ENV === 'weapp') {
@@ -178,7 +173,7 @@ export default function PayPage() {
<View className="sub-page-body">
<View className="pay-status">
<View className="pay-status-icon">
<Image className="pay-status-brand" src={brandMarkUrl} mode="aspectFit" />
<Image className="pay-status-brand" src={payLogo} mode="aspectFit" />
</View>
<Text className="pay-status-title">
{needsWechatAuth ? '需完成微信授权' : '待支付'}
@@ -165,6 +165,12 @@ export default function ProductDetailPage() {
allowOnSitePickup: activeSku.allowOnSitePickup,
}
: product;
const carouselImages = (() => {
const base = getProductCarouselImages(product);
const skuImg = activeSku?.imageUrl?.trim();
if (!skuImg) return base;
return [skuImg, ...base.filter((url) => url !== skuImg)];
})();
const sharePayload = useMemo(
() =>
@@ -172,9 +178,9 @@ export default function ProductDetailPage() {
path: `/pages/product-detail/index?id=${productId}`,
dynamicTitle: product?.name,
dynamicDesc: product?.subtitle,
dynamicImageUrl: product ? getProductMainImage(product) : undefined,
dynamicImageUrl: (activeSku?.imageUrl?.trim() || (product ? getProductMainImage(product) : undefined)),
}),
[product, productId],
[product, productId, activeSku],
);
useShareAppMessage(() => toWeappShareMessage(sharePayload));
@@ -249,7 +255,6 @@ export default function ProductDetailPage() {
const allowOnline = canBuyOnline(fulfillment ?? {});
const allowOnSite = canPickupOnSite(fulfillment ?? {});
const carouselImages = getProductCarouselImages(product);
const detailImages = getProductDetailImages(product);
const detail = product.detailContent ?? {};
const features = detail.features ?? [];
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { View, Text, Image } from '@tarojs/components';
import { View, Text, Image, ScrollView } from '@tarojs/components';
import '../../styles/store-detail.css';
import Taro, {
useDidShow,
@@ -444,17 +444,19 @@ export default function StoreDetailPage() {
</View>
) : null}
{intro ? (
{benefitRule ? (
<View className="store-detail-section">
<Text className="store-detail-section-title"></Text>
<Text className="store-detail-intro">{intro}</Text>
<Text className="store-detail-section-title store-detail-section-title--rule">使</Text>
<Text className="store-detail-intro">{benefitRule}</Text>
</View>
) : null}
{benefitRule ? (
{intro ? (
<View className="store-detail-section">
<Text className="store-detail-section-title">使</Text>
<Text className="store-detail-intro">{benefitRule}</Text>
<Text className="store-detail-section-title"></Text>
<ScrollView className="store-detail-intro-scroll" scrollY showScrollbar>
<Text className="store-detail-intro">{intro}</Text>
</ScrollView>
</View>
) : null}
+5 -7
View File
@@ -488,12 +488,10 @@
}
.pay-status-icon {
width: 72px;
height: 72px;
width: 88px;
height: 88px;
border-radius: 50%;
background: rgba(166, 29, 36, 0.08);
color: var(--color-heritage-red);
font-size: 36px;
background: #f7f4ee;
display: flex;
align-items: center;
justify-content: center;
@@ -502,8 +500,8 @@
}
.pay-status-brand {
width: 44px;
height: 44px;
width: 72px;
height: 72px;
}
.pay-status-title {
+2 -1
View File
@@ -130,6 +130,7 @@
.product-detail-promo {
position: relative;
margin-top: 8px;
padding: 16px;
border-radius: var(--radius-lg);
background: linear-gradient(135deg, #fff9e6 0%, #fff0c2 100%);
@@ -377,7 +378,7 @@
}
.product-detail-specs {
margin: 12px 0 4px;
margin: 16px 0 28px;
display: flex;
flex-direction: column;
gap: 12px;
@@ -211,6 +211,17 @@
color: var(--color-on-surface);
}
.store-detail-section-title--rule {
color: var(--color-heritage-red, #a61d24);
}
.store-detail-intro-scroll {
max-height: 168px;
height: 168px;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.store-detail-env-grid {
display: flex;
flex-direction: column;