新增抖音授权登录

This commit is contained in:
邹宗楠
2022-04-14 17:02:41 +08:00
parent 65852ad289
commit 13757d515d
13 changed files with 1307 additions and 5 deletions

View File

@@ -228,10 +228,6 @@ func (a *API) signParams(params url.Values) string {
}
func (a *API) AccessAPI2(baseURL, action string, params map[string]interface{}) (retVal *ResponseResult, err error) {
// if params == nil {
// panic("params is nil!")
// }
params2 := utils.Map2URLValues(params)
if baseURL == mtpsAPIURL {
params2.Set("appkey", a.appKey)
@@ -241,7 +237,6 @@ func (a *API) AccessAPI2(baseURL, action string, params map[string]interface{})
} else if a.GetCookieCount() == 0 {
return nil, fmt.Errorf("需要设置Store Cookie才能使用此方法")
}
// baseapi.SugarLogger.Debug(params2.Encode())
err = platformapi.AccessPlatformAPIWithRetry(a.client,
func() *http.Request {

View File

@@ -0,0 +1,19 @@
package mtpsapi
const (
DaDaCode = 10002 // 达达配送
FnPsCode = 10004 // 蜂鸟配送
MTPsCode = 10032 // 美团配送
MyselfPsCode = 10015 // 自送
)
type RiderInfo struct {
OrderId string `json:"order_id"` // 发单平台订单id(美团,京西,京,京东)
ThirdCarrierOrderId string `json:"third_carrier_order_id"` // 京西平台id
CourierName string `json:"courier_name"` // 骑手名称
CourierPhone string `json:"courier_phone"` // 骑手电话
LogisticsProviderCode string `json:"logistics_provider_code"` // 配送平台code 10001-顺丰, 10002-达达, 10003-闪送, 10004-蜂鸟, 10005 UU跑腿,10006 快跑者, 10007 极客快送,10008-点我达,10009 同达, 10010-生活半径,10011 邻趣,10012 趣送, 10013 快服务 10014 菜鸟新配盟 10015 商家自建配送 10016 风先生,10017-其他,10032-美团跑腿
LogisticsStatus int `json:"logistics_status"` // 配送状态
Latitude string `json:"latitude"` // 骑手当前的纬度,美团使用的是高德坐标系。
Longitude string `json:"longitude"` // 骑手当前的经度,美团使用的是高德坐标系。
}