Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wychl
uni-app
提交
cbe40e14
U
uni-app
项目概览
wychl
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cbe40e14
编写于
4月 29, 2020
作者:
M
mehaotian
提交者:
d-u-a
4月 29, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(stat) : 报数前咨询服务器,是否长久未登录,若是,则本地设置24小时内不上报
上级
2981847d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
263 addition
and
113 deletion
+263
-113
packages/uni-stat/dist/index.js
packages/uni-stat/dist/index.js
+130
-56
packages/uni-stat/src/index.js
packages/uni-stat/src/index.js
+17
-17
packages/uni-stat/src/parameter.js
packages/uni-stat/src/parameter.js
+86
-17
packages/uni-stat/src/stat.js
packages/uni-stat/src/stat.js
+30
-23
未找到文件。
packages/uni-stat/dist/index.js
浏览文件 @
cbe40e14
...
@@ -7,6 +7,7 @@ const PAGE_PVER_TIME = 1800;
...
@@ -7,6 +7,7 @@ const PAGE_PVER_TIME = 1800;
const
APP_PVER_TIME
=
300
;
const
APP_PVER_TIME
=
300
;
const
OPERATING_TIME
=
10
;
const
OPERATING_TIME
=
10
;
const
statConfig
=
require
(
'
uni-stat-config
'
).
default
||
require
(
'
uni-stat-config
'
);
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
const
UUID_VALUE
=
'
__DC_UUID_VALUE
'
;
const
UUID_VALUE
=
'
__DC_UUID_VALUE
'
;
...
@@ -82,12 +83,12 @@ const getPlatformName = () => {
...
@@ -82,12 +83,12 @@ const getPlatformName = () => {
};
};
const
getPackName
=
()
=>
{
const
getPackName
=
()
=>
{
let
packName
=
''
;
let
packName
=
''
;
if
(
getPlatformName
()
===
'
wx
'
||
getPlatformName
()
===
'
qq
'
)
{
if
(
getPlatformName
()
===
'
wx
'
||
getPlatformName
()
===
'
qq
'
)
{
// 兼容微信小程序低版本基础库
// 兼容微信小程序低版本基础库
if
(
uni
.
canIUse
(
'
getAccountInfoSync
'
)){
if
(
uni
.
canIUse
(
'
getAccountInfoSync
'
))
{
packName
=
uni
.
getAccountInfoSync
().
miniProgram
.
appId
||
''
;
packName
=
uni
.
getAccountInfoSync
().
miniProgram
.
appId
||
''
;
}
}
}
}
return
packName
return
packName
};
};
...
@@ -255,22 +256,22 @@ const getPageRoute = (self) => {
...
@@ -255,22 +256,22 @@ const getPageRoute = (self) => {
if
(
getPlatformName
()
===
'
bd
'
)
{
if
(
getPlatformName
()
===
'
bd
'
)
{
return
_self
.
$mp
&&
_self
.
$mp
.
page
.
is
+
str
;
return
_self
.
$mp
&&
_self
.
$mp
.
page
.
is
+
str
;
}
else
{
}
else
{
return
(
_self
.
$scope
&&
_self
.
$scope
.
route
+
str
)
||
(
_self
.
$mp
&&
_self
.
$mp
.
page
.
route
+
str
);
return
(
_self
.
$scope
&&
_self
.
$scope
.
route
+
str
)
||
(
_self
.
$mp
&&
_self
.
$mp
.
page
.
route
+
str
);
}
}
};
};
const
getPageTypes
=
(
self
)
=>
{
const
getPageTypes
=
(
self
)
=>
{
if
(
self
.
mpType
===
'
page
'
||
(
self
.
$mp
&&
self
.
$mp
.
mpType
===
'
page
'
)
||
self
.
$options
.
mpType
===
'
page
'
)
{
if
(
self
.
mpType
===
'
page
'
||
(
self
.
$mp
&&
self
.
$mp
.
mpType
===
'
page
'
)
||
self
.
$options
.
mpType
===
'
page
'
)
{
return
true
;
return
true
;
}
}
return
false
;
return
false
;
};
};
const
calibration
=
(
eventName
,
options
)
=>
{
const
calibration
=
(
eventName
,
options
)
=>
{
// login 、 share 、pay_success 、pay_fail 、register 、title
// login 、 share 、pay_success 、pay_fail 、register 、title
if
(
!
eventName
){
if
(
!
eventName
)
{
console
.
error
(
`uni.report 缺少 [eventName] 参数`
);
console
.
error
(
`uni.report 缺少 [eventName] 参数`
);
return
true
return
true
}
}
if
(
typeof
eventName
!==
'
string
'
)
{
if
(
typeof
eventName
!==
'
string
'
)
{
console
.
error
(
`uni.report [eventName] 参数类型错误,只能为 String 类型`
);
console
.
error
(
`uni.report [eventName] 参数类型错误,只能为 String 类型`
);
...
@@ -294,11 +295,78 @@ const calibration = (eventName, options) => {
...
@@ -294,11 +295,78 @@ const calibration = (eventName, options) => {
if
(
eventName
===
'
title
'
&&
typeof
options
!==
'
string
'
)
{
if
(
eventName
===
'
title
'
&&
typeof
options
!==
'
string
'
)
{
console
.
error
(
'
uni.report [eventName] 参数为 title 时,[options] 参数只能为 String 类型
'
);
console
.
error
(
'
uni.report [eventName] 参数为 title 时,[options] 参数只能为 String 类型
'
);
return
true
return
true
}
}
};
const
Report_Data_Time
=
'
Report_Data_Time
'
;
const
isReportData
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
start_time
=
''
;
let
end_time
=
new
Date
().
getTime
();
let
diff_time
=
60
*
1000
*
60
*
24
;
try
{
start_time
=
uni
.
getStorageSync
(
Report_Data_Time
);
}
catch
(
e
)
{
start_time
=
''
;
}
if
(
!
start_time
)
{
uni
.
setStorageSync
(
Report_Data_Time
,
end_time
);
start_time
=
end_time
;
}
if
((
end_time
-
start_time
)
>
diff_time
)
{
requestData
(({
enable
})
=>
{
uni
.
setStorageSync
(
Report_Data_Time
,
end_time
);
if
(
enable
===
1
)
{
resolve
();
}
});
}
})
};
const
Report_Status
=
'
Report_Status
'
;
const
requestData
=
(
done
)
=>
{
let
formData
=
{
usv
:
STAT_VERSION
,
conf
:
encodeURIComponent
({
ak
:
statConfig
.
appid
})
};
uni
.
request
({
url
:
STAT_URL
,
method
:
'
GET
'
,
data
:
formData
,
success
:
(
res
)
=>
{
const
{
data
}
=
res
;
if
(
data
.
ret
===
0
)
{
typeof
done
===
'
function
'
&&
done
({
enable
:
data
.
enable
});
}
},
fail
:
(
e
)
=>
{
let
report_status_code
=
1
;
try
{
report_status_code
=
uni
.
getStorageSync
(
Report_Status
);
}
catch
(
e
)
{
report_status_code
=
1
;
}
if
(
report_status_code
===
1
)
{
typeof
done
===
'
function
'
&&
done
({
enable
:
res
.
enable
});
}
// console.error('统计请求错误');
}
});
};
};
const
PagesJson
=
require
(
'
uni-pages?{"type":"style"}
'
).
default
;
const
PagesJson
=
require
(
'
uni-pages?{"type":"style"}
'
).
default
;
const
statConfig
=
require
(
'
uni-stat-config
'
).
default
||
require
(
'
uni-stat-config
'
);
const
statConfig
$1
=
require
(
'
uni-stat-config
'
).
default
||
require
(
'
uni-stat-config
'
);
const
resultOptions
=
uni
.
getSystemInfoSync
();
const
resultOptions
=
uni
.
getSystemInfoSync
();
...
@@ -328,7 +396,7 @@ class Util {
...
@@ -328,7 +396,7 @@ class Util {
uuid
:
getUuid
(),
uuid
:
getUuid
(),
ut
:
getPlatformName
(),
ut
:
getPlatformName
(),
mpn
:
getPackName
(),
mpn
:
getPackName
(),
ak
:
statConfig
.
appid
,
ak
:
statConfig
$1
.
appid
,
usv
:
STAT_VERSION
,
usv
:
STAT_VERSION
,
v
:
getVersion
(),
v
:
getVersion
(),
ch
:
getChannel
(),
ch
:
getChannel
(),
...
@@ -352,7 +420,11 @@ class Util {
...
@@ -352,7 +420,11 @@ class Util {
};
};
}
}
getIsReportData
(){
return
isReportData
()
}
_applicationShow
()
{
_applicationShow
()
{
if
(
this
.
__licationHide
)
{
if
(
this
.
__licationHide
)
{
getLastTime
();
getLastTime
();
...
@@ -547,7 +619,7 @@ class Util {
...
@@ -547,7 +619,7 @@ class Util {
}
}
getLocation
()
{
getLocation
()
{
if
(
statConfig
.
getLocation
)
{
if
(
statConfig
$1
.
getLocation
)
{
uni
.
getLocation
({
uni
.
getLocation
({
type
:
'
wgs84
'
,
type
:
'
wgs84
'
,
geocode
:
true
,
geocode
:
true
,
...
@@ -641,27 +713,29 @@ class Util {
...
@@ -641,27 +713,29 @@ class Util {
}
}
this
.
_sendRequest
(
optionsData
);
this
.
_sendRequest
(
optionsData
);
}
}
_sendRequest
(
optionsData
)
{
_sendRequest
(
optionsData
)
{
uni
.
request
({
this
.
getIsReportData
().
then
(()
=>
{
url
:
STAT_URL
,
uni
.
request
({
method
:
'
POST
'
,
url
:
STAT_URL
,
// header: {
method
:
'
POST
'
,
// 'content-type': 'application/json' // 默认值
// header: {
// },
// 'content-type': 'application/json' // 默认值
data
:
optionsData
,
// },
success
:
()
=>
{
data
:
optionsData
,
// if (process.env.NODE_ENV === 'development') {
success
:
()
=>
{
// console.log('stat request success');
// if (process.env.NODE_ENV === 'development') {
// }
// console.log('stat request success');
},
// }
fail
:
(
e
)
=>
{
},
if
(
++
this
.
_retry
<
3
)
{
fail
:
(
e
)
=>
{
setTimeout
(()
=>
{
if
(
++
this
.
_retry
<
3
)
{
this
.
_sendRequest
(
optionsData
);
setTimeout
(()
=>
{
},
1000
);
this
.
_sendRequest
(
optionsData
);
}
},
1000
);
}
}
});
}
});
});
}
}
/**
/**
* h5 请求
* h5 请求
...
@@ -836,14 +910,14 @@ const lifecycle = {
...
@@ -836,14 +910,14 @@ const lifecycle = {
stat
.
ready
(
this
);
stat
.
ready
(
this
);
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
stat
.
load
(
options
,
this
);
stat
.
load
(
options
,
this
);
// 重写分享,获取分享上报事件
// 重写分享,获取分享上报事件
if
(
this
.
$scope
&&
this
.
$scope
.
onShareAppMessage
)
{
if
(
this
.
$scope
&&
this
.
$scope
.
onShareAppMessage
)
{
let
oldShareAppMessage
=
this
.
$scope
.
onShareAppMessage
;
let
oldShareAppMessage
=
this
.
$scope
.
onShareAppMessage
;
this
.
$scope
.
onShareAppMessage
=
function
(
options
)
{
this
.
$scope
.
onShareAppMessage
=
function
(
options
)
{
stat
.
interceptShare
(
false
);
stat
.
interceptShare
(
false
);
return
oldShareAppMessage
.
call
(
this
,
options
)
return
oldShareAppMessage
.
call
(
this
,
options
)
};
};
}
}
},
},
onShow
()
{
onShow
()
{
...
@@ -867,14 +941,14 @@ const lifecycle = {
...
@@ -867,14 +941,14 @@ const lifecycle = {
};
};
function
main
()
{
function
main
()
{
if
(
process
.
env
.
NODE_ENV
===
'
development
'
)
{
if
(
process
.
env
.
NODE_ENV
===
'
development
'
)
{
uni
.
report
=
function
(
type
,
options
)
{};
uni
.
report
=
function
(
type
,
options
)
{};
}
else
{
}
else
{
const
Vue
=
require
(
'
vue
'
);
const
Vue
=
require
(
'
vue
'
);
(
Vue
.
default
||
Vue
).
mixin
(
lifecycle
);
(
Vue
.
default
||
Vue
).
mixin
(
lifecycle
);
uni
.
report
=
function
(
type
,
options
)
{
uni
.
report
=
function
(
type
,
options
)
{
stat
.
sendEvent
(
type
,
options
);
stat
.
sendEvent
(
type
,
options
);
};
};
}
}
}
}
...
...
packages/uni-stat/src/index.js
浏览文件 @
cbe40e14
import
Stat
from
'
./stat.js
'
;
import
Stat
from
'
./stat.js
'
;
const
stat
=
Stat
.
getInstance
();
const
stat
=
Stat
.
getInstance
();
let
isHide
=
false
let
isHide
=
false
const
lifecycle
=
{
const
lifecycle
=
{
...
@@ -9,14 +9,14 @@ const lifecycle = {
...
@@ -9,14 +9,14 @@ const lifecycle = {
stat
.
ready
(
this
);
stat
.
ready
(
this
);
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
stat
.
load
(
options
,
this
);
stat
.
load
(
options
,
this
);
// 重写分享,获取分享上报事件
// 重写分享,获取分享上报事件
if
(
this
.
$scope
&&
this
.
$scope
.
onShareAppMessage
)
{
if
(
this
.
$scope
&&
this
.
$scope
.
onShareAppMessage
)
{
let
oldShareAppMessage
=
this
.
$scope
.
onShareAppMessage
;
let
oldShareAppMessage
=
this
.
$scope
.
onShareAppMessage
;
this
.
$scope
.
onShareAppMessage
=
function
(
options
)
{
this
.
$scope
.
onShareAppMessage
=
function
(
options
)
{
stat
.
interceptShare
(
false
);
stat
.
interceptShare
(
false
);
return
oldShareAppMessage
.
call
(
this
,
options
)
return
oldShareAppMessage
.
call
(
this
,
options
)
}
}
}
}
},
},
onShow
()
{
onShow
()
{
...
@@ -40,14 +40,14 @@ const lifecycle = {
...
@@ -40,14 +40,14 @@ const lifecycle = {
}
}
function
main
()
{
function
main
()
{
if
(
process
.
env
.
NODE_ENV
===
'
development
'
)
{
if
(
process
.
env
.
NODE_ENV
===
'
development
'
)
{
uni
.
report
=
function
(
type
,
options
)
{};
uni
.
report
=
function
(
type
,
options
)
{};
}
else
{
}
else
{
const
Vue
=
require
(
'
vue
'
);
const
Vue
=
require
(
'
vue
'
);
(
Vue
.
default
||
Vue
).
mixin
(
lifecycle
);
(
Vue
.
default
||
Vue
).
mixin
(
lifecycle
);
uni
.
report
=
function
(
type
,
options
)
{
uni
.
report
=
function
(
type
,
options
)
{
stat
.
sendEvent
(
type
,
options
);
stat
.
sendEvent
(
type
,
options
);
};
};
}
}
}
}
...
...
packages/uni-stat/src/parameter.js
浏览文件 @
cbe40e14
import
{
import
{
PAGE_PVER_TIME
,
PAGE_PVER_TIME
,
APP_PVER_TIME
APP_PVER_TIME
,
STAT_URL
,
STAT_VERSION
}
from
'
./config
'
;
}
from
'
./config
'
;
const
statConfig
=
require
(
'
uni-stat-config
'
).
default
||
require
(
'
uni-stat-config
'
);
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
const
UUID_VALUE
=
'
__DC_UUID_VALUE
'
;
const
UUID_VALUE
=
'
__DC_UUID_VALUE
'
;
...
@@ -78,12 +80,12 @@ export const getPlatformName = () => {
...
@@ -78,12 +80,12 @@ export const getPlatformName = () => {
}
}
export
const
getPackName
=
()
=>
{
export
const
getPackName
=
()
=>
{
let
packName
=
''
let
packName
=
''
if
(
getPlatformName
()
===
'
wx
'
||
getPlatformName
()
===
'
qq
'
)
{
if
(
getPlatformName
()
===
'
wx
'
||
getPlatformName
()
===
'
qq
'
)
{
// 兼容微信小程序低版本基础库
// 兼容微信小程序低版本基础库
if
(
uni
.
canIUse
(
'
getAccountInfoSync
'
)){
if
(
uni
.
canIUse
(
'
getAccountInfoSync
'
))
{
packName
=
uni
.
getAccountInfoSync
().
miniProgram
.
appId
||
''
;
packName
=
uni
.
getAccountInfoSync
().
miniProgram
.
appId
||
''
;
}
}
}
}
return
packName
return
packName
}
}
...
@@ -254,22 +256,22 @@ export const getPageRoute = (self) => {
...
@@ -254,22 +256,22 @@ export const getPageRoute = (self) => {
if
(
getPlatformName
()
===
'
bd
'
)
{
if
(
getPlatformName
()
===
'
bd
'
)
{
return
_self
.
$mp
&&
_self
.
$mp
.
page
.
is
+
str
;
return
_self
.
$mp
&&
_self
.
$mp
.
page
.
is
+
str
;
}
else
{
}
else
{
return
(
_self
.
$scope
&&
_self
.
$scope
.
route
+
str
)
||
(
_self
.
$mp
&&
_self
.
$mp
.
page
.
route
+
str
);
return
(
_self
.
$scope
&&
_self
.
$scope
.
route
+
str
)
||
(
_self
.
$mp
&&
_self
.
$mp
.
page
.
route
+
str
);
}
}
};
};
export
const
getPageTypes
=
(
self
)
=>
{
export
const
getPageTypes
=
(
self
)
=>
{
if
(
self
.
mpType
===
'
page
'
||
(
self
.
$mp
&&
self
.
$mp
.
mpType
===
'
page
'
)
||
self
.
$options
.
mpType
===
'
page
'
)
{
if
(
self
.
mpType
===
'
page
'
||
(
self
.
$mp
&&
self
.
$mp
.
mpType
===
'
page
'
)
||
self
.
$options
.
mpType
===
'
page
'
)
{
return
true
;
return
true
;
}
}
return
false
;
return
false
;
}
}
export
const
calibration
=
(
eventName
,
options
)
=>
{
export
const
calibration
=
(
eventName
,
options
)
=>
{
// login 、 share 、pay_success 、pay_fail 、register 、title
// login 、 share 、pay_success 、pay_fail 、register 、title
if
(
!
eventName
){
if
(
!
eventName
)
{
console
.
error
(
`uni.report 缺少 [eventName] 参数`
);
console
.
error
(
`uni.report 缺少 [eventName] 参数`
);
return
true
return
true
}
}
if
(
typeof
eventName
!==
'
string
'
)
{
if
(
typeof
eventName
!==
'
string
'
)
{
console
.
error
(
`uni.report [eventName] 参数类型错误,只能为 String 类型`
);
console
.
error
(
`uni.report [eventName] 参数类型错误,只能为 String 类型`
);
...
@@ -293,5 +295,72 @@ export const calibration = (eventName, options) => {
...
@@ -293,5 +295,72 @@ export const calibration = (eventName, options) => {
if
(
eventName
===
'
title
'
&&
typeof
options
!==
'
string
'
)
{
if
(
eventName
===
'
title
'
&&
typeof
options
!==
'
string
'
)
{
console
.
error
(
'
uni.report [eventName] 参数为 title 时,[options] 参数只能为 String 类型
'
);
console
.
error
(
'
uni.report [eventName] 参数为 title 时,[options] 参数只能为 String 类型
'
);
return
true
return
true
}
}
}
const
Report_Data_Time
=
'
Report_Data_Time
'
export
const
isReportData
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
start_time
=
''
let
end_time
=
new
Date
().
getTime
()
let
diff_time
=
60
*
1000
*
60
*
24
try
{
start_time
=
uni
.
getStorageSync
(
Report_Data_Time
)
}
catch
(
e
)
{
start_time
=
''
}
if
(
!
start_time
)
{
uni
.
setStorageSync
(
Report_Data_Time
,
end_time
)
start_time
=
end_time
}
if
((
end_time
-
start_time
)
>
diff_time
)
{
requestData
(({
enable
})
=>
{
uni
.
setStorageSync
(
Report_Data_Time
,
end_time
)
if
(
enable
===
1
)
{
resolve
();
}
});
}
})
}
const
Report_Status
=
'
Report_Status
'
const
requestData
=
(
done
)
=>
{
let
formData
=
{
usv
:
STAT_VERSION
,
conf
:
encodeURIComponent
({
ak
:
statConfig
.
appid
})
}
uni
.
request
({
url
:
STAT_URL
,
method
:
'
GET
'
,
data
:
formData
,
success
:
(
res
)
=>
{
const
{
data
}
=
res
if
(
data
.
ret
===
0
)
{
typeof
done
===
'
function
'
&&
done
({
enable
:
data
.
enable
})
}
},
fail
:
(
e
)
=>
{
let
report_status_code
=
1
try
{
report_status_code
=
uni
.
getStorageSync
(
Report_Status
)
}
catch
(
e
)
{
report_status_code
=
1
}
if
(
report_status_code
===
1
)
{
typeof
done
===
'
function
'
&&
done
({
enable
:
res
.
enable
})
}
// console.error('统计请求错误');
}
});
}
}
packages/uni-stat/src/stat.js
浏览文件 @
cbe40e14
...
@@ -22,7 +22,8 @@ import {
...
@@ -22,7 +22,8 @@ import {
getPageRoute
,
getPageRoute
,
getRoute
,
getRoute
,
getPageTypes
,
getPageTypes
,
calibration
calibration
,
isReportData
}
from
'
./parameter
'
;
}
from
'
./parameter
'
;
import
{
import
{
...
@@ -84,7 +85,11 @@ class Util {
...
@@ -84,7 +85,11 @@ class Util {
}
}
}
}
getIsReportData
(){
return
isReportData
()
}
_applicationShow
()
{
_applicationShow
()
{
if
(
this
.
__licationHide
)
{
if
(
this
.
__licationHide
)
{
getLastTime
();
getLastTime
();
...
@@ -373,27 +378,29 @@ class Util {
...
@@ -373,27 +378,29 @@ class Util {
}
}
this
.
_sendRequest
(
optionsData
)
this
.
_sendRequest
(
optionsData
)
}
}
_sendRequest
(
optionsData
)
{
_sendRequest
(
optionsData
)
{
uni
.
request
({
this
.
getIsReportData
().
then
(()
=>
{
url
:
STAT_URL
,
uni
.
request
({
method
:
'
POST
'
,
url
:
STAT_URL
,
// header: {
method
:
'
POST
'
,
// 'content-type': 'application/json' // 默认值
// header: {
// },
// 'content-type': 'application/json' // 默认值
data
:
optionsData
,
// },
success
:
()
=>
{
data
:
optionsData
,
// if (process.env.NODE_ENV === 'development') {
success
:
()
=>
{
// console.log('stat request success');
// if (process.env.NODE_ENV === 'development') {
// }
// console.log('stat request success');
},
// }
fail
:
(
e
)
=>
{
},
if
(
++
this
.
_retry
<
3
)
{
fail
:
(
e
)
=>
{
setTimeout
(()
=>
{
if
(
++
this
.
_retry
<
3
)
{
this
.
_sendRequest
(
optionsData
);
setTimeout
(()
=>
{
},
1000
);
this
.
_sendRequest
(
optionsData
);
}
},
1000
);
}
}
});
}
});
})
}
}
/**
/**
* h5 请求
* h5 请求
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录