|
|
|
from sanic import Blueprint, Request
|
|
|
|
|
|
|
|
import time
|
|
|
|
|
|
|
|
from .common import common_api
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bp_sif_unit = Blueprint("sif_unit", url_prefix="unit")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bp_sif_unit.route("unitAll", methods=["POST"])
|
|
|
|
@common_api
|
|
|
|
async def unitAll(request: Request):
|
|
|
|
|
|
|
|
### TODO - PLACEHOLDER ###
|
|
|
|
|
|
|
|
active = []
|
|
|
|
for i in range(9):
|
|
|
|
active.append({
|
|
|
|
"unit_owning_user_id": i,
|
|
|
|
"unit_id": i,
|
|
|
|
"exp": 8000,
|
|
|
|
"next_exp": 0,
|
|
|
|
"level": 40,
|
|
|
|
"max_level": 40,
|
|
|
|
"level_limit_id": 0,
|
|
|
|
"rank": 1,
|
|
|
|
"max_rank": 2,
|
|
|
|
"love": 50,
|
|
|
|
"max_love": 50,
|
|
|
|
"unit_skill_exp": 0,
|
|
|
|
"unit_skill_level": 0,
|
|
|
|
"max_hp": 3,
|
|
|
|
"unit_removable_skill_capacity": 0,
|
|
|
|
"favorite_flag": False,
|
|
|
|
"display_rank": 2,
|
|
|
|
"is_rank_max": False,
|
|
|
|
"is_love_max": False,
|
|
|
|
"is_level_max": False,
|
|
|
|
"is_signed": False,
|
|
|
|
"is_skill_level_max": False,
|
|
|
|
"is_removable_skill_capacity_max": False,
|
|
|
|
"insert_date": "2023-03-13 11:47:24"
|
|
|
|
})
|
|
|
|
|
|
|
|
resp = {
|
|
|
|
"active": active,
|
|
|
|
"waiting": []
|
|
|
|
}
|
|
|
|
return resp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bp_sif_unit.route("deckInfo", methods=["POST"])
|
|
|
|
@common_api
|
|
|
|
async def deckInfo(request: Request):
|
|
|
|
|
|
|
|
### TODO - PLACEHOLDER ###
|
|
|
|
|
|
|
|
resp = [
|
|
|
|
{
|
|
|
|
"unit_deck_id": 1,
|
|
|
|
"main_flag": True,
|
|
|
|
"deck_name": "队伍A",
|
|
|
|
"unit_owning_user_ids": [
|
|
|
|
{ "position": 1, "unit_owning_user_id": 0 },
|
|
|
|
{ "position": 2, "unit_owning_user_id": 1 },
|
|
|
|
{ "position": 3, "unit_owning_user_id": 2 },
|
|
|
|
{ "position": 4, "unit_owning_user_id": 3 },
|
|
|
|
{ "position": 5, "unit_owning_user_id": 4 },
|
|
|
|
{ "position": 6, "unit_owning_user_id": 5 },
|
|
|
|
{ "position": 7, "unit_owning_user_id": 6 },
|
|
|
|
{ "position": 8, "unit_owning_user_id": 7 },
|
|
|
|
{ "position": 9, "unit_owning_user_id": 8 }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
return resp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bp_sif_unit.route("supporterAll", methods=["POST"])
|
|
|
|
@common_api
|
|
|
|
async def supporterAll(request: Request):
|
|
|
|
|
|
|
|
### TODO - PLACEHOLDER ###
|
|
|
|
|
|
|
|
resp = { "unit_support_list": [] }
|
|
|
|
return resp
|