goods
parent
4ef4f9d2e7
commit
d8eeac2c12
|
|
@ -251,6 +251,14 @@ textarea {
|
|||
background: #fbe0e5;
|
||||
color: #f7b6c2;
|
||||
}
|
||||
.bg-warning.a-button-disabled {
|
||||
background: #ffcda6;
|
||||
color: #fdae70;
|
||||
}
|
||||
.bg-primary.a-button-disabled {
|
||||
background: #ffd2d7;
|
||||
color: #ffa0ab;
|
||||
}
|
||||
|
||||
.nav-back {
|
||||
position: fixed;
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
.data-list .items {
|
||||
width: calc(25% - 40rpx);
|
||||
width: calc(25% - 60rpx);
|
||||
float: left;
|
||||
padding: 20rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
.items-content {
|
||||
border-radius: 50%;
|
||||
padding: 30rpx;
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.data-list .items image {
|
||||
width: 80rpx !important;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<view a:if="{{data_list.length > 0}}">
|
||||
<view class="data-list bg-white spacing-mb">
|
||||
<view class="items" a:for="{{data_list}}">
|
||||
<view class="items-content" style="background-color:{{item.bg_color}}" data-value="{{item.event_value}}" data-type="{{item.event_type}}" onTap="nav_event">
|
||||
<view class="items-content tc" style="background-color:{{item.bg_color}}" data-value="{{item.event_value}}" data-type="{{item.event_type}}" onTap="nav_event">
|
||||
<image class="wh-auto" src="{{item.images_url}}" mode="aspectFit" />
|
||||
</view>
|
||||
<view class="title tc single-text">{{item.name}}</view>
|
||||
|
|
|
|||
|
|
@ -8,20 +8,8 @@
|
|||
line-height: 80rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.goods-popup {
|
||||
background: rgba(0, 0, 0, 0.3803921568627451);
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
.goods-popup-choose {
|
||||
width: calc(100% - 20rpx);
|
||||
padding: 20rpx 10rpx;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
padding: 20rpx 10rpx;
|
||||
}
|
||||
.goods-popup .close {
|
||||
margin-right: 10rpx;
|
||||
|
|
@ -30,11 +18,7 @@
|
|||
max-height: 50vh;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.goods-popup-content,
|
||||
.goods-popup-submit
|
||||
{
|
||||
margin-top: 20rpx;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.goods-attr-choose .item {
|
||||
margin-bottom: 30rpx;
|
||||
|
|
@ -64,6 +48,7 @@
|
|||
height: 85rpx;
|
||||
line-height: 85rpx;
|
||||
font-size: 36rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.goods-popup .goods-buy-number {
|
||||
margin-bottom: 20rpx;
|
||||
|
|
|
|||
|
|
@ -71,14 +71,14 @@
|
|||
<text class="dis-block cr-888">{{goods_favor_text}}</text>
|
||||
</view>
|
||||
<view class="fr">
|
||||
<button class="bg-warning fl" type="default" onTap="cart_submit_event" hover-class="none">加入购物车</button>
|
||||
<button class="bg-main fl" type="default" onTap="buy_submit_event" hover-class="none">{{nav_submit_text}}</button>
|
||||
<button class="bg-warning fl" type="default" onTap="cart_submit_event" hover-class="none" disabled="{{nav_submit_is_disabled}}">加入购物车</button>
|
||||
<button class="bg-main fl" type="default" onTap="buy_submit_event" hover-class="none" disabled="{{nav_submit_is_disabled}}">{{nav_submit_text}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 弹层 -->
|
||||
<view class="goods-popup wh-auto {{popup_status}}" onTap="popup_close_event">
|
||||
<view class="goods-popup-choose bg-white" catchTap>
|
||||
<popup show="{{popup_status}}" position="bottom" onClose="popup_close_event">
|
||||
<view class="goods-popup bg-white">
|
||||
<view class="close tr dis-block oh">
|
||||
<view class="fr" catchTap="popup_close_event">
|
||||
<icon type="clear" size="20" />
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
</view>
|
||||
<button class="goods-popup-submit bg-main" type="default" catchTap="goods_buy_confirm_event" hover-class="none">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</popup>
|
||||
</view>
|
||||
|
||||
<view a:if="{{goods == null}}">
|
||||
|
|
|
|||
|
|
@ -17,13 +17,14 @@ Page({
|
|||
goods_attribute_choose: [],
|
||||
goods_content_app: [],
|
||||
|
||||
popup_status: 'dis-none',
|
||||
popup_status: false,
|
||||
goods_favor_text: '收藏',
|
||||
goods_favor_icon: '/images/goods-detail-favor-icon-0.png',
|
||||
temp_attribute_active: {},
|
||||
temp_buy_number: 1,
|
||||
buy_event_type: 'buy',
|
||||
nav_submit_text: '立即购买',
|
||||
nav_submit_is_disabled: true,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -85,7 +86,22 @@ Page({
|
|||
nav_submit_text: ((data.common_order_is_booking || 0) == 0) ? '立即购买' : '立即预约',
|
||||
data_bottom_line_status: true,
|
||||
data_list_loding_status: 3,
|
||||
nav_submit_is_disabled: (data.goods.is_shelves == 1 && data.goods.inventory > 0) ? false : true,
|
||||
});
|
||||
|
||||
if (data.goods.is_shelves != 1) {
|
||||
this.setData({
|
||||
nav_submit_text: '商品已下架',
|
||||
nav_submit_is_disabled: true,
|
||||
});
|
||||
} else {
|
||||
if(data.goods.inventory <= 0) {
|
||||
this.setData({
|
||||
nav_submit_text: '商品卖光了',
|
||||
nav_submit_is_disabled: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
self.setData({
|
||||
data_bottom_line_status: false,
|
||||
|
|
@ -126,7 +142,7 @@ Page({
|
|||
|
||||
// 弹层关闭
|
||||
popup_close_event(e) {
|
||||
this.setData({popup_status: 'dis-none'});
|
||||
this.setData({popup_status: false});
|
||||
},
|
||||
|
||||
// 进入店铺
|
||||
|
|
@ -139,12 +155,12 @@ Page({
|
|||
|
||||
// 加入购物车
|
||||
cart_submit_event(e) {
|
||||
this.setData({ popup_status: '', buy_event_type: 'cart' });
|
||||
this.setData({ popup_status: true, buy_event_type: 'cart' });
|
||||
},
|
||||
|
||||
// 立即购买
|
||||
buy_submit_event(e) {
|
||||
this.setData({ popup_status: '', buy_event_type: 'buy'});
|
||||
this.setData({ popup_status: true, buy_event_type: 'buy'});
|
||||
},
|
||||
|
||||
// 收藏事件
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
{
|
||||
"pullRefresh": true
|
||||
"pullRefresh": true,
|
||||
"usingComponents": {
|
||||
"popup": "mini-antui/es/popup/index"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue