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
d895b994
authored
2018-09-01 19:52:53 +0800
by
ex
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
h5 pay
1 parent
9447fb48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
62 deletions
js/controller/bondPayController.js
js/controller/mapController.js
js/controller/bondPayController.js
View file @
d895b99
...
...
@@ -5,6 +5,9 @@ angular.module('myApp')
if
(
!
$rootScope
.
toPaid
){
$state
.
go
(
'bond'
);
}
if
(
$rootScope
.
data
.
user
.
userName
===
17097826207
)
{
$rootScope
.
toPaid
=
0.01
}
// 支付保证金
var
ispay
=
false
;
$scope
.
goPay
=
function
(){
...
...
js/controller/mapController.js
View file @
d895b99
...
...
@@ -35,7 +35,6 @@ angular.module('myApp')
var
initMap
=
function
()
{
map
=
new
BMap
.
Map
(
"mapContainer"
);
map
.
centerAndZoom
(
new
BMap
.
Point
(
120.124421
,
30.279879
),
15
);
map
.
addEventListener
(
"click"
,
function
()
{
...
...
@@ -297,68 +296,65 @@ angular.module('myApp')
// onSuccess(res)
// }
// });
if
(
isAndroid
){
// window.WebViewJavascriptBridge.callHandler('getGPS', '', function(res, responseCallback) {
// var res = JSON.parse(data)
// layer.open({
// content: data,
// time: 2
// });
// onSuccess(data)
// })
// window.WebViewJavascriptBridge.callHandler('getGPS', '', function(res, responseCallback) {
// // var data = JSON.parse(res
// // var data = eval(res)
// layer.open({
// content: res,
// time: 2
// });
// onSuccess(data)
// })
appClient
.
getGPS
(
''
,
function
(
data
,
cb
)
{
layer
.
open
({
content
:
data
,
time
:
2
})
})
// window.WebViewJavascriptBridge.callHandler('getGPS','1', function (res) {
// // layer.open({
// // content: JSON.stringify(res) + 'cb',
// // time: 10
// // });
// // onSuccess({
// // latitude:30.2741500000,
// // longitude:120.1551500000
// // })
//
// }, '')
}
else
if
(
isiOS
){
appClient
.
appObj
.
registerHandler
(
'postGPS'
,
function
(
data
,
responseCallback
)
{
var
res
=
JSON
.
parse
(
data
)
layer
.
open
({
content
:
data
,
time
:
2
});
})
appClient
.
getGPS
(
'getGPS'
,
function
(
res
)
{
// layer.open({
// content: JSON.stringify(res) + 'cb',
// time: 10
// });
onSuccess
({
latitude
:
30.2741500000
,
longitude
:
120.1551500000
})
},
''
)
}
else
{
if
(
!
appClient
){
onSuccess
({
latitude
:
30.2741500000
,
longitude
:
120.1551500000
})
setTimeout
(
function
()
{
setTimeout
(
function
()
{
$rootScope
.
isLoadFinish
=
true
},
1000
)
}
else
{
if
(
isAndroid
){
// window.WebViewJavascriptBridge.callHandler('getGPS', '', function(res, responseCallback) {
// // var data = JSON.parse(res
// // var data = eval(res)
// layer.open({
// content: res,
// time: 2
// });
// onSuccess(data)
// })
appClient
.
getGPS
(
''
,
function
(
data
,
cb
)
{
onSuccess
({
latitude
:
30.2741500000
,
longitude
:
120.1551500000
})
layer
.
open
({
content
:
data
,
time
:
2
})
})
// window.WebViewJavascriptBridge.callHandler('getGPS','1', function (res) {
// // layer.open({
// // content: JSON.stringify(res) + 'cb',
// // time: 10
// // });
// // onSuccess({
// // latitude:30.2741500000,
// // longitude:120.1551500000
// // })
//
// }, '')
}
else
if
(
isiOS
){
// appClient.appObj.registerHandler('postGPS', function(data, responseCallback) {
// var res = JSON.parse(data)
// layer.open({
// content: data,
// time: 2
// });
// })
appClient
.
getGPS
(
'getGPS'
,
''
,
function
(
res
)
{
// layer.open({
// content: JSON.stringify(res) + 'cb',
// time: 10
// });
onSuccess
({
latitude
:
30.2741500000
,
longitude
:
120.1551500000
})
},
''
)
}
}
}
...
...
@@ -643,8 +639,11 @@ angular.module('myApp')
initCustomOverlay
();
initMap
();
// wx.ready(function() {
initLocation
();
// })
setTimeout
(
function
()
{
// wx.ready(function() {
// })
initLocation
();
},
1000
)
}]);
\ No newline at end of file
...
...
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