1
This commit is contained in:
@@ -114,18 +114,18 @@ func (a *API) CommentAddReply(poiCode string, commentID int64, reply string) (er
|
||||
}
|
||||
|
||||
func (a *API) GetComment4ShanGou(param map[string]interface{}, isPost bool, cookie string) ([]*CommentsList, error) {
|
||||
wmPoiId := NumberCell + fmt.Sprintf("name=\"wmPoiId\"\r\n\r\n%v\r\n", param["wmPoiId"])
|
||||
appType := NumberCell + fmt.Sprintf("name=\"appType\"\r\n\r\n%v\r\n", param["appType"])
|
||||
pageNum := NumberCell + fmt.Sprintf("name=\"pageNum\"\r\n\r\n%v\r\n", param["pageNum"])
|
||||
rate := NumberCell + fmt.Sprintf("name=\"rate\"\r\n\r\n%v\r\n", param["rate"])
|
||||
reply := NumberCell + fmt.Sprintf("name=\"reply\"\r\n\r\n%v\r\n", param["reply"])
|
||||
context := NumberCell + fmt.Sprintf("name=\"context\"\r\n\r\n%v\r\n", param["context"])
|
||||
startDate := NumberCell + fmt.Sprintf("name=\"startDate\"\r\n\r\n%v\r\n", param["startDate"])
|
||||
endDate := NumberCell + fmt.Sprintf("name=\"endDate\"\r\n\r\n%v\r\n", param["endDate"])
|
||||
timeType := NumberCell + fmt.Sprintf("name=\"timeType\"\r\n\r\n%v\r\n-----011000010111000001101001--\r\n\r\n", param["timeType"])
|
||||
date := wmPoiId + appType + pageNum + rate + reply + context + startDate + endDate + timeType
|
||||
//wmPoiId := NumberCell + fmt.Sprintf("name=\"wmPoiId\"\r\n\r\n%v\r\n", param["wmPoiId"])
|
||||
//appType := NumberCell + fmt.Sprintf("name=\"appType\"\r\n\r\n%v\r\n", param["appType"])
|
||||
//pageNum := NumberCell + fmt.Sprintf("name=\"pageNum\"\r\n\r\n%v\r\n", param["pageNum"])
|
||||
//rate := NumberCell + fmt.Sprintf("name=\"rate\"\r\n\r\n%v\r\n", param["rate"])
|
||||
//reply := NumberCell + fmt.Sprintf("name=\"reply\"\r\n\r\n%v\r\n", param["reply"])
|
||||
//context := NumberCell + fmt.Sprintf("name=\"context\"\r\n\r\n%v\r\n", param["context"])
|
||||
//startDate := NumberCell + fmt.Sprintf("name=\"startDate\"\r\n\r\n%v\r\n", param["startDate"])
|
||||
//endDate := NumberCell + fmt.Sprintf("name=\"endDate\"\r\n\r\n%v\r\n", param["endDate"])
|
||||
//timeType := NumberCell + fmt.Sprintf("name=\"timeType\"\r\n\r\n%v\r\n-----011000010111000001101001--\r\n\r\n", param["timeType"])
|
||||
//date := wmPoiId + appType + pageNum + rate + reply + context + startDate + endDate + timeType
|
||||
|
||||
result, err := a.AccessStoreComment(CommentUrl, date, isPost, cookie)
|
||||
result, err := a.AccessStoreComment(CommentUrl, param, isPost, cookie)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -148,14 +148,15 @@ func (a *API) GetComment4ShanGou(param map[string]interface{}, isPost bool, cook
|
||||
|
||||
// AccessStoreComment 拉去美团页面上的评价订单
|
||||
// https://shangoue.meituan.com/api/support/customer/comment/r/list
|
||||
func (a *API) AccessStoreComment(fullURL string, param string, isPost bool, cookie string) (retVal map[string]interface{}, err error) {
|
||||
func (a *API) AccessStoreComment(fullURL string, param map[string]interface{}, isPost bool, cookie string) (retVal map[string]interface{}, err error) {
|
||||
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
||||
func() *http.Request {
|
||||
var request *http.Request
|
||||
if isPost {
|
||||
request, _ = http.NewRequest(http.MethodPost, fullURL, strings.NewReader(param))
|
||||
request, _ = http.NewRequest(http.MethodPost, fullURL, strings.NewReader(utils.Map2URLValues(param).Encode()))
|
||||
request.Header.Set("Cookie", cookie)
|
||||
request.Header.Set("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
|
||||
request.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
request.Header.Set("accept", "application/json, text/plain, */*")
|
||||
}
|
||||
a.FillRequestCookies(request)
|
||||
return request
|
||||
|
||||
Reference in New Issue
Block a user