Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_njstar
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_njstar
Commits
b926d689
Commit
b926d689
authored
Aug 10, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 输入激活码
parent
a52882f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
64 deletions
+3
-64
air.js
assets/middleLayer_for_njstar/script/air.js
+1
-1
middleLayer.ts
assets/middleLayer_for_njstar/script/middleLayer.ts
+2
-63
No files found.
assets/middleLayer_for_njstar/script/air.js
View file @
b926d689
...
@@ -319,7 +319,7 @@ export function initAir(_this) {
...
@@ -319,7 +319,7 @@ export function initAir(_this) {
}
else
{
}
else
{
console
.
error
(
`非源生环境,网页版不支持
${
method
}
方法,将返回此方法的Mock数据以便于网页版调试使用`
);
console
.
error
(
`非源生环境,网页版不支持
${
method
}
方法,将返回此方法的Mock数据以便于网页版调试使用`
);
if
(
method
==
'
getEngineInfo
'
){
if
(
method
==
'
getEngineInfo
'
){
window
.
air
.
getEngineInfoCallback
({
isDev
:
1
,
uuid
:
'
debug-xxxxxx-xxxxxx
'
});
window
.
air
.
getEngineInfoCallback
({
isDev
:
0
,
uuid
:
'
debug-xxxxxx-xxxxxx
'
});
}
else
if
(
method
==
'
startTest
'
)
{
}
else
if
(
method
==
'
startTest
'
)
{
}
else
if
(
method
==
'
stopTest
'
)
{
}
else
if
(
method
==
'
stopTest
'
)
{
window
.
air
.
testCallBack
(
testMockData
);
window
.
air
.
testCallBack
(
testMockData
);
...
...
assets/middleLayer_for_njstar/script/middleLayer.ts
View file @
b926d689
...
@@ -229,69 +229,8 @@ export default class NewClass extends middleLayerBase {
...
@@ -229,69 +229,8 @@ export default class NewClass extends middleLayerBase {
if
(
this
.
IS_BUNDLE_LOADING
)
{
if
(
this
.
IS_BUNDLE_LOADING
)
{
return
;
return
;
}
}
if
(
cc
.
sys
.
isNative
&&
cc
.
sys
.
os
==
cc
.
sys
.
OS_IOS
)
{
const
tipsLayer
=
cc
.
find
(
'
middleLayer/activeLayer
'
);
// if (true) {
tipsLayer
.
active
=
true
;
const
tipsLayer
=
cc
.
find
(
'
middleLayer/iosActiveLayer
'
);
cc
.
find
(
`loading`
,
tipsLayer
).
active
=
true
;
tipsLayer
.
active
=
true
;
const
token
=
cc
.
sys
.
localStorage
.
getItem
(
'
token
'
);
const
res
:
any
=
await
this
.
asyncCallNetworkApiGet
(
'
/api/oxford/v1/product/list
'
,
{
token
});
const
products
=
JSON
.
parse
(
res
).
rows
;
let
index
=
1
;
for
(
let
i
=
0
;
i
<
products
.
length
;
i
++
)
{
const
pd
=
products
[
i
];
if
(
pd
.
type_
==
1
)
{
cc
.
find
(
`active_bg/1_5_product/card/buy`
,
tipsLayer
).
attr
({
product
:
pd
});
}
else
{
const
cardNode
=
cc
.
find
(
`active_bg/one_level_product`
,
tipsLayer
);
const
levelNode
=
cc
.
find
(
`level
${
index
}
`
,
cardNode
);
cc
.
find
(
`buy`
,
levelNode
).
attr
({
product
:
pd
});
const
endDate
=
pd
.
syll_end_date
;
if
(
endDate
)
{
cc
.
find
(
`buy/text`
,
levelNode
).
getComponent
(
cc
.
Label
).
string
=
"
续费
"
;
cc
.
find
(
`tips`
,
levelNode
).
getComponent
(
cc
.
Label
).
string
=
`有效期至
${
endDate
.
split
(
"
T
"
)[
0
].
trim
()}
`
;
cc
.
find
(
`tips`
,
levelNode
).
active
=
true
;
}
else
{
cc
.
find
(
`buy/text`
,
levelNode
).
getComponent
(
cc
.
Label
).
string
=
"
立即购买
"
;
cc
.
find
(
`tips`
,
levelNode
).
active
=
false
;
}
index
++
;
}
}
cc
.
find
(
`loading`
,
tipsLayer
).
active
=
false
;
}
else
if
(
this
.
type
!=
'
aixuebao
'
)
{
const
tipsLayer
=
cc
.
find
(
'
middleLayer/androidActiveLayer
'
);
cc
.
find
(
`loading`
,
tipsLayer
).
active
=
true
;
tipsLayer
.
active
=
true
;
const
token
=
cc
.
sys
.
localStorage
.
getItem
(
'
token
'
);
const
res
:
any
=
await
this
.
asyncCallNetworkApiGet
(
'
/api/oxford/v1/product/list
'
,
{
token
});
const
products
=
JSON
.
parse
(
res
).
rows
;
let
index
=
1
;
for
(
let
i
=
0
;
i
<
products
.
length
;
i
++
)
{
const
pd
=
products
[
i
];
if
(
pd
.
type_
==
1
)
{
cc
.
find
(
`active_bg/1_5_product/card/buy`
,
tipsLayer
).
attr
({
product
:
pd
});
}
else
{
const
cardNode
=
cc
.
find
(
`active_bg/one_level_product`
,
tipsLayer
);
const
levelNode
=
cc
.
find
(
`level
${
index
}
`
,
cardNode
);
cc
.
find
(
`buy`
,
levelNode
).
attr
({
product
:
pd
});
const
endDate
=
pd
.
syll_end_date
;
if
(
endDate
)
{
cc
.
find
(
`buy/text`
,
levelNode
).
getComponent
(
cc
.
Label
).
string
=
"
续费
"
;
cc
.
find
(
`tips`
,
levelNode
).
getComponent
(
cc
.
Label
).
string
=
`有效期至
${
endDate
.
split
(
"
T
"
)[
0
].
trim
()}
`
;
cc
.
find
(
`tips`
,
levelNode
).
active
=
true
;
}
else
{
cc
.
find
(
`buy/text`
,
levelNode
).
getComponent
(
cc
.
Label
).
string
=
"
立即购买
"
;
cc
.
find
(
`tips`
,
levelNode
).
active
=
false
;
}
index
++
;
}
}
cc
.
find
(
`loading`
,
tipsLayer
).
active
=
false
;
}
else
{
const
tipsLayer
=
cc
.
find
(
'
middleLayer/activeLayer
'
);
tipsLayer
.
active
=
true
;
}
}
}
// 立即显示激活弹窗
// 立即显示激活弹窗
...
...
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