Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
dy-wx2
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4deac723
authored
2018-09-01 15:35:25 +0800
by
ex
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
h5 2
1 parent
4d211f25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
js/controller/mainController.js
js/controller/mainController.js
View file @
4deac72
...
...
@@ -149,22 +149,36 @@ angular.module('myApp')
$rootScope
.
openRing
=
false
;
$rootScope
.
$watch
(
"openScan"
,
function
(
newVal
,
oldVal
){
if
(
newVal
!==
oldVal
&&
newVal
)
{
if
(
!
$scope
.
checkLogin
())
{
return
;
}
//
if(!$scope.checkLogin()) {
//
return;
//
}
//
// if($scope.unfinishOrder.status == 200) {
// $state.go('tripDetail' , { orderId : $scope.unfinishOrder.id});
// return;
// }
$rootScope
.
openScan
=
false
;
layer
.
open
({
content
:
appClient
,
time
:
5
})
if
(
appClient
){
if
(
isAndroid
){
// appClient.appObj.registerHandler('postERCode', function(data, responseCallback) {
// layer.open({
// content: JSON.stringify(data),
// time: 10
// });
// // log('ObjC called testJavascriptHandler with', data)
// // var responseData = { 'Javascript Says':'Right back atcha!' }
// // log('JS responding with', responseData)
// // responseCallback(responseData)
// })
window
.
WebViewJavascriptBridge
.
callHandler
(
'getGPS'
,
function
(
res
)
{
layer
.
open
({
content
:
res
,
time
:
10
});
},
''
)
}
else
if
(
isiOS
){
appClient
.
appObj
.
registerHandler
(
'postERCode'
,
function
(
data
,
responseCallback
)
{
layer
.
open
({
content
:
JSON
.
stringify
(
data
),
...
...
@@ -181,8 +195,7 @@ angular.module('myApp')
// time: 10
// });
},
''
)
}
else
{
}
else
{
layer
.
open
({
content
:
'调起摄像头失败'
,
time
:
2
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment