Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 428e7961
authored
Dec 30, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
合并
1 parent
a18fcb44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
46 deletions
App.vue
App.vue
View file @
428e796
...
@@ -26,54 +26,8 @@ export default {
...
@@ -26,54 +26,8 @@ export default {
keepScreenOn
:
true
keepScreenOn
:
true
})
})
new
Ws
().
connect
()
new
Ws
().
connect
()
this
.
getAllApply
()
},
},
methods
:
{
methods
:
{
getAllApply
()
{
// #ifdef APP-PLUS
const
main
=
plus
.
android
.
runtimeMainActivity
()
const
pManager
=
plus
.
android
.
invoke
(
main
,
'getPackageManager'
)
const
ApplicationInfo
=
plus
.
android
.
importClass
(
'android.content.pm.ApplicationInfo'
)
const
packages
=
plus
.
android
.
invoke
(
pManager
,
'getInstalledPackages'
,
0
)
const
total
=
plus
.
android
.
invoke
(
packages
,
'size'
)
let
appInfoList
=
[]
for
(
let
i
=
0
;
i
<
total
;
i
++
)
{
try
{
const
packageInfo
=
plus
.
android
.
invoke
(
packages
,
'get'
,
i
)
// 获取包名
const
packName
=
plus
.
android
.
getAttribute
(
packageInfo
,
'packageName'
)
const
versionName
=
plus
.
android
.
getAttribute
(
packageInfo
,
'versionName'
)
const
versionCode
=
plus
.
android
.
getAttribute
(
packageInfo
,
'versionCode'
)
const
appInfo
=
plus
.
android
.
invoke
(
pManager
,
'getApplicationInfo'
,
packName
,
0
)
const
appName
=
plus
.
android
.
invoke
(
pManager
,
'getApplicationLabel'
,
appInfo
)
// 是否是系统软件
const
isSystem
=
packageInfo
.
plusGetAttribute
(
'applicationInfo'
).
plusGetAttribute
(
'flags'
)
&
(
ApplicationInfo
.
FLAG_SYSTEM
!=
0
)
?
true
:
false
// 判断是否是系统文件
if
(
!
isSystem
)
{
appInfoList
.
push
({
packName
,
versionName
,
versionCode
,
appName
})
}
}
catch
(
e
)
{}
}
plus
.
android
.
autoCollection
(
main
)
const
{
deviceId
:
tabletSerialNumber
}
=
uni
.
getDeviceInfo
()
uni
.
$api
.
commonApi
.
saveOrUpdateEmployeeAppUsage
({
tabletSerialNumber
,
appVersion
:
plus
.
runtime
.
version
,
gameAppList
:
JSON
.
stringify
(
appInfoList
)
})
.
then
(
res
=>
{
console
.
log
(
res
)
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
// #endif
},
init
()
{
init
()
{
uni
.
addInterceptor
(
'navigateTo'
,
{
uni
.
addInterceptor
(
'navigateTo'
,
{
//监听跳转
//监听跳转
...
...
Write
Preview
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