mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:43:26 +08:00
【优化】优化单品非sku下弹窗格式化数据异常,更换新的购物车及下单按钮。
This commit is contained in:
@@ -564,6 +564,14 @@ namespace CoreCms.Net.Services
|
||||
good.weight = product.weight;
|
||||
good.buyPinTuanCount = product.buyPinTuanCount;
|
||||
good.buyPromotionCount = product.buyPromotionCount;
|
||||
|
||||
if (!string.IsNullOrEmpty(good.labelIds))
|
||||
{
|
||||
var ids = CommonHelper.StringToIntArray(good.labelIds);
|
||||
var lbs = await _labelServices.QueryAsync(true, true, 3600);
|
||||
good.labels = lbs.Where(p => ids.Contains(p.id)).ToList();
|
||||
}
|
||||
|
||||
//获取商品最小价格
|
||||
good.minPrice = products.Any() ? products.OrderBy(p => p.price).First().price : product.price;
|
||||
//获取商品最大价格
|
||||
@@ -704,7 +712,7 @@ namespace CoreCms.Net.Services
|
||||
var buyPinTuanCount = 0;
|
||||
var isMaxGroupOrSeckillGoodsNums = false;
|
||||
var buyPromotionCount = 0;
|
||||
if (type == "pinTuan")
|
||||
if (type == GlobalEnumVars.OrderType.PinTuan.ToString().ToLowerInvariant())
|
||||
{
|
||||
//把拼团的一些属性等加上
|
||||
var pinTuanRule = pinTuanRuleServices.QueryMuchFirst<CoreCmsPinTuanRule, CoreCmsPinTuanGoods, CoreCmsPinTuanRule>(
|
||||
@@ -843,7 +851,7 @@ namespace CoreCms.Net.Services
|
||||
{
|
||||
result = new CoreCmsProductsView();
|
||||
result._id = product.id.ToString();
|
||||
result.name = product.name;
|
||||
result.name = good.name;
|
||||
result.goods_thumb = product.images;
|
||||
result.buyPinTuanCount = buyPinTuanCount;
|
||||
result.buyPromotionCount = buyPromotionCount;
|
||||
@@ -857,7 +865,7 @@ namespace CoreCms.Net.Services
|
||||
item.goods_name = good.name;
|
||||
item.image = o.images;
|
||||
item.price = o.price - gradePrice; //减去会员等级价格
|
||||
item.sku_name_arr = new List<string> { "商品信息", product.name };
|
||||
item.sku_name_arr = new List<string> { "默认" };
|
||||
item.stock = o.stock;
|
||||
if (type == GlobalEnumVars.OrderType.PinTuan.ToString().ToLowerInvariant())
|
||||
{
|
||||
@@ -881,10 +889,10 @@ namespace CoreCms.Net.Services
|
||||
new Product_Spec_listItem(){
|
||||
list = new List<Product_Sku_list>{
|
||||
new Product_Sku_list{
|
||||
name = product.name
|
||||
name = "默认"
|
||||
}
|
||||
},
|
||||
name = "商品信息"
|
||||
name = "默认"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
&.left { left: 0; }
|
||||
&.right { right: 0; }
|
||||
&.top { top: 0; }
|
||||
&.bottom { bottom: 3px; }
|
||||
&.bottom { bottom: 0; }
|
||||
.icon-jia { color: #ffffff; font-size: 25px; transition: all 0.3s; width: 22px; height: 22px;
|
||||
&.active { transform: rotate(90deg); }
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</view>
|
||||
|
||||
<view class="coreshop-margin-top-12 coreshop-multiple-line-clamp">
|
||||
<text class="coreshop-font-16 coreshop-font-weight-bold">{{ goodsInfo.name || '' }}</text>
|
||||
<text class="coreshop-font-16 coreshop-text-black coreshop-font-weight-bold">{{ goodsInfo.name || '' }}</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-8 coreshop-single-line-clamp">
|
||||
<text class="coreshop-font-14 coreshop-text-gray">{{ goodsInfo.brief || '' }}</text>
|
||||
@@ -286,25 +286,35 @@
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="action">
|
||||
<button open-type="contact" bindcontact="showChat" class="noButtonStyle" :send-message-title="goodsInfo.name" :send-message-path="'/pages/goods/goodDetails/goodDetails?id='+goodsInfo.id" :send-message-img="goodsInfo.image" show-message-card="true">
|
||||
<u-icon name="server-fill" :size="20" label="找客服" :labelSize="12" labelPos="bottom"></u-icon>
|
||||
<u-icon name="server-fill" :size="20" label="找客服" :labelSize="12" space="5px" labelPos="bottom"></u-icon>
|
||||
</button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="action" @click="redirectCart">
|
||||
<button class="noButtonStyle">
|
||||
<u-badge type="warning" :value="cartNums" showZero="false" absolute="true" :offset="[1, 4]"></u-badge>
|
||||
<u-icon name="shopping-cart" :size="24" label="购物车" :labelSize="12" labelPos="bottom"></u-icon>
|
||||
<u-icon name="shopping-cart-fill" :size="24" label="购物车" :labelSize="12" space="1px" labelPos="bottom"></u-icon>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-group coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-basis-5">
|
||||
<!--<view class="btn-group coreshop-flex coreshop-align-center coreshop-flex-direction-row coreshop-justify-between coreshop-basis-6">
|
||||
<u-button type="warning" size="normal" :plain="true" shape="circle" @click="openSkuPopup">
|
||||
<text class="coreshop-font-12">加购物车</text>
|
||||
</u-button>
|
||||
<u-button type="error" size="normal" shape="circle" @click="openSkuPopup">
|
||||
<text class="coreshop-font-12">立即购买</text>
|
||||
</u-button>
|
||||
</view>-->
|
||||
|
||||
<view class="coreshop-border-radius-20 coreshop-flex coreshop-align-end coreshop-flex-sub">
|
||||
<view class="btn-add-shopcar" @click="openSkuPopup">
|
||||
<text>加入购物车</text>
|
||||
</view>
|
||||
<view class="btn-buy" @click="openSkuPopup">
|
||||
<text>立即购买</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -686,3 +686,8 @@ u-icon { line-height: 0; }
|
||||
.goods-param-line .value { color: #2f2f2f; font-size: 12px; padding-left: 12px; width: 215px; }
|
||||
|
||||
.line-70 { background: #c3c3c3; height: 1px; margin-top: 3px; width: 34.5px; }
|
||||
|
||||
|
||||
.btn-add-shopcar { border: 1rpx solid #ff8512; border-radius: 12rpx; color: #ff8512; font-size: 32rpx; width: 210rpx; }
|
||||
.btn-add-shopcar, .btn-buy { font-weight: bolder; height: 72rpx; line-height: 72rpx; text-align: center; }
|
||||
.btn-buy { background: #ff3b3b; border-radius: 12rpx; color: #fff; margin-left: 14rpx; width: 220rpx; }
|
||||
|
||||
Reference in New Issue
Block a user