feat: 增加设置项

This commit is contained in:
guozhigq
2023-09-03 13:22:20 +08:00
parent ff47aff7cf
commit b9b1ac7ec5
5 changed files with 21 additions and 2 deletions

View File

@ -20,6 +20,8 @@ import 'package:pilipala/utils/storage.dart';
class VideoHttp {
static Box localCache = GStrorage.localCache;
static Box setting = GStrorage.setting;
static bool enableRcmdDynamic =
setting.get(SettingBoxKey.enableRcmdDynamic, defaultValue: true);
// 首页推荐视频
static Future rcmdVideoList({required int ps, required int freshIdx}) async {
@ -73,6 +75,7 @@ class VideoHttp {
for (var i in res.data['data']['items']) {
// 屏蔽推广和拉黑用户
if (i['card_goto'] != 'ad_av' &&
(!enableRcmdDynamic ? i['card_goto'] != 'picture' : true) &&
(i['args'] != null &&
!blackMidsList.contains(i['args']['up_mid']))) {
list.add(RecVideoItemAppModel.fromJson(i));