1
This commit is contained in:
@@ -125,9 +125,9 @@ func TestAPI_GetPoiIMStatus(t *testing.T) {
|
||||
//for _, v := range ids {
|
||||
// retrieval, _ := api.GetPoiIMStatus(v)
|
||||
// ans += v + ":" + utils.Int2Str(retrieval.ImStatus) + ","
|
||||
//}
|
||||
//}`
|
||||
//fmt.Println(ans)
|
||||
retrieval, _ := api.GetPoiIMStatus("18008153")
|
||||
retrieval, _ := api.GetPoiIMStatus("25791090")
|
||||
fmt.Println(retrieval)
|
||||
}
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ func init() {
|
||||
baseapi.Init(sugarLogger)
|
||||
|
||||
// 菜市
|
||||
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||
|
||||
// 果园
|
||||
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||
|
||||
//商超
|
||||
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_sinaAnZgfFZJkRIrdbJKBA")
|
||||
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_ouN_SJj1m7HALrIdnQFHlQ")
|
||||
//cookieStr := `
|
||||
// acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
||||
//`
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"go.uber.org/zap"
|
||||
"math"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
@@ -130,3 +131,19 @@ func TestGetOrderLiquidatedDamages(t *testing.T) {
|
||||
t.Log(deductFee)
|
||||
}
|
||||
}
|
||||
func TestChangeCoord(t *testing.T) {
|
||||
lng, lat := GaodeCoord2BaiDu(104.057697, 30.69524)
|
||||
fmt.Println(lng, lat)
|
||||
}
|
||||
|
||||
func GaodeCoord2BaiDu(lng, lat float64) (float64, float64) {
|
||||
x := lng
|
||||
y := lat
|
||||
z := math.Sqrt(x*x+y*y) + 0.00002*math.Sin(y*math.Pi)
|
||||
theta := math.Atan2(y, x) + 0.000003*math.Cos(x*math.Pi)
|
||||
|
||||
bdLng := z*math.Cos(theta) + 0.0065
|
||||
bdLat := z*math.Sin(theta) + 0.006
|
||||
|
||||
return bdLng, bdLat
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user