Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NJ
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
middleLayer_for_NJ
Commits
d5495a18
Commit
d5495a18
authored
Apr 11, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 同步依赖文件
parent
18aae423
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
air.js
assets/middleLayer_for_NJ/script/air.js
+20
-1
No files found.
assets/middleLayer_for_NJ/script/air.js
View file @
d5495a18
...
...
@@ -37,6 +37,7 @@ export function initAir(_this) {
takePictureCallBack
:
null
,
configurationPortraitCallback
:
null
,
configurationLandscapeCallback
:
null
,
startBuyToAppStoreCallBack
:
null
,
recognitionCameraCallBack
:
null
,
testCallBack
:
null
,
recordCallBack
:
null
,
...
...
@@ -184,7 +185,11 @@ export function initAir(_this) {
takePicture
(
callback
)
{
_this
.
log
(
`===成功调用takePicture===`
);
window
.
air
.
takePictureCallBack
=
(
res
)
=>
{
if
(
typeof
(
res
)
==
'
string
'
)
{
callback
&&
callback
(
res
);
}
else
{
callback
&&
callback
(
JSON
.
stringify
(
res
));
}
window
.
air
.
takePictureCallBack
=
null
;
};
window
.
courseware
.
callOcMethod
(
"
takePicture
"
,
{});
...
...
@@ -219,6 +224,10 @@ export function initAir(_this) {
};
window
.
courseware
.
callOcMethod
(
"
getEngineInfo
"
,
{});
},
behaviorToCollectWithParam
(
event
,
type
=
""
)
{
// 埋点所需接口 levelPayForSuccess userRegistrationEvent
window
.
courseware
.
callOcMethod
(
"
behaviorToCollectWithParam
"
,
{
event
,
type
});
},
exitApp
()
{
_this
.
log
(
`===成功调用exitApp===`
);
window
.
courseware
.
callOcMethod
(
"
exitApp
"
,
{});
...
...
@@ -305,6 +314,14 @@ export function initAir(_this) {
};
window
.
courseware
.
callOcMethod
(
"
onConfigurationLandscape
"
,
params
);
},
startBuyToAppStore
(
params
=
{},
callback
)
{
// 苹果支付
_this
.
log
(
`===成功调用startBuyToAppStore===`
);
window
.
air
.
startBuyToAppStoreCallBack
=
(
res
)
=>
{
callback
&&
callback
(
res
);
};
window
.
courseware
.
callOcMethod
(
"
startBuyToAppStore
"
,
params
);
},
callOcMethod
(
method
,
param
)
{
const
paramStr
=
JSON
.
stringify
(
param
);
_this
.
log
(
`===成功调用原生方法
${
method
}
===参数==
${
paramStr
}
`
);
...
...
@@ -324,6 +341,8 @@ export function initAir(_this) {
}
else
if
(
method
==
'
startRecord
'
)
{
}
else
if
(
method
==
'
stopRecord
'
)
{
window
.
air
.
recordCallBack
(
recordMockData
);
}
else
if
(
method
==
'
startBuyToAppStore
'
)
{
window
.
air
.
startBuyToAppStoreCallBack
({
productid
:
1
,
puid
:
22
,
receiptData
:
"
HelloWorld
"
,
error
:
""
});
}
else
{
console
.
error
(
`
${
method
}
方法还没有Mock数据,请联系技术支持人员添加`
);
}
...
...
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