# -*- coding: utf-8 -*-
import json
import requests
# url="http://127.0.0.1:4050/v1/once"
url="http://doris.paas-test.env/v1/once"

# 如果在生产环境doris 01上执行，把url改成"http://127.0.0.1:4050/v1/once"
header_dict={'Content-Type': 'application/x-www-form-urlencoded'}
param_dict={}

param_dict["method"]="doris/search/spu_sku"
param_detail = {"device_id":"3ab", "size":10,"offset":0,"user_city_tag_id":328,"recall_type":2,"unit_id":4,"sort_params":{"lat":0,"lng":0},"tag_ids":[993, 971, 5, 41, 759, 47, 821],"filters":{"tag_ids":[971]}}

# 美购首页活动美购
# param_dict["method"]="doris/search/activity"
# param_detail = {"device_id":"hello","promotion_id":342,"user_city_tag_id":328,"size":10}

# param_dict["method"]="doris/search/doctor_officer"
# param_detail = {"device_id":"hello","size":10,"user_city_tag_id":328,"offset":0,"is_officer":False,
#                 "filters":{},"query":"连喜艳"}


param_dict["params"]=json.dumps(param_detail)

a = requests.post(url=url,data=param_dict,headers=header_dict)

print(a.content)
