美团配送cookie取消
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package jdapi
|
package jdapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
"regexp"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -151,3 +153,14 @@ func TestUpdateStoreFreightConfigNew(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestAA(t *testing.T) {
|
||||||
|
str := "您的快件正在派送中,请您准备签收(快递员:赵磊,联系电话:18884041675)"
|
||||||
|
regexpCnameAndCmobile2 := regexp.MustCompile(`(快递员:(.*),联系电话:(.*))`)
|
||||||
|
result := regexpCnameAndCmobile2.FindAllStringSubmatch(str, -1)
|
||||||
|
if len(result) > 0 {
|
||||||
|
cName := result[0][1]
|
||||||
|
cMobile := result[0][2]
|
||||||
|
fmt.Println(cName, cMobile)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ func TestGetProvince(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetCity(t *testing.T) {
|
func TestGetCity(t *testing.T) {
|
||||||
result, err := api.GetCity(22)
|
result, err := api.GetCity(2)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ func TestGetCity(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetCounty(t *testing.T) {
|
func TestGetCounty(t *testing.T) {
|
||||||
result, err := api.GetCounty(1930)
|
result, err := api.GetCounty(2815)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,20 @@
|
|||||||
package mtpsapi
|
package mtpsapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (a *API) PagePoiUpdate(outerPoiID, contactName, contactPhone, contactEmail string) (err error) {
|
func (a *API) PagePoiUpdate(outerPoiID, contactName, contactPhone, contactEmail string) (err error) {
|
||||||
if outerPoiID == "" || contactName == "" || contactPhone == "" || contactEmail == "" {
|
// if outerPoiID == "" || contactName == "" || contactPhone == "" || contactEmail == "" {
|
||||||
return fmt.Errorf("所有参数必须都要有值")
|
// return fmt.Errorf("所有参数必须都要有值")
|
||||||
}
|
// }
|
||||||
params := map[string]interface{}{
|
// params := map[string]interface{}{
|
||||||
"outerPoiId": outerPoiID,
|
// "outerPoiId": outerPoiID,
|
||||||
"contactName": contactName,
|
// "contactName": contactName,
|
||||||
"contactPhone": contactPhone,
|
// "contactPhone": contactPhone,
|
||||||
"contactEmail": contactEmail,
|
// "contactEmail": contactEmail,
|
||||||
}
|
// }
|
||||||
_, err = a.AccessAPI2("https://page.peisong.meituan.com/api", "haikuiopen/haikui/open/partner/poi/update", params)
|
// _, err = a.AccessAPI2("https://page.peisong.meituan.com/api", "haikuiopen/haikui/open/partner/poi/update", params)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user