modified: app/amazon/__pycache__/approve.cpython-39.pyc
modified: app/amazon/__pycache__/del_brand.cpython-39.pyc modified: app/amazon/__pycache__/main.cpython-39.pyc modified: app/amazon/__pycache__/match_action.cpython-39.pyc modified: app/amazon/__pycache__/tool.cpython-39.pyc modified: app/amazon/approve.py modified: app/amazon/del_brand.py modified: app/amazon/main.py modified: app/amazon/match_action.py modified: app/amazon/tool.py modified: app/assets/delete-brand.js modified: app/new_web_source/delete-brand.html
This commit is contained in:
@@ -5,6 +5,9 @@ except ImportError:
|
||||
webview = None
|
||||
|
||||
|
||||
import requests
|
||||
from urllib.parse import quote
|
||||
|
||||
|
||||
def show_notification(message: str, message_type: str = "error"):
|
||||
"""显示 pywebview 顶层通知(5秒后自动消失)
|
||||
@@ -75,3 +78,39 @@ def show_notification(message: str, message_type: str = "error"):
|
||||
print(f"显示通知失败: {str(e)}")
|
||||
|
||||
|
||||
|
||||
|
||||
def get_shop_info(shop_name: str, base_url: str = "http://8.136.19.173:18080") -> requests.Response:
|
||||
"""
|
||||
调用商铺凭证接口
|
||||
:param shop_name: 商铺名称,将自动进行 URL 编码
|
||||
:param base_url: API 基础地址,默认从 curl 中提取
|
||||
:return: requests.Response 对象
|
||||
"""
|
||||
url = f"{base_url}/api/admin/shop-manages/credential"
|
||||
params = {"shopName": shop_name}
|
||||
|
||||
headers = {
|
||||
"Accept": "*/*",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
|
||||
"Cache-Control": "no-cache",
|
||||
"Connection": "keep-alive",
|
||||
"Pragma": "no-cache",
|
||||
"Referer": "http://8.136.19.173:18080/doc.html",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36",
|
||||
"X-Internal-Token": "59c6691199917a2095827b5188502029",
|
||||
}
|
||||
|
||||
response = requests.get(
|
||||
url,
|
||||
params=params,
|
||||
headers=headers,
|
||||
verify=False,
|
||||
timeout=30
|
||||
)
|
||||
return response
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user