Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re860_factory
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
waterword
re860_factory
Commits
ccd2cb53
Commit
ccd2cb53
authored
Sep 29, 2025
by
lyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:暂时添加容错自动化启动APP
parent
1e371990
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
131 additions
and
0 deletions
+131
-0
appAuto.js
appAuto.js
+131
-0
No files found.
appAuto.js
0 → 100644
View file @
ccd2cb53
// globalThis.cslog = //console.log
// console.log = function () {
// }
// console.trace = function () {
// }
console
.
debug
=
function
(
text
)
{
var
date
=
new
Date
()
text
=
`========= [
${
date
}
]
${
text
}
`
print
(
text
)
}
function
initEventLister
()
{
var
EventEmitter
=
require
(
'
@system.events
'
);
globalThis
.
eventEmitter
=
new
EventEmitter
();
}
function
onCreate
(
uri
)
{
var
re860_router
=
require
(
"
router-re860.js
"
).
router
;
re860_router
.
onClick
=
function
(
node
,
topNode
,
x
,
y
)
{
var
systemCtrl
=
require
(
"
systemCtrl.js
"
);
systemCtrl
.
executeSystemCommand
(
"
/mnt/app/quicknode/shell/eAplay.sh /mnt/app/voice_click.wav
"
);
}
initEventLister
();
globalThis
.
Simu
=
{
"
En
"
:
0
,
}
globalThis
.
test
=
{
"
En
"
:
0
,
}
var
process
=
require
(
"
@system.process
"
)
if
(
process
.
platform
==
"
win32
"
)
{
//console.log("its win32.")
globalThis
.
Simu
.
En
=
1
}
globalThis
.
DEV
=
{
"
tpLog
"
:
1
,
}
initEventLister
();
gc
();
//console.log(showMemInfo());
var
dom
=
require
(
"
dom.js
"
);
//要放在router后面,router会创建document
var
router
=
re860_router
;
var
times
=
[];
if
(
startUrl
()
==
undefined
)
{
times
.
push
(
clock
());
gc
();
router
.
push
({
'
path
'
:
uri
});
times
.
push
(
clock
());
gc
();
}
else
{
times
.
push
(
clock
());
var
uriObj
=
JSON
.
parse
(
globalThat
.
$uri
);
console
.
log
(
uriObj
);
router
.
push
(
uriObj
);
times
.
push
(
clock
());
console
.
log
(
times
);
gc
();
}
require
(
"
factory_autoFactoryTest.js
"
).
autoFactoryTestTimer
();
}
// function onKeyEvent(code) {
// var router = require("@system.router");
// var keypad = require("keypadCode.js")
// keypad.triggerByCode(code)
// //console.log("++++ CodeNum:" + code)
// return
// if (code == 62) {
// router.pageDebug(!router.debugOn);
// }
// }
function
onDestroy
()
{
// 应用退出时会被触发
var
router
=
require
(
"
@system.router
"
);
router
.
quit
();
}
function
onGestureEvent
(
dir
,
x
,
y
)
{
var
router
=
require
(
"
@system.router
"
);
var
indexObj
=
router
.
currentPage
.
$indexObj
;
if
(
indexObj
.
hasOwnProperty
(
'
onGestureEvent
'
))
{
indexObj
.
onGestureEvent
(
dir
,
x
,
y
);
}
}
function
onMoveEvent
(
globalX
,
globalY
,
topObj
,
x
,
y
)
{
if
(
this
.
currentPage
)
{
var
indexObj
=
this
.
currentPage
.
$indexObj
;
if
(
indexObj
&&
(
indexObj
.
hasOwnProperty
(
'
onmousemove
'
)
||
indexObj
.
hasOwnProperty
(
'
touchmove
'
)))
{
if
(
indexObj
.
$onmousemove
==
undefined
)
{
if
(
indexObj
.
hasOwnProperty
(
'
onmousemove
'
))
{
indexObj
.
$onmousemove
=
indexObj
.
onmousemove
;
}
else
if
(
indexObj
.
hasOwnProperty
(
'
touchmove
'
))
{
indexObj
.
$onmousemove
=
indexObj
.
touchmove
;
}
}
if
(
typeof
indexObj
.
$onmousemove
==
"
function
"
)
{
var
node
=
__getElementByObj
(
indexObj
,
topObj
)
if
(
node
)
{
if
(
indexObj
.
$onmousemove
.
length
==
1
)
{
var
e
=
router
.
toH5Event
(
node
,
node
,
x
,
y
);
indexObj
.
$onmousemove
(
e
);
return
;
}
}
indexObj
.
$onmousemove
(
globalX
,
globalY
,
topObj
,
x
,
y
);
}
}
}
}
EvueApp
({
// "font": "MideaType-Regular.ttf",
"
font
"
:
"
SimHei_GB2312_80_t.ttf
"
,
// "font": "Metropolis-Medium.ttf",
'
onCreate
'
:
onCreate
,
'
onDestroy
'
:
onDestroy
,
'
onMoveEvent
'
:
onMoveEvent
,
'
onGestureEvent
'
:
onGestureEvent
,
'
paths
'
:
[
"
../RD190/
"
,
"
../../enode_modules/
"
,
"
./../RE860A/logicJS/
"
,
"
./../RE860A/common/
"
,
"
./../RE860A/
"
,
"
./../re860a-v1.0/
"
,
"
./../re860a-v1.0/logicJS/
"
,
"
./../re860a-v1.0/common/
"
,
"
./factoryTest_plugin/
"
,
"
./factoryTest_plugin/ref/
"
,
"
./factoryTestItem/
"
],
'
uri
'
:
'
factory_testList
'
,
// 'uri': 'testLongTimeList',
'
minFreeJSHeapSize
'
:
200
});
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