diff --git a/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs b/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs index e68e130..5f33af7 100644 --- a/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs +++ b/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs @@ -78,7 +78,8 @@ namespace Coldairarrow.Business.HuiYan { GoodsId = b.GoodsId, HasFilter = b.HasFilter, - Platform = b.Platform + Platform = b.Platform, + GoodsUrl=b.GoodsUrl }; select = select.BuildExtendSelectExpre(); @@ -124,6 +125,21 @@ namespace Coldairarrow.Business.HuiYan Platform = (int)model.Platform }; + item.GoodsUrl = string.Empty; + switch (model.Platform) + { + case ItemPlatform.Taobao: + item.GoodsUrl = $"https://item.taobao.com/item.htm?id={item.GoodsId}"; + break; + case ItemPlatform.Jd: + item.GoodsUrl = $"https://item.jd.com/{item.GoodsId}.html"; + break; + case ItemPlatform.ALBB: + item.GoodsUrl = $"https://detail.1688.com/offer/{item.GoodsId}.html"; + break; + } + + int row = Db.Insert(item); if (row <= 0) @@ -320,7 +336,8 @@ namespace Coldairarrow.Business.HuiYan { GoodsId = b.GoodsId, HasFilter = b.HasFilter, - Platform = b.Platform + Platform = b.Platform, + GoodsUrl=b.GoodsUrl }; select = select.BuildExtendSelectExpre(); diff --git a/src/Coldairarrow.Entity/DTO/ItemlabelInfoDto.cs b/src/Coldairarrow.Entity/DTO/ItemlabelInfoDto.cs index 8e03aa2..9199c7a 100644 --- a/src/Coldairarrow.Entity/DTO/ItemlabelInfoDto.cs +++ b/src/Coldairarrow.Entity/DTO/ItemlabelInfoDto.cs @@ -23,6 +23,12 @@ namespace Coldairarrow.Entity.DTO /// 宝贝ID /// public string GoodsId { get; set; } + + /// + /// 商品地址 + /// + public string GoodsUrl { get; set; } + } public class AlbbItemlabelInfoDto : albbitemlabels diff --git a/src/Coldairarrow.Entity/HuiYan/items.cs b/src/Coldairarrow.Entity/HuiYan/items.cs index ebe844c..3ed37b7 100644 --- a/src/Coldairarrow.Entity/HuiYan/items.cs +++ b/src/Coldairarrow.Entity/HuiYan/items.cs @@ -52,5 +52,9 @@ namespace Coldairarrow.Entity.HuiYan /// public Int32 Platform { get; set; } + /// + /// 商品链接 + /// + public string GoodsUrl { get; set; } } } \ No newline at end of file diff --git a/客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/items/Index.vue b/客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/items/Index.vue index ce776b5..8da7000 100644 --- a/客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/items/Index.vue +++ b/客户端/齐越慧眼/齐越慧眼/vuepage/client/src/views/items/Index.vue @@ -59,7 +59,7 @@
- ¥{{item.Price}} @@ -157,7 +157,7 @@
- + ¥{{item.RivalPrice}}