Merge branch 'fix'

This commit is contained in:
guozhigq
2024-09-21 23:17:46 +08:00
8 changed files with 106 additions and 86 deletions

View File

@ -1,5 +1,6 @@
import UIKit import UIKit
import Flutter import Flutter
import AVFoundation
@UIApplicationMain @UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate { @objc class AppDelegate: FlutterAppDelegate {
@ -8,6 +9,14 @@ import Flutter
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool { ) -> Bool {
GeneratedPluginRegistrant.register(with: self) GeneratedPluginRegistrant.register(with: self)
//
do {
try AVAudioSession.sharedInstance().setCategory(.playback, options: [.duckOthers])
} catch {
print("Failed to set audio session category: \(error)")
}
return super.application(application, didFinishLaunchingWithOptions: launchOptions) return super.application(application, didFinishLaunchingWithOptions: launchOptions)
} }
} }

View File

@ -46,7 +46,8 @@ class ApiInterceptor extends Interceptor {
// 处理网络请求错误 // 处理网络请求错误
// handler.next(err); // handler.next(err);
String url = err.requestOptions.uri.toString(); String url = err.requestOptions.uri.toString();
if (!url.contains('heartbeat')) { final excludedPatterns = RegExp(r'heartbeat|seg\.so|online/total');
if (!excludedPatterns.hasMatch(url)) {
SmartDialog.showToast( SmartDialog.showToast(
await dioError(err), await dioError(err),
displayType: SmartToastType.onlyRefresh, displayType: SmartToastType.onlyRefresh,

View File

@ -48,7 +48,7 @@ class FollowSearchController extends GetxController {
return {'status': true, 'data': <FollowItemModel>[].obs}; return {'status': true, 'data': <FollowItemModel>[].obs};
} }
if (type == 'init') { if (type == 'init') {
ps = 1; pn = 1;
} }
var res = await MemberHttp.getfollowSearch( var res = await MemberHttp.getfollowSearch(
mid: mid, mid: mid,

View File

@ -406,7 +406,7 @@ class _MemberPageState extends State<MemberPage>
? '个人认证:' ? '个人认证:'
: '企业认证:', : '企业认证:',
style: TextStyle( style: TextStyle(
color: Theme.of(context).primaryColor, color: Theme.of(context).colorScheme.primary,
), ),
children: [ children: [
TextSpan( TextSpan(

View File

@ -27,10 +27,13 @@ class MemberArchiveController extends GetxController {
// 获取用户投稿 // 获取用户投稿
Future getMemberArchive(type) async { Future getMemberArchive(type) async {
if (isLoading.value) {
return;
}
isLoading.value = true;
if (type == 'init') { if (type == 'init') {
pn = 1; pn = 1;
archivesList.clear(); archivesList.clear();
isLoading.value = true;
} }
var res = await MemberHttp.memberArchive( var res = await MemberHttp.memberArchive(
mid: mid, mid: mid,

View File

@ -21,7 +21,7 @@ class MemberSeasonsController extends GetxController {
mid = int.parse(Get.parameters['mid']!); mid = int.parse(Get.parameters['mid']!);
category = Get.parameters['category']!; category = Get.parameters['category']!;
if (category == '0') { if (category == '0') {
seasonId = int.parse(Get.parameters['seriesId']!); seasonId = int.parse(Get.parameters['seasonId']!);
} }
if (category == '1') { if (category == '1') {
seriesId = int.parse(Get.parameters['seriesId']!); seriesId = int.parse(Get.parameters['seriesId']!);

View File

@ -203,9 +203,9 @@ class LikeItem extends StatelessWidget {
Text.rich(TextSpan(children: [ Text.rich(TextSpan(children: [
TextSpan(text: nickNameList.join('')), TextSpan(text: nickNameList.join('')),
const TextSpan(text: ' '), const TextSpan(text: ' '),
if (item.users!.length > 1) if (item.counts! > 1)
TextSpan( TextSpan(
text: '等总计${item.users!.length}', text: '等总计${item.counts}',
style: TextStyle(color: outline), style: TextStyle(color: outline),
), ),
TextSpan( TextSpan(

View File

@ -261,13 +261,16 @@ class VideoPanelController extends GetxController {
onShowFilterSheet(searchPanelCtr) { onShowFilterSheet(searchPanelCtr) {
showModalBottomSheet( showModalBottomSheet(
context: Get.context!, context: Get.context!,
isScrollControlled: true,
builder: (context) { builder: (context) {
return StatefulBuilder( return StatefulBuilder(
builder: (context, StateSetter setState) { builder: (context, StateSetter setState) {
return Container( return Padding(
color: Theme.of(Get.context!).colorScheme.surface, padding: EdgeInsets.only(
padding: const EdgeInsets.only(top: 12), top: 12, bottom: MediaQuery.of(context).padding.bottom + 20),
child: Column( child: Wrap(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
const ListTile( const ListTile(
@ -295,9 +298,10 @@ class VideoPanelController extends GetxController {
onSelect: (value) async { onSelect: (value) async {
currentTimeFilterval.value = i['value']; currentTimeFilterval.value = i['value'];
setState(() {}); setState(() {});
SmartDialog.showToast("${i['label']}」的筛选结果"); SmartDialog.showToast(
SearchPanelController ctr = "${i['label']}」的筛选结果");
Get.find<SearchPanelController>( SearchPanelController ctr = Get.find<
SearchPanelController>(
tag: 'video${searchPanelCtr.keyword!}'); tag: 'video${searchPanelCtr.keyword!}');
ctr.duration.value = i['value']; ctr.duration.value = i['value'];
Get.back(); Get.back();
@ -326,13 +330,14 @@ class VideoPanelController extends GetxController {
SearchText( SearchText(
searchText: i['label'], searchText: i['label'],
searchTextIdx: i['value'], searchTextIdx: i['value'],
isSelect: currentPartFilterval.value == i['value'], isSelect:
currentPartFilterval.value == i['value'],
onSelect: (value) async { onSelect: (value) async {
currentPartFilterval.value = i['value']; currentPartFilterval.value = i['value'];
setState(() {}); setState(() {});
SmartDialog.showToast("${i['label']}」的筛选结果"); SmartDialog.showToast("${i['label']}」的筛选结果");
SearchPanelController ctr = SearchPanelController ctr = Get.find<
Get.find<SearchPanelController>( SearchPanelController>(
tag: 'video${searchPanelCtr.keyword!}'); tag: 'video${searchPanelCtr.keyword!}');
ctr.tids.value = i['value']; ctr.tids.value = i['value'];
Get.back(); Get.back();
@ -347,6 +352,8 @@ class VideoPanelController extends GetxController {
) )
], ],
), ),
],
),
); );
}, },
); );