merge: integrate catalog into order payment flow
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
# 阿里云 OSS 资源桶基址,迁移时只改这一个变量
|
||||
OSS_BASE_URL=https://wordcloudwechat.oss-cn-hangzhou.aliyuncs.com
|
||||
|
||||
# 后端接口基址:本机 Docker 联调时使用 http://127.0.0.1:3090
|
||||
# 不配置时会继续使用线上测试接口。
|
||||
TARO_APP_API_BASE_URL=http://127.0.0.1:3090
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.shop-list{padding:0 32rpx calc(220rpx + env(safe-area-inset-bottom))}.shop-header{padding-bottom:32rpx}.shop-header-title{color:var(--text-primary);display:block;font-size:56rpx;font-weight:800;letter-spacing:0;line-height:1.15}.shop-header-sub{color:var(--text-secondary);display:block;font-size:24rpx;margin-top:8rpx}.shop-grid{display:grid;gap:24rpx;grid-template-columns:1fr 1fr}.shop-card{background:var(--bg-card);border:1rpx solid var(--border);border-radius:24rpx;-webkit-box-shadow:var(--shadow-card);box-shadow:var(--shadow-card);overflow:hidden;-webkit-transition:-webkit-transform .15s ease;transition:-webkit-transform .15s ease;transition:transform .15s ease;transition:transform .15s ease,-webkit-transform .15s ease}.shop-card:active{-webkit-transform:scale(.98);-ms-transform:scale(.98);transform:scale(.98)}.shop-card-img-wrap{aspect-ratio:1/1;background:var(--bg-muted);overflow:hidden}.shop-card-img{height:100%;-o-object-fit:cover;object-fit:cover;-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease;width:100%}.shop-card-body{padding:20rpx 24rpx 24rpx}.shop-card-name{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--text-primary);display:-webkit-box;font-size:28rpx;font-weight:700;line-height:1.4;overflow:hidden}.shop-card-desc{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--text-secondary);display:-webkit-box;font-size:24rpx;line-height:1.4;margin-top:8rpx;overflow:hidden}.shop-card-price{color:var(--accent-primary);display:block;font-size:32rpx;font-variant:tabular-nums;font-weight:700;margin-top:12rpx}@media (min-width:750rpx){.shop-page{-ms-flex-pack:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center}}
|
||||
.shop-list{padding:0 32rpx calc(220rpx + env(safe-area-inset-bottom))}.shop-header{padding-bottom:32rpx}.shop-header-title{color:var(--text-primary);display:block;font-size:56rpx;font-weight:800;letter-spacing:0;line-height:1.15}.shop-header-sub{color:var(--text-secondary);display:block;font-size:24rpx;margin-top:8rpx}.shop-grid{display:grid;gap:24rpx;grid-template-columns:1fr 1fr}.shop-card{background:var(--bg-card);border:1rpx solid var(--border);border-radius:24rpx;-webkit-box-shadow:var(--shadow-card);box-shadow:var(--shadow-card);overflow:hidden;-webkit-transition:-webkit-transform .15s ease;transition:-webkit-transform .15s ease;transition:transform .15s ease;transition:transform .15s ease,-webkit-transform .15s ease}.shop-card:active{-webkit-transform:scale(.98);-ms-transform:scale(.98);transform:scale(.98)}.shop-card-img-wrap{aspect-ratio:1/1;background:var(--bg-muted);overflow:hidden}.shop-card-img{height:100%;-o-object-fit:cover;object-fit:cover;-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease;width:100%}.shop-card-body{padding:20rpx 24rpx 24rpx}.shop-card-name{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--text-primary);display:-webkit-box;font-size:28rpx;font-weight:700;line-height:1.4;overflow:hidden}.shop-card-desc{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--text-secondary);display:-webkit-box;font-size:24rpx;line-height:1.4;margin-top:8rpx;overflow:hidden}.shop-card-price{color:var(--accent-primary);display:block;font-size:32rpx;font-variant:tabular-nums;font-weight:700;margin-top:12rpx}.shop-feedback{color:var(--text-secondary);display:block;font-size:26rpx;padding:48rpx 24rpx;text-align:center}.shop-feedback-action{color:var(--accent-primary)}@media (min-width:750rpx){.shop-page{-ms-flex-pack:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:center;justify-content:center}}
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
||||
"description": "智绘微刻 - 词云微雕定制小程序",
|
||||
"appid": "wxad998564cf43a7d9",
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"urlCheck": false,
|
||||
"es6": false,
|
||||
"enhance": true,
|
||||
"postcss": true,
|
||||
|
||||
@@ -95,6 +95,18 @@
|
||||
font-variant: tabular-nums;
|
||||
}
|
||||
|
||||
.shop-feedback {
|
||||
display: block;
|
||||
padding: 48rpx 24rpx;
|
||||
text-align: center;
|
||||
color: var(--text-secondary);
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.shop-feedback-action {
|
||||
color: var(--accent-primary);
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
Responsive: container center on wide screens
|
||||
============================================================ */
|
||||
|
||||
@@ -44,6 +44,10 @@ export interface ProductCategory {
|
||||
specs?: [string, string][] // 规格参数键值对
|
||||
mask: MaskConfig
|
||||
images: string[] // 商品实物照片路径列表(相对页面引用的路径)
|
||||
/** 服务端商品目录字段;本地兜底数据可不填。 */
|
||||
status?: 'ON_SALE'
|
||||
sort?: number
|
||||
categoryId?: string
|
||||
}
|
||||
|
||||
/** 贴纸物品 */
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { ProductCategory } from '../types'
|
||||
import type { ProductDto } from './api/product'
|
||||
|
||||
/**
|
||||
* 将商品目录接口数据适配为现有 DIY/设计清单仍在使用的商品模型。
|
||||
* 页面只从接口读取商品;本适配层避免把后端字段差异散落到各个页面。
|
||||
*/
|
||||
export function toProductCategory(product: ProductDto): ProductCategory {
|
||||
return {
|
||||
id: product.id,
|
||||
name: product.name,
|
||||
desc: product.subtitle || product.description || '',
|
||||
icon: product.iconImg || '',
|
||||
iconImg: product.iconImg,
|
||||
price: product.price,
|
||||
originalPrice: product.originalPrice,
|
||||
leadTime: product.leadTime,
|
||||
description: product.description || product.subtitle || '',
|
||||
subtitle: product.subtitle,
|
||||
tone: product.tone,
|
||||
story: product.story,
|
||||
scene: product.scene,
|
||||
tags: product.tags,
|
||||
specs: product.specs,
|
||||
mask: product.mask,
|
||||
images: product.images,
|
||||
status: product.status,
|
||||
sort: product.sort,
|
||||
categoryId: product.categoryId,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user