You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
806 B
24 lines
806 B
|
6 days ago
|
# -*- coding: utf-8 -*-
|
||
|
|
"""票 12 bruno-sync:取 a2 工作计划 list 实测响应(作 .bru 实测摘录)。"""
|
||
|
|
import io
|
||
|
|
import sys
|
||
|
|
import json
|
||
|
|
|
||
|
|
import requests
|
||
|
|
|
||
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
||
|
|
|
||
|
|
BASE = 'http://localhost:8080'
|
||
|
|
A = '744842565802524672'
|
||
|
|
r = requests.get(f'{BASE}/api/auth/debug/token', params={'userId': A}, timeout=15)
|
||
|
|
token = r.json()['data']
|
||
|
|
h = {'Authorization': f'Bearer {token}'}
|
||
|
|
|
||
|
|
r = requests.get(f'{BASE}/api/opportunity/opportunity/page',
|
||
|
|
params={'current': 1, 'size': 20}, headers=h, timeout=15)
|
||
|
|
# 用 DB 已知 a2 id 直查 list
|
||
|
|
a2 = '749565538786607104'
|
||
|
|
r = requests.get(f'{BASE}/api/opportunity/workplan/list', params={'oppId': a2}, headers=h, timeout=15)
|
||
|
|
b = r.json()
|
||
|
|
print(json.dumps(b, ensure_ascii=False, indent=2))
|