From 44096b96f91eb18e998c072f4adc2943de869c5a Mon Sep 17 00:00:00 2001
From: feng <279202647@qq.com>
Date: Wed, 14 Dec 2022 17:21:06 +0800
Subject: [PATCH] =?UTF-8?q?pdd=20=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../HuiYan/itemlabelsController.cs | 13 ++++---
.../Filters/EnumDocumentFilter.cs | 7 ++++
src/Coldairarrow.Api/Startup.cs | 1 +
.../HuiYan/itemlabelsBusiness.cs | 14 +++----
src/Coldairarrow.Entity/DTO/ItemLabelDto.cs | 37 +++++++++++++++----
.../HuiYan/IitemlabelsBusiness.cs | 6 +--
.../齐越慧眼/齐越慧眼/ApiHelper.cs | 2 +-
.../PublishProfiles/FolderProfile.pubxml | 9 ++---
.../UserControls/BrowerControl.xaml.cs | 12 +++++-
.../UserControls/BrowerTabPanelControl.xaml | 1 +
.../BrowerTabPanelControl.xaml.cs | 4 ++
.../cefhelper/CefRequestHandler.cs | 17 ++++++++-
12 files changed, 91 insertions(+), 32 deletions(-)
create mode 100644 src/Coldairarrow.Api/Filters/EnumDocumentFilter.cs
diff --git a/src/Coldairarrow.Api/Controllers/HuiYan/itemlabelsController.cs b/src/Coldairarrow.Api/Controllers/HuiYan/itemlabelsController.cs
index 00f32fc..e4720de 100644
--- a/src/Coldairarrow.Api/Controllers/HuiYan/itemlabelsController.cs
+++ b/src/Coldairarrow.Api/Controllers/HuiYan/itemlabelsController.cs
@@ -78,11 +78,11 @@ namespace Coldairarrow.Api.Controllers.HuiYan
///
/// 获取标签状态
///
- ///
- ///
+ /// 商品id集合
+ /// 所属平台
///
[HttpPost]
- public AjaxResult GetLabelByItemIds([FromBody] List ids, [FromQuery] ItemPlatform platform)
+ public List GetLabelByItemIds([FromBody] List ids, [FromQuery] ItemPlatform platform)
{
return _itemlabelsBus.GetLabelByItemIds(ids, platform);
}
@@ -91,10 +91,10 @@ namespace Coldairarrow.Api.Controllers.HuiYan
///
/// 检索阿里巴巴合作标签的商品
///
- ///
+ /// 商品id集合
///
[HttpPost]
- public AjaxResult GetAlbbLabelByShopIds([FromBody] List ids)
+ public List GetAlbbLabelByShopIds([FromBody] List ids)
{
return _itemlabelsBus.GetAlbbLabelByShopIds(ids);
}
@@ -113,9 +113,10 @@ namespace Coldairarrow.Api.Controllers.HuiYan
///
/// 获取竞品相关商品列表
///
+ /// 可不传
///
[HttpGet]
- public AjaxResult GetItemsByJpLabels(int type)
+ public List GetItemsByJpLabels(int type)
{
return _itemlabelsBus.GetItemsByJpLabels(type);
}
diff --git a/src/Coldairarrow.Api/Filters/EnumDocumentFilter.cs b/src/Coldairarrow.Api/Filters/EnumDocumentFilter.cs
new file mode 100644
index 0000000..b6f1ab5
--- /dev/null
+++ b/src/Coldairarrow.Api/Filters/EnumDocumentFilter.cs
@@ -0,0 +1,7 @@
+namespace Coldairarrow.Api.Filters
+{
+ public class EnumDocumentFilter
+ {
+
+ }
+}
diff --git a/src/Coldairarrow.Api/Startup.cs b/src/Coldairarrow.Api/Startup.cs
index acd0470..f9de708 100644
--- a/src/Coldairarrow.Api/Startup.cs
+++ b/src/Coldairarrow.Api/Startup.cs
@@ -69,6 +69,7 @@ namespace Coldairarrow.Api
//swagger
services.AddOpenApiDocument(settings =>
{
+ settings.GenerateEnumMappingDescription = true;
settings.AllowReferencesWithProperties = true;
settings.AddSecurity("身份认证Token", Enumerable.Empty(), new OpenApiSecurityScheme()
{
diff --git a/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs b/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs
index b3e8f6c..e520a1d 100644
--- a/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs
+++ b/src/Coldairarrow.Business/HuiYan/itemlabelsBusiness.cs
@@ -78,7 +78,7 @@ namespace Coldairarrow.Business.HuiYan
#endregion
- public AjaxResult GetLabelByItemIds(List ids, ItemPlatform platform)
+ public List GetLabelByItemIds(List ids, ItemPlatform platform)
{
Expression> select = (a, b) => new ItemlabelInfoDto
{
@@ -112,14 +112,14 @@ namespace Coldairarrow.Business.HuiYan
}
});
- return Success(list);
+ return list;
}
- public AjaxResult GetAlbbLabelByShopIds(Listids)
+ public List GetAlbbLabelByShopIds(Listids)
{
- var list= Db.GetIQueryable().Where(c => ids.Contains(c.ShopId));
+ var list= Db.GetIQueryable().Where(c => ids.Contains(c.ShopId)).ToList();
- return Success(list);
+ return list;
}
public AjaxResult SetItemLabel(ItemLabelDto model)
@@ -372,7 +372,7 @@ namespace Coldairarrow.Business.HuiYan
}
}
- public AjaxResult GetItemsByJpLabels(int type)
+ public List GetItemsByJpLabels(int type)
{
Expression> select = (a, b) => new ItemlabelInfoDto
{
@@ -394,7 +394,7 @@ namespace Coldairarrow.Business.HuiYan
var list = q.Where(where).ToList();
- return Success(list);
+ return list;
}
}
diff --git a/src/Coldairarrow.Entity/DTO/ItemLabelDto.cs b/src/Coldairarrow.Entity/DTO/ItemLabelDto.cs
index bb92de5..150ba75 100644
--- a/src/Coldairarrow.Entity/DTO/ItemLabelDto.cs
+++ b/src/Coldairarrow.Entity/DTO/ItemLabelDto.cs
@@ -8,15 +8,34 @@ namespace Coldairarrow.Entity.DTO
{
public class ItemLabelDto
{
+ ///
+ /// 商品ID
+ ///
public string ItemId { get; set; }
+ ///
+ /// 商品标题
+ ///
public string Title { get; set; }
+ ///
+ /// 价格
+ ///
public decimal Price { get; set; }
+ ///
+ /// 销量
+ ///
public string Sales { get; set; }
+ ///
+ /// 主图链接
+ ///
public string Img { get; set; }
+
+ ///
+ /// 类目ID
+ ///
public string CatId { get; set; }
///
/// 标签状态
@@ -50,7 +69,11 @@ namespace Coldairarrow.Entity.DTO
///
/// 阿里巴巴
///
- ALBB = 2
+ ALBB = 2,
+ ///
+ /// 拼多多
+ ///
+ PDD = 3
}
///
@@ -59,17 +82,17 @@ namespace Coldairarrow.Entity.DTO
public enum ItemLabelStatus
{
///
- /// 筛选
+ /// 同款
///
- Screening=0,
+ Screening = 0,
///
- /// 过滤
+ /// 淘汰
///
- Filter =1,
+ Filter = 1,
///
- /// 添加产品库
+ /// 海选
///
- Added=2,
+ Added = 2,
///
/// 竞品
///
diff --git a/src/Coldairarrow.IBusiness/HuiYan/IitemlabelsBusiness.cs b/src/Coldairarrow.IBusiness/HuiYan/IitemlabelsBusiness.cs
index f516705..0587af4 100644
--- a/src/Coldairarrow.IBusiness/HuiYan/IitemlabelsBusiness.cs
+++ b/src/Coldairarrow.IBusiness/HuiYan/IitemlabelsBusiness.cs
@@ -15,10 +15,10 @@ namespace Coldairarrow.Business.HuiYan
Task DeleteDataAsync(List ids);
AjaxResult SetItemLabel(ItemLabelDto model);
- AjaxResult GetLabelByItemIds(List ids, ItemPlatform platform);
- AjaxResult GetAlbbLabelByShopIds(List ids);
+ List GetLabelByItemIds(List ids, ItemPlatform platform);
+ List GetAlbbLabelByShopIds(List ids);
AjaxResult SetAlbbCooperation(string shopId);
- AjaxResult GetItemsByJpLabels(int type);
+ List GetItemsByJpLabels(int type);
}
}
\ No newline at end of file
diff --git a/客户端/齐越慧眼/齐越慧眼/ApiHelper.cs b/客户端/齐越慧眼/齐越慧眼/ApiHelper.cs
index 990e958..adf7071 100644
--- a/客户端/齐越慧眼/齐越慧眼/ApiHelper.cs
+++ b/客户端/齐越慧眼/齐越慧眼/ApiHelper.cs
@@ -33,7 +33,7 @@ namespace 齐越慧眼
#if LOCATION
//return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTE5NTA3MzgwMTkzMjAyMTc2IiwidGVhbUlkIjoiMTQzOTg5ODUxNDIyMDkxMjY0MCIsImV4cCI6MTY4ODExNzc4Nn0.xnkLLkvmMtNwS1u4SAEj-i6rwNZ1_prx_LmkGQEP47o";
- return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNTcxMDUzOTEzMzUwNjA2ODQ4IiwidGVhbUlkIjoiMTU2NzA0ODk5MjgwODc2NzQ4OCIsInNvblRlYW1JZHMiOiIiLCJleHAiOjE2OTU3OTU4MTV9.JvCOsec7mh94--zFtV9egqhVLGNsfSUv_LH5natQtWo";
+ return "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNjAxODUxNDAyMDAxMzIxOTg0IiwidGVhbUlkIjoiMTU2NzA0ODk5MjgwODc2NzQ4OCIsInNvblRlYW1JZHMiOiIxNTY3MDQ4OTkyODA4NzY3NDg4IiwiZXhwIjoxNzAyMjgyMjUwfQ.nd11fJb99Ous6YuS10oodyFwVOVstEJ87JE6z-NGswU";
#endif
if (string.IsNullOrEmpty(jwtToken))
diff --git a/客户端/齐越慧眼/齐越慧眼/Properties/PublishProfiles/FolderProfile.pubxml b/客户端/齐越慧眼/齐越慧眼/Properties/PublishProfiles/FolderProfile.pubxml
index d61bf9a..83c7117 100644
--- a/客户端/齐越慧眼/齐越慧眼/Properties/PublishProfiles/FolderProfile.pubxml
+++ b/客户端/齐越慧眼/齐越慧眼/Properties/PublishProfiles/FolderProfile.pubxml
@@ -4,15 +4,14 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
- Release
- Any CPU
+ Location
+ x64
bin\Release\netcoreapp3.1\publish\
FileSystem
netcoreapp3.1
win-x64
true
- False
- False
- False
+ false
+ false
\ No newline at end of file
diff --git a/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerControl.xaml.cs b/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerControl.xaml.cs
index e67cb92..1e67174 100644
--- a/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerControl.xaml.cs
+++ b/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerControl.xaml.cs
@@ -46,7 +46,8 @@ namespace 齐越慧眼.UserControls
//关于跨域限制
//WebSecurity = CefState.Disabled,
ApplicationCache = CefState.Enabled,
- LocalStorage = CefState.Enabled
+ LocalStorage = CefState.Enabled,
+
},
@@ -73,9 +74,12 @@ namespace 齐越慧眼.UserControls
web.TitleChanged += Web_TitleChanged;
}
web.AddressChanged += Web_AddressChanged;
+
+
this.KeyUp += BrowerControl_KeyUp;
}
+
private void BrowerControl_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
{
@@ -97,6 +101,7 @@ namespace 齐越慧眼.UserControls
{
txtUrl.Text = e.NewValue.ToString();
});
+
if (IsJustLoginJd)
@@ -236,6 +241,11 @@ namespace 齐越慧眼.UserControls
nowPatlom = 2;
}
+ if (lastUrl.StartsWith("https://mobile.yangkeduo.com/"))
+ {
+
+ nowPatlom = 3;
+ }
StartPage();
}
}
diff --git a/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerTabPanelControl.xaml b/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerTabPanelControl.xaml
index ed179a4..4e678de 100644
--- a/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerTabPanelControl.xaml
+++ b/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerTabPanelControl.xaml
@@ -33,6 +33,7 @@
+
diff --git a/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerTabPanelControl.xaml.cs b/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerTabPanelControl.xaml.cs
index df10197..126c182 100644
--- a/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerTabPanelControl.xaml.cs
+++ b/客户端/齐越慧眼/齐越慧眼/UserControls/BrowerTabPanelControl.xaml.cs
@@ -120,5 +120,9 @@ namespace 齐越慧眼.UserControls
});
}
+ private void pddRb_Click(object sender, RoutedEventArgs e)
+ {
+ NewTab("https://mobile.yangkeduo.com/index.html");
+ }
}
}
diff --git a/客户端/齐越慧眼/齐越慧眼/cefhelper/CefRequestHandler.cs b/客户端/齐越慧眼/齐越慧眼/cefhelper/CefRequestHandler.cs
index 9c6aecb..d59d009 100644
--- a/客户端/齐越慧眼/齐越慧眼/cefhelper/CefRequestHandler.cs
+++ b/客户端/齐越慧眼/齐越慧眼/cefhelper/CefRequestHandler.cs
@@ -18,7 +18,7 @@ namespace 齐越慧眼.cefhelper
protected override bool OnBeforeBrowse(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IRequest request, bool userGesture,
bool isRedirect)
{
- // 先调用基类的实现,断点调试
+ // 先调用基类的实现,断点调试
return base.OnBeforeBrowse(chromiumWebBrowser, browser, frame, request, userGesture, isRedirect);
}
@@ -85,9 +85,22 @@ namespace 齐越慧眼.cefhelper
return base.OnResourceResponse(chromiumWebBrowser, browser, frame, request, response);
}
+
+ protected override CefReturnValue OnBeforeResourceLoad(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback)
+ {
+ if (!request.Url.Contains("mobile.yangkeduo.com/login.html"))
+ {
+ if (request.Url.Contains("yangkeduo"))
+ {
+ request.SetHeaderByName("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 NetType/WIFI MicroMessenger/7.0.20.1781(0x6700143B) WindowsWechat(0x63070517)", true);
+ }
+ }
+ return base.OnBeforeResourceLoad(chromiumWebBrowser, browser, frame, request, callback);
+ }
+
//protected override IResponseFilter GetResourceResponseFilter(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IRequest request, IResponse response)
//{
- // if (request.Url.Contains("search.jd.com"))
+ // if (request.Url.Contains("static.pddpic.com"))
// {
// var fil = new MyResponseFilter(true, Brower, request.Url);
// return fil;