aa
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestGetCoordinateFromAddressByPage(t *testing.T) {
|
func TestGetCoordinateFromAddressByPage(t *testing.T) {
|
||||||
lng, lat, err := autonaviAPI.GetCoordinateFromAddressByPage("兴月宏干杂", 510100)
|
lng, lat, err := autonaviAPI.GetCoordinateFromAddressByPage("四川成都市武侯区望江路街道南三环五段188密苏里小城62栋3单元501", 510100)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ func TestOrderListAll(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestOrderPartRefundGet(t *testing.T) {
|
func TestOrderPartRefundGet(t *testing.T) {
|
||||||
result, err := api.OrderPartRefundGet("5028611225947901495")
|
result, err := api.OrderPartRefundGet("115082650031169457")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
} else {
|
} else {
|
||||||
@@ -64,7 +64,7 @@ func TestOrderPartRefundGet(t *testing.T) {
|
|||||||
// if err != nil {
|
// if err != nil {
|
||||||
// t.Fatal(err)
|
// t.Fatal(err)
|
||||||
// } else {
|
// } else {
|
||||||
// t.Log(utils.Format4Output(result, false))
|
// t.Log(utils.Format4Output(result, false))image/upload
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,18 @@ type RefundSkuDetail struct {
|
|||||||
Spec string `json:"spec"`
|
Spec string `json:"spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RefundDetail struct {
|
||||||
|
TotalFoodAmount string `json:"total_food_amount"`
|
||||||
|
BoxAmount string `json:"box_amount"`
|
||||||
|
ActivityPoiAmount string `json:"activity_poi_amount"`
|
||||||
|
ActivityMeituanAmount string `json:"activity_meituan_amount"`
|
||||||
|
ActivityAgentAmount string `json:"activity_agent_amount"`
|
||||||
|
PlatformChargeFee string `json:"platform_charge_fee"`
|
||||||
|
SettleAmount string `json:"settle_amount"`
|
||||||
|
Productpreferences string `json:"productpreferences"`
|
||||||
|
NotProductpreferences string `json:"not_productpreferences"`
|
||||||
|
}
|
||||||
|
|
||||||
type RefundOrderDetail struct {
|
type RefundOrderDetail struct {
|
||||||
ApplyReason string `json:"apply_reason"`
|
ApplyReason string `json:"apply_reason"`
|
||||||
ApplyType int `json:"apply_type"`
|
ApplyType int `json:"apply_type"`
|
||||||
@@ -128,6 +140,7 @@ type RefundOrderDetail struct {
|
|||||||
UTime int64 `json:"utime"`
|
UTime int64 `json:"utime"`
|
||||||
WmAppRetailForOrderPartRefundList []*RefundSkuDetail `json:"wmAppRetailForOrderPartRefundList"`
|
WmAppRetailForOrderPartRefundList []*RefundSkuDetail `json:"wmAppRetailForOrderPartRefundList"`
|
||||||
WmOrderIDView int64 `json:"wm_order_id_view"`
|
WmOrderIDView int64 `json:"wm_order_id_view"`
|
||||||
|
RefundPartialEstimateCharge *RefundDetail `json:"refund_partial_estimate_charge"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type OrderExtraInfo struct {
|
type OrderExtraInfo struct {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ func TestOrderGetRiderInfoPhoneNumber(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetOrderRefundDetail(t *testing.T) {
|
func TestGetOrderRefundDetail(t *testing.T) {
|
||||||
result, err := api.GetOrderRefundDetail(94310371440052951, 0)
|
result, err := api.GetOrderRefundDetail(115082650031169457, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,16 +36,14 @@ func TestPoiMGet(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPoiSave(t *testing.T) {
|
func TestPoiSave(t *testing.T) {
|
||||||
result, err := api.PoiMGet([]string{testPoiCode})
|
//result, err := api.PoiMGet([]string{testPoiCode})
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
t.Fatal(err)
|
// t.Fatal(err)
|
||||||
}
|
//}
|
||||||
poiParams := utils.FilterMapNilMembers(utils.Struct2FlatMap(result[0]))
|
poiParams := map[string]interface{}{}
|
||||||
poiParams["name"] = "中国"
|
//utils.FilterMapNilMembers(utils.Struct2FlatMap(result[0]))
|
||||||
err = api.PoiSave(testPoiCode, poiParams)
|
poiParams["name"] = "京西果园·果切·水果捞(宝山店)"
|
||||||
if err != nil {
|
api.PoiSave("9202094", poiParams)
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPoiTagList(t *testing.T) {
|
func TestPoiTagList(t *testing.T) {
|
||||||
@@ -60,7 +58,7 @@ func TestPoiTagList(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestImageUploadByURL(t *testing.T) {
|
func TestImageUploadByURL(t *testing.T) {
|
||||||
result, err := api.ImageUploadByURL(testPoiCode, "hello.jpg", "http://image.jxc4.com/56cd1e88ada3660f37548c2d29ea2158.jpg")
|
result, err := api.ImageUploadByURL("11918886", "菜市800x600.jpg", "http://image.jxc4.com/image/ff8c9443c894bfb4822f7d2f742718df.jpg")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ const (
|
|||||||
MaterialTypeVoice = "voice"
|
MaterialTypeVoice = "voice"
|
||||||
MaterialTypeNews = "news"
|
MaterialTypeNews = "news"
|
||||||
MaterialTypeThumb = "thumb"
|
MaterialTypeThumb = "thumb"
|
||||||
|
|
||||||
|
SNSCutLine = `
|
||||||
|
<br>
|
||||||
|
<hr style=\"border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);\" />
|
||||||
|
<br>
|
||||||
|
`
|
||||||
)
|
)
|
||||||
|
|
||||||
type CBUserInfo struct {
|
type CBUserInfo struct {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ func TestCBGetTicketInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestCBBatchgetMaterial(t *testing.T) {
|
func TestCBBatchgetMaterial(t *testing.T) {
|
||||||
userInfo, err := api.CBBatchgetMaterial(MaterialTypeNews, 19, 1)
|
userInfo, err := api.CBBatchgetMaterial(MaterialTypeThumb, 0, 1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ func init() {
|
|||||||
|
|
||||||
//weixinapp
|
//weixinapp
|
||||||
//api = New("wx18111a41fd17f24f", "c79ac6e1b2d6d7968e72a9658a8b6715")
|
//api = New("wx18111a41fd17f24f", "c79ac6e1b2d6d7968e72a9658a8b6715")
|
||||||
api.CBSetToken("46_wVx1dpEvGz0nGoSl_4mngTxlmLMYXMkixtDpppskseIwPJCa0U9JclQWGVPRtEShpwEhZumF6SoLpwtQMwndEOWOaZnI9tbdC1nOggw594wTadHzco4Dl8qmkrvvaPDwwHuz43bBWtURKruyNCFfABAJYB")
|
api.CBSetToken("46_sKrKhgoeh0Om1V2_IcTERUux4-pLL5CplvhOh7civG51UCSUTt6g3WkTutvk107i2SMhdcU5q9MYGbciZ4PHyPzhlzx34yBPblf8dpRHx3VYE_a9JbE2wbtjJY93GmXc4KcRHxlEa8s_QWFVOLCgADAKHY")
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleError(t *testing.T, err error) {
|
func handleError(t *testing.T, err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user