(code, token)
| 545 | print(f"请求失败: {e}") |
| 546 | |
| 547 | def cscscs(code, token): |
| 548 | url = "https://sg01.purcotton.com/api/statistics/store" |
| 549 | headers = create_headers(code, token) |
| 550 | _, user_id = login(code, token) # 调用login函数,忽略电话号码,只获取user_id |
| 551 | data = { |
| 552 | "uid": user_id, |
| 553 | "type": 301 # 确保这里的值符合API的要求 |
| 554 | } |
| 555 | #print(data) # 打印整个响应数据 |
| 556 | try: |
| 557 | response = requests.post(url, headers=headers, json=data) |
| 558 | response.raise_for_status() # 检查HTTP响应状态 |
| 559 | |
| 560 | response_data = response.json() |
| 561 | #print(response_data) # 打印整个响应数据 |
| 562 | except requests.exceptions.RequestException as e: |
| 563 | print(f"请求失败: {e}") |
| 564 | |
| 565 | # 阳光 |
| 566 |
no test coverage detected