jyj 4 роки тому
батько
коміт
8369a5cb61

+ 4 - 0
lib/internal/bbs/page/tab/video/video_detail.dart

@@ -59,6 +59,10 @@ class VideoDetailState extends State<VideoDetail> {
   VideoPlayerController _controller;
 
   Future getVideoDetail() async {
+    if(_controller != null){
+      _controller.pause();
+      _controller = null;
+    }
     print("-/-/-/-////////////////////////-----------");
     await NewApiService().getVideoDetail(int.parse(widget.id), 1,
         onSuccess: (res) {

+ 8 - 0
lib/internal/wode/page/order/order_detail.dart

@@ -49,6 +49,14 @@ class OrderDetailState extends State<OrderDetail>
   double totalPay;
 
   getBrandDetail() {
+    if(_controllerBefore != null){
+      _controllerBefore.pause();
+      _controllerBefore = null;
+    }
+    if(_controllerAfter != null){
+      _controllerAfter.pause();
+      _controllerAfter = null;
+    }
     NewApiService().getLiftcaseDetail(widget.id, onSuccess: (res) {
       detailObj = res;
       double serviceCost = detailObj.serviceCost!=null?detailObj.serviceCost:0.0;

+ 8 - 0
lib/internal/wode/page/order_master/order_detail.dart

@@ -48,6 +48,14 @@ class OrderDetailMasterState extends State<OrderDetailMaster>
   double totalPay;
   getBrandDetail() {
     // showLoading(context);
+    if(_controllerBefore != null){
+      _controllerBefore.pause();
+      _controllerBefore = null;
+    }
+    if(_controllerAfter != null){
+      _controllerAfter.pause();
+      _controllerAfter = null;
+    }
     NewApiService().getLiftcaseDetail(widget.id, onSuccess: (res) {
       detailObj = res;
       print("获取详情成功");

+ 4 - 0
lib/internal/wode/page/video/video_detail.dart

@@ -51,6 +51,10 @@ class VideoDetailState extends State<VideoDetail> {
   VideoPlayerController _controller;
 
   Future getVideoDetail() async {
+    if(_controller != null){
+      _controller.pause();
+      _controller = null;
+    }
     await NewApiService().getVideoDetail(int.parse(widget.id), 1,
         onSuccess: (res) async {
       if (res != null) {