mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
some fix (#480)
* fix dislikeVideo * fix profile update * show login toast
This commit is contained in:
committed by
GitHub
parent
b15fdfa2ff
commit
066f3d4132
@@ -519,6 +519,7 @@ class VideoHttp {
|
|||||||
'aid': IdUtils.bv2av(bvid).toString(),
|
'aid': IdUtils.bv2av(bvid).toString(),
|
||||||
'dislike': type ? '0' : '1',
|
'dislike': type ? '0' : '1',
|
||||||
},
|
},
|
||||||
|
options: Options(contentType: Headers.formUrlEncodedContentType),
|
||||||
);
|
);
|
||||||
if (res.data is! String && res.data['code'] == 0) {
|
if (res.data is! String && res.data['code'] == 0) {
|
||||||
return {'status': true};
|
return {'status': true};
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:PiliPlus/http/constants.dart';
|
|||||||
import 'package:PiliPlus/http/index.dart';
|
import 'package:PiliPlus/http/index.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/utils/extension.dart';
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
|
import 'package:PiliPlus/utils/storage.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
@@ -314,7 +315,13 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
|||||||
required ProfileType type,
|
required ProfileType type,
|
||||||
dynamic datum,
|
dynamic datum,
|
||||||
}) async {
|
}) async {
|
||||||
|
final accessKey = Accounts.main.accessKey;
|
||||||
|
if (accessKey.isNullOrEmpty) {
|
||||||
|
SmartDialog.showToast('请退出账号后重新登录');
|
||||||
|
return;
|
||||||
|
}
|
||||||
Map<String, String> data = {
|
Map<String, String> data = {
|
||||||
|
'access_key': accessKey!,
|
||||||
'build': '1462100',
|
'build': '1462100',
|
||||||
'c_locale': 'zh_CN',
|
'c_locale': 'zh_CN',
|
||||||
'channel': 'yingyongbao',
|
'channel': 'yingyongbao',
|
||||||
@@ -332,6 +339,7 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
|||||||
else if (type == ProfileType.sex)
|
else if (type == ProfileType.sex)
|
||||||
'sex': datum.toString(),
|
'sex': datum.toString(),
|
||||||
};
|
};
|
||||||
|
Utils.appSign(data);
|
||||||
Request()
|
Request()
|
||||||
.post(
|
.post(
|
||||||
'/x/member/app/${type.name}/update',
|
'/x/member/app/${type.name}/update',
|
||||||
|
|||||||
Reference in New Issue
Block a user