feat: dyn reserve

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-13 14:56:13 +08:00
parent d15b8091bc
commit 152eaf2627
6 changed files with 177 additions and 75 deletions

View File

@@ -845,4 +845,6 @@ class Api {
static const String setPushSs =
'${HttpString.tUrl}/link_setting/v1/link_setting/set_push_ss';
static const String dynReserve = '/x/dynamic/feed/reserve/click';
}

View File

@@ -326,4 +326,29 @@ class DynamicsHttp {
return Error(res.data['message']);
}
}
static Future dynReserve({
required reserveId,
required curBtnStatus,
required dynamicIdStr,
required reserveTotal,
}) async {
var res = await Request().post(
Api.dynReserve,
queryParameters: {
'csrf': Accounts.main.csrf,
},
data: {
'reserve_id': reserveId,
'cur_btn_status': curBtnStatus,
'dynamic_id_str': dynamicIdStr,
'reserve_total': reserveTotal,
},
);
if (res.data['code'] == 0) {
return {'status': true, 'data': res.data['data']};
} else {
return {'status': false, 'msg': res.data['message']};
}
}
}