优化
This commit is contained in:
@@ -14,7 +14,13 @@
|
||||
|
||||
<view class='goods-info-view c-flex-column' style='margin-right: 10rpx'>
|
||||
<view class='c-flex-row'>
|
||||
<text class='goods-price accent-text-color'>{{ goodsBean?.price || 0 }}</text>
|
||||
<text class='goods-price accent-text-color'>
|
||||
¥{{ ((goodsBean?.price || 0) * ((userInfo.levelEntity?.discount || 100) / 100)).toFixed(2) }}
|
||||
<text v-if='userInfo.levelEntity?.discount>0'
|
||||
style='display:unset;text-decoration: line-through;font-size: 30rpx;color: #999999'>
|
||||
¥{{ goodsBean?.price || 0 }}
|
||||
</text>
|
||||
</text>
|
||||
<text>销量{{ goodsBean?.send_num || 0 }}</text>
|
||||
</view>
|
||||
|
||||
@@ -49,8 +55,12 @@
|
||||
:key='index'>
|
||||
<view class='recommend-item c-flex-column'>
|
||||
<image :src='item.images||defaultImage' />
|
||||
<text>{{ item.goodsName||'未知' }}</text>
|
||||
<text class='goods-price'>{{ item.price }}</text>
|
||||
<text>{{ item.goodsName || '未知' }}</text>
|
||||
<text class='goods-price'>{{ (item.price * ((userInfo.levelEntity.discount || 100) / 100)).toFixed(2) }}
|
||||
<text v-if='userInfo.levelEntity.discount>0'
|
||||
style='text-decoration: line-through;font-size: 25rpx;color: #999999'>{{ item.price }}
|
||||
</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -100,10 +110,14 @@ import { goPath, showToast } from '@/utils';
|
||||
import { getGoodsDetail, getGoodsList } from '@/api/goods';
|
||||
import { GoodsBean } from '@/api/goods/types';
|
||||
import useShoppingCartStore from '@/store/modules/shoppingcart';
|
||||
import { useUserStore } from '@/store';
|
||||
|
||||
const shoppingCartStore = useShoppingCartStore();
|
||||
const { totalCount } = storeToRefs(shoppingCartStore);
|
||||
|
||||
const userStore = useUserStore();
|
||||
const { userInfo } = storeToRefs(userStore);
|
||||
|
||||
const goodsBean = ref<GoodsBean>();
|
||||
const recommendList = ref<GoodsBean[]>();
|
||||
|
||||
@@ -216,6 +230,9 @@ const placeOrder = () => {
|
||||
padding: 20rpx 30rpx;
|
||||
|
||||
view:nth-of-type(1) {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
text:nth-of-type(1) {
|
||||
display: flex;
|
||||
font-size: 40rpx;
|
||||
@@ -225,10 +242,10 @@ const placeOrder = () => {
|
||||
}
|
||||
|
||||
.goods-price:before {
|
||||
content: "¥";
|
||||
font-size: 30rpx;
|
||||
margin-bottom: 5rpx;
|
||||
margin-right: 5rpx;
|
||||
//content: "¥";
|
||||
//font-size: 30rpx;
|
||||
//margin-bottom: 5rpx;
|
||||
//margin-right: 5rpx;
|
||||
}
|
||||
|
||||
text:nth-of-type(2) {
|
||||
|
Reference in New Issue
Block a user