Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
xiaoxiaole
Commits
0dbab592
Commit
0dbab592
authored
Mar 02, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
9e514440
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
279 additions
and
266 deletions
+279
-266
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+1
-0
BloodPanel.ts
egret/src/panels/BloodPanel.ts
+96
-96
BloodPanel2.ts
egret/src/panels/BloodPanel2.ts
+97
-97
InvitePanel.ts
egret/src/panels/InvitePanel.ts
+2
-2
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+2
-2
ShareCodePanel.ts
egret/src/panels/ShareCodePanel.ts
+19
-7
StartPanel.ts
egret/src/panels/StartPanel.ts
+61
-61
No files found.
egret/libs/tw/manager/NetManager.ts
View file @
0dbab592
...
@@ -2401,7 +2401,7 @@ export class NetManager extends ABNetManager {
...
@@ -2401,7 +2401,7 @@ export class NetManager extends ABNetManager {
const
net
:
INetData
=
{
const
net
:
INetData
=
{
name
:
"doHelpNew"
,
name
:
"doHelpNew"
,
uri
:
window
[
'duiba'
]
+
'/activtyShareCode/doHelpNew'
,
uri
:
window
[
'duiba'
]
+
'/activtyShareCode/doHelpNew'
,
type
:
'
ge
t'
,
type
:
'
pos
t'
,
dataType
:
'json'
,
dataType
:
'json'
,
hideMsg
:
true
,
hideMsg
:
true
,
param
:
{
param
:
{
...
...
egret/src/mapScene/MapScene.ts
View file @
0dbab592
...
@@ -75,6 +75,7 @@ export default class MapScene extends Scene {
...
@@ -75,6 +75,7 @@ export default class MapScene extends Scene {
//新加的,还没给,其他的都用助力失败
//新加的,还没给,其他的都用助力失败
"2002002013"
:
"口令无效,请复制正确的口令!"
,
"2002002013"
:
"口令无效,请复制正确的口令!"
,
"2002002015"
:
"口令不存在"
,
"2002002015"
:
"口令不存在"
,
"2002002026"
:
"好友今日被助力已达上限啦!"
}
}
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
}
}
...
...
egret/src/panels/BloodPanel.ts
View file @
0dbab592
...
@@ -92,108 +92,108 @@ export default class BloodPanel extends Panel {
...
@@ -92,108 +92,108 @@ export default class BloodPanel extends Panel {
},
1
);
},
1
);
}
}
onTapInvite
()
{
if
(
iswx
())
{
getShareUrl
(
this
.
stage
);
}
else
showShare
(
1
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
4
));
const
data
=
getHomeData
();
if
(
data
.
askForEnergy
>=
BloodPanel
.
MAX
)
{
showToast
(
'对不起,索要体力的机会已经用完了~'
);
return
;
}
this
[
'inviteBtn'
].
enabled
=
false
;
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
this
[
'inviteBtn'
].
enabled
=
true
;
if
(
success
)
{
}
NetManager
.
ins
.
hc_home
(()
=>
{
this
.
updateData
();
updateMainTimer
();
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功~'
);
});
})
}
//0224修改
// onTapInvite() {
// onTapInvite() {
// if(iswx()) {
// getShareUrl(this.stage);
// } else
// showShare(1);
// NetManager.ins.clickLog(getlogItem(4));
// NetManager.ins.clickLog(getlogItem(4));
// const data = getHomeData();
// const data = getHomeData();
// if (iswx()) {
// if(data.askForEnergy >= BloodPanel.MAX) {
// //微信流程不变
// showToast('对不起,索要体力的机会已经用完了~');
// getShareUrl(this.stage);
// return;
// if (data.askForEnergy >= BloodPanel.MAX) {
// showToast('对不起,索要体力的机会已经用完了~');
// return;
// }
// this['inviteBtn'].enabled = false;
// NetManager.ins.hc_askForEnergy((success) => {
// this['inviteBtn'].enabled = true;
// if (success) {
// }
// NetManager.ins.hc_home(() => {
// this.updateData();
// updateMainTimer();
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功~');
// });
// })
// } else {
// // if (window["test0228"]) {
// //如果之前没获取到,就再发接口,几率很低
// if (!DataManager.ins.getData("getUserShareCode")) {
// this.touchEnabled = false
// this.touchChildren = false
// NetManager.ins.getUserShareCode((s, res) => {
// this.touchEnabled = true
// this.touchChildren = true
// if (!s) {
// showToast("获取分享信息失败,请重试")
// } else {
// showShareCodePanel(
// CodeChannels.AddBlood,
// res.data,
// () => { wait(2000).then(() => { showToast('分享成功'); }); }
// )
// }
// })
// } else {
// showShareCodePanel(
// CodeChannels.AddBlood,
// DataManager.ins.getData("getUserShareCode").data,
// () => { wait(2000).then(() => { showToast('分享成功'); }); }
// );
// }
// // } else {
// // showShareCodePanel(CodeChannels.AddBlood, null, () => {
// // if (data.askForEnergy >= BloodPanel.MAX) {
// // wait(2000).then(() => {
// // showToast('对不起,索要体力的机会已经用完了~');
// // });
// // } else {
// // NetManager.ins.hc_askForEnergy((success) => {
// // NetManager.ins.hc_home(() => {
// // this.updateData();
// // updateMainTimer();
// // SceneCtrl.instance.updateScene();
// // }, window['collectRuleId']);
// // wait(2000).then(() => {
// // showToast('分享成功');
// // });
// // })
// // }
// // })
// // }
// }
// }
// this['inviteBtn'].enabled = false;
// NetManager.ins.hc_askForEnergy((success) => {
// this['inviteBtn'].enabled = true;
// if(success) {
// }
// NetManager.ins.hc_home(() => {
// this.updateData();
// updateMainTimer();
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功~');
// });
// })
// }
// }
//0224修改
onTapInvite
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
4
));
const
data
=
getHomeData
();
if
(
iswx
())
{
//微信流程不变
getShareUrl
(
this
.
stage
);
if
(
data
.
askForEnergy
>=
BloodPanel
.
MAX
)
{
showToast
(
'对不起,索要体力的机会已经用完了~'
);
return
;
}
this
[
'inviteBtn'
].
enabled
=
false
;
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
this
[
'inviteBtn'
].
enabled
=
true
;
if
(
success
)
{
}
NetManager
.
ins
.
hc_home
(()
=>
{
this
.
updateData
();
updateMainTimer
();
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功~'
);
});
})
}
else
{
// if (window["test0228"]) {
//如果之前没获取到,就再发接口,几率很低
if
(
!
DataManager
.
ins
.
getData
(
"getUserShareCode"
))
{
this
.
touchEnabled
=
false
this
.
touchChildren
=
false
NetManager
.
ins
.
getUserShareCode
((
s
,
res
)
=>
{
this
.
touchEnabled
=
true
this
.
touchChildren
=
true
if
(
!
s
)
{
showToast
(
"获取分享信息失败,请重试"
)
}
else
{
showShareCodePanel
(
CodeChannels
.
AddBlood
,
res
.
data
,
()
=>
{
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功'
);
});
}
)
}
})
}
else
{
showShareCodePanel
(
CodeChannels
.
AddBlood
,
DataManager
.
ins
.
getData
(
"getUserShareCode"
).
data
,
()
=>
{
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功'
);
});
}
);
}
// } else {
// showShareCodePanel(CodeChannels.AddBlood, null, () => {
// if (data.askForEnergy >= BloodPanel.MAX) {
// wait(2000).then(() => {
// showToast('对不起,索要体力的机会已经用完了~');
// });
// } else {
// NetManager.ins.hc_askForEnergy((success) => {
// NetManager.ins.hc_home(() => {
// this.updateData();
// updateMainTimer();
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功');
// });
// })
// }
// })
// }
}
}
protected
get
closeBtns
():
eui
.
Button
[]
{
protected
get
closeBtns
():
eui
.
Button
[]
{
...
...
egret/src/panels/BloodPanel2.ts
View file @
0dbab592
...
@@ -88,110 +88,110 @@ export default class BloodPanel2 extends Panel {
...
@@ -88,110 +88,110 @@ export default class BloodPanel2 extends Panel {
},
1
);
},
1
);
}
}
onTapInvite
()
{
//
onTapInvite() {
if
(
iswx
())
{
// if(iswx()) {
getShareUrl
(
this
.
stage
);
// getShareUrl(this.stage);
}
else
// } else
showShare
(
1
);
// showShare(1);
// NetManager.ins.clickLog(getlogItem(4));
// const data = getHomeData();
// if(data.askForEnergy >= BloodPanel.MAX) {
// showToast('对不起,索要体力的机会已经用完了~');
// return;
// }
// this['inviteBtn'].enabled = false;
// NetManager.ins.hc_askForEnergy((success) => {
// this['inviteBtn'].enabled = true;
// if(success) {
// }
// NetManager.ins.hc_home(() => {
// this.updateData();
// updateMainTimer();
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功~');
// });
// })
// }
//0224修改
onTapInvite
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
4
));
NetManager
.
ins
.
clickLog
(
getlogItem
(
4
));
const
data
=
getHomeData
();
const
data
=
getHomeData
();
if
(
data
.
askForEnergy
>=
BloodPanel
.
MAX
)
{
if
(
iswx
())
{
showToast
(
'对不起,索要体力的机会已经用完了~'
);
getShareUrl
(
this
.
stage
);
return
;
//原先微信流程不变
}
if
(
data
.
askForEnergy
>=
BloodPanel
.
MAX
)
{
this
[
'inviteBtn'
].
enabled
=
false
;
showToast
(
'对不起,索要体力的机会已经用完了~'
);
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
return
;
this
[
'inviteBtn'
].
enabled
=
true
;
}
if
(
success
)
{
this
[
'inviteBtn'
].
enabled
=
false
;
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
this
[
'inviteBtn'
].
enabled
=
true
;
if
(
success
)
{
}
NetManager
.
ins
.
hc_home
(()
=>
{
this
.
updateData
();
updateMainTimer
();
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功~'
);
});
})
}
else
{
// if (window["test0228"]) {
//如果之前没获取到,就再发接口,几率很低
if
(
!
DataManager
.
ins
.
getData
(
"getUserShareCode"
))
{
this
.
touchEnabled
=
false
this
.
touchChildren
=
false
NetManager
.
ins
.
getUserShareCode
((
s
,
res
)
=>
{
this
.
touchEnabled
=
true
this
.
touchChildren
=
true
if
(
!
s
)
{
showToast
(
"获取分享信息失败,请重试"
)
}
else
{
showShareCodePanel
(
CodeChannels
.
AddBlood
,
res
.
data
,
()
=>
{
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功'
);
});
}
)
}
})
}
else
{
showShareCodePanel
(
CodeChannels
.
AddBlood
,
DataManager
.
ins
.
getData
(
"getUserShareCode"
).
data
,
()
=>
{
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功'
);
});
}
);
}
}
NetManager
.
ins
.
hc_home
(()
=>
{
// } else {
this
.
updateData
();
// showShareCodePanel(CodeChannels.AddBlood, null, () => {
updateMainTimer
();
// if (data.askForEnergy >= BloodPanel.MAX) {
SceneCtrl
.
instance
.
updateScene
();
// wait(2000).then(() => {
},
window
[
'collectRuleId'
]);
// showToast('对不起,索要体力的机会已经用完了~');
wait
(
2000
).
then
(()
=>
{
// });
showToast
(
'分享成功~'
);
// } else {
});
// NetManager.ins.hc_askForEnergy((success) => {
})
// NetManager.ins.hc_home(() => {
// this.updateData();
// updateMainTimer();
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功');
// });
// })
// }
// })
// }
}
}
}
//0224修改
// onTapInvite() {
// NetManager.ins.clickLog(getlogItem(4));
// const data = getHomeData();
// if (iswx()) {
// getShareUrl(this.stage);
// //原先微信流程不变
// if (data.askForEnergy >= BloodPanel.MAX) {
// showToast('对不起,索要体力的机会已经用完了~');
// return;
// }
// this['inviteBtn'].enabled = false;
// NetManager.ins.hc_askForEnergy((success) => {
// this['inviteBtn'].enabled = true;
// if (success) {
// }
// NetManager.ins.hc_home(() => {
// this.updateData();
// updateMainTimer();
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功~');
// });
// })
// } else {
// // if (window["test0228"]) {
// //如果之前没获取到,就再发接口,几率很低
// if (!DataManager.ins.getData("getUserShareCode")) {
// this.touchEnabled = false
// this.touchChildren = false
// NetManager.ins.getUserShareCode((s, res) => {
// this.touchEnabled = true
// this.touchChildren = true
// if (!s) {
// showToast("获取分享信息失败,请重试")
// } else {
// showShareCodePanel(
// CodeChannels.AddBlood,
// res.data,
// () => { wait(2000).then(() => { showToast('分享成功'); }); }
// )
// }
// })
// } else {
// showShareCodePanel(
// CodeChannels.AddBlood,
// DataManager.ins.getData("getUserShareCode").data,
// () => { wait(2000).then(() => { showToast('分享成功'); }); }
// );
// }
// // } else {
// // showShareCodePanel(CodeChannels.AddBlood, null, () => {
// // if (data.askForEnergy >= BloodPanel.MAX) {
// // wait(2000).then(() => {
// // showToast('对不起,索要体力的机会已经用完了~');
// // });
// // } else {
// // NetManager.ins.hc_askForEnergy((success) => {
// // NetManager.ins.hc_home(() => {
// // this.updateData();
// // updateMainTimer();
// // SceneCtrl.instance.updateScene();
// // }, window['collectRuleId']);
// // wait(2000).then(() => {
// // showToast('分享成功');
// // });
// // })
// // }
// // })
// // }
// }
// }
protected
get
closeBtns
():
eui
.
Button
[]
{
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
return
[
this
[
'closeBtn'
]]
}
}
...
...
egret/src/panels/InvitePanel.ts
View file @
0dbab592
...
@@ -130,9 +130,9 @@ export default class InvitePanel extends Panel {
...
@@ -130,9 +130,9 @@ export default class InvitePanel extends Panel {
window
[
"invokeWX"
]();
window
[
"invokeWX"
]();
}
else
{
//端内
}
else
{
//端内
this
.
wxShareTip
.
visible
=
false
;
this
.
wxShareTip
.
visible
=
false
;
window
[
"inviteShare"
](
shareCode
);
//
window["inviteShare"](shareCode);
//0224修改,去掉原先邀请逻辑,新增口令逻辑
//0224修改,去掉原先邀请逻辑,新增口令逻辑
//
showShareCodePanel(CodeChannels.InvitePrize, shareCode)
showShareCodePanel
(
CodeChannels
.
InvitePrize
,
shareCode
)
}
}
});
});
}
}
...
...
egret/src/panels/ScratchPanel.ts
View file @
0dbab592
...
@@ -264,9 +264,9 @@ class ScratchItem extends eui.ItemRenderer {
...
@@ -264,9 +264,9 @@ class ScratchItem extends eui.ItemRenderer {
window
[
"invokeWX"
]();
window
[
"invokeWX"
]();
}
else
{
//端内
}
else
{
//端内
this
.
data
.
wxShareTip
.
visible
=
false
;
this
.
data
.
wxShareTip
.
visible
=
false
;
window
[
"scratchShare"
](
code
);
//
window["scratchShare"](code);
//0224修改,去掉原先邀请逻辑,新增口令逻辑
//0224修改,去掉原先邀请逻辑,新增口令逻辑
//
showShareCodePanel(CodeChannels.Scratch, code)
showShareCodePanel
(
CodeChannels
.
Scratch
,
code
)
}
}
},
this
.
data
.
scratchTaskId
);
},
this
.
data
.
scratchTaskId
);
},
this
);
},
this
);
...
...
egret/src/panels/ShareCodePanel.ts
View file @
0dbab592
...
@@ -95,7 +95,7 @@ class ShareCodePanel extends ComponentBase {
...
@@ -95,7 +95,7 @@ class ShareCodePanel extends ComponentBase {
public
goBtn
:
eui
.
Image
;
public
goBtn
:
eui
.
Image
;
/**
/**
* 0表示微信,1表示朋友圈
* 0表示微信,1表示朋友圈
,2表示微博,3表示qq
*/
*/
private
mark
:
0
|
1
|
2
|
3
private
mark
:
0
|
1
|
2
|
3
data
:
ShareData
data
:
ShareData
...
@@ -166,13 +166,24 @@ class ShareCodePanel extends ComponentBase {
...
@@ -166,13 +166,24 @@ class ShareCodePanel extends ComponentBase {
this
.
goBtn
.
touchEnabled
=
false
;
this
.
goBtn
.
touchEnabled
=
false
;
//点击埋点
//点击埋点
NetManager
.
ins
.
clickLog
(
getlogItem
(
buridNums
[
this
.
data
.
channel
]))
NetManager
.
ins
.
clickLog
(
getlogItem
(
buridNums
[
this
.
data
.
channel
]))
//延时1秒跳转,为了埋点
setTimeout
(()
=>
{
//如果是微信,会调起,延时1秒跳转,为了埋点
//有回调就执行
if
(
this
.
mark
==
0
)
{
this
.
data
.
addFun
&&
this
.
data
.
addFun
();
setTimeout
(()
=>
{
//关闭弹框,
this
.
onTouchClickBg
()
//有回调就执行,暂时只有体力分享会有回调,只有微信分享才显示toast分享成功
this
.
data
.
addFun
&&
this
.
data
.
addFun
();
this
.
goBtn
.
touchEnabled
=
true
;
jumpFun
[
this
.
mark
]()
},
1000
)
}
else
{
//其他情况暂时没有回调,不管addFun
this
.
onTouchClickBg
();
this
.
goBtn
.
touchEnabled
=
true
;
this
.
goBtn
.
touchEnabled
=
true
;
jumpFun
[
this
.
mark
]()
jumpFun
[
this
.
mark
]()
},
1000
)
}
//有回调执行
//有回调执行
// if (this.data.addFun) {
// if (this.data.addFun) {
// this.data.addFun();
// this.data.addFun();
...
@@ -278,6 +289,7 @@ export const showShareCodePanel = (channel: CodeChannels, shareCode?: string, ad
...
@@ -278,6 +289,7 @@ export const showShareCodePanel = (channel: CodeChannels, shareCode?: string, ad
NetManager
.
ins
.
showLog
(
getlogItem
(
85
));
NetManager
.
ins
.
showLog
(
getlogItem
(
85
));
NetManager
.
ins
.
showLog
(
getlogItem
(
86
));
NetManager
.
ins
.
showLog
(
getlogItem
(
86
));
_share
.
setData
({
channel
,
shareCode
,
addFun
});
_share
.
setData
({
channel
,
shareCode
,
addFun
});
_share
.
panelGroup
.
visible
=
false
;
//要隐藏弹框
layers
.
shareCodeLayer
.
visible
=
true
;
layers
.
shareCodeLayer
.
visible
=
true
;
}
}
...
@@ -292,7 +304,7 @@ export const showShareCodePanel = (channel: CodeChannels, shareCode?: string, ad
...
@@ -292,7 +304,7 @@ export const showShareCodePanel = (channel: CodeChannels, shareCode?: string, ad
* @param shareCode 分享加体力暂时没有分享码(27号版本要加上),排行榜邀请一起玩也没有分享码,默认传0
* @param shareCode 分享加体力暂时没有分享码(27号版本要加上),排行榜邀请一起玩也没有分享码,默认传0
*/
*/
function
generateCode
(
callback
:
Function
,
channel
:
CodeChannels
,
shareCode
:
string
=
"0"
)
{
function
generateCode
(
callback
:
Function
,
channel
:
CodeChannels
,
shareCode
:
string
=
"0"
)
{
var
activityCode
=
getParamString
(
"snactCode"
)
||
"ACT0000002
863"
;
var
activityCode
=
getParamString
(
"snactCode"
)
||
"ACT0000002
664"
;
//上线必须改回来,动态获取
var
sceneCode
=
channel
;
var
sceneCode
=
channel
;
var
token
=
shareCode
||
"0"
;
var
token
=
shareCode
||
"0"
;
window
[
'$'
].
ajax
({
window
[
'$'
].
ajax
({
...
...
egret/src/panels/StartPanel.ts
View file @
0dbab592
...
@@ -91,68 +91,68 @@ export default class StartPanel extends Panel {
...
@@ -91,68 +91,68 @@ export default class StartPanel extends Panel {
if
(
homeData
.
askForEnergy
)
{
if
(
homeData
.
askForEnergy
)
{
PanelCtrl
.
instance
.
show
(
'blood2Panel'
);
PanelCtrl
.
instance
.
show
(
'blood2Panel'
);
}
else
{
}
else
{
if
(
iswx
())
{
// if(iswx()) {
getShareUrl
(
this
.
stage
);
}
else
showShare
(
1
);
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功~'
);
});
})
//0224修改,微信环境不变
// if (iswx()) {
// getShareUrl(this.stage);
// getShareUrl(this.stage);
// NetManager.ins.hc_askForEnergy((success) => {
// } else
// NetManager.ins.hc_home(() => {
// showShare(1);
// SceneCtrl.instance.updateScene();
// NetManager.ins.hc_askForEnergy((success) => {
// }, window['collectRuleId']);
// NetManager.ins.hc_home(() => {
// wait(2000).then(() => {
// SceneCtrl.instance.updateScene();
// showToast('分享成功~');
// }, window['collectRuleId']);
// });
// wait(2000).then(() => {
// })
// showToast('分享成功~');
// } else {
// });
// // if (window["test0228"]) {
// })
// //如果之前没获取到,就再发接口,几率很低
//0224修改,微信环境不变
// if (!DataManager.ins.getData("getUserShareCode")) {
if
(
iswx
())
{
// this.touchEnabled = false
getShareUrl
(
this
.
stage
);
// this.touchChildren = false
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
// NetManager.ins.getUserShareCode((s, res) => {
NetManager
.
ins
.
hc_home
(()
=>
{
// this.touchEnabled = true
SceneCtrl
.
instance
.
updateScene
();
// this.touchChildren = true
},
window
[
'collectRuleId'
]);
// if (!s) {
wait
(
2000
).
then
(()
=>
{
// showToast("获取分享信息失败,请重试")
showToast
(
'分享成功~'
);
// } else {
});
// showShareCodePanel(
})
// CodeChannels.AddBlood,
}
else
{
// res.data,
// if (window["test0228"]) {
// () => { wait(2000).then(() => { showToast('分享成功'); }); }
//如果之前没获取到,就再发接口,几率很低
// )
if
(
!
DataManager
.
ins
.
getData
(
"getUserShareCode"
))
{
// }
this
.
touchEnabled
=
false
// })
this
.
touchChildren
=
false
// } else {
NetManager
.
ins
.
getUserShareCode
((
s
,
res
)
=>
{
// showShareCodePanel(
this
.
touchEnabled
=
true
// CodeChannels.AddBlood,
this
.
touchChildren
=
true
// DataManager.ins.getData("getUserShareCode").data,
if
(
!
s
)
{
// () => { wait(2000).then(() => { showToast('分享成功'); }); }
showToast
(
"获取分享信息失败,请重试"
)
// );
}
else
{
// }
showShareCodePanel
(
// // } else {
CodeChannels
.
AddBlood
,
// // showShareCodePanel(CodeChannels.AddBlood, null, () => {
res
.
data
,
// // NetManager.ins.hc_askForEnergy((success) => {
()
=>
{
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功'
);
});
}
// // NetManager.ins.hc_home(() => {
)
// // SceneCtrl.instance.updateScene();
}
// // }, window['collectRuleId']);
})
// // wait(2000).then(() => {
}
else
{
// // showToast('分享成功');
showShareCodePanel
(
// // });
CodeChannels
.
AddBlood
,
// // })
DataManager
.
ins
.
getData
(
"getUserShareCode"
).
data
,
// // });
()
=>
{
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功'
);
});
}
// // }
);
// }
}
// } else {
// showShareCodePanel(CodeChannels.AddBlood, null, () => {
// NetManager.ins.hc_askForEnergy((success) => {
// NetManager.ins.hc_home(() => {
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功');
// });
// })
// });
// }
}
}
}
return
;
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