Update App.jsx via upload script - 2026-10-14 16:25:18

This commit is contained in:
mike 2026-10-14 16:25:22 +08:00
parent f83ec7a128
commit 53370386e2
1 changed files with 6 additions and 4 deletions

10
App.jsx
View File

@ -1036,7 +1036,7 @@ const blankProduct = () => ({
webDetailImages: [], // 网站产品详情图,最多20张,显示在规格表下方 webDetailImages: [], // 网站产品详情图,最多20张,显示在规格表下方
youtubeUrl: '', // 网站产品视频(YouTube链接) youtubeUrl: '', // 网站产品视频(YouTube链接)
webDescription: { en: '', es: '', ru: '' }, // 网站产品介绍:只需填英文,其他语言在网站构建时用DeepSeek自动翻译;es/ru填了就用手动译文 webDescription: { en: '', es: '', ru: '' }, // 网站产品介绍:只需填英文,其他语言在网站构建时用DeepSeek自动翻译;es/ru填了就用手动译文
webSale: { mode: 'stock', stock: '', minPrice: '', maxPrice: '' }, // 网站销售状态:stock现货 / group拼单;minPrice起订量单价、maxPrice 1000台单价(USD),中间按数量等差自动生成 webSale: { mode: 'group', stock: '', minPrice: '', maxPrice: '' }, // 网站销售状态:group拼单(默认)/ stock现货;minPrice起订量单价、maxPrice 1000台单价(USD),中间按数量等差自动生成
}); });
function isUpsCategory(cat) { function isUpsCategory(cat) {
@ -5553,7 +5553,9 @@ function WebImageList({ draft, set, onNotify, field, max, label, cover, tall })
function WebPublishSection({ draft, set, onNotify }) { function WebPublishSection({ draft, set, onNotify }) {
const desc = draft.webDescription || {}; const desc = draft.webDescription || {};
const sale = draft.webSale || { mode: 'stock', stock: '', tiers: [] }; // 还没设置过销售状态的产品:迷你UPS默认拼单,其他品类默认现货
const defaultMode = draft.type === '迷你UPS' ? 'group' : 'stock';
const sale = { mode: defaultMode, ...(draft.webSale || {}) };
const tiers = webTiers(sale); const tiers = webTiers(sale);
const moq = webTierPoints(sale.mode).moq; const moq = webTierPoints(sale.mode).moq;
const [showManual, setShowManual] = useState(!!(desc.es || desc.ru)); const [showManual, setShowManual] = useState(!!(desc.es || desc.ru));
@ -5617,9 +5619,9 @@ function WebPublishSection({ draft, set, onNotify }) {
<div className="grid-2"> <div className="grid-2">
<div className="field"> <div className="field">
<span className="field-label">网站销售状态</span> <span className="field-label">网站销售状态</span>
<select className="select" value={sale.mode || 'stock'} onChange={e => setSale({ mode: e.target.value })}> <select className="select" value={sale.mode || defaultMode} onChange={e => setSale({ mode: e.target.value })}>
<option value="stock">现货(起订20台,按20递增)</option>
<option value="group">拼单(起订100台,按100递增)</option> <option value="group">拼单(起订100台,按100递增)</option>
<option value="stock">现货(起订20台,按20递增)</option>
</select> </select>
</div> </div>
{sale.mode !== 'group' ? ( {sale.mode !== 'group' ? (