Files
NqiTools/backend/app/platform/constants.py
T

54 lines
1.9 KiB
Python

"""平台地址与前端公开的签名参数。
签名用的 ak / secret 与门户页面脚本一致,用来按同样规则访问已登录用户自己的接口。
"""
from __future__ import annotations
ORIGIN = "https://nqi.gmcc.net:20443"
CAS_LOGIN = f"{ORIGIN}/cas/login"
CAS_CONFIG = f"{ORIGIN}/cas/getConfig"
CAS_SMS = f"{ORIGIN}/cas/sendCode1"
CAS_CAPTCHA = f"{ORIGIN}/cas/captcha.jpg"
PORTAL_SERVICE = f"{ORIGIN}/pro-portal/"
CAS_USER = f"{ORIGIN}/pro-portalv2/api/cas/getCasUser"
CAS_PASSWORD_CHECK = f"{ORIGIN}/pro-portalv2/api/user/checkUserPasswordUpdated"
PORTAL_ONLINE = f"{ORIGIN}/pro-portal/pure/LogEnter!getOnLineCount.action"
GIS_PROD = f"{ORIGIN}/pro-gis-tenant/gmcc-wyzc/prod-api"
GIS_API = f"{ORIGIN}/pro-gis-tenant/gmcc-wyzc/api"
APP_KEY = "1e395dc741b64ce1913cf411e6c08384"
APP_SECRET = "2d6f5e13b9d54c99bea58f46c2a45ddb"
SIGN_VERSION = "1.0.0"
USER_AGENT = (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
)
# 来自门户 city 脚本,顺序与页面一致。全省没有栅格图层城市码,不提供下载。
CITIES: list[dict[str, str]] = [
{"name": "广州", "code": "GZ"},
{"name": "深圳", "code": "SZ"},
{"name": "佛山", "code": "FS"},
{"name": "东莞", "code": "DG"},
{"name": "惠州", "code": "HZ"},
{"name": "珠海", "code": "ZH"},
{"name": "茂名", "code": "MM"},
{"name": "江门", "code": "JM"},
{"name": "中山", "code": "ZS"},
{"name": "湛江", "code": "ZJ"},
{"name": "汕头", "code": "ST"},
{"name": "肇庆", "code": "ZQ"},
{"name": "揭阳", "code": "JY"},
{"name": "清远", "code": "QY"},
{"name": "阳江", "code": "YJ"},
{"name": "韶关", "code": "SG"},
{"name": "梅州", "code": "MZ"},
{"name": "潮州", "code": "CZ"},
{"name": "汕尾", "code": "SW"},
{"name": "河源", "code": "HY"},
{"name": "云浮", "code": "YF"},
]