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 c5339ea4
authored
Dec 31, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.47.6' of
http://192.168.3.233:8090/glsx/gl_tape
into SAAS+V4.47.6
2 parents
20a5e184
d3c28ad7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
116 additions
and
22 deletions
App.vue
components/HomeFrame/components/RecordList.vue
manifest.json
mixin/click.js
mixin/uploader.js
utils/utils.js
App.vue
View file @
c5339ea
...
...
@@ -2,12 +2,13 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-07 17:09:53
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-
24 16:06:29
* @LastEditTime: 2024-12-
31 10:50:50
* @FilePath: \gl_tape\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
script
>
const
PATH
=
[
'/pages/common/caseDetail'
]
const
keepAlive
=
uni
.
requireNativePlugin
(
'Ba-KeepAliveSuit'
)
import
{
mapState
}
from
'vuex'
import
{
Ws
}
from
'@/ws/Ws.js'
export
default
{
...
...
@@ -16,6 +17,7 @@ export default {
},
onLoad
()
{},
onLaunch
:
async
function
()
{
this
.
onKeep
()
// this.init()
this
.
setAPPVersion
()
setTimeout
(()
=>
{
...
...
@@ -28,6 +30,17 @@ export default {
new
Ws
().
connect
()
},
methods
:
{
onKeep
()
{
keepAlive
.
onKeep
(
{
title
:
'接待'
,
content
:
'接待通知'
},
res
=>
{
console
.
log
(
res
)
}
)
},
init
()
{
uni
.
addInterceptor
(
'navigateTo'
,
{
//监听跳转
...
...
components/HomeFrame/components/RecordList.vue
View file @
c5339ea
...
...
@@ -231,7 +231,6 @@ export default {
formatValue
(
val
,
k
)
{
if
(
!
val
)
return
if
(
k
==
'phoneNumber'
)
{
val
=
val
.
toString
()
return
val
.
slice
(
0
,
3
)
+
" "
+
val
.
slice
(
3
,
7
)
+
" "
+
val
.
slice
(
7
)
}
return
val
...
...
@@ -241,8 +240,7 @@ export default {
}
,
async
handleSubmit
(
val
)
{
this
.
showRecord
=
true
;
// uni.$recordManager.addRecord(val)
await
uni
.
$dbManager
.
addRecord
(
val
)
uni
.
$recordManager
.
addRecord
(
val
)
uni
.
$logger
.
local
.
info
(
`添加记录${JSON.stringify(val)
}
`
)
interruptRecord
.
removePreRecord
(
val
.
id
)
this
.
getRecordNum
()
...
...
@@ -283,9 +281,8 @@ export default {
scroll
(
e
)
{
this
.
sticky
=
e
.
detail
.
scrollTop
>=
148
}
,
async
getRecordNum
()
{
// let recordFailListAll = uni.$recordManager.getRecords();
let
recordFailListAll
=
await
uni
.
$dbManager
.
getRecords
();
getRecordNum
()
{
let
recordFailListAll
=
uni
.
$recordManager
.
getRecords
();
if
(
typeof
recordFailListAll
==
'string'
)
{
recordFailListAll
=
JSON
.
parse
(
recordFailListAll
||
'[]'
)
}
...
...
manifest.json
View file @
c5339ea
...
...
@@ -65,6 +65,22 @@
"xxhdpi"
:
"static/144.png"
}
}
},
"nativePlugins"
:
{
"Ba-KeepAliveSuit"
:
{
"__plugin_info__"
:
{
"name"
:
"安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)"
,
"description"
:
"在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)"
,
"platforms"
:
"Android"
,
"url"
:
"https://ext.dcloud.net.cn/plugin?id=11765"
,
"android_package_name"
:
"uni.gltap"
,
"ios_bundle_id"
:
""
,
"isCloud"
:
true
,
"bought"
:
1
,
"pid"
:
"11765"
,
"parameters"
:
{}
}
}
}
},
/*
快应用特有相关
*/
...
...
mixin/click.js
View file @
c5339ea
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-11-22 15:07:59
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-30 20:17:43
* @FilePath: \gl-tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-1
1-28 10:03:22
* @LastEditTime: 2024-1
2-30 20:57:30
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -43,6 +35,7 @@ export default {
},
async
mounted
()
{
uni
.
$logger
.
local
.
info
(
`进入接待首页!`
)
// this.checkPackage() //检查安装包
this
.
handleCheck
()
// 检查更新
this
.
handleSave
(
false
)
// 获取当前页面栈数组
...
...
@@ -81,6 +74,66 @@ export default {
},
methods
:
{
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
,
'setBooks'
,
'setAudioInfo'
]),
checkPackage
()
{
const
{
deviceId
:
tabletSerialNumber
}
=
uni
.
getDeviceInfo
()
uni
.
$api
.
commonApi
.
checkAppUpload
({
tabletSerialNumber
}).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
)
{
this
.
getAllApply
()
}
})
// this.getAllApply()
},
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
)
{
appInfoList
=
[]
}
}
plus
.
android
.
autoCollection
(
main
)
const
{
deviceId
:
tabletSerialNumber
}
=
uni
.
getDeviceInfo
()
if
(
appInfoList
.
length
<
2
)
{
appInfoList
=
[]
}
console
.
log
(
appInfoList
)
uni
.
$api
.
commonApi
.
saveOrUpdateEmployeeAppUsage
({
tabletSerialNumber
,
appVersion
:
plus
.
runtime
.
version
,
gameAppList
:
JSON
.
stringify
(
appInfoList
)
})
.
then
(
res
=>
{
console
.
log
(
res
)
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
// #endif
},
handleCheck
()
{
const
{
textList
,
tempFileURL
,
version
}
=
uni
.
$storage
.
get
(
'mock_data'
)
const
res
=
utils
.
compareVersions
(
plus
?.
runtime
?.
version
,
version
)
...
...
@@ -148,7 +201,9 @@ export default {
staffName
:
name
})
})
let
version
=
plus
.
runtime
.
version
let
params
=
{
// appVersion: version,
staffUuid
:
uuid
,
staffName
:
name
,
serviceMerchantId
:
merchantId
,
...
...
@@ -210,6 +265,7 @@ export default {
)
})
},
//开始录音
startAudio
:
utils
.
throttle
(
async
function
()
{
if
(
this
.
audioInfo
.
audioStatus
==
AUDIO_STATUS
.
START
)
return
...
...
@@ -312,6 +368,7 @@ export default {
}
})
},
/**
* 删除待提交记录
* @returns {void}
...
...
@@ -329,7 +386,7 @@ export default {
uni
.
$logger
.
local
.
info
(
`添加记录
${
JSON
.
stringify
(
record
)}
`
)
const
unlock
=
await
uni
.
$recordManager
.
lock
()
console
.
log
(
'record'
,
record
)
await
uni
.
$db
Manager
.
addRecord
(
record
)
uni
.
$record
Manager
.
addRecord
(
record
)
interruptRecord
.
removePreRecord
(
record
.
id
)
unlock
()
},
...
...
mixin/uploader.js
View file @
c5339ea
...
...
@@ -22,6 +22,7 @@ export default {
}
},
mounted
()
{
this
.
mergeRecord
()
this
.
init
()
this
.
subscribe
()
// uni.$dbManager.updateRecord({"recordUrlList": [
...
...
@@ -81,6 +82,15 @@ export default {
handlerMessage
(
data
)
{
this
.
save
(
data
)
},
async
mergeRecord
()
{
const
unlock
=
await
uni
.
$recordManager
.
lock
()
const
records
=
uni
.
$recordManager
.
getRecords
()
for
(
let
i
=
0
;
i
<
records
.
length
;
i
++
)
{
await
uni
.
$dbManager
.
addRecord
(
records
[
i
])
uni
.
$recordManager
.
removeRecord
(
records
[
i
].
id
)
}
unlock
()
},
async
checkDB
()
{
try
{
const
isSuccess
=
uni
.
$dbManager
.
init
()
...
...
utils/utils.js
View file @
c5339ea
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 17:16:46
* @LastEditors:
limi
n
* @LastEditTime: 2024-1
1-07 15:56:0
5
* @LastEditors:
前端 qianduan01@didihu.com.c
n
* @LastEditTime: 2024-1
2-31 14:28:3
5
* @FilePath: \gl_tape\utils\utils.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -151,6 +151,7 @@ function getFilePath() {
/** 比较版本号的大小
**/
function
compareVersions
(
version1
,
version2
)
{
if
(
!
version1
||
!
version2
)
return
0
const
v1
=
version1
.
split
(
'.'
).
map
(
v
=>
+
v
)
// 转化成数字数组
const
v2
=
version2
.
split
(
'.'
).
map
(
v
=>
+
v
)
const
b1
=
v1
.
every
(
v
=>
!
isNaN
(
v
))
// 判断数组的每一项是否是数字
...
...
@@ -179,11 +180,11 @@ export function serializeIfObject(msg) {
}
export
function
isInteger
(
value
)
{
if
(
typeof
value
===
'number'
)
{
return
Number
.
isInteger
(
value
)
;
return
Number
.
isInteger
(
value
)
}
else
if
(
typeof
value
===
'string'
)
{
return
/^-
?\d
+$/
.
test
(
value
)
;
return
/^-
?\d
+$/
.
test
(
value
)
}
return
false
;
return
false
}
export
default
{
compareVersions
,
...
...
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