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 1d119f75
authored
Mar 05, 2025
by
huyue
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.50' of
http://192.168.3.233:8090/glsx/gl_tape
into SAAS+V4.50
2 parents
e9a32467
09693de1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
51 deletions
components/HomeFrame/components/LeftSide.vue
utils/logger/LogCat.js
components/HomeFrame/components/LeftSide.vue
View file @
1d119f7
...
@@ -76,7 +76,7 @@ export default {
...
@@ -76,7 +76,7 @@ export default {
this
.
$emit
(
"changeTab"
,
index
)
this
.
$emit
(
"changeTab"
,
index
)
},
},
async
haveCustomerAccess
(
val
)
{
async
haveCustomerAccess
(
val
)
{
const
{
shopMerchantId
,
merchantId
,
sceneType
:
scene
}
=
val
const
{
shopMerchantId
,
sceneType
:
scene
}
=
val
const
res
=
await
uni
.
$api
.
customerApi
.
haveCustomerAccess
({
const
res
=
await
uni
.
$api
.
customerApi
.
haveCustomerAccess
({
merchantId
:
shopMerchantId
merchantId
:
shopMerchantId
})
})
...
@@ -87,7 +87,7 @@ export default {
...
@@ -87,7 +87,7 @@ export default {
})
})
this
.
$store
.
state
.
user
.
haveCustomerAccess
=
res
this
.
$store
.
state
.
user
.
haveCustomerAccess
=
res
uni
.
$api
.
customerApi
.
saleOpen
({
uni
.
$api
.
customerApi
.
saleOpen
({
merchantId
,
merchantId
:
shopMerchantId
,
scene
scene
}).
then
(
result
=>
{
}).
then
(
result
=>
{
if
(
result
)
{
if
(
result
)
{
...
...
utils/logger/LogCat.js
View file @
1d119f7
import
{
getTime
}
from
'./util'
import
{
getTime
}
from
'./util'
import
{
serializeIfObject
}
from
'../utils'
import
{
serializeIfObject
}
from
'../utils'
class
LogCat
{
class
LogCat
{
//
main = plus.android.runtimeMainActivity()
main
=
plus
.
android
.
runtimeMainActivity
()
//
File = plus.android.importClass('java.io.File')
File
=
plus
.
android
.
importClass
(
'java.io.File'
)
//
Environment = plus.android.importClass('android.os.Environment')
Environment
=
plus
.
android
.
importClass
(
'android.os.Environment'
)
//
BufferedWriter = plus.android.importClass('java.io.BufferedWriter')
BufferedWriter
=
plus
.
android
.
importClass
(
'java.io.BufferedWriter'
)
//
FileOutputStream = plus.android.importClass('java.io.FileOutputStream')
FileOutputStream
=
plus
.
android
.
importClass
(
'java.io.FileOutputStream'
)
//
OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter')
OutputStreamWriter
=
plus
.
android
.
importClass
(
'java.io.OutputStreamWriter'
)
//
//
BufferedReader = plus.android.importClass('java.io.BufferedReader')
// BufferedReader = plus.android.importClass('java.io.BufferedReader')
//
//
FileInputStream = plus.android.importClass('java.io.FileInputStream')
// FileInputStream = plus.android.importClass('java.io.FileInputStream')
//
//
InputStreamReader = plus.android.importClass('java.io.InputStreamReader')
// InputStreamReader = plus.android.importClass('java.io.InputStreamReader')
//
LogPath = ''
LogPath
=
''
constructor
(
folderName
=
'_zyzs_log'
)
{
constructor
(
folderName
=
'_zyzs_log'
)
{
//
if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) {
if
(
this
.
Environment
.
MEDIA_MOUNTED
||
!
this
.
Environment
.
isExternalStorageRemovable
())
{
//
this.LogPath = this.main.getExternalFilesDir(null).getPath() + folderName
this
.
LogPath
=
this
.
main
.
getExternalFilesDir
(
null
).
getPath
()
+
folderName
//
} else {
}
else
{
//
this.LogPath = this.main.getFilesDir().getPath() + folderName
this
.
LogPath
=
this
.
main
.
getFilesDir
().
getPath
()
+
folderName
//
}
}
//
console.log('日志文件存放路径->', this.LogPath)
console
.
log
(
'日志文件存放路径->'
,
this
.
LogPath
)
}
}
writeLog
(
tag
,
messages
)
{
writeLog
(
tag
,
messages
)
{
//
let msg = serializeIfObject(messages)
let
msg
=
serializeIfObject
(
messages
)
//
let date = getTime('YYYY-MM-DD')
let
date
=
getTime
(
'YYYY-MM-DD'
)
//
let datetime = getTime()
let
datetime
=
getTime
()
//
//
文件名
//文件名
//
let fileName = this.LogPath + '/' + date + '.txt'
let
fileName
=
this
.
LogPath
+
'/'
+
date
+
'.txt'
//
//
写入的内容
//写入的内容
//
let content = `${datetime} [${tag}] : ${msg}\n`
let
content
=
`
${
datetime
}
[
${
tag
}
] :
${
msg
}
\n`
//
console.log(content.replace(/\n/g, ''))
console
.
log
(
content
.
replace
(
/
\n
/g
,
''
))
//
let path = new this.File(this.LogPath)
let
path
=
new
this
.
File
(
this
.
LogPath
)
//
if (!path.exists()) {
if
(
!
path
.
exists
())
{
//
path.mkdirs() //创建父路径
path
.
mkdirs
()
//创建父路径
//
}
}
//
let fos = null
let
fos
=
null
//
let bw = null
let
bw
=
null
//
try {
try
{
//
fos = new this.FileOutputStream(fileName, true)
fos
=
new
this
.
FileOutputStream
(
fileName
,
true
)
//
bw = new this.BufferedWriter(new this.OutputStreamWriter(fos))
bw
=
new
this
.
BufferedWriter
(
new
this
.
OutputStreamWriter
(
fos
))
//
//bw.write(log);
//bw.write(log);
//
bw.append(content)
bw
.
append
(
content
)
//
} catch (e) {
}
catch
(
e
)
{
//
console.log('e->', e)
console
.
log
(
'e->'
,
e
)
//
} finally {
}
finally
{
//
try {
try
{
//
if (bw != null) {
if
(
bw
!=
null
)
{
//
bw.close() //关闭缓冲流
bw
.
close
()
//关闭缓冲流
//
fos.close() //关闭文件输出流
fos
.
close
()
//关闭文件输出流
//
}
}
//
} catch (closeEx) {
}
catch
(
closeEx
)
{
//
console.log('closeEx->', closeEx)
console
.
log
(
'closeEx->'
,
closeEx
)
//
}
}
//
}
}
}
}
// 删除日志
// 删除日志
removeLogFile
(
fileName
)
{
removeLogFile
(
fileName
)
{
...
@@ -84,11 +84,9 @@ export default LogCat
...
@@ -84,11 +84,9 @@ export default LogCat
// // BufferedWriter = plus.android.importClass('java.io.BufferedWriter')
// // BufferedWriter = plus.android.importClass('java.io.BufferedWriter')
// // FileOutputStream = plus.android.importClass('java.io.FileOutputStream')
// // FileOutputStream = plus.android.importClass('java.io.FileOutputStream')
// // OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter')
// // OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter')
// // BufferedReader = plus.android.importClass('java.io.BufferedReader')
// // BufferedReader = plus.android.importClass('java.io.BufferedReader')
// // FileInputStream = plus.android.importClass('java.io.FileInputStream')
// // FileInputStream = plus.android.importClass('java.io.FileInputStream')
// // InputStreamReader = plus.android.importClass('java.io.InputStreamReader')
// // InputStreamReader = plus.android.importClass('java.io.InputStreamReader')
// LogPath = ''
// LogPath = ''
// constructor(folderName = '_zyzs_log') {
// constructor(folderName = '_zyzs_log') {
// // if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) {
// // if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) {
...
...
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