mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -284,7 +284,7 @@ class Request {
|
|||||||
token.cancel("cancelled");
|
token.cancel("cancelled");
|
||||||
}
|
}
|
||||||
|
|
||||||
String headerUa({type = 'mob'}) {
|
static String headerUa({type = 'mob'}) {
|
||||||
String headerUa = '';
|
String headerUa = '';
|
||||||
if (type == 'mob') {
|
if (type == 'mob') {
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
|
|||||||
@@ -820,12 +820,30 @@ class VideoHttp {
|
|||||||
// 操作用户关系
|
// 操作用户关系
|
||||||
static Future relationMod(
|
static Future relationMod(
|
||||||
{required int mid, required int act, required int reSrc}) async {
|
{required int mid, required int act, required int reSrc}) async {
|
||||||
var res = await Request().post(Api.relationMod, queryParameters: {
|
var res = await Request().post(
|
||||||
'fid': mid,
|
Api.relationMod,
|
||||||
'act': act,
|
data: {
|
||||||
're_src': reSrc,
|
'fid': mid,
|
||||||
'csrf': await Request.getCsrf(),
|
'act': act,
|
||||||
});
|
're_src': reSrc,
|
||||||
|
'gaia_source': 'web_main',
|
||||||
|
'spmid': '333.999.0.0',
|
||||||
|
'extend_content': {
|
||||||
|
"entity": "user",
|
||||||
|
"entity_id": mid,
|
||||||
|
'fp': Request.headerUa(type: 'pc'),
|
||||||
|
},
|
||||||
|
'csrf': await Request.getCsrf(),
|
||||||
|
},
|
||||||
|
options: Options(
|
||||||
|
contentType: Headers.formUrlEncodedContentType,
|
||||||
|
headers: {
|
||||||
|
'origin': 'https://space.bilibili.com',
|
||||||
|
'referer': 'https://space.bilibili.com/$mid/dynamic',
|
||||||
|
'user-agent': Request.headerUa(type: 'pc'),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
if (res.data['code'] == 0) {
|
if (res.data['code'] == 0) {
|
||||||
return {'status': true};
|
return {'status': true};
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ class _WebviewPageNewState extends State<WebviewPageNew> {
|
|||||||
useHybridComposition: false,
|
useHybridComposition: false,
|
||||||
algorithmicDarkeningAllowed: true,
|
algorithmicDarkeningAllowed: true,
|
||||||
useShouldOverrideUrlLoading: true,
|
useShouldOverrideUrlLoading: true,
|
||||||
userAgent: Request().headerUa(type: uaType),
|
userAgent: Request.headerUa(type: uaType),
|
||||||
mixedContentMode: MixedContentMode.MIXED_CONTENT_ALWAYS_ALLOW,
|
mixedContentMode: MixedContentMode.MIXED_CONTENT_ALWAYS_ALLOW,
|
||||||
),
|
),
|
||||||
initialUrlRequest:
|
initialUrlRequest:
|
||||||
|
|||||||
Reference in New Issue
Block a user