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
cc335fd4
Commit
cc335fd4
authored
Feb 24, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5a232947
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
259 additions
and
259 deletions
+259
-259
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
StartPanel.ts
egret/src/panels/StartPanel.ts
+62
-62
No files found.
egret/src/panels/BloodPanel.ts
View file @
cc335fd4
...
...
@@ -92,108 +92,108 @@ export default class BloodPanel extends Panel {
},
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
()
{
if
(
iswx
())
{
getShareUrl
(
this
.
stage
);
}
else
showShare
(
1
);
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
(
'分享成功'
);
});
})
}
})
}
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));
// 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
[]
{
...
...
egret/src/panels/BloodPanel2.ts
View file @
cc335fd4
...
...
@@ -88,110 +88,110 @@ export default class BloodPanel2 extends Panel {
},
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
()
{
if
(
iswx
())
{
getShareUrl
(
this
.
stage
);
}
else
showShare
(
1
);
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
)
{
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
(
'分享成功'
);
});
})
}
})
}
}
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
[]
{
return
[
this
[
'closeBtn'
]]
}
...
...
egret/src/panels/InvitePanel.ts
View file @
cc335fd4
...
...
@@ -130,9 +130,9 @@ export default class InvitePanel extends Panel {
window
[
"invokeWX"
]();
}
else
{
//端内
this
.
wxShareTip
.
visible
=
false
;
//
window["inviteShare"](shareCode);
window
[
"inviteShare"
](
shareCode
);
//0224修改,去掉原先邀请逻辑,新增口令逻辑
showShareCodePanel
(
CodeChannels
.
InvitePrize
,
shareCode
)
//
showShareCodePanel(CodeChannels.InvitePrize, shareCode)
}
});
}
...
...
egret/src/panels/ScratchPanel.ts
View file @
cc335fd4
...
...
@@ -264,9 +264,9 @@ class ScratchItem extends eui.ItemRenderer {
window
[
"invokeWX"
]();
}
else
{
//端内
this
.
data
.
wxShareTip
.
visible
=
false
;
//
window["scratchShare"](code);
window
[
"scratchShare"
](
code
);
//0224修改,去掉原先邀请逻辑,新增口令逻辑
showShareCodePanel
(
CodeChannels
.
Scratch
,
code
)
//
showShareCodePanel(CodeChannels.Scratch, code)
}
},
this
.
data
.
scratchTaskId
);
},
this
);
...
...
egret/src/panels/StartPanel.ts
View file @
cc335fd4
...
...
@@ -91,70 +91,70 @@ export default class StartPanel extends Panel {
if
(
homeData
.
askForEnergy
)
{
PanelCtrl
.
instance
.
show
(
'blood2Panel'
);
}
else
{
// 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
())
{
if
(
iswx
())
{
getShareUrl
(
this
.
stage
);
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功~'
);
});
})
}
else
// showShare(1);
{
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
,
()
=>
{
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功'
);
});
})
});
}
}
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);
// NetManager.ins.hc_askForEnergy((success) => {
// NetManager.ins.hc_home(() => {
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功~');
// });
// })
// } else
// // showShare(1);
// {
// 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, () => {
// NetManager.ins.hc_askForEnergy((success) => {
// NetManager.ins.hc_home(() => {
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功');
// });
// })
// });
// }
// }
}
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