fix: 数据格式修改
This commit is contained in:
@ -113,10 +113,6 @@ class VideoHttp {
|
||||
try {
|
||||
var res = await Request().get(Api.videoUrl, data: data);
|
||||
if (res.data['code'] == 0) {
|
||||
// List<HotVideoItemModel> list = [];
|
||||
// for (var i in res.data['data']['list']) {
|
||||
// list.add(HotVideoItemModel.fromJson(i));
|
||||
// }
|
||||
return {
|
||||
'status': true,
|
||||
'data': PlayUrlModel.fromJson(res.data['data'])
|
||||
|
||||
@ -78,7 +78,7 @@ class Dash {
|
||||
List<VideoItem>? video;
|
||||
List<AudioItem>? audio;
|
||||
Map? dolby;
|
||||
String? flac;
|
||||
Map? flac;
|
||||
|
||||
Dash.fromJson(Map<String, dynamic> json) {
|
||||
duration = json['duration'];
|
||||
@ -88,7 +88,7 @@ class Dash {
|
||||
? json['audio'].map<AudioItem>((e) => AudioItem.fromJson(e)).toList()
|
||||
: [];
|
||||
dolby = json['dolby'];
|
||||
flac = json['flac'] ?? '';
|
||||
flac = json['flac'] ?? {};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:pilipala/http/constants.dart';
|
||||
@ -181,6 +182,8 @@ class VideoDetailController extends GetxController
|
||||
defaultST: Duration(milliseconds: data.lastPlayTime!),
|
||||
duration: data.timeLength ?? 0,
|
||||
);
|
||||
} else {
|
||||
SmartDialog.showToast(result['msg'].toString());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user