temu客户端程序
This commit is contained in:
commit
4aaf264e89
694 files changed
+263780
No files matched your search
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Work.Api
|
||||
{
|
||||
public class PinduoduoApiPropId
|
||||
{
|
||||
public ShopChatBase Shop;
|
||||
public PinduoduoApiPropId(ShopChatBase shop)
|
||||
{
|
||||
Shop = shop;
|
||||
}
|
||||
/// <summary>
|
||||
/// 初始化大类
|
||||
/// </summary>
|
||||
/// <param name="mainCatId"></param>
|
||||
/// <returns></returns>
|
||||
public string Get(int mainCatId)
|
||||
{
|
||||
PinduoduoApiGetProduct api = new PinduoduoApiGetProduct(Shop);
|
||||
api.Type = "pdd.goods.spec.get";
|
||||
var cid = FromTitleToCat.MainCat.Find(c => c!=null && c.Key == mainCatId.ToString());
|
||||
if (cid == null)
|
||||
return "";
|
||||
string id = cid.Value1.Substring(1);
|
||||
id = id.Substring(0, id.IndexOf(","));
|
||||
api.Data.Add("cat_id", id);
|
||||
return api.GetData();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取
|
||||
/// </summary>
|
||||
/// <param name="parentId"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
public string GetPropId(string parentId, string name)
|
||||
{
|
||||
PinduoduoApiGetProduct api = new PinduoduoApiGetProduct(Shop);
|
||||
api.Type = "pdd.goods.spec.id.get";
|
||||
api.Data.Add("parent_spec_id", parentId);
|
||||
api.Data.Add("spec_name", name);
|
||||
return api.GetData();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user