mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 10:29:50 +08:00
【新增】新增仿点餐模块
This commit is contained in:
@@ -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>
|
||||
/// 商品取消/添加收藏
|
||||
|
||||
Reference in New Issue
Block a user