From ced32d7034365039f9e7591112c9c5bf7bea42a4 Mon Sep 17 00:00:00 2001 From: JianWeie Date: Tue, 7 Dec 2021 00:43:54 +0800 Subject: [PATCH] =?UTF-8?q?##=201.2.4=EF=BC=882021-12-06=EF=BC=89=20?= =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8D=E5=88=86?= =?UTF-8?q?=E9=94=80=E8=AE=BE=E7=BD=AE=E6=88=90=E4=B8=BA=E5=88=86=E9=94=80?= =?UTF-8?q?=E5=95=86=E7=9A=84=E6=9D=A1=E4=BB=B6=E4=B8=BA=E3=80=90=E6=97=A0?= =?UTF-8?q?=E9=9C=80=E5=AE=A1=E6=A0=B8=E3=80=91=E4=BD=86=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82#I4LA2A=20?= =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E5=8F=96=E6=B6=88=E6=9C=AA?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E9=AA=8C=E8=AF=81=E5=8F=AF=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E9=AA=8C=E8=AF=81=E6=A8=A1=E5=BC=8F=E3=80=82#I4L198?= =?UTF-8?q?=20=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=89=8D=E7=AB=AFcoreshop.vue=E9=A1=B5=E9=9D=A2=E7=BC=96?= =?UTF-8?q?=E7=A0=81=E4=B8=BAgb=E9=97=AE=E9=A2=98=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=B8=BAutf-8=E3=80=82#I4L0YR=20=E3=80=90=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8D=E5=88=A4=E6=96=AD=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=98=AF=E5=90=A6=E5=8F=82=E5=8A=A0=E5=9B=A2=E8=B4=AD?= =?UTF-8?q?=E6=88=96=E8=80=85=E7=A7=92=E6=9D=80=E7=9A=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E8=BF=90=E7=AE=97=E7=AC=A6=E4=BD=BF=E7=94=A8=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82#I4KZ1K=20=E3=80=90?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=91=E5=9B=A0=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=AD=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E8=B7=AF=E5=BE=84windows=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E4=B8=8Elinux=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=9C=89=E5=B7=AE?= =?UTF-8?q?=E5=BC=82=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=A4=BA=E4=BE=8B=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E3=80=82#I4KVWL=20=E3=80=90=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=91=E8=B0=83=E6=95=B4=E7=9F=AD=E4=BF=A1=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=A8=A1=E6=9D=BF=E6=A0=B7=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=AF=E5=90=8E=E5=8F=B0=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E7=9F=AD=E4=BF=A1=E5=8F=91=E9=80=81=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E3=80=82#I4KLK1=20=E3=80=90=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E4=BF=AE=E5=A4=8D=E5=85=A8=E5=B1=80=E4=BF=83?= =?UTF-8?q?=E9=94=80=E5=A6=82=E6=9E=9C=E4=BF=83=E9=94=80=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E4=B8=BA=E5=B0=8F=E6=95=B0=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= =?UTF-8?q?#I4L9H6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Policys/PermissionForAdminHandler.cs | 15 ++- .../Policys/PermissionForClientHandler.cs | 15 ++- CoreCms.Net.Configuration/GlobalEnumVars.cs | 23 ++++ .../SystemSettingConstVars.cs | 55 +++++++++ .../SystemSettingDictionary.cs | 13 +++ .../CoreCmsDistributionOrderServices.cs | 2 +- .../CoreCmsDistributionServices.cs | 10 +- .../Good/CoreCmsGoodsServices.cs | 3 +- .../Message/CoreCmsSmsServices.cs | 106 +++++++++++++++++- .../CoreCmsPromotionResultServices.cs | 10 +- .../components/coreshop-page/coreshop.vue | 42 +++---- CoreCms.Net.Web.Admin/appsettings.json | 1 + .../views/shop/message/smssetting/index.html | 99 ++++++++++++++++ CoreCms.Net.Web.WebApi/appsettings.json | 1 + 14 files changed, 355 insertions(+), 40 deletions(-) diff --git a/CoreCms.Net.Auth/Policys/PermissionForAdminHandler.cs b/CoreCms.Net.Auth/Policys/PermissionForAdminHandler.cs index 3538be4..b3cd0da 100644 --- a/CoreCms.Net.Auth/Policys/PermissionForAdminHandler.cs +++ b/CoreCms.Net.Auth/Policys/PermissionForAdminHandler.cs @@ -185,6 +185,11 @@ namespace CoreCms.Net.Auth.Policys } return; } + else + { + context.Fail(); + return; + } } else { @@ -192,11 +197,11 @@ namespace CoreCms.Net.Auth.Policys return; } //判断没有登录时,是否访问登录的url,并且是Post请求,并且是form表单提交类型,否则为失败 - if (!questUrl.Equals(requirement.LoginPath.ToLower(), StringComparison.Ordinal) && (!httpContext.Request.Method.Equals("POST") || !httpContext.Request.HasJsonContentType())) - { - context.Fail(); - return; - } + //if (!questUrl.Equals(requirement.LoginPath.ToLower(), StringComparison.Ordinal) && (!httpContext.Request.Method.Equals("POST") || !httpContext.Request.HasJsonContentType())) + //{ + // context.Fail(); + // return; + //} } context.Succeed(requirement); diff --git a/CoreCms.Net.Auth/Policys/PermissionForClientHandler.cs b/CoreCms.Net.Auth/Policys/PermissionForClientHandler.cs index 6f9c383..1a878c2 100644 --- a/CoreCms.Net.Auth/Policys/PermissionForClientHandler.cs +++ b/CoreCms.Net.Auth/Policys/PermissionForClientHandler.cs @@ -157,6 +157,11 @@ namespace CoreCms.Net.Auth.Policys } return; } + else + { + context.Fail(); + return; + } } else { @@ -164,11 +169,11 @@ namespace CoreCms.Net.Auth.Policys return; } //判断没有登录时,是否访问登录的url,并且是Post请求,并且是form表单提交类型,否则为失败 - if (!questUrl.Equals(requirement.LoginPath.ToLower(), StringComparison.Ordinal) && (!httpContext.Request.Method.Equals("POST") || !httpContext.Request.HasJsonContentType())) - { - context.Fail(); - return; - } + //if (!questUrl.Equals(requirement.LoginPath.ToLower(), StringComparison.Ordinal) && (!httpContext.Request.Method.Equals("POST") || !httpContext.Request.HasJsonContentType())) + //{ + // context.Fail(); + // return; + //} } context.Succeed(requirement); diff --git a/CoreCms.Net.Configuration/GlobalEnumVars.cs b/CoreCms.Net.Configuration/GlobalEnumVars.cs index c2f2506..52f7fdd 100644 --- a/CoreCms.Net.Configuration/GlobalEnumVars.cs +++ b/CoreCms.Net.Configuration/GlobalEnumVars.cs @@ -2264,6 +2264,29 @@ namespace CoreCms.Net.Configuration COMMISSION_TYPE_FIXED = 2, } + /// + /// 成为分销商条件 + /// + public enum DistributionConditionType + { + + /// + /// 无条件(需审核) + /// + [Description("无条件(需审核)")] + Unconditional = 1, + /// + /// 申请(需审核) + /// + [Description("申请(需审核)")] + Apply = 2, + /// + /// 无需审核 + /// + [Description("无需审核")] + NoReview = 3, + } + #endregion #region 快递100api接口相关=================== diff --git a/CoreCms.Net.Configuration/SystemSettingConstVars.cs b/CoreCms.Net.Configuration/SystemSettingConstVars.cs index 15edd24..c0dc81a 100644 --- a/CoreCms.Net.Configuration/SystemSettingConstVars.cs +++ b/CoreCms.Net.Configuration/SystemSettingConstVars.cs @@ -539,6 +539,61 @@ namespace CoreCms.Net.Configuration public const string SmsSignature = "smsSignature"; + /// + /// 账户注册-短信内容模板 + /// + public const string SmsTplForReg = "smsTplForReg"; + + /// + /// 账户登录-短信内容模板 + /// + public const string SmsTplForLogin = "smsTplForLogin"; + + /// + /// 验证验证码-短信内容模板 + /// + public const string SmsTplForVeri = "smsTplForVeri"; + + /// + /// 下单成功时-短信内容模板 + /// + public const string SmsTplForCreateOrder = "smsTplForCreateOrder"; + + /// + /// 订单支付成功时-短信内容模板 + /// + public const string SmsTplForOrderPayed = "smsTplForOrderPayed"; + + /// + /// 订单催付提醒-短信内容模板 + /// + public const string SmsTplForRemindOrderPay = "smsTplForRemindOrderPay"; + + /// + /// 订单发货通知-短信内容模板 + /// + public const string SmsTplForDeliveryNotice = "smsTplForDeliveryNotice"; + + /// + /// 售后确认通过-短信内容模板 + /// + public const string SmsTplForAfterSalesPass = "smsTplForAfterSalesPass"; + + /// + /// 用户退款成功通知-短信内容模板 + /// + public const string SmsTplForRefundSuccess = "smsTplForRefundSuccess"; + + /// + /// 订单付款成功平台通知-短信内容模板 + /// + public const string SmsTplForSellerOrderNotice = "smsTplForSellerOrderNotice"; + + /// + /// 通用类型-短信内容模板 + /// + public const string SmsTplForCommon = "smsTplForCommon"; + //网络打印机============================================================================ /// /// 是否开启 diff --git a/CoreCms.Net.Configuration/SystemSettingDictionary.cs b/CoreCms.Net.Configuration/SystemSettingDictionary.cs index 688738a..6491dc2 100644 --- a/CoreCms.Net.Configuration/SystemSettingDictionary.cs +++ b/CoreCms.Net.Configuration/SystemSettingDictionary.cs @@ -194,6 +194,19 @@ namespace CoreCms.Net.Configuration di.Add(SystemSettingConstVars.FilesStorageQiNiuBucketName, new DictionaryKeyValues() { sKey = "七牛云桶名称", sValue = "CoreShop" }); + //短信发送内容模板 + di.Add(SystemSettingConstVars.SmsTplForReg, new DictionaryKeyValues() { sKey = "账户注册", sValue = "您正在注册账号,验证码是{code},请勿告诉他人。" }); + di.Add(SystemSettingConstVars.SmsTplForLogin, new DictionaryKeyValues() { sKey = "账户登录", sValue = "您正在登陆账号,验证码是{code},请勿告诉他人。" }); + di.Add(SystemSettingConstVars.SmsTplForVeri, new DictionaryKeyValues() { sKey = "验证验证码", sValue = "您的验证码是{code},请勿告诉他人。" }); + di.Add(SystemSettingConstVars.SmsTplForCreateOrder, new DictionaryKeyValues() { sKey = "下单成功时", sValue = "恭喜您,订单创建成功,祝您购物愉快。" }); + di.Add(SystemSettingConstVars.SmsTplForOrderPayed, new DictionaryKeyValues() { sKey = "订单支付成功时", sValue = "恭喜您,订单支付成功,祝您购物愉快。" }); + di.Add(SystemSettingConstVars.SmsTplForRemindOrderPay, new DictionaryKeyValues() { sKey = "订单催付提醒", sValue = "您的订单还有1个小时就要取消了,请及时进行支付。" }); + di.Add(SystemSettingConstVars.SmsTplForDeliveryNotice, new DictionaryKeyValues() { sKey = "订单发货通知", sValue = "您好,您的订单已经发货。" }); + di.Add(SystemSettingConstVars.SmsTplForAfterSalesPass, new DictionaryKeyValues() { sKey = "售后确认通过", sValue = "您好,您的售后已经通过。" }); + di.Add(SystemSettingConstVars.SmsTplForRefundSuccess, new DictionaryKeyValues() { sKey = "用户退款成功通知", sValue = "用户您好,您的退款已经处理,请确认。" }); + di.Add(SystemSettingConstVars.SmsTplForSellerOrderNotice, new DictionaryKeyValues() { sKey = "订单付款成功平台通知", sValue = "您有新的订单了,请及时处理。" }); + di.Add(SystemSettingConstVars.SmsTplForCommon, new DictionaryKeyValues() { sKey = "通用类型", sValue = "欢迎您访问我们的微信小程序,有问题请联系客服。" }); + return di; } diff --git a/CoreCms.Net.Services/Distribution/CoreCmsDistributionOrderServices.cs b/CoreCms.Net.Services/Distribution/CoreCmsDistributionOrderServices.cs index 1403ca6..55a2068 100644 --- a/CoreCms.Net.Services/Distribution/CoreCmsDistributionOrderServices.cs +++ b/CoreCms.Net.Services/Distribution/CoreCmsDistributionOrderServices.cs @@ -144,7 +144,7 @@ namespace CoreCms.Net.Services //查询获取几级返利 var user = await _userServices.QueryByClauseAsync(p => p.id == order.userId); - if (user != null && user.parentId > 0) + if (user is { parentId: > 0 }) { //获取购物明细 var orderItems = await _orderItemServices.QueryListByClauseAsync(p => p.orderId == order.orderId); diff --git a/CoreCms.Net.Services/Distribution/CoreCmsDistributionServices.cs b/CoreCms.Net.Services/Distribution/CoreCmsDistributionServices.cs index 117dc41..13fe02e 100644 --- a/CoreCms.Net.Services/Distribution/CoreCmsDistributionServices.cs +++ b/CoreCms.Net.Services/Distribution/CoreCmsDistributionServices.cs @@ -234,10 +234,18 @@ namespace CoreCms.Net.Services iData.gradeId = disGradeModel.id; } } - if (iData.verifyStatus == 0) + + var allConfigs = await _settingServices.GetConfigDictionaries(); + var distributionType = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.DistributionType).ObjectToInt(0); + if (distributionType == (int)GlobalEnumVars.DistributionConditionType.NoReview) + { + iData.verifyStatus = (int)GlobalEnumVars.DistributionVerifyStatus.VerifyYes; + } + else { iData.verifyStatus = (int)GlobalEnumVars.DistributionVerifyStatus.VerifyWait; } + iData.isDelete = false; iData.createTime = DateTime.Now; diff --git a/CoreCms.Net.Services/Good/CoreCmsGoodsServices.cs b/CoreCms.Net.Services/Good/CoreCmsGoodsServices.cs index eed719b..31f0e4e 100644 --- a/CoreCms.Net.Services/Good/CoreCmsGoodsServices.cs +++ b/CoreCms.Net.Services/Good/CoreCmsGoodsServices.cs @@ -24,6 +24,7 @@ using CoreCms.Net.Model.Entities.Expression; using CoreCms.Net.Model.FromBody; using CoreCms.Net.Model.ViewModels.Basics; using CoreCms.Net.Model.ViewModels.UI; +using CoreCms.Net.Utility.Extensions; using CoreCms.Net.Utility.Helper; using Newtonsoft.Json; using SqlSugar; @@ -454,7 +455,7 @@ namespace CoreCms.Net.Services goodId = "", num = 0, }); - if (obj.goodId == goodId.ToString()) return false; + if (obj.goodId.ObjectToInt(0) != goodId) return false; promotionsModel = promotions; return true; } diff --git a/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs b/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs index f24fa93..8a91ce3 100644 --- a/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs +++ b/CoreCms.Net.Services/Message/CoreCmsSmsServices.cs @@ -225,7 +225,111 @@ namespace CoreCms.Net.Services { isUsed = true; } - var str = SmsHelper.GetTemp(code, parameters); + + + var str = string.Empty; + var allConfigs = await _settingServices.GetConfigDictionaries(); + + if (code == GlobalEnumVars.SmsMessageTypes.Reg.ToString()) + { + // 账户注册 + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForReg); + if (!string.IsNullOrEmpty(msg)) + { + var sendCode = string.Empty; + if (parameters.ContainsKey("code")) + { + sendCode = parameters["code"]?.ToString(); + } + str = msg.Replace("{code}", sendCode); + } + } + else if (code == GlobalEnumVars.SmsMessageTypes.Login.ToString()) + { + // 账户登录 + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForLogin); + if (!string.IsNullOrEmpty(msg)) + { + var sendCode = string.Empty; + if (parameters.ContainsKey("code")) + { + sendCode = parameters["code"]?.ToString(); + } + str = msg.Replace("{code}", sendCode); + } + } + else if (code == GlobalEnumVars.SmsMessageTypes.Veri.ToString()) + { + // 验证验证码 + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForVeri); + if (!string.IsNullOrEmpty(msg)) + { + var sendCode = string.Empty; + if (parameters.ContainsKey("code")) + { + sendCode = parameters["code"]?.ToString(); + } + str = msg.Replace("{code}", sendCode); + } + } + else if (code == GlobalEnumVars.PlatformMessageTypes.CreateOrder.ToString()) + { + // 订单创建 + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForCreateOrder); + str = !string.IsNullOrEmpty(msg) ? msg : string.Empty; + } + else if (code == GlobalEnumVars.PlatformMessageTypes.OrderPayed.ToString()) + { + // 订单支付通知买家 + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForOrderPayed); + str = !string.IsNullOrEmpty(msg) ? msg : string.Empty; + } + else if (code == GlobalEnumVars.PlatformMessageTypes.RemindOrderPay.ToString()) + { + // 未支付催单 + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForRemindOrderPay); + str = !string.IsNullOrEmpty(msg) ? msg : string.Empty; + } + else if (code == GlobalEnumVars.PlatformMessageTypes.DeliveryNotice.ToString()) + { + // 订单发货 + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForDeliveryNotice); + str = !string.IsNullOrEmpty(msg) ? msg : string.Empty; + } + else if (code == GlobalEnumVars.PlatformMessageTypes.AfterSalesPass.ToString()) + { + // 售后审核通过 + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForAfterSalesPass); + str = !string.IsNullOrEmpty(msg) ? msg : string.Empty; + } + else if (code == GlobalEnumVars.PlatformMessageTypes.RefundSuccess.ToString()) + { + // 退款已处理 + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForRefundSuccess); + str = !string.IsNullOrEmpty(msg) ? msg : string.Empty; + } + else if (code == GlobalEnumVars.PlatformMessageTypes.SellerOrderNotice.ToString()) + { + // 订单支付通知卖家 + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForSellerOrderNotice); + str = !string.IsNullOrEmpty(msg) ? msg : string.Empty; + } + else if (code == GlobalEnumVars.PlatformMessageTypes.Common.ToString()) + { + //通用类型 + var tpl = string.Empty; + if (parameters.ContainsKey("tpl")) + { + tpl = parameters["tpl"]?.ToString(); + } + str = tpl; + if (!string.IsNullOrEmpty(str)) + { + var msg = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.SmsTplForCommon); + str = !string.IsNullOrEmpty(msg) ? msg : string.Empty; + } + } + if (string.IsNullOrEmpty(str)) { jm.msg = GlobalErrorCodeVars.Code10009; diff --git a/CoreCms.Net.Services/Promotion/CoreCmsPromotionResultServices.cs b/CoreCms.Net.Services/Promotion/CoreCmsPromotionResultServices.cs index 56df364..384accf 100644 --- a/CoreCms.Net.Services/Promotion/CoreCmsPromotionResultServices.cs +++ b/CoreCms.Net.Services/Promotion/CoreCmsPromotionResultServices.cs @@ -31,7 +31,7 @@ namespace CoreCms.Net.Services { private readonly ICoreCmsPromotionResultRepository _dal; - private ICoreCmsPromotionConditionServices _promotionConditionServices; + private readonly ICoreCmsPromotionConditionServices _promotionConditionServices; private readonly IUnitOfWork _unitOfWork; @@ -156,7 +156,7 @@ namespace CoreCms.Net.Services { case (int)GlobalEnumVars.PromotionType.Promotion: //总促销修改 - cart.orderPromotionMoney = cart.orderPromotionMoney + (decimal)parameters["money"]; + cart.orderPromotionMoney += (decimal)parameters["money"]; //设置促销列表 if (cart.promotionList.ContainsKey(promotionInfo.id)) { @@ -171,7 +171,7 @@ namespace CoreCms.Net.Services case (int)GlobalEnumVars.PromotionType.Coupon: //优惠券促销金额 - cart.couponPromotionMoney = cart.couponPromotionMoney + (decimal)parameters["money"]; + cart.couponPromotionMoney += (decimal)parameters["money"]; break; } return true; @@ -190,7 +190,7 @@ namespace CoreCms.Net.Services //var objDiscount = Convert.ToInt32(parameters["discount"]); if (!parameters.ContainsKey("discount")) return true; - var objDiscount = parameters["discount"].ObjectToInt(0); + var objDiscount = parameters["discount"].ObjectToDecimal(0); //判断参数是否设置的正确 if (objDiscount >= 10 || objDiscount <= 0) @@ -264,7 +264,7 @@ namespace CoreCms.Net.Services public decimal result_GOODS_DISCOUNT(JObject parameters, CartProducts cartProducts, CoreCmsPromotion promotionInfo) { if (!parameters.ContainsKey("discount")) return 0; - var objDiscount = parameters["discount"].ObjectToInt(0); + var objDiscount = parameters["discount"].ObjectToDecimal(0); decimal promotionMoney = 0; decimal goodsPrice = cartProducts.products.price; diff --git a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop.vue b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop.vue index 3cc78d7..a396316 100644 --- a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop.vue +++ b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop.vue @@ -1,47 +1,47 @@