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
@@ -4,6 +4,7 @@ import 'package:PiliPlus/http/constants.dart';
|
||||
import 'package:PiliPlus/http/index.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
@@ -314,7 +315,13 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
||||
required ProfileType type,
|
||||
dynamic datum,
|
||||
}) async {
|
||||
final accessKey = Accounts.main.accessKey;
|
||||
if (accessKey.isNullOrEmpty) {
|
||||
SmartDialog.showToast('请退出账号后重新登录');
|
||||
return;
|
||||
}
|
||||
Map<String, String> data = {
|
||||
'access_key': accessKey!,
|
||||
'build': '1462100',
|
||||
'c_locale': 'zh_CN',
|
||||
'channel': 'yingyongbao',
|
||||
@@ -332,6 +339,7 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
||||
else if (type == ProfileType.sex)
|
||||
'sex': datum.toString(),
|
||||
};
|
||||
Utils.appSign(data);
|
||||
Request()
|
||||
.post(
|
||||
'/x/member/app/${type.name}/update',
|
||||
|
||||
Reference in New Issue
Block a user