修改样式
parent
ee5a00e867
commit
7b1cc19c89
|
|
@ -3,10 +3,18 @@
|
|||
<u-image class="flex-none" width="190" height="190" border-radius="10" :src="goods.cover" :lazy-load="true">
|
||||
</u-image>
|
||||
<view class="flex-1 ml-15rpx">
|
||||
<view class="line-1 w-full text-txBase">{{goods.name}}</view>
|
||||
<view class="price-text flex-1 text-txBase text-md mt-30rpx">{{goods.sell_price}}元</view>
|
||||
<view class="flex justify-between">
|
||||
<view class=" flex-1 flex-none">
|
||||
<view class="line-1 w-full text-txBase">{{goods.name}}</view>
|
||||
<view class="price-text flex-1 text-txBase text-md mt-30rpx">{{goods.sell_price}}元</view>
|
||||
</view>
|
||||
<view class="flex-1 w-0 line-1 ml-20rpx text-right ">
|
||||
{{ specs.join(' ')}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex items-center justify-between mt-30rpx flex-1">
|
||||
<view class="text-txBase text-md price-text">{{goods.vip_price}}元 vip</view>
|
||||
|
||||
<view v-if="isAdd" class="bg-hex-ef4444 text-center px-20rpx py-8rpx text-white rounded-10rpx" @click="add">添加</view>
|
||||
<view v-else>
|
||||
<u-number-box :min="1" v-model="goods.num" @change="valChange">
|
||||
|
|
@ -28,6 +36,11 @@
|
|||
default:()=>{}
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
specs(){
|
||||
return this.goods?.specs??[]
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
//添加商品
|
||||
add(){
|
||||
|
|
|
|||
|
|
@ -95,14 +95,14 @@
|
|||
const total = this.chooseList.reduce((pr, cu) => {
|
||||
return pr + cu.sell_price * cu.num
|
||||
}, 0)
|
||||
return total
|
||||
return total.toFixed(2)
|
||||
},
|
||||
//会员价合计
|
||||
vipPrice() {
|
||||
const total = this.chooseList.reduce((pr, cu) => {
|
||||
return pr + cu.vip_price * cu.num
|
||||
}, 0)
|
||||
return total
|
||||
return total.toFixed(2)
|
||||
},
|
||||
goodsList(){
|
||||
return this.list?.map(e=>{
|
||||
|
|
|
|||
Loading…
Reference in New Issue