去除goods_type的样式
This commit is contained in:
parent
1a114ff060
commit
d55719eec2
@ -76,8 +76,7 @@ Page({
|
|||||||
imageUrl: image
|
imageUrl: image
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onUnload: function() {
|
onUnload: function() {},
|
||||||
},
|
|
||||||
handleTap: function(event) { //阻止冒泡
|
handleTap: function(event) { //阻止冒泡
|
||||||
},
|
},
|
||||||
getGoodsInfo: function() {
|
getGoodsInfo: function() {
|
||||||
@ -89,7 +88,6 @@ Page({
|
|||||||
id: that.data.id
|
id: that.data.id
|
||||||
}).then(function(res) {
|
}).then(function(res) {
|
||||||
if (res.errno === 0) {
|
if (res.errno === 0) {
|
||||||
let goods_type = res.data.info.goods_type;
|
|
||||||
let _specificationList = res.data.specificationList;
|
let _specificationList = res.data.specificationList;
|
||||||
// 如果仅仅存在一种货品,那么商品页面初始化时默认checked
|
// 如果仅仅存在一种货品,那么商品页面初始化时默认checked
|
||||||
if (_specificationList.valueList.length == 1) {
|
if (_specificationList.valueList.length == 1) {
|
||||||
@ -392,7 +390,6 @@ Page({
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let type = that.data.goods.goods_type;
|
|
||||||
util.request(api.CartAdd, {
|
util.request(api.CartAdd, {
|
||||||
addType: 0,
|
addType: 0,
|
||||||
goodsId: this.data.id,
|
goodsId: this.data.id,
|
||||||
@ -402,11 +399,6 @@ Page({
|
|||||||
.then(function(res) {
|
.then(function(res) {
|
||||||
let _res = res;
|
let _res = res;
|
||||||
if (_res.errno == 0) {
|
if (_res.errno == 0) {
|
||||||
if (type == 2) {
|
|
||||||
wx.switchTab({
|
|
||||||
url: '/pages/cart/cart',
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '添加成功',
|
title: '添加成功',
|
||||||
});
|
});
|
||||||
@ -420,8 +412,6 @@ Page({
|
|||||||
cartGoodsCount: _res.data.cartTotal.goodsCount
|
cartGoodsCount: _res.data.cartTotal.goodsCount
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
image: '/images/icon/icon_error.png',
|
image: '/images/icon/icon_error.png',
|
||||||
@ -477,7 +467,6 @@ Page({
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let type = that.data.goods.goods_type;
|
|
||||||
//添加到购物车
|
//添加到购物车
|
||||||
util.request(api.CartAdd, {
|
util.request(api.CartAdd, {
|
||||||
addType: 1, // 0:正常加入购物车,1:立即购买,2:再来一单
|
addType: 1, // 0:正常加入购物车,1:立即购买,2:再来一单
|
||||||
|
|||||||
@ -91,11 +91,8 @@
|
|||||||
<view class="spec-con">
|
<view class="spec-con">
|
||||||
<view class='spec-item'>
|
<view class='spec-item'>
|
||||||
<view class='name'>{{specificationList.name}}</view>
|
<view class='name'>{{specificationList.name}}</view>
|
||||||
<view wx:if="{{goods.goods_type == 2}}" class="values">
|
<view class="values">
|
||||||
<view class="value {{item.checked ? 'selected' : ''}}" wx:for="{{specificationList.valueList}}" wx:key="{{item.id}}" data-value-id="{{item.id}}" data-name-id="{{item.specification_id}}">{{item.value}}</view>
|
<view class="value {{item.checked ? 'selected' : ''}} {{item.goods_number <=0?'out-stock':''}}" bindtap="{{item.goods_number <=0?'':'clickSkuValue'}}" wx:for="{{specificationList.valueList}}" wx:key="{{item.id}}" data-value-id="{{item.id}}" data-index="{{index}}" data-name-id="{{item.specification_id}}">{{item.value}}</view>
|
||||||
</view>
|
|
||||||
<view wx:else class="values">
|
|
||||||
<view class="value {{item.checked ? 'selected' : ''}}" bindtap="clickSkuValue" wx:for="{{specificationList.valueList}}" wx:key="{{item.id}}" data-value-id="{{item.id}}" data-index="{{index}}" data-name-id="{{item.specification_id}}">{{item.value}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="number-item">
|
<view class="number-item">
|
||||||
|
|||||||
@ -835,6 +835,13 @@
|
|||||||
color: #ff3456;
|
color: #ff3456;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.spec-con .value.out-stock {
|
||||||
|
border: 1px solid #a3a3a3;
|
||||||
|
color: #696969;
|
||||||
|
background: #dbdbdb;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.number-item .selnum {
|
.number-item .selnum {
|
||||||
width: 280rpx;
|
width: 280rpx;
|
||||||
height: 62rpx;
|
height: 62rpx;
|
||||||
|
|||||||
@ -199,7 +199,7 @@
|
|||||||
|
|
||||||
.catalog-wrap .icon-navi {
|
.catalog-wrap .icon-navi {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 160rpx;
|
/* height: 160rpx; */
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user