4deac723 by ex

h5 2

1 parent 4d211f25
...@@ -149,22 +149,36 @@ angular.module('myApp') ...@@ -149,22 +149,36 @@ angular.module('myApp')
149 $rootScope.openRing = false; 149 $rootScope.openRing = false;
150 $rootScope.$watch("openScan",function(newVal, oldVal){ 150 $rootScope.$watch("openScan",function(newVal, oldVal){
151 if(newVal !== oldVal && newVal) { 151 if(newVal !== oldVal && newVal) {
152 if(!$scope.checkLogin()) { 152 // if(!$scope.checkLogin()) {
153 return; 153 // return;
154 } 154 // }
155 155 //
156 // if($scope.unfinishOrder.status == 200) { 156 // if($scope.unfinishOrder.status == 200) {
157 // $state.go('tripDetail' , { orderId : $scope.unfinishOrder.id}); 157 // $state.go('tripDetail' , { orderId : $scope.unfinishOrder.id});
158 // return; 158 // return;
159 // } 159 // }
160 $rootScope.openScan = false; 160 $rootScope.openScan = false;
161 161
162
163 if(isAndroid){
164 // appClient.appObj.registerHandler('postERCode', function(data, responseCallback) {
165 // layer.open({
166 // content: JSON.stringify(data),
167 // time: 10
168 // });
169 // // log('ObjC called testJavascriptHandler with', data)
170 // // var responseData = { 'Javascript Says':'Right back atcha!' }
171 // // log('JS responding with', responseData)
172 // // responseCallback(responseData)
173 // })
174 window.WebViewJavascriptBridge.callHandler('getGPS', function (res) {
162 layer.open({ 175 layer.open({
163 content: appClient, 176 content: res,
164 time: 5 177 time: 10
165 }) 178 });
179 }, '')
166 180
167 if(appClient){ 181 }else if(isiOS){
168 appClient.appObj.registerHandler('postERCode', function(data, responseCallback) { 182 appClient.appObj.registerHandler('postERCode', function(data, responseCallback) {
169 layer.open({ 183 layer.open({
170 content: JSON.stringify(data), 184 content: JSON.stringify(data),
...@@ -181,7 +195,6 @@ angular.module('myApp') ...@@ -181,7 +195,6 @@ angular.module('myApp')
181 // time: 10 195 // time: 10
182 // }); 196 // });
183 }, '') 197 }, '')
184
185 } else { 198 } else {
186 layer.open({ 199 layer.open({
187 content: '调起摄像头失败', 200 content: '调起摄像头失败',
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!