|
@@ -1,12 +1,16 @@ |
|
|
package macao_logistics |
|
|
package macao_logistics |
|
|
|
|
|
|
|
|
import "github.com/tidwall/gjson" |
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
|
zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils" |
|
|
|
|
|
"fmt" |
|
|
|
|
|
"github.com/tidwall/gjson" |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
func GetToken() string { |
|
|
|
|
|
params := map[string]interface{}{ |
|
|
|
|
|
"phone": "15217160421", |
|
|
|
|
|
"password": "123456789@", |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
func GetToken(params map[string]interface{}) string { |
|
|
|
|
|
//params := map[string]interface{}{ |
|
|
|
|
|
// "phone": "15217160421", |
|
|
|
|
|
// "password": "123456789@", |
|
|
|
|
|
//} |
|
|
//7c2f6cbd480a96f1aa69509f9dd65462 |
|
|
//7c2f6cbd480a96f1aa69509f9dd65462 |
|
|
send, err := Send("/jyb/admin/login/password", params, "") |
|
|
send, err := Send("/jyb/admin/login/password", params, "") |
|
|
if err != nil { |
|
|
if err != nil { |
|
@@ -15,17 +19,30 @@ func GetToken() string { |
|
|
return gjson.Get(send, "data.token").String() |
|
|
return gjson.Get(send, "data.token").String() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func GetGoods(params map[string]interface{}) string { |
|
|
|
|
|
send, err := SendGet("/admin/goods/detailed/list", params, "7c2f6cbd480a96f1aa69509f9dd65462") |
|
|
|
|
|
|
|
|
func GetGoods(params map[string]interface{}, acctoken string) string { |
|
|
|
|
|
send, err := SendGet("/admin/goods/detailed/list", params, acctoken) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return "" |
|
|
return "" |
|
|
} |
|
|
} |
|
|
return gjson.Get(send, "data.data").String() |
|
|
return gjson.Get(send, "data.data").String() |
|
|
} |
|
|
} |
|
|
func GetStore(params map[string]interface{}) string { |
|
|
|
|
|
send, err := SendGet("/jyb/order/delivery/store", params, "7c2f6cbd480a96f1aa69509f9dd65462") |
|
|
|
|
|
|
|
|
func GetStore(params map[string]interface{}, acctoken string) string { |
|
|
|
|
|
send, err := SendGet("/jyb/order/delivery/store", params, acctoken) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return "" |
|
|
return "" |
|
|
} |
|
|
} |
|
|
return gjson.Get(send, "data.data").String() |
|
|
return gjson.Get(send, "data.data").String() |
|
|
} |
|
|
} |
|
|
|
|
|
func GetOrder(params map[string]interface{}, acctoken string) string { |
|
|
|
|
|
send, err := SendGet("/jyb/order/delivery/list", params, acctoken) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
return gjson.Get(send, "data.data").String() |
|
|
|
|
|
} |
|
|
|
|
|
func RegUser(params map[string]interface{}) string { |
|
|
|
|
|
header := make(map[string]string, 0) |
|
|
|
|
|
data, _ := zhios_third_party_utils.CurlPost("https://mx.aoyunltd.com/wxnewshibaouser.php", params, header) |
|
|
|
|
|
fmt.Println(string(data)) |
|
|
|
|
|
return string(data) |
|
|
|
|
|
} |