【调整】重写拼团前端列表,拼团详情,拼团首页组件,拼团海报等数据获取规则,减少不必要的数据查询,增加redis缓存,提升访问速度,调整拼团海报为新海报模式。

【优化】优化分享识别跳转页面【jump】代码。
This commit is contained in:
大灰灰
2022-10-21 05:41:25 +08:00
parent 91e6cb2432
commit adfbbc783e
21 changed files with 485 additions and 329 deletions

View File

@@ -66,7 +66,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
/// </summary>
/// <returns></returns>
[HttpPost]
public async Task<WebApiCallBack> GetList([FromBody] FMIntId entity)
public async Task<WebApiCallBack> GetList()
{
WebApiCallBack jm;
@@ -75,12 +75,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
{
userId = _user.ID;
}
var id = 0;
if (entity.id > 0)
{
id = entity.id;
}
jm = await _pinTuanRuleServices.GetPinTuanList(id, userId);
jm = await _pinTuanRuleServices.GetPinTuanList(userId);
return jm;
}
@@ -101,11 +96,20 @@ namespace CoreCms.Net.Web.WebApi.Controllers
{
userId = _user.ID;
}
var pinTuanStatus = entity.data.ObjectToInt(1);
var showSku = entity.data.ObjectToBool();
var pinTuanRule = await _pinTuanRuleServices.QueryByClauseAsync(p => p.id == entity.id, true, true);
if (pinTuanRule == null)
{
jm.msg = "拼团获取失败";
return jm;
}
var pinTuanGood = await _pinTuanGoodsServices.QueryByClauseAsync(p => p.ruleId == entity.id, true, true);
jm.status = true;
jm.msg = "获取详情成功";
jm.data = await _pinTuanGoodsServices.GetGoodsInfo(entity.id, userId, pinTuanStatus);
jm.data = await _pinTuanGoodsServices.GetGoodsInfo(pinTuanRule, pinTuanGood.goodsId, userId, true, true, showSku);
return jm;