Files
baseapi/platformapi/mtwmapi/user_page_test.go
2025-11-21 09:09:09 +08:00

60 lines
1.3 KiB
Go

package mtwmapi
import (
"testing"
"git.rosy.net.cn/baseapi/utils"
)
func TestAccessUserPage(t *testing.T) {
result, err := api.AccessUserPage("openh5/channel/kingkongshoplist", map[string]interface{}{
"startIndex": 0,
"sortId": 1,
"navigateType": 101578,
"firstCategoryId": 101578,
"secondCategoryId": 101578,
"initialLng": 104.076656,
"initialLat": 30.665696,
"geoType": 2,
"wm_longitude": 104076656,
"wm_latitude": 30665696,
})
if err != nil {
t.Fatal(err)
}
t.Log(utils.Format4Output(result, false))
}
func TestGetStoreList(t *testing.T) {
result, err := api.GetStoreList(104.076656, 30.665696)
if err != nil {
t.Fatal(err)
}
t.Log(utils.Format4Output(result, false))
t.Log(len(result))
}
func TestGetStoreInfo(t *testing.T) {
result, err := api.GetStoreInfo("935062809368623")
if err != nil {
t.Fatal(err)
}
t.Log(utils.Format4Output(result, false))
}
func TestGetStandardProductListWithCond(t *testing.T) {
result, err := api.GetStandardProductListWithCond("6920174736731")
if err != nil {
t.Fatal(err)
}
t.Log(utils.Format4Output(result, false))
}
func TestSetTokenPage(t *testing.T) {
err := api.SetTokenPage()
if err != nil {
t.Fatal(err)
}
//t.Log(utils.Format4Output(result, false))
}