|
|
|
@ -1,12 +1,10 @@ |
|
|
|
<view class="container"> |
|
|
|
<!-- 头部导航栏 --> |
|
|
|
<view class="header"> |
|
|
|
<view class="header-content" style="display: block; box-sizing: border-box; height: 124rpx; width: 740rpx"> |
|
|
|
<text class="title">规格选择</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="content" style="width: 612rpx; height: 1622rpx; display: block; box-sizing: border-box"> |
|
|
|
<view class="content" style="width: 525rpx; display: flex; box-sizing: content-box"> |
|
|
|
<!-- 加载中状态 --> |
|
|
|
<view wx:if="{{loading}}" class="loading"> |
|
|
|
<view class="loading-spinner"></view> |
|
|
|
@ -24,24 +22,25 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 商品信息 --> |
|
|
|
<view wx:else class="product-card" style="display: block; box-sizing: border-box; width: 525rpx"> |
|
|
|
<view wx:else class="product-card"> |
|
|
|
<view class="product-info-container"> |
|
|
|
<view class="product-info-row"> |
|
|
|
<text class="product-label">商品名称</text> |
|
|
|
<button bindtap="goBackToProductList" class="btn-back" style="width: 172rpx; display: flex; box-sizing: border-box; left: 0rpx; top: 0rpx; height: 87rpx"> |
|
|
|
<text class="btn-back-icon">←</text> |
|
|
|
<view class="product-name-container"> |
|
|
|
<text class="product-label">商品名称:</text> |
|
|
|
<text class="product-name" style="position: relative; left: 20rpx; top: 0rpx; width: 0rpx">{{productName}}</text> |
|
|
|
</view> |
|
|
|
<button bindtap="goBackToProductList" class="btn-back" style="width: 200rpx; left: 47rpx; top: 1rpx; position: relative"> |
|
|
|
<text class="btn-back-text">更换商品</text> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
<text class="product-name">{{productName}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 规格列表 --> |
|
|
|
<view wx:if="{{!loading && !error && specifications.length > 0}}" class="spec-section"> |
|
|
|
<view class="section-header" style="width: 525rpx; display: flex; box-sizing: border-box; left: 0rpx; top: 0rpx"> |
|
|
|
<view class="section-header"> |
|
|
|
<text class="section-title">可用规格</text> |
|
|
|
<text class="section-count">{{specifications.length}}个</text> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="spec-list"> |
|
|
|
<view |
|
|
|
@ -50,7 +49,7 @@ |
|
|
|
class="spec-item" |
|
|
|
data-spec="{{item}}" |
|
|
|
bindtap="goToSpecDetail" |
|
|
|
style="width: 525rpx; height: 90rpx; display: flex; box-sizing: border-box"> |
|
|
|
style="width: 612rpx; display: flex; box-sizing: border-box"> |
|
|
|
<text class="spec-name">{{item.name}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -62,7 +61,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 无规格提示 --> |
|
|
|
<view wx:if="{{!loading && !error && specifications.length === 0}}" class="empty-state" style="height: 600rpx; display: flex; box-sizing: border-box"> |
|
|
|
<view wx:if="{{!loading && !error && specifications.length === 0}}" class="empty-state"> |
|
|
|
<view class="empty-icon">📋</view> |
|
|
|
<text class="empty-text">该商品暂无可用规格</text> |
|
|
|
<button bindtap="goBackToProductList" class="btn-secondary">返回商品列表</button> |
|
|
|
|