Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DoorLock
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
朱建香
DoorLock
Commits
57788686
Commit
57788686
authored
Dec 19, 2017
by
朱建香
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2017/12/19
1.Android物理按钮返回bug修改
parent
8ceb76ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
6 deletions
+54
-6
dev/src/public/public.js
+54
-6
No files found.
dev/src/public/public.js
View file @
57788686
...
...
@@ -209,7 +209,7 @@ iot.navigator.closeAll = function (){
}
iot
.
ready
(
function
(){
plus
.
key
.
addEventListener
(
'backbutton'
,
iot
.
navigator
.
aback
,
false
);
//
plus.key.addEventListener('backbutton',iot.navigator.aback,false);
})
iot
.
navigator
.
aback
=
function
(){
...
...
@@ -287,6 +287,45 @@ iot.navigator.getCurrentWebView = function (){
// window.clearTimeout(timeout);
//}
//
//function sendRequest(url, params, canSend){
// var opts = {
// type: 'post',
// data: params.data,
// success: params.success,
// error: params.error,
// complete: params.complete
// };
// canSend = false;
// requestsend(url, {
// type: 'post',
// data: {
// params.data
// },
// success: (response) => {
// intervalcb.success(response);
// if(stopcondition(response)){
// params.success(response);
// clearTime(handle, time);
// canSend = false;
// }else{
// canSend = true;
// }
// },
// error: (error) => {
// intervalcb.error(error);
// //在intervalcb.error(error)中返回的如果是true则继续执行,否则结束轮询
// if(intervalcb.error(error)){
// canSend = true;
// }else{
// params.error(error);
// clearTime(handle, time);
// }
// },
// complete: {}
// }, true, false);
// return canSend;
//}
//
//uComponents.loop = function(request, timeout, interval, fincb, stopcondition){
// var handle = null;
// var time = null;
...
...
@@ -295,12 +334,18 @@ iot.navigator.getCurrentWebView = function (){
// var intervalTime = interval.delay;
// var intervalcb = interval.opts;
// var flag = true;
// var canSend = true;
// var canDo = true;
// var i = 0;
// time = setTimeout(function(){
// clearTime(handle, time);
// intervalcb.error('timeout');
// fincb.error('timeout');
// },timeout);
// var watcher = setInterval(function(){
// if(canSend && canDo){
// var send = sendRequest(url, opts, canSend, canDo);
// }
// },1000);
// //一开始执行一次,发送一次请求
// requestsend(url, {
// data: {},
...
...
@@ -313,7 +358,7 @@ iot.navigator.getCurrentWebView = function (){
// }else{
// //首次请求结果不符合条件的话,每隔intervalTime时间发送请求
// handle = setInterval(() => {
// i++;
// i++;
// console.log(i);
// if(flag){
// flag = false;
...
...
@@ -328,9 +373,12 @@ iot.navigator.getCurrentWebView = function (){
// flag = true;
// },
// error: (error) => {
// intervalcb.error(error);
// fincb.error(error);
// clearTime(handle, time);
// if(intervalcb.error(error)){
// flag = false;
// }else{
// fincb.error(error);
// clearTime(handle, time);
// }
// },
// complete: {}
// }, i);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment