mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:43:26 +08:00
# 2022-02-20
### 1.3.7 开源社区版: 无 ### 0.2.1 会员专业版: 【修复】修复商品分享链接获取失败的问题。 【优化】同城配送运费计算直线距离超过50km的极端情况下直接按照公里数*2元计算。 【修复】修复同城配送切换地址成功但是未重新计算运费的问题。 【优化】优化会员中心面板用户登录后昵称与会员等级挤压导致换行问题。 【修复】修复购物车加减按钮反复频繁点击下。导致总价可能出现异常的情况。 【优化】优化下单界面布局细节。 【修复】修复首页秒杀排列样式问题。#I4UE2E
This commit is contained in:
@@ -715,30 +715,17 @@ namespace CoreCms.Net.Services
|
||||
var intraCityServiceBy15Km = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.IntraCityServiceBy15KM).ObjectToDecimal(0);
|
||||
var intraCityServiceBy20Km = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.IntraCityServiceBy20KM).ObjectToDecimal(0);
|
||||
|
||||
if (0 <= result && result <= 2)
|
||||
cartDto.costFreight = result switch
|
||||
{
|
||||
cartDto.costFreight = intraCityServiceBy2Km;
|
||||
}
|
||||
else if (result > 2 && result <= 5)
|
||||
{
|
||||
cartDto.costFreight = intraCityServiceBy5Km;
|
||||
}
|
||||
else if (result > 5 && result <= 10)
|
||||
{
|
||||
cartDto.costFreight = intraCityServiceBy5Km;
|
||||
}
|
||||
else if (result > 10 && result <= 15)
|
||||
{
|
||||
cartDto.costFreight = intraCityServiceBy5Km;
|
||||
}
|
||||
else if (result > 15 && result <= 20)
|
||||
{
|
||||
cartDto.costFreight = intraCityServiceBy5Km;
|
||||
}
|
||||
else
|
||||
{
|
||||
cartDto.costFreight = 0;
|
||||
}
|
||||
>= 0 and <= 2 => intraCityServiceBy2Km,
|
||||
> 2 and <= 5 => intraCityServiceBy5Km,
|
||||
> 5 and <= 10 => intraCityServiceBy10Km,
|
||||
> 10 and <= 15 => intraCityServiceBy15Km,
|
||||
> 15 and <= 20 => intraCityServiceBy20Km,
|
||||
> 20 => Math.Round(result * 2).ObjectToDecimal(),
|
||||
< 0 => intraCityServiceBy2Km,
|
||||
_ => cartDto.costFreight
|
||||
};
|
||||
cartDto.amount = Math.Round(cartDto.amount + cartDto.costFreight, 2);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user