Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
W
wdlc_mjb_unity
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
wdlc_mjb_unity
Commits
d0cf92d2
Commit
d0cf92d2
authored
May 10, 2021
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提现加入同盾blackBox参数
parent
405b4184
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
3 deletions
+74
-3
InitProject.cs
Assets/AdSDK/InitProject/Scripts/InitProject.cs
+3
-2
GameConfig.cs
Assets/AdSDK/NetWork/HTTP/GameConfig.cs
+40
-0
PlantTreeItem.cs
Assets/Game/Main/Scripts/Item/PlantTreeItem.cs
+15
-0
PlayerDataControl.cs
Assets/Game/Main/Scripts/Utils/PlayerDataControl.cs
+4
-1
WithDrawControl.cs
Assets/Game/Main/Scripts/View/WithDrawControl.cs
+6
-0
WithdrawalEveryDayControl.cs
Assets/Game/Main/Scripts/View/WithdrawalEveryDayControl.cs
+6
-0
No files found.
Assets/AdSDK/InitProject/Scripts/InitProject.cs
View file @
d0cf92d2
...
...
@@ -20,7 +20,8 @@ public class InitProject : MonoBehaviour
#if UNITY_ANDROID
StartCoroutine
(
StartApp
());
Gettd
();
OaidUtil
.
GetOaid
(
new
Action
<
string
>((
oaid
)
=>
{
OaidUtil
.
GetOaid
(
new
Action
<
string
>((
oaid
)
=>
{
ZXHCUtils
.
SetDeviceOaid
(
oaid
);
}));
#endif
...
...
@@ -82,7 +83,7 @@ public class InitProject : MonoBehaviour
AndroidJavaObject
util
=
new
AndroidJavaObject
(
"com.ym.zxhcsdkaar.TDUtils"
);
util
.
Call
(
"TD"
,
GetActivity
(),
new
TdListenerProxy
((
s
)
=>
{
PlayerDataControl
.
Instance
.
TdValue
=
s
;
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"4 初始化 同盾 结束"
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
//td 上报
Dictionary
<
string
,
string
>
map
=
new
Dictionary
<
string
,
string
>();
...
...
Assets/AdSDK/NetWork/HTTP/GameConfig.cs
View file @
d0cf92d2
...
...
@@ -19,11 +19,51 @@ public class GameConfig : MonoBehaviour
private
void
Awake
()
{
GameConfig
.
_instacne
=
this
;
#if UNITY_ANDROID&&!UNITY_EDITOR
//定时刷新TD
StartCoroutine
(
UpdateTD
());
#endif
}
private
IEnumerator
UpdateTD
()
{
while
(
true
)
{
//五分钟刷新一次
yield
return
new
WaitForSeconds
(
300f
);
AndroidJavaObject
util
=
new
AndroidJavaObject
(
"com.ym.zxhcsdkaar.TDUtils"
);
util
.
Call
(
"TD"
,
GetActivity
(),
new
TdListenerProxy
((
s
)
=>
{
PlayerDataControl
.
Instance
.
TdValue
=
s
;
}));
}
}
public
void
GetTD
()
{
AndroidJavaObject
util
=
new
AndroidJavaObject
(
"com.ym.zxhcsdkaar.TDUtils"
);
util
.
Call
(
"TD"
,
GetActivity
(),
new
TdListenerProxy
((
s
)
=>
{
PlayerDataControl
.
Instance
.
TdValue
=
s
;
}));
}
public
static
AndroidJavaObject
GetActivity
()
{
AndroidJavaObject
activity
=
null
;
#if UNITY_ANDROID && !UNITY_EDITOR
if
(
activity
==
null
)
{
var
unityPlayer
=
new
AndroidJavaClass
(
"com.unity3d.player.UnityPlayer"
);
activity
=
unityPlayer
.
GetStatic
<
AndroidJavaObject
>(
"currentActivity"
);
}
#endif
return
activity
;
}
...
...
Assets/Game/Main/Scripts/Item/PlantTreeItem.cs
View file @
d0cf92d2
...
...
@@ -85,8 +85,15 @@ public class PlantTreeItem : MonoBehaviour
private
Dictionary
<
string
,
object
>
parms
=
new
Dictionary
<
string
,
object
>();
public
void
Guideclick
()
{
if
(
PlayerDataControl
.
Instance
.
TdValue
==
null
||
PlayerDataControl
.
Instance
.
TdValue
==
""
)
{
GameConfig
.
Instance
.
GetTD
();
return
;
}
parms
.
Clear
();
parms
.
Add
(
"wdId"
,
1
);
parms
.
Add
(
"blackBox"
,
PlayerDataControl
.
Instance
.
TdValue
);
HttpTool
.
Instance
.
_Post
(
"app/v1/wdlc/wd/do_wd"
,
parms
,
new
Action
<
WithDrawDialogBean
>((
bean
)
=>
{
ToastPlugin
.
ToastHelper
.
ShowToast
(
bean
.
reason
);
...
...
@@ -104,15 +111,23 @@ public class PlantTreeItem : MonoBehaviour
public
void
clickWithDraw
()
{
AudioUtils
.
ins
.
PlayBtnAudio
();
EventUtils
.
OnEvent
(
"cashout_btn_click"
);
if
(
mData
.
status
==
1
)
{
ToastPlugin
.
ToastHelper
.
ShowToast
(
"已经提现了"
);
}
else
{
if
(
PlayerDataControl
.
Instance
.
TdValue
==
null
||
PlayerDataControl
.
Instance
.
TdValue
==
""
)
{
GameConfig
.
Instance
.
GetTD
();
return
;
}
wdId
=
mData
.
id
;
parms
.
Clear
();
parms
.
Add
(
"wdId"
,
wdId
);
parms
.
Add
(
"blackBox"
,
PlayerDataControl
.
Instance
.
TdValue
);
HttpTool
.
Instance
.
_Post
(
"app/v1/wdlc/wd/do_wd"
,
parms
,
new
Action
<
WithDrawDialogBean
>((
bean
)
=>
{
ToastPlugin
.
ToastHelper
.
ShowToast
(
bean
.
reason
);
...
...
Assets/Game/Main/Scripts/Utils/PlayerDataControl.cs
View file @
d0cf92d2
...
...
@@ -14,7 +14,10 @@ public class PlayerDataControl
}
}
/// <summary>
/// 同盾
/// </summary>
public
string
TdValue
{
get
;
set
;
}
/// <summary>
/// 用户协议
...
...
Assets/Game/Main/Scripts/View/WithDrawControl.cs
View file @
d0cf92d2
...
...
@@ -199,8 +199,14 @@ public class WithDrawControl : MonoBehaviour
{
AudioUtils
.
ins
.
PlayBtnAudio
();
EventUtils
.
OnEvent
(
"cashout_btn_click"
);
if
(
PlayerDataControl
.
Instance
.
TdValue
==
null
||
PlayerDataControl
.
Instance
.
TdValue
==
""
)
{
GameConfig
.
Instance
.
GetTD
();
return
;
}
parms
.
Clear
();
parms
.
Add
(
"wdId"
,
wdId
);
parms
.
Add
(
"blackBox"
,
PlayerDataControl
.
Instance
.
TdValue
);
HttpTool
.
Instance
.
_Post
(
"app/v1/wdlc/wd/do_wd"
,
parms
,
new
Action
<
WithDrawDialogBean
>((
bean
)
=>
{
ToastPlugin
.
ToastHelper
.
ShowToast
(
bean
.
reason
);
...
...
Assets/Game/Main/Scripts/View/WithdrawalEveryDayControl.cs
View file @
d0cf92d2
...
...
@@ -262,8 +262,14 @@ public class WithdrawalEveryDayControl : MonoBehaviour
/// <param name="id"></param>
private
void
crush
(
int
id
)
{
if
(
PlayerDataControl
.
Instance
.
TdValue
==
null
||
PlayerDataControl
.
Instance
.
TdValue
==
""
)
{
GameConfig
.
Instance
.
GetTD
();
return
;
}
Dictionary
<
string
,
object
>
parameters
=
new
Dictionary
<
string
,
object
>();
parameters
.
Add
(
"id"
,
id
);
parameters
.
Add
(
"blackBox"
,
PlayerDataControl
.
Instance
.
TdValue
);
HttpTool
.
Instance
.
_Post
(
"app/v1/game/module/hearts/wd"
,
parameters
,
new
Action
<
MyWalletData
>((
result
)
=>
{
if
(
null
!=
result
)
...
...
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