diff --git a/CoreCms.Net.Configuration/GlobalEnumVars.cs b/CoreCms.Net.Configuration/GlobalEnumVars.cs
index d4030beb..cf485471 100644
--- a/CoreCms.Net.Configuration/GlobalEnumVars.cs
+++ b/CoreCms.Net.Configuration/GlobalEnumVars.cs
@@ -268,6 +268,11 @@ namespace CoreCms.Net.Configuration
///
[Description("取消订单返还")]
PointCanCelOrder = 8,
+ ///
+ /// 邀请用户注册
+ ///
+ [Description("邀请用户注册")]
+ PointTypeInviterUser = 9,
}
///
diff --git a/CoreCms.Net.Configuration/SystemSettingConstVars.cs b/CoreCms.Net.Configuration/SystemSettingConstVars.cs
index fc03d673..d1718548 100644
--- a/CoreCms.Net.Configuration/SystemSettingConstVars.cs
+++ b/CoreCms.Net.Configuration/SystemSettingConstVars.cs
@@ -135,6 +135,11 @@ namespace CoreCms.Net.Configuration
///
public const string ShowInviterInfo = "showInviterInfo";
+ ///
+ /// 邀请用户赠送积分
+ ///
+ public const string InviterUserIntegral = "inviterUserIntegral";
+
///
/// 分销层级1,2层
diff --git a/CoreCms.Net.Configuration/SystemSettingDictionary.cs b/CoreCms.Net.Configuration/SystemSettingDictionary.cs
index f8c77e6a..c77333e2 100644
--- a/CoreCms.Net.Configuration/SystemSettingDictionary.cs
+++ b/CoreCms.Net.Configuration/SystemSettingDictionary.cs
@@ -96,11 +96,14 @@ namespace CoreCms.Net.Configuration
di.Add(SystemSettingConstVars.DistributionGoods, new DictionaryKeyValues() { sKey = "购买商品成为分销商", sValue = "1" });
di.Add(SystemSettingConstVars.DistributionGoodsId, new DictionaryKeyValues() { sKey = "购买商品成为分销商指定商品序列号", sValue = "0" });
+ //邀请好友
di.Add(SystemSettingConstVars.CommissionType, new DictionaryKeyValues() { sKey = "佣金类型", sValue = "1" });
di.Add(SystemSettingConstVars.CommissionFirst, new DictionaryKeyValues() { sKey = "一级佣金", sValue = "0" });
di.Add(SystemSettingConstVars.CommissionSecond, new DictionaryKeyValues() { sKey = "二级佣金", sValue = "0" });
di.Add(SystemSettingConstVars.CommissionThird, new DictionaryKeyValues() { sKey = "三级佣金", sValue = "0" });
+ di.Add(SystemSettingConstVars.InviterUserIntegral, new DictionaryKeyValues() { sKey = "赠送积分", sValue = "0" });
+
//代理功能
di.Add(SystemSettingConstVars.IsOpenAgent, new DictionaryKeyValues() { sKey = "是否开启代理模块", sValue = "1" });
di.Add(SystemSettingConstVars.IsShowAgentPortal, new DictionaryKeyValues() { sKey = "前端显示入口", sValue = "1" });
diff --git a/CoreCms.Net.Services/User/CoreCmsUserServices.cs b/CoreCms.Net.Services/User/CoreCmsUserServices.cs
index 35e48ee4..3493fdd6 100644
--- a/CoreCms.Net.Services/User/CoreCmsUserServices.cs
+++ b/CoreCms.Net.Services/User/CoreCmsUserServices.cs
@@ -170,7 +170,7 @@ namespace CoreCms.Net.Services
///
public async Task GetUserPoint(int userId, decimal orderMoney, int[] ids, int cartType)
{
-
+
GetUserPointResult dto = new GetUserPointResult();
//1是2否
@@ -352,6 +352,18 @@ namespace CoreCms.Net.Services
}
var bl = await _dal.UpdateAsync(p => new CoreCmsUser() { parentId = superiorId }, p => p.id == userId);
+
+ //增加上级积分
+ if (bl)
+ {
+ var allConfigs = await _settingServices.GetConfigDictionaries();
+ var inviterUserIntegral = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.InviterUserIntegral).ObjectToInt(); //是否开启积分功能
+ if (inviterUserIntegral > 0)
+ {
+ await _userPointLogServices.SetPoint(superiorId, inviterUserIntegral, (int)GlobalEnumVars.UserPointSourceTypes.PointTypeInviterUser, "发展用户:" + userId + "赠送积分");
+ }
+ }
+
jm.status = bl;
jm.msg = bl ? "填写邀请码成功!" : "填写邀请码失败!";
return jm;
@@ -628,6 +640,17 @@ namespace CoreCms.Net.Services
jm.msg = GlobalErrorCodeVars.Code10000;
return jm;
}
+
+ if (userId > 0 && entity.invitecode > 0 && userInfo.parentId > 0)
+ {
+ var allConfigs = await _settingServices.GetConfigDictionaries();
+ var inviterUserIntegral = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.InviterUserIntegral).ObjectToInt(); //是否开启积分功能
+ if (inviterUserIntegral > 0)
+ {
+ await _userPointLogServices.SetPoint(userId, inviterUserIntegral, (int)GlobalEnumVars.UserPointSourceTypes.PointTypeInviterUser, "发展用户:" + userId + "赠送积分");
+ }
+
+ }
userInfo = await _dal.QueryByIdAsync(userId);
}
else
diff --git a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-service.vue b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-service.vue
index 5d08f693..52602e41 100644
--- a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-service.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-service.vue
@@ -11,17 +11,17 @@
{{item.title}}
{{item.description}}
-
- ¥{{item.money}}
-
-
-
- 剩余:
-
- 已结束
- 售罄
+
+
+ ¥{{item.money}}
+
+
+
+
-
+ 已结束
+ 即将开始
+
diff --git a/CoreCms.Net.Web.Admin/Doc.xml b/CoreCms.Net.Web.Admin/Doc.xml
index 7d6c8ea6..d3c747f1 100644
--- a/CoreCms.Net.Web.Admin/Doc.xml
+++ b/CoreCms.Net.Web.Admin/Doc.xml
@@ -1162,12 +1162,14 @@
支付单表
-
+
构造函数
+
+
@@ -1201,6 +1203,13 @@
+
+
+ 更新微信支付数据
+
+
+
+
退款单表
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/common/getUpLoad.html b/CoreCms.Net.Web.Admin/wwwroot/views/common/getUpLoad.html
index 0a0966b5..43885d89 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/common/getUpLoad.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/common/getUpLoad.html
@@ -11,7 +11,7 @@
@@ -47,7 +47,7 @@
//普通图片上传
var uploadInst = upload.render({
- elem: '#upBtn'
+ elem: '#getUpLoadBtn'
, url: layui.setter.apiUrl + 'Api/Tools/UploadFiles'
, before: function (obj) {
obj.preview(function (index, file, result) {
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html
index a1795f74..7c957da8 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/good/goods/create.html
@@ -327,7 +327,7 @@
|
- |