微信调用外部插件修改订单,拼多多获取token等部分功能

This commit is contained in:
wule committed 2026-03-31 09:51:15 +08:00
1 parent 81d5107b32
commit ff42506091
24 files changed
+2728 -193

No files matched your search

+27 -2
View File
@@ -1,13 +1,38 @@
using System;
using AllBase;
using AllBase.Model.Result;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Work;
namespace TemuKJD.BLL.PddApi
{
public class PddApiHelper
{
public static AuthInfo GetShopPddToken(ShopLoginInfo shop)
{
var url = BaseClass.BuildObjString("shop/e57_get_pdd_shop_token");
var data = UserLogin.GetSignaturex();
data += "&mall_id=" + shop.MallId;
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":0"))
{
}
else
{
var token = new AuthInfo()
{
ShopId = shop.ShopId,
AppKey = BaseClass.GetFileMd5(BaseRegex.GetStringJson(ref html, "appKey").ParseToString()),
AccessToken = BaseRegex.GetStringJson(ref html, "accessToken"),
ExpiresTime = BaseClass.StampToDateTime(BaseRegex.GetIntJson(ref html, "tokenExpiresTime")),
};
return token;
}
return new AuthInfo() { ShopId = shop.ShopId, AccessToken = "", ExpiresTime = DateTime.Now };
}
}
}