mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-04 13:00:05 +08:00
商品详情图片缝隙,小程序适配icon价格展示
This commit is contained in:
parent
9b7ff621f9
commit
4efe3e5b43
@ -1309,7 +1309,7 @@ class GoodsService
|
|||||||
{
|
{
|
||||||
return DataReturn('请填写有效的规格销售价格', -1);
|
return DataReturn('请填写有效的规格销售价格', -1);
|
||||||
}
|
}
|
||||||
if(empty($data[0][1]))
|
if(!isset($data[0][1]) || $data[0][1] < 0)
|
||||||
{
|
{
|
||||||
return DataReturn('请填写规格库存', -1);
|
return DataReturn('请填写规格库存', -1);
|
||||||
}
|
}
|
||||||
|
@ -196,3 +196,14 @@
|
|||||||
.page {
|
.page {
|
||||||
padding-bottom: 100rpx;
|
padding-bottom: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 价格icon
|
||||||
|
*/
|
||||||
|
.price-icon {
|
||||||
|
background:#FF5722;
|
||||||
|
color:#fff;
|
||||||
|
padding:2px 5px;
|
||||||
|
line-height:20px;
|
||||||
|
border-radius:1px;
|
||||||
|
}
|
@ -27,6 +27,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-price single-text">
|
<view class="goods-price single-text">
|
||||||
|
<text a:if="{{(show_field_price_text || null) != null}}" class="price-icon">{{show_field_price_text}}</text>
|
||||||
<text class="sales-price">¥{{goods.price}}</text>
|
<text class="sales-price">¥{{goods.price}}</text>
|
||||||
<text a:if="{{(goods.original_price || null) != null}}" class="original-price">¥{{goods.original_price}}</text>
|
<text a:if="{{(goods.original_price || null) != null}}" class="original-price">¥{{goods.original_price}}</text>
|
||||||
<view class="cr-ccc sales">
|
<view class="cr-ccc sales">
|
||||||
@ -49,7 +50,7 @@
|
|||||||
<text class="text-wrapper">详情</text>
|
<text class="text-wrapper">详情</text>
|
||||||
</view>
|
</view>
|
||||||
<view a:for="{{goods_content_app}}" class="goods-detail-app bg-white">
|
<view a:for="{{goods_content_app}}" class="goods-detail-app bg-white">
|
||||||
<image a:if="{{(item.images || null) != null}}" onTap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto" src="{{item.images}}" mode="widthFix" />
|
<image a:if="{{(item.images || null) != null}}" onTap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
|
||||||
<view a:if="{{(item.content || null) != null}}" class="content-items">
|
<view a:if="{{(item.content || null) != null}}" class="content-items">
|
||||||
<view a:for="{{item.content}}" a:for-item="items">{{items}}</view>
|
<view a:for="{{item.content}}" a:for-item="items">{{items}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -28,6 +28,8 @@ Page({
|
|||||||
goods_spec_base_original_price: 0,
|
goods_spec_base_original_price: 0,
|
||||||
goods_spec_base_inventory: 0,
|
goods_spec_base_inventory: 0,
|
||||||
goods_spec_base_images: '',
|
goods_spec_base_images: '',
|
||||||
|
|
||||||
|
show_field_price_text: null,
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(params) {
|
onLoad(params) {
|
||||||
@ -93,7 +95,9 @@ Page({
|
|||||||
goods_spec_base_price: data.goods.price,
|
goods_spec_base_price: data.goods.price,
|
||||||
goods_spec_base_original_price: data.goods.original_price,
|
goods_spec_base_original_price: data.goods.original_price,
|
||||||
goods_spec_base_inventory: data.goods.inventory,
|
goods_spec_base_inventory: data.goods.inventory,
|
||||||
goods_spec_base_images: data.goods.images
|
goods_spec_base_images: data.goods.images,
|
||||||
|
|
||||||
|
show_field_price_text: data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 不能选择规格处理
|
// 不能选择规格处理
|
||||||
|
@ -28,6 +28,8 @@ Page({
|
|||||||
goods_spec_base_original_price: 0,
|
goods_spec_base_original_price: 0,
|
||||||
goods_spec_base_inventory: 0,
|
goods_spec_base_inventory: 0,
|
||||||
goods_spec_base_images: '',
|
goods_spec_base_images: '',
|
||||||
|
|
||||||
|
show_field_price_text: null,
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(params) {
|
onLoad(params) {
|
||||||
@ -93,7 +95,9 @@ Page({
|
|||||||
goods_spec_base_price: data.goods.price,
|
goods_spec_base_price: data.goods.price,
|
||||||
goods_spec_base_original_price: data.goods.original_price,
|
goods_spec_base_original_price: data.goods.original_price,
|
||||||
goods_spec_base_inventory: data.goods.inventory,
|
goods_spec_base_inventory: data.goods.inventory,
|
||||||
goods_spec_base_images: data.goods.images
|
goods_spec_base_images: data.goods.images,
|
||||||
|
|
||||||
|
show_field_price_text: data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 不能选择规格处理
|
// 不能选择规格处理
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-price single-text">
|
<view class="goods-price single-text">
|
||||||
|
<text wx:if="{{(show_field_price_text || null) != null}}" class="price-icon">{{show_field_price_text}}</text>
|
||||||
<text class="sales-price">¥{{goods.price}}</text>
|
<text class="sales-price">¥{{goods.price}}</text>
|
||||||
<text wx:if="{{(goods.original_price || null) != null}}" class="original-price">¥{{goods.original_price}}</text>
|
<text wx:if="{{(goods.original_price || null) != null}}" class="original-price">¥{{goods.original_price}}</text>
|
||||||
<view class="cr-ccc sales">
|
<view class="cr-ccc sales">
|
||||||
@ -49,7 +50,7 @@
|
|||||||
<text class="text-wrapper">详情</text>
|
<text class="text-wrapper">详情</text>
|
||||||
</view>
|
</view>
|
||||||
<view wx:for="{{goods_content_app}}" wx:key="key" class="goods-detail-app bg-white">
|
<view wx:for="{{goods_content_app}}" wx:key="key" class="goods-detail-app bg-white">
|
||||||
<image wx:if="{{(item.images || null) != null}}" bindtap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto" src="{{item.images}}" mode="widthFix" />
|
<image wx:if="{{(item.images || null) != null}}" bindtap="goods_detail_images_view_event" data-value="{{item.images}}" class="wh-auto dis-block" src="{{item.images}}" mode="widthFix" />
|
||||||
<view wx:if="{{(item.content || null) != null}}" class="content-items">
|
<view wx:if="{{(item.content || null) != null}}" class="content-items">
|
||||||
<view wx:for="{{item.content}}" wx:for-item="items">{{items}}</view>
|
<view wx:for="{{item.content}}" wx:for-item="items">{{items}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -203,3 +203,14 @@
|
|||||||
.page {
|
.page {
|
||||||
padding-bottom: 100rpx;
|
padding-bottom: 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 价格icon
|
||||||
|
*/
|
||||||
|
.price-icon {
|
||||||
|
background:#FF5722;
|
||||||
|
color:#fff;
|
||||||
|
padding:2px 5px;
|
||||||
|
line-height:20px;
|
||||||
|
border-radius:1px;
|
||||||
|
}
|
@ -14,7 +14,6 @@ time, mark, audio, video {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
vertical-align: baseline;
|
|
||||||
font-family: arial,"Lantinghei SC","Microsoft Yahei";
|
font-family: arial,"Lantinghei SC","Microsoft Yahei";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
@ -649,6 +648,7 @@ ul.am-dropdown-content > .am-active > a:focus,
|
|||||||
max-width: 100px;
|
max-width: 100px;
|
||||||
max-height: 45px;
|
max-height: 45px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
.shop-navigation .wap-logo img {
|
.shop-navigation .wap-logo img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
Loading…
Reference in New Issue
Block a user