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.
133 lines
3.3 KiB
133 lines
3.3 KiB
from sanic import Blueprint, Request
|
|
|
|
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
|
|
|
|
|
|
|
|
@bp_sif_unit.route("removableSkillInfo", methods=["POST"])
|
|
@common_api
|
|
async def removableSkillInfo(request: Request):
|
|
|
|
### TODO - PLACEHOLDER ###
|
|
|
|
resp = {
|
|
"owning_info": [
|
|
{
|
|
"unit_removable_skill_id": 1,
|
|
"total_amount": 9,
|
|
"equipped_amount": 0,
|
|
"insert_date": "2023-01-01 12:00:00"
|
|
}
|
|
],
|
|
"equipment_info": {}
|
|
}
|
|
return resp
|
|
|
|
|
|
|
|
@bp_sif_unit.route("accessoryAll", methods=["POST"])
|
|
@common_api
|
|
async def accessoryAll(request: Request):
|
|
|
|
### TODO - PLACEHOLDER ###
|
|
|
|
resp = {
|
|
"accessory_list": [
|
|
{
|
|
"accessory_owning_user_id": 1,
|
|
"accessory_id": 1,
|
|
"exp": 9800,
|
|
"next_exp": 0,
|
|
"level": 8,
|
|
"max_level": 8,
|
|
"rank_up_count": 4,
|
|
"favorite_flag": True
|
|
}
|
|
],
|
|
"wearing_info": [],
|
|
"especial_create_flag": False
|
|
} |