bb2643e8 by ex

未完成订单

1 parent 3a19c2d9
...@@ -69,24 +69,27 @@ angular.module('myApp') ...@@ -69,24 +69,27 @@ angular.module('myApp')
69 localStorage.removeItem('ls.user') 69 localStorage.removeItem('ls.user')
70 return 70 return
71 } 71 }
72 if(data.data.unfinishedOrder.status == 200) { 72 if(date.meta.code === 200) {
73 if(data.data.unfinishedOrder.id) { 73 if(data.data.unfinishedOrder.status == 200) {
74 $rootScope.isRendBike = true; 74 if(data.data.unfinishedOrder.id) {
75 $scope.unfinishOrder = data.data.unfinishedOrder; 75 $rootScope.isRendBike = true;
76 $scope.unfinishOrder = data.data.unfinishedOrder;
77 }
78 layer.open({
79 content: '您有未支付的订单,是否前往支付?',
80 btn: ['确认', '取消'],
81 shadeClose: false,
82 yes: function(index){
83 layer.close(index);
84 $state.go('tripDetail' , { orderId : $scope.unfinishOrder.id});
85 return;
86 },no: function(index){
87 layer.close(index);
88 }
89 });
76 } 90 }
77 layer.open({
78 content: '您有未支付的订单,是否前往支付?',
79 btn: ['确认', '取消'],
80 shadeClose: false,
81 yes: function(index){
82 layer.close(index);
83 $state.go('tripDetail' , { orderId : $scope.unfinishOrder.id});
84 return;
85 },no: function(index){
86 layer.close(index);
87 }
88 });
89 } 91 }
92
90 }).error(function(data , status) { 93 }).error(function(data , status) {
91 console.log(JSON.stringify(data)) 94 console.log(JSON.stringify(data))
92 }) 95 })
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!