hyzp_ybqx-Commit046:已经可以播放点位视频,实现登录前加载统计数据
This commit is contained in:
@@ -2009,12 +2009,15 @@ Future getDwspUrlNew(
|
|||||||
print('indexRecord = ${indexRecord}');
|
print('indexRecord = ${indexRecord}');
|
||||||
String _dwspUrl = '';
|
String _dwspUrl = '';
|
||||||
if (null != listDwspGetList2[indexRecord]['play_urlhead']) {
|
if (null != listDwspGetList2[indexRecord]['play_urlhead']) {
|
||||||
String _dwspUrl =
|
_dwspUrl =
|
||||||
listDwspGetList2[indexRecord]['play_urlhead'] + listDwspGetList2[indexRecord]['video16'];
|
listDwspGetList2[indexRecord]['play_urlhead'] + listDwspGetList2[indexRecord]['video16'];
|
||||||
print('开始播放:第$getCount次成功获取的视频地址');
|
print('开始播放:第$getCount次成功获取的视频地址');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print('判断_dwspUrl是否是视频地址?');
|
||||||
|
print('_dwspUrl : ${_dwspUrl}');
|
||||||
if (!isVideoUrl(_dwspUrl)) {
|
if (!isVideoUrl(_dwspUrl)) {
|
||||||
|
print('_dwspUrl非视频地址?');
|
||||||
Fluttertoast.showToast(
|
Fluttertoast.showToast(
|
||||||
msg: '获取 $getingDwmc 点位视频地址失败,请稍后重试。',
|
msg: '获取 $getingDwmc 点位视频地址失败,请稍后重试。',
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
toastLength: Toast.LENGTH_SHORT,
|
||||||
@@ -2023,6 +2026,7 @@ Future getDwspUrlNew(
|
|||||||
//正在获取点位视频标志,禁止重入
|
//正在获取点位视频标志,禁止重入
|
||||||
getingDwVideo = false;
|
getingDwVideo = false;
|
||||||
} else {
|
} else {
|
||||||
|
print('_dwspUrl非视频地址?');
|
||||||
print('开始播放视频地址');
|
print('开始播放视频地址');
|
||||||
playUrl(index: indexRecord, url: _dwspUrl, context: context);
|
playUrl(index: indexRecord, url: _dwspUrl, context: context);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -589,6 +589,7 @@ Map<String, ItemData> mapGetWzxxGetDataSpecial = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Map<String, String> mapWzxxDataText = {
|
Map<String, String> mapWzxxDataText = {
|
||||||
|
// "主键ID": "id",
|
||||||
"主键ID": "id",
|
"主键ID": "id",
|
||||||
"车牌号码": "plate_id",
|
"车牌号码": "plate_id",
|
||||||
"车牌颜色": "plate_color",
|
"车牌颜色": "plate_color",
|
||||||
|
|||||||
+2
-1
@@ -7,6 +7,7 @@ import 'package:flutter/services.dart';
|
|||||||
import 'package:flutter_bmfbase/BaiduMap/bmfmap_base.dart' show BMFMapSDK, BMF_COORD_TYPE;
|
import 'package:flutter_bmfbase/BaiduMap/bmfmap_base.dart' show BMFMapSDK, BMF_COORD_TYPE;
|
||||||
import 'package:flutter_screenutil/screenutil_init.dart';
|
import 'package:flutter_screenutil/screenutil_init.dart';
|
||||||
import 'package:hyzp_ybqx511528_xingwen/pages/Login/LoginTabs2.dart';
|
import 'package:hyzp_ybqx511528_xingwen/pages/Login/LoginTabs2.dart';
|
||||||
|
import 'package:hyzp_ybqx511528_xingwen/pages/Works/TJXX/tj_data.dart';
|
||||||
import 'package:package_info/package_info.dart';
|
import 'package:package_info/package_info.dart';
|
||||||
// 引入provider
|
// 引入provider
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
@@ -63,7 +64,7 @@ class _MyAppState extends State<MyApp> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
initApp(); // 1、处理百度地图sdk初始化鉴权
|
initApp(); // 1、处理百度地图sdk初始化鉴权
|
||||||
//startGetStatisDataNew(); // 2、登录前提前获取统计数据,改善用户登录体验
|
startGetStatisDataNew(); // 2、登录前提前获取统计数据,改善用户登录体验
|
||||||
// 3、处理版本更新
|
// 3、处理版本更新
|
||||||
PackageInfo.fromPlatform().then((PackageInfo packageInfo) async {
|
PackageInfo.fromPlatform().then((PackageInfo packageInfo) async {
|
||||||
String appName = packageInfo.appName;
|
String appName = packageInfo.appName;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class _DwspPageState extends State<DwspGetList> {
|
|||||||
// listDwspGetList2[i]['dwbh'] = i + 1;
|
// listDwspGetList2[i]['dwbh'] = i + 1;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
//print('listDwspGetList2 = $listDwspGetList2');
|
// print('xxxx_listDwspGetList2 = $listDwspGetList2');
|
||||||
// for (var item in listDwspGetList2) {
|
// for (var item in listDwspGetList2) {
|
||||||
// print('item = $item');
|
// print('item = $item');
|
||||||
// }
|
// }
|
||||||
@@ -73,6 +73,7 @@ class _DwspPageState extends State<DwspGetList> {
|
|||||||
_listSort();
|
_listSort();
|
||||||
firstIndex = 0;
|
firstIndex = 0;
|
||||||
lastIndex = 7;
|
lastIndex = 7;
|
||||||
|
//try_setState();
|
||||||
|
|
||||||
// listDwinfoGetList2 = listDwspGetList2;
|
// listDwinfoGetList2 = listDwspGetList2;
|
||||||
// int len = listDwspGetList2.length;
|
// int len = listDwspGetList2.length;
|
||||||
@@ -362,7 +363,7 @@ class _DwspPageState extends State<DwspGetList> {
|
|||||||
// items.where((DropdownMenuItem<T> item) {
|
// items.where((DropdownMenuItem<T> item) {
|
||||||
// return item.value == value;
|
// return item.value == value;
|
||||||
// }).length == 1'
|
// }).length == 1'
|
||||||
String _selectedValue = 'id';
|
String _selectedValue = '主键ID';
|
||||||
bool _descending = false; //默认升序排列
|
bool _descending = false; //默认升序排列
|
||||||
|
|
||||||
Widget _getImage(String _image) {
|
Widget _getImage(String _image) {
|
||||||
@@ -391,6 +392,8 @@ class _DwspPageState extends State<DwspGetList> {
|
|||||||
//按_selectedValue排序,升序
|
//按_selectedValue排序,升序
|
||||||
listDwspGetList2.sort((a, b) =>
|
listDwspGetList2.sort((a, b) =>
|
||||||
(a[mapWzxxDataText[_selectedValue]]).compareTo(b[mapWzxxDataText[_selectedValue]]));
|
(a[mapWzxxDataText[_selectedValue]]).compareTo(b[mapWzxxDataText[_selectedValue]]));
|
||||||
|
// E/flutter ( 5170): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception:
|
||||||
|
// NoSuchMethodError: The method 'compareTo' was called on null.
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user