Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-back
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengguangpu
doublescreen-back
Commits
43ee4826
Commit
43ee4826
authored
Jul 02, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加错误监控
parent
86bcb384
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
13 deletions
+31
-13
app.js
app.js
+29
-13
index.js
pages/index/index.js
+2
-0
No files found.
app.js
View file @
43ee4826
import
monitor
from
'/utils/alipayLogger'
;
var
fundebug
=
require
(
'./utils/fundebug.0.2.0.min.js'
);
fundebug
.
init
(
{
apikey
:
'c0c5937571f82aecab3f7578bea5d8163455cd2407863f94829bee12324f57b4'
})
App
(
monitor
.
hookApp
({
globalData
:
{
version
:
"1.0.1.20200311"
,
TEST_URL
:
"https://cashier.test.miyahub.net/"
,
RELEASE_URL
:
"https://cashier.miyahub.com/"
,
LOG_URL
:
"https://log.test.miyahub.net/log"
,
appId
:
"2021001107617164"
,
frontScreenAppId
:
"2021001107603212"
,
userName
:
""
},
onLaunch
(
options
)
{
monitor
.
init
({
pid
:
"qzhr85jigetfamuqniwz4q=="
,
options
:
options
,
...
...
@@ -42,10 +35,33 @@ App(monitor.hookApp({
// options.query == {number:1}
},
onError
(
err
)
{
fundebug
.
onError
(
err
);
//错误上报
onError
(
err
)
{
try
{
var
commonRequest
=
{
appId
:
this
.
globalData
.
appId
,
account
:
this
.
globalData
.
userName
,
version
:
this
.
globalData
.
version
,
extra_data
:
err
};
my
.
request
({
url
:
this
.
globalData
.
LOG_URL
,
method
:
'POST'
,
dataType
:
'json'
,
timeout
:
30000
,
data
:
commonRequest
,
success
:
(
res
)
=>
{
console
.
log
(
"upload log success"
);
},
fail
:
(
res
)
=>
{
console
.
log
(
"upload log fail"
);
}
});
}
catch
(
e
)
{
console
.
log
(
"upload log exp"
,
e
);
}
}
}));
pages/index/index.js
View file @
43ee4826
...
...
@@ -305,6 +305,7 @@ Page({
var
sn
=
loginOptions
.
sn
;
var
account
=
loginOptions
.
account
;
var
version
=
loginOptions
.
containerVersion
;
getApp
().
globalData
.
userName
=
account
.
userName
context
.
setData
({
isFrontScreenLoginOK
:
true
,
storeName
:
account
.
storeName
,
...
...
@@ -506,6 +507,7 @@ Page({
/**首页相关 */
/**立即收款 */
onHomeCashierImmediatelyClicked
:
throttle
(
2000
,
function
()
{
if
(
this
.
showLoading
==
true
)
{
return
}
...
...
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