mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 10:57:25 +08:00
fix: 优化订单详情和购物车列表组件的交互与样式
- 在订单详情中添加复制订单编号的提示,避免空值复制 - 更新购物车列表中的样式,确保价格和数量显示更为美观 - 调整促销信息的展示逻辑,提升用户体验
This commit is contained in:
@@ -145,7 +145,9 @@
|
|||||||
<view class="title">订单编号:</view>
|
<view class="title">订单编号:</view>
|
||||||
<view class="value order-sn-value">
|
<view class="value order-sn-value">
|
||||||
<text class="order-sn-text">{{ order.sn }}</text>
|
<text class="order-sn-text">{{ order.sn }}</text>
|
||||||
<u-tag class="copy" text="复制" type="info" mode="plain" size="mini" @click="onCopy(order.sn)" />
|
<view class="copy" @click.stop="onCopy(order.sn)">
|
||||||
|
<u-tag text="复制" type="info" plain size="mini" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-info-view">
|
<view class="order-info-view">
|
||||||
@@ -395,7 +397,11 @@ function gotoGoodsDetail(sku: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onCopy(orderSnText: string) {
|
function onCopy(orderSnText: string) {
|
||||||
setClipboard(orderSnText)
|
if (!orderSnText) {
|
||||||
|
uni.showToast({ title: '暂无订单编号', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setClipboard(String(orderSnText))
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAfterSales(orderSnText: string, sku: any) {
|
function onAfterSales(orderSnText: string, sku: any) {
|
||||||
|
|||||||
@@ -69,30 +69,28 @@
|
|||||||
<!-- 规格 -->
|
<!-- 规格 -->
|
||||||
<p class="sp-type" style="width:300rpx">{{skuItem.goodsSku.simpleSpecs}}</p>
|
<p class="sp-type" style="width:300rpx">{{skuItem.goodsSku.simpleSpecs}}</p>
|
||||||
<p class="sp-type" v-if="skuItem.goodsSku.salesModel == 'WHOLESALE'">批发商品</p>
|
<p class="sp-type" v-if="skuItem.goodsSku.salesModel == 'WHOLESALE'">批发商品</p>
|
||||||
<p class="sp-number">
|
<view class="sp-number">
|
||||||
<view class="sp-price">
|
<view class="sp-price">
|
||||||
<div class="main-color">
|
<div class="main-color">
|
||||||
¥<span>{{ goodsFormatPrice(skuItem.goodsSku.price)[0] }}</span>
|
¥<span>{{ goodsFormatPrice(skuItem.goodsSku.price)[0] }}</span>
|
||||||
<span>.{{ goodsFormatPrice(skuItem.goodsSku.price)[1] }}</span>
|
<span>.{{ goodsFormatPrice(skuItem.goodsSku.price)[1] }}</span>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view class="sp-numbox">
|
||||||
<uni-number-box class="uNumber" :min="1" :max="999" @change="numChange(skuItem)" v-model="skuItem.num"></uni-number-box>
|
<uni-number-box class="uNumber" :min="1" :max="999" @change="numChange(skuItem)" v-model="skuItem.num"></uni-number-box>
|
||||||
</view>
|
</view>
|
||||||
<!-- 如果当有促销并且促销是 限时抢购 -->
|
</view>
|
||||||
<div class="promotions-list" v-if="Object.keys(skuItem.promotionMap).length != 0"
|
<!-- 如果当有促销并且促销是 限时抢购 -->
|
||||||
>
|
<div class="promotions-list" v-if="Object.keys(skuItem.promotionMap).length != 0">
|
||||||
<div class="promotions-item-seckill" v-if="getPromotion(skuItem).includes('SECKILL')">
|
<div class="promotions-item-seckill" v-if="getPromotion(skuItem).includes('SECKILL')">
|
||||||
距秒杀结束: <u-count-down show-border :hide-zero-day="true" :color="$mainColor" border-color="#ededed"
|
距秒杀结束: <u-count-down show-border :hide-zero-day="true" :color="$mainColor" border-color="#ededed"
|
||||||
font-size="24" :timestamp="getCountDownTime(skuItem)">
|
font-size="24" :timestamp="getCountDownTime(skuItem)">
|
||||||
</u-count-down>
|
</u-count-down>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div style='margin-left: 20rpx;' v-if="!skuItem.checked && skuItem.errorMessage">
|
<div class="sku-error" v-if="!skuItem.checked && skuItem.errorMessage">
|
||||||
{{skuItem.errorMessage}}
|
{{ skuItem.errorMessage }}
|
||||||
</div>
|
</div>
|
||||||
</p>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -889,11 +887,16 @@ page {
|
|||||||
|
|
||||||
|
|
||||||
.sp-number {
|
.sp-number {
|
||||||
|
width: 100%;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
> .sp-price {
|
> .sp-price {
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
::v-deep span:nth-of-type(1) {
|
::v-deep span:nth-of-type(1) {
|
||||||
font-size: 38rpx;
|
font-size: 38rpx;
|
||||||
}
|
}
|
||||||
@@ -901,6 +904,17 @@ page {
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> .sp-numbox {
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sku-error {
|
||||||
|
margin-top: 8rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
}
|
}
|
||||||
.priceDetail-flowPrice {
|
.priceDetail-flowPrice {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
Reference in New Issue
Block a user