【新增】新增仿点餐模块

This commit is contained in:
大灰灰
2022-09-18 22:44:02 +08:00
parent 1b2a299d0a
commit 8682701c66
15 changed files with 820 additions and 122 deletions

View File

@@ -37,6 +37,7 @@ using CoreCms.Net.WeChat.Service.Models;
using CoreCms.Net.WeChat.Service.Options;
using CoreCms.Net.WeChat.Service.Utilities;
using DotLiquid.Util;
using Essensoft.Paylink.Alipay.Domain;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
@@ -273,7 +274,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
{
jm.msg = "当前请求太频繁_请稍后再试";
}
return jm;
}
#endregion
@@ -888,6 +889,31 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
#endregion
#region
/// <summary>
/// 获取购物车商品数量
/// </summary>
/// <returns></returns>
[HttpPost]
[Authorize]
public async Task<WebApiCallBack> GetCartNumberAndMoney()
{
var jm = new WebApiCallBack();
var count = await _cartServices.GetCountAsync(_user.ID);
var money = await _cartServices.GetMoneyAsync(_user.ID);
jm.status = true;
jm.msg = jm.status ? GlobalConstVars.GetDataSuccess : GlobalConstVars.GetDataFailure;
jm.data = new
{
count,
money
};
return jm;
}
#endregion
#region /
/// <summary>
/// 商品取消/添加收藏