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
459fe133
Commit
459fe133
authored
May 10, 2021
by
王雪伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改菜市场模拟器 ios平台报错
parent
d0cf92d2
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
7 deletions
+45
-7
AdManager.cs
Assets/AdSDK/AD/AD_Manager/AdManager.cs
+8
-0
CSJRewardUtil.cs
Assets/AdSDK/AD/CSJ/CSJRewardUtil.cs
+1
-1
FSRewardUtils.cs
Assets/AdSDK/AD/Funshion/FSRewardUtils.cs
+2
-1
YLBRewardAdUtil.cs
Assets/AdSDK/AD/YLB/YlbDemo/YLBRewardAdUtil.cs
+1
-1
ZXHCSplashUtil.cs
Assets/AdSDK/AD/ZXHC/ZXHCDemo/ZXHCSplashUtil.cs
+1
-1
ZXHCUtils.cs
Assets/AdSDK/AD/ZXHC/ZxHCSDK/common/ZXHCUtils.cs
+3
-1
InitProject.cs
Assets/AdSDK/InitProject/Scripts/InitProject.cs
+4
-1
EncryptHelper.cs
Assets/AdSDK/NetWork/HTTP/EncryptHelper.cs
+24
-0
Splash.cs
Assets/Game/Splash/Splash.cs
+1
-1
No files found.
Assets/AdSDK/AD/AD_Manager/AdManager.cs
View file @
459fe133
...
@@ -103,8 +103,10 @@ public class AdManager
...
@@ -103,8 +103,10 @@ public class AdManager
#endif
#endif
break
;
break
;
case
ZXADConfig
.
PLANTFORM_AD_FS
:
case
ZXADConfig
.
PLANTFORM_AD_FS
:
#if UNITY_ANDROID
AndroidJavaClass
jc3
=
new
AndroidJavaClass
(
"com.ym.admodule.fs.FunShionManager"
);
AndroidJavaClass
jc3
=
new
AndroidJavaClass
(
"com.ym.admodule.fs.FunShionManager"
);
jc3
.
CallStatic
(
"init"
);
jc3
.
CallStatic
(
"init"
);
#endif
break
;
break
;
default
:
default
:
...
@@ -131,6 +133,7 @@ public class AdManager
...
@@ -131,6 +133,7 @@ public class AdManager
if
(!
IsInitAd
)
if
(!
IsInitAd
)
{
{
listener
.
onError
(
"没有初始化"
);
listener
.
onError
(
"没有初始化"
);
listener
.
onLastError
();
return
;
return
;
}
}
Debug
.
unityLogger
.
Log
(
"huangjunhui"
,
" 开屏,请求接口"
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
Debug
.
unityLogger
.
Log
(
"huangjunhui"
,
" 开屏,请求接口"
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
...
@@ -1146,6 +1149,7 @@ public class AdManager
...
@@ -1146,6 +1149,7 @@ public class AdManager
//广点通激励视频广告加载
//广点通激励视频广告加载
GDTRewardAdUtil
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
GDTRewardAdUtil
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
break
;
break
;
#if UNITY_ANDROID
case
ZXADConfig
.
PLANTFORM_AD_YLB
:
case
ZXADConfig
.
PLANTFORM_AD_YLB
:
//优良宝激励视频广告加载
//优良宝激励视频广告加载
YLBRewardAdUtil
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
YLBRewardAdUtil
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
...
@@ -1154,6 +1158,8 @@ public class AdManager
...
@@ -1154,6 +1158,8 @@ public class AdManager
case
ZXADConfig
.
PLANTFORM_AD_FS
:
case
ZXADConfig
.
PLANTFORM_AD_FS
:
FSRewardUtils
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
FSRewardUtils
.
Instance
.
LoadCacheRewardAd
(
entity
,
callback
);
break
;
break
;
#endif
default
:
default
:
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"不支持加载"
+
entity
.
adPlatform
+
"的激励视频广告"
);
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"不支持加载"
+
entity
.
adPlatform
+
"的激励视频广告"
);
callback
(
null
);
callback
(
null
);
...
@@ -1257,6 +1263,7 @@ public class AdManager
...
@@ -1257,6 +1263,7 @@ public class AdManager
//广点通激励视频广告播放
//广点通激励视频广告播放
GDTRewardAdUtil
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
GDTRewardAdUtil
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
break
;
break
;
#if UNITY_ANDROID
case
ZXADConfig
.
PLANTFORM_AD_YLB
:
case
ZXADConfig
.
PLANTFORM_AD_YLB
:
//优良宝激励视频广告播放
//优良宝激励视频广告播放
YLBRewardAdUtil
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
YLBRewardAdUtil
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
...
@@ -1265,6 +1272,7 @@ public class AdManager
...
@@ -1265,6 +1272,7 @@ public class AdManager
case
ZXADConfig
.
PLANTFORM_AD_FS
:
case
ZXADConfig
.
PLANTFORM_AD_FS
:
FSRewardUtils
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
FSRewardUtils
.
Instance
.
playCacheRewardAd
(
entity
,
listener
,
callback
);
break
;
break
;
#endif
default
:
default
:
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"不支持Show"
+
entity
.
adPlatform
+
"的激励视频广告"
);
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"不支持Show"
+
entity
.
adPlatform
+
"的激励视频广告"
);
callback
(
false
);
callback
(
false
);
...
...
Assets/AdSDK/AD/CSJ/CSJRewardUtil.cs
View file @
459fe133
...
@@ -145,7 +145,7 @@ public class CSJRewardUtil
...
@@ -145,7 +145,7 @@ public class CSJRewardUtil
#if UNITY_IOS
#if UNITY_IOS
EventUtils
.
onEventPullSuccess
(
entity
);
EventUtils
.
onEventPullSuccess
(
entity
);
this
.
csjAD
.
SetRewardVideoAdForIOS
(
entity
.
codeGroup
+
entity
.
slotName
,
ad
);
this
.
csjAD
.
SetRewardVideoAdForIOS
(
entity
.
codeGroup
+
entity
.
slotName
,
ad
);
callback
(
true
);
callback
(
entity
);
#endif
#endif
}
}
...
...
Assets/AdSDK/AD/Funshion/FSRewardUtils.cs
View file @
459fe133
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
#if UNITY_ANDROID
public
class
FSRewardUtils
public
class
FSRewardUtils
{
{
private
FSRewardUtils
()
{
}
private
FSRewardUtils
()
{
}
...
@@ -198,3 +198,4 @@ public class FSRewardUtils
...
@@ -198,3 +198,4 @@ public class FSRewardUtils
}
}
}
}
#
endif
\ No newline at end of file
Assets/AdSDK/AD/YLB/YlbDemo/YLBRewardAdUtil.cs
View file @
459fe133
...
@@ -35,7 +35,7 @@ public class YLBRewardAdUtil
...
@@ -35,7 +35,7 @@ public class YLBRewardAdUtil
rewardVideoAd
.
SetLoadListener
(
new
RewardVideoAdLoadListener
(
this
,
entity
,
rewardVideoAd
,
callback
));
rewardVideoAd
.
SetLoadListener
(
new
RewardVideoAdLoadListener
(
this
,
entity
,
rewardVideoAd
,
callback
));
rewardVideoAd
.
LoadAd
(
entity
.
codeId
,
entity
.
codeGroup
);
rewardVideoAd
.
LoadAd
(
entity
.
codeId
,
entity
.
codeGroup
);
#elif UNITY_IOS
#elif UNITY_IOS
callback
(
false
);
callback
(
null
);
#endif
#endif
}
}
...
...
Assets/AdSDK/AD/ZXHC/ZXHCDemo/ZXHCSplashUtil.cs
View file @
459fe133
...
@@ -80,10 +80,10 @@ public class ZXHCSplashUtil
...
@@ -80,10 +80,10 @@ public class ZXHCSplashUtil
// Android 要求开屏 container 必须是 c# 的 AndroidJavaObject 类型,必须是 Java(Android)上的 ViewGroup 类型
// Android 要求开屏 container 必须是 c# 的 AndroidJavaObject 类型,必须是 Java(Android)上的 ViewGroup 类型
container
=
ZXHCUtils
.
NewAdContainer
();
container
=
ZXHCUtils
.
NewAdContainer
();
ZXHCUtils
.
ShowView
(
container
,
false
);
ZXHCUtils
.
ShowView
(
container
,
false
);
this
.
hcAdUtils
.
hcSplshad
.
Show
(
container
);
#elif UNITY_IOS
#elif UNITY_IOS
#endif
#endif
this
.
hcAdUtils
.
hcSplshad
.
Show
(
container
);
}
}
public
void
OnAdShow
()
public
void
OnAdShow
()
...
...
Assets/AdSDK/AD/ZXHC/ZxHCSDK/common/ZXHCUtils.cs
View file @
459fe133
...
@@ -37,13 +37,15 @@ namespace ZXHC
...
@@ -37,13 +37,15 @@ namespace ZXHC
public
static
void
SetDeviceOaid
(
string
oaid
)
public
static
void
SetDeviceOaid
(
string
oaid
)
{
{
#if UNITY_ANDROID && !UNITY_EDITOR
AndroidJavaObject
phoneUtil
=
new
AndroidJavaClass
(
"com.ym.zxhcsdk.PhoneUtils"
).
CallStatic
<
AndroidJavaObject
>(
"getInstance"
);
AndroidJavaObject
phoneUtil
=
new
AndroidJavaClass
(
"com.ym.zxhcsdk.PhoneUtils"
).
CallStatic
<
AndroidJavaObject
>(
"getInstance"
);
phoneUtil
.
Call
(
"setOaid"
,
oaid
);
phoneUtil
.
Call
(
"setOaid"
,
oaid
);
#endif
}
}
public
static
string
GetDeviceOaid
()
public
static
string
GetDeviceOaid
()
{
{
#if UNITY_ANDROID
&&
!UNITY_EDITOR
#if UNITY_ANDROID
&&
!UNITY_EDITOR
AndroidJavaObject
phoneUtil
=
new
AndroidJavaClass
(
"com.ym.zxhcsdk.PhoneUtils"
).
CallStatic
<
AndroidJavaObject
>(
"getInstance"
);
AndroidJavaObject
phoneUtil
=
new
AndroidJavaClass
(
"com.ym.zxhcsdk.PhoneUtils"
).
CallStatic
<
AndroidJavaObject
>(
"getInstance"
);
return
phoneUtil
.
Call
<
string
>(
"getoaid"
);
return
phoneUtil
.
Call
<
string
>(
"getoaid"
);
#endif
#endif
...
...
Assets/AdSDK/InitProject/Scripts/InitProject.cs
View file @
459fe133
...
@@ -24,6 +24,9 @@ public class InitProject : MonoBehaviour
...
@@ -24,6 +24,9 @@ public class InitProject : MonoBehaviour
{
{
ZXHCUtils
.
SetDeviceOaid
(
oaid
);
ZXHCUtils
.
SetDeviceOaid
(
oaid
);
}));
}));
#elif UNITY_IOS
////加载游戏场景
SceneManager
.
LoadSceneAsync
(
1
);
#endif
#endif
}
}
...
@@ -102,7 +105,7 @@ public class InitProject : MonoBehaviour
...
@@ -102,7 +105,7 @@ public class InitProject : MonoBehaviour
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"5 加载splash场景 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"5 加载splash场景 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
}));
}));
#else
#else
callback
(
"不支持"
);
//
callback("不支持");
#endif
#endif
}
}
...
...
Assets/AdSDK/NetWork/HTTP/EncryptHelper.cs
View file @
459fe133
...
@@ -445,6 +445,30 @@ namespace EncryptHelper
...
@@ -445,6 +445,30 @@ namespace EncryptHelper
return
temp
;
return
temp
;
}
}
/// <summary>
/// MD5加密
/// </summary>
/// <param name="value">需要加密字符串</param>
/// <returns>返回32位大写字符</returns>
public
static
string
MD5Encrypt
(
string
value
)
{
//将输入字符串转换成字节数组 ANSI代码页编码
var
buffer
=
Encoding
.
Default
.
GetBytes
(
value
);
//接着,创建Md5对象进行散列计算
var
data
=
MD5
.
Create
().
ComputeHash
(
buffer
);
//创建一个新的Stringbuilder收集字节
var
sb
=
new
StringBuilder
();
//遍历每个字节的散列数据
foreach
(
var
t
in
data
)
{
//转换大写十六进制字符串
// X2 大写
// x2 小写
sb
.
Append
(
t
.
ToString
(
"x2"
));
}
//返回十六进制字符串
return
sb
.
ToString
();
}
}
}
...
...
Assets/Game/Splash/Splash.cs
View file @
459fe133
...
@@ -109,7 +109,7 @@ public class Splash : MonoBehaviour
...
@@ -109,7 +109,7 @@ public class Splash : MonoBehaviour
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"5 加载splash场景 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
Debug
.
unityLogger
.
Log
(
"huangjunhui load "
,
"5 加载splash场景 "
+
((
DateTime
.
Now
.
ToUniversalTime
().
Ticks
-
621355968000000000
)
/
10000
).
ToString
());
}));
}));
#else
#else
callback
(
"不支持"
);
//
callback("不支持");
#endif
#endif
}
}
...
...
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