118 lines
5.6 KiB
Plaintext
118 lines
5.6 KiB
Plaintext
<navigation-bar title="{{product ? product.displayTitle : '作品详情'}}" showBack="{{true}}" fallbackPath="/pages/products/index" color="#2d2430" background="{{navThemeBackground || '#FFF7F9'}}"></navigation-bar>
|
||
|
||
<view class="page-shell detail-page" style="{{themeVars}}">
|
||
<view wx:if="{{loadError}}" class="page-content">
|
||
<view class="page-card empty-card">
|
||
<text class="empty-title">暂时无法查看作品详情</text>
|
||
<text class="empty-desc">{{loadError}}</text>
|
||
<view class="ghost-btn" bindtap="handleBack">返回上一页</view>
|
||
</view>
|
||
</view>
|
||
|
||
<block wx:elif="{{product}}">
|
||
<view class="media-box">
|
||
<swiper class="media-swiper" indicator-dots autoplay circular>
|
||
<swiper-item wx:for="{{productImages}}" wx:key="*this">
|
||
<image class="media-image" src="{{item}}" mode="aspectFill" data-url="{{item}}" bindtap="handlePreviewImage" lazy-load="{{true}}"></image>
|
||
</swiper-item>
|
||
</swiper>
|
||
<view class="media-mask">
|
||
<view class="media-badges">
|
||
<view class="chip">{{product.approximateDuration || '时长待确认'}}</view>
|
||
<view class="soft-chip">{{artistCountText}}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="page-content detail-content">
|
||
<view class="page-card info-card">
|
||
<view class="detail-head">
|
||
<text class="section-kicker">作品详情</text>
|
||
<view class="product-title">{{product.displayTitle}}</view>
|
||
<view class="product-price">{{product.priceText}}</view>
|
||
<view class="product-brief">查看作品、门店和可预约信息。</view>
|
||
</view>
|
||
|
||
<view class="summary-strip detail-summary">
|
||
<view class="summary-metric" bindtap="handleOpenShop">
|
||
<text class="summary-label">所属门店</text>
|
||
<text class="summary-value detail-summary-value">{{shopInfo ? shopInfo.shopName : '待绑定'}}</text>
|
||
<text class="summary-note">查看门店</text>
|
||
</view>
|
||
<view class="summary-metric">
|
||
<text class="summary-label">可约美甲师</text>
|
||
<text class="summary-value detail-summary-value">{{artistCountText}}</text>
|
||
<text class="summary-note">可继续选择</text>
|
||
</view>
|
||
<view class="summary-metric">
|
||
<text class="summary-label">最早可约</text>
|
||
<text class="summary-value detail-summary-value">{{earliestBookableText}}</text>
|
||
<text class="summary-note">以营业时间为准</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view wx:if="{{shopInfo}}" class="shop-box" bindtap="handleOpenShop">
|
||
<view class="shop-box-head">
|
||
<view class="shop-name">{{shopInfo.shopName}}</view>
|
||
<view class="shop-link">查看门店</view>
|
||
</view>
|
||
<view class="shop-meta">{{shopInfo.address || '门店地址待补充'}}</view>
|
||
<view class="shop-meta">{{shopInfo.businessHours || '营业时间待补充'}}</view>
|
||
</view>
|
||
|
||
<view class="actions-row">
|
||
<view class="action-pill {{isLiked ? 'active' : ''}}" bindtap="handleToggleLike">
|
||
点赞 {{product.likeCount || 0}}
|
||
</view>
|
||
<view class="action-pill {{isFavorite ? 'active' : ''}}" bindtap="handleToggleFavorite">
|
||
收藏 {{product.collectCount || 0}}
|
||
</view>
|
||
</view>
|
||
|
||
<view wx:if="{{product.tagInfos && product.tagInfos.length}}" class="tags-wrap">
|
||
<view wx:for="{{product.tagInfos}}" wx:key="id" class="tag-chip">{{item.tagName}}</view>
|
||
</view>
|
||
|
||
<view class="desc-block">
|
||
<view class="section-title">款式说明</view>
|
||
<view class="desc-text">{{product.descriptionText}}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="page-card comment-card">
|
||
<view class="comment-head">
|
||
<view class="section-title">作品评论</view>
|
||
<text class="comment-count">{{comments.length}} 条</text>
|
||
</view>
|
||
<view class="comment-editor">
|
||
<textarea class="comment-input" maxlength="300" auto-height placeholder="{{replyTarget ? '回复 ' + (replyTarget.userNickname || '用户') : '说说你的看法'}}" value="{{commentText}}" bindinput="handleCommentInput"></textarea>
|
||
<view class="comment-actions">
|
||
<view wx:if="{{replyTarget}}" class="comment-cancel" bindtap="handleReply">取消回复</view>
|
||
<view class="comment-submit" bindtap="handleSubmitComment">发布</view>
|
||
</view>
|
||
</view>
|
||
<view wx:if="{{!comments.length}}" class="comment-empty">还没有评论,来写第一条吧</view>
|
||
<view wx:for="{{comments}}" wx:key="id" class="comment-item">
|
||
<view class="comment-main">
|
||
<text class="comment-name">{{item.userNickname || '用户'}}</text>
|
||
<text class="comment-time">{{item.createTime}}</text>
|
||
</view>
|
||
<view class="comment-text">{{item.commentContent}}</view>
|
||
<view class="comment-reply-btn" data-comment="{{item}}" bindtap="handleReply">回复</view>
|
||
<view wx:if="{{item.replies && item.replies.length}}" class="reply-list">
|
||
<view wx:for="{{item.replies}}" wx:for-item="reply" wx:key="id" class="reply-item">
|
||
<text class="reply-name">{{reply.userNickname || '用户'}}:</text>
|
||
<text>{{reply.commentContent}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="footer-bar">
|
||
<view class="footer-btn secondary" bindtap="handleAddToCart">加入购物车</view>
|
||
<view class="footer-btn primary" bindtap="handleBuyNow">立即预约</view>
|
||
</view>
|
||
</block>
|
||
</view>
|