Commit 834a3929 authored by wangxuewei's avatar wangxuewei

[提交人]:王雪伟

[提交简述] :幸福农场
[实现方案] :luckyfarm_1.0.3
parent 26a14caf
...@@ -128,9 +128,13 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback { ...@@ -128,9 +128,13 @@ class GameActivity : UnityPlayerActivity(), IDialogViewCloseCallback {
/** /**
* 跳转提现页 * 跳转提现页
*/ */
fun gotoWithdrawPage() { fun gotoWithdrawPage(type: Int) {
if(type==1){
JumpUtils.h5Jump("跳转提现页", Constant.Param.WithDraw2, false,act)
}else{
JumpUtils.h5Jump("跳转提现页", Constant.Param.WithDraw, false,act) JumpUtils.h5Jump("跳转提现页", Constant.Param.WithDraw, false,act)
} }
}
/** /**
* 上榜赚钱 * 上榜赚钱
......
...@@ -113,7 +113,7 @@ class WxLoginActivity : BaseActivity(), WxImplUtils.IWxLoginCallback { ...@@ -113,7 +113,7 @@ class WxLoginActivity : BaseActivity(), WxImplUtils.IWxLoginCallback {
} }
override fun onWxSuccess(token: String?, openid: String?) { override fun onWxSuccess(token: String?, openid: String?) {
onEvent("login_success", "登录成功") onEvent("login_wx", "登录成功")
startActivity( startActivity(
Intent(this@WxLoginActivity, GameActivity::class.java) Intent(this@WxLoginActivity, GameActivity::class.java)
) )
......
...@@ -23,7 +23,6 @@ class GameOrderListAdapter : ...@@ -23,7 +23,6 @@ class GameOrderListAdapter :
holder.item_name?.text = orderBean.name holder.item_name?.text = orderBean.name
var currPos = orderBean.ownNum/orderBean.targetNum.toFloat() var currPos = orderBean.ownNum/orderBean.targetNum.toFloat()
holder.item_progress?.progress=(currPos * 100).toInt() holder.item_progress?.progress=(currPos * 100).toInt()
Log.d("wxw","orderBean.ownNum%orderBean.targetNum"+orderBean.ownNum%orderBean.targetNum)
holder.item_desc?.text="${orderBean.ownNum}/${orderBean.targetNum}" holder.item_desc?.text="${orderBean.ownNum}/${orderBean.targetNum}"
} }
......
PACKAGE_NAME=com.ym.xync PACKAGE_NAME=com.ym.xync
VERSION_CODE=3 VERSION_CODE=4
VERSION_NAME=1.0.2 VERSION_NAME=1.0.3
\ No newline at end of file \ No newline at end of file
gfx-disable-mt-rendering=
gfx-enable-native-gfx-jobs= gfx-enable-native-gfx-jobs=
wait-for-native-debugger=0 wait-for-native-debugger=0
scripting-runtime-version=latest scripting-runtime-version=latest
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -455,8 +455,8 @@ public class Constant { ...@@ -455,8 +455,8 @@ public class Constant {
public static String WelfareCenter = "https://h5v3.zhangxinzhixun.com/huayuan/Welfare";//福利中心 public static String WelfareCenter = "https://h5v3.zhangxinzhixun.com/huayuan/Welfare";//福利中心
public static String PunchRecord = "https://h5v3.zhangxinzhixun.com/huayuan/ClockIn";//打卡记录 public static String PunchRecord = "https://h5v3.zhangxinzhixun.com/huayuan/ClockIn";//打卡记录
public static String RankList = "https://h5v3.zhangxinzhixun.com/huayuan/Ranking";//排行榜 public static String RankList = "https://h5v3.zhangxinzhixun.com/huayuan/Ranking";//排行榜
public static String WithDraw = "http://h5v2test.zhangxinzhixun.com/farm/Withdraw";//提现页 public static String WithDraw = "http://h5v2.zhangxinzhixun.com/farm/Withdraw";//提现页
public static String WithDraw2 = "http://h5v2.zhangxinzhixun.com/farm/Withdraw?novice=1";//提现页
} }
public static class SdkKey { public static class SdkKey {
......
package com.ym.library.activity;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Build;
import android.util.AttributeSet;
import android.webkit.WebView;
/**
* Craeted by ${junqi.li}
* Craeted by 2020/10/26
*/
public class CustomWebView extends WebView {
public CustomWebView(Context context) {
super(getFixedContext(context));
}
public CustomWebView(Context context, AttributeSet attrs) {
super(getFixedContext(context), attrs);
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public CustomWebView(Context context, AttributeSet attrs, int defStyleAttr) {
super(getFixedContext(context), attrs, defStyleAttr);
}
public CustomWebView(Context context, AttributeSet attrs, int defStyleAttr, boolean privateBrowsing) {
super(getFixedContext(context), attrs, defStyleAttr, privateBrowsing);
}
public static Context getFixedContext(Context context) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
return context.createConfigurationContext(new Configuration());
} else {
return context;
}
}
}
...@@ -2,6 +2,8 @@ package com.ym.library.activity; ...@@ -2,6 +2,8 @@ package com.ym.library.activity;
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.os.Build;
import android.util.Log;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.webkit.WebSettings; import android.webkit.WebSettings;
...@@ -24,7 +26,7 @@ public class WebViewActivity extends BaseActivity { ...@@ -24,7 +26,7 @@ public class WebViewActivity extends BaseActivity {
private String url; private String url;
private String title; private String title;
private WebView webView; private CustomWebView webView;
@Override @Override
public void before() { public void before() {
...@@ -53,26 +55,26 @@ public class WebViewActivity extends BaseActivity { ...@@ -53,26 +55,26 @@ public class WebViewActivity extends BaseActivity {
webView.loadUrl(url); webView.loadUrl(url);
} }
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
// url = intent.getData().getQueryParameter("url");
// title = intent.getData().getQueryParameter("title");
// RelativeLayout rl = findViewById(R.id.id_rl_toolbar);
// if (getIntent().getData().getBooleanQueryParameter("showToolbar", true)) {
// rl.setVisibility(View.VISIBLE);
// } else {
// rl.setVisibility(View.GONE);
// }
// webView = findViewById(R.id.activity_webview2);
// initTitle();
//// initWebView();
// webView.loadUrl(url);
}
private void initWebView() { private void initWebView() {
// webView.setBackgroundColor(getResources().getColor(R.color.color_FEDA83)); // webView.setBackgroundColor(getResources().getColor(R.color.color_FEDA83));
//设置WebView的宽高 //设置WebView的宽高
//==================================引起的白屏========================================
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
// webView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
// }
// // 清缓存和记录,缓存引起的白屏
// webView.clearCache(true);
// webView.clearHistory();
//
// webView.requestFocus();
// webView.getSettings().setDatabaseEnabled(true);
//// 缓存白屏
// String appCachePath = getApplicationContext().getCacheDir()
// .getAbsolutePath() + "/webcache";
//// 设置 Application Caches 缓存目录
// webView.getSettings().setAppCachePath(appCachePath);
// webView.getSettings().setDatabasePath(appCachePath);
//==========================================================================
webView.getSettings().setUseWideViewPort(true); webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true); webView.getSettings().setLoadWithOverviewMode(true);
// webView.getSettings().setDefaultFontSize(56); // webView.getSettings().setDefaultFontSize(56);
...@@ -80,7 +82,6 @@ public class WebViewActivity extends BaseActivity { ...@@ -80,7 +82,6 @@ public class WebViewActivity extends BaseActivity {
// 建议禁止缓存加载,以确保在攻击发生时可快速获取最新的滑动验证组件进行对抗。 // 建议禁止缓存加载,以确保在攻击发生时可快速获取最新的滑动验证组件进行对抗。
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
// 设置不使用默认浏览器,而直接使用WebView组件加载页面。 // 设置不使用默认浏览器,而直接使用WebView组件加载页面。
// 设置WebView组件支持加载JavaScript。 // 设置WebView组件支持加载JavaScript。
webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setJavaScriptEnabled(true);
// 建立JavaScript调用Java接口的桥梁。 // 建立JavaScript调用Java接口的桥梁。
...@@ -127,7 +128,7 @@ public class WebViewActivity extends BaseActivity { ...@@ -127,7 +128,7 @@ public class WebViewActivity extends BaseActivity {
} }
}); });
TextView tv_title = findViewById(R.id.tv_user_toolbar_title); TextView tv_title = findViewById(R.id.tv_user_toolbar_title);
tv_title.setText(title+""); tv_title.setText(title + "");
} }
@Override @Override
...@@ -154,9 +155,9 @@ public class WebViewActivity extends BaseActivity { ...@@ -154,9 +155,9 @@ public class WebViewActivity extends BaseActivity {
@Override @Override
protected void onDestroy() { protected void onDestroy() {
super.onDestroy(); super.onDestroy();
// if (webView != null) { if (webView != null) {
// webView.destroy(); webView.destroy();
// } }
} }
class WebJavaInterface extends JavaInterface { class WebJavaInterface extends JavaInterface {
......
...@@ -82,7 +82,6 @@ object TTADUtils { ...@@ -82,7 +82,6 @@ object TTADUtils {
ttNativeExpressAd.setExpressInteractionListener(object :ExpressAdInteractionListener{ ttNativeExpressAd.setExpressInteractionListener(object :ExpressAdInteractionListener{
override fun onAdClicked(p0: View?, p1: Int) { override fun onAdClicked(p0: View?, p1: Int) {
// AdUpload.onAdClick(newsEntity) // AdUpload.onAdClick(newsEntity)
} }
override fun onAdShow(p0: View?, p1: Int) { override fun onAdShow(p0: View?, p1: Int) {
...@@ -147,12 +146,14 @@ object TTADUtils { ...@@ -147,12 +146,14 @@ object TTADUtils {
// AdUpload.onAdClick(data) // AdUpload.onAdClick(data)
zxadListener.onAdClicked(data) zxadListener.onAdClicked(data)
EventUtils.apiClient(data?.clk_tracking[0]) EventUtils.apiClient(data?.clk_tracking[0])
EventUtils.onEventUM("ad_splash_click","穿山甲开屏")
} }
override fun onAdShow(view: View, i: Int) { override fun onAdShow(view: View, i: Int) {
zxadListener.onAdShow(data) zxadListener.onAdShow(data)
// AdUpload.onAdImpression(data) // AdUpload.onAdImpression(data)
EventUtils.apiClient(data?.imp_tracking[0]) EventUtils.apiClient(data?.imp_tracking[0])
EventUtils.onEventUM("ad_splash_show","穿山甲开屏")
} }
override fun onAdSkip() { override fun onAdSkip() {
...@@ -267,12 +268,14 @@ object TTADUtils { ...@@ -267,12 +268,14 @@ object TTADUtils {
zxadExpressListener.onAdClicked(entity) zxadExpressListener.onAdClicked(entity)
// AdUpload.onAdClick(entity) // AdUpload.onAdClick(entity)
EventUtils.apiClient(entity?.clk_tracking[0]) EventUtils.apiClient(entity?.clk_tracking[0])
EventUtils.onEventUM("ad_feed_click","穿山甲大图")
} }
override fun onAdShow(view: View, type: Int) { override fun onAdShow(view: View, type: Int) {
zxadExpressListener.onAdShow(entity) zxadExpressListener.onAdShow(entity)
callback.onAdSuccess() callback.onAdSuccess()
EventUtils.apiClient(entity?.imp_tracking[0]) EventUtils.apiClient(entity?.imp_tracking[0])
EventUtils.onEventUM("ad_feed_show","穿山甲大图")
} }
override fun onRenderFail( override fun onRenderFail(
...@@ -469,13 +472,14 @@ object TTADUtils { ...@@ -469,13 +472,14 @@ object TTADUtils {
override fun onAdShow() { override fun onAdShow() {
EventUtils.apiClient(entity?.imp_tracking[0]) EventUtils.apiClient(entity?.imp_tracking[0])
listener.setRewardAdInteractionListener() listener.setRewardAdInteractionListener()
EventUtils.onEventUM("ad_reward_video_show","穿山甲激励视频")
// AdUpload.onAdImpression(entity) // AdUpload.onAdImpression(entity)
} }
override fun onAdVideoBarClick() { override fun onAdVideoBarClick() {
EventUtils.apiClient(entity?.clk_tracking[0]) EventUtils.apiClient(entity?.clk_tracking[0])
listener.onAdVideoBarClick(entity) listener.onAdVideoBarClick(entity)
EventUtils.onEventUM("ad_reward_video_click","穿山甲激励视频")
} }
override fun onAdClose() { override fun onAdClose() {
......
...@@ -29,6 +29,7 @@ import com.ym.library.module.NewsEntity ...@@ -29,6 +29,7 @@ import com.ym.library.module.NewsEntity
import com.ym.library.net.AdUpload import com.ym.library.net.AdUpload
import com.ym.library.utils.EventUtils import com.ym.library.utils.EventUtils
import com.ym.library.utils.EventUtils.apiClient import com.ym.library.utils.EventUtils.apiClient
import com.ym.library.utils.EventUtils.onEventUM
object GDTAdUtils { object GDTAdUtils {
...@@ -52,6 +53,7 @@ object GDTAdUtils { ...@@ -52,6 +53,7 @@ object GDTAdUtils {
// AdUpload.onAdImpression(newsEntity) // AdUpload.onAdImpression(newsEntity)
zxadCallback.onAdSuccess() zxadCallback.onAdSuccess()
apiClient(newsEntity?.imp_tracking[0]) apiClient(newsEntity?.imp_tracking[0])
onEventUM("ad_splash_show","广点通开屏")
} }
override fun onNoAD(p0: AdError?) { override fun onNoAD(p0: AdError?) {
...@@ -64,6 +66,7 @@ object GDTAdUtils { ...@@ -64,6 +66,7 @@ object GDTAdUtils {
override fun onADClicked() { override fun onADClicked() {
// AdUpload.onAdClick(newsEntity) // AdUpload.onAdClick(newsEntity)
apiClient(newsEntity?.clk_tracking[0]) apiClient(newsEntity?.clk_tracking[0])
onEventUM("ad_splash_click","广点通开屏")
} }
override fun onADTick(p0: Long) { override fun onADTick(p0: Long) {
...@@ -199,12 +202,13 @@ object GDTAdUtils { ...@@ -199,12 +202,13 @@ object GDTAdUtils {
override fun onADClicked(p0: NativeExpressADView?) { override fun onADClicked(p0: NativeExpressADView?) {
// AdUpload.onAdClick(newsEntity) // AdUpload.onAdClick(newsEntity)
EventUtils.apiClient(newsEntity?.clk_tracking[0]) EventUtils.apiClient(newsEntity?.clk_tracking[0])
onEventUM("ad_feed_click","广点通大图");
} }
override fun onRenderSuccess(p0: NativeExpressADView?) { override fun onRenderSuccess(p0: NativeExpressADView?) {
// AdUpload.onAdImpression(newsEntity) // AdUpload.onAdImpression(newsEntity)
EventUtils.apiClient(newsEntity?.imp_tracking[0]) EventUtils.apiClient(newsEntity?.imp_tracking[0])
onEventUM("ad_feed_show","广点通大图");
} }
}) })
...@@ -262,6 +266,7 @@ object GDTAdUtils { ...@@ -262,6 +266,7 @@ object GDTAdUtils {
override fun onADClick() { override fun onADClick() {
apiClient(entity?.clk_tracking[0]) apiClient(entity?.clk_tracking[0])
listener.onAdVideoBarClick(entity) listener.onAdVideoBarClick(entity)
onEventUM("ad_reward_video_click","广点通激励视频")
} }
override fun onVideoCached() { override fun onVideoCached() {
...@@ -302,7 +307,7 @@ object GDTAdUtils { ...@@ -302,7 +307,7 @@ object GDTAdUtils {
// AdUpload.onAdImpression(entity) // AdUpload.onAdImpression(entity)
apiClient(entity.imp_tracking[0]) apiClient(entity.imp_tracking[0])
onEventUM("ad_reward_video_show","广点通激励视频")
} }
}) // 有声播放 }) // 有声播放
......
...@@ -115,6 +115,7 @@ public class KSADUtils { ...@@ -115,6 +115,7 @@ public class KSADUtils {
// mGotoMainActivity = true; // mGotoMainActivity = true;
if (newsEntity != null && newsEntity.getClk_tracking().size() > 0) { if (newsEntity != null && newsEntity.getClk_tracking().size() > 0) {
EventUtils.INSTANCE.apiClient(newsEntity.getClk_tracking().get(0)); EventUtils.INSTANCE.apiClient(newsEntity.getClk_tracking().get(0));
EventUtils.INSTANCE.onEventUM("ad_splash_click","快手开屏");
} }
zxadListener.onAdClicked(newsEntity); zxadListener.onAdClicked(newsEntity);
} }
...@@ -141,6 +142,7 @@ public class KSADUtils { ...@@ -141,6 +142,7 @@ public class KSADUtils {
zxadListener.onAdShow(newsEntity); zxadListener.onAdShow(newsEntity);
if (newsEntity != null && newsEntity.getImp_tracking().size() > 0) { if (newsEntity != null && newsEntity.getImp_tracking().size() > 0) {
EventUtils.INSTANCE.apiClient(newsEntity.getImp_tracking().get(0)); EventUtils.INSTANCE.apiClient(newsEntity.getImp_tracking().get(0));
EventUtils.INSTANCE.onEventUM("ad_splash_show","快手开屏");
} }
LogUtils.e("huang: onAdShowStart"); LogUtils.e("huang: onAdShowStart");
...@@ -227,6 +229,7 @@ public class KSADUtils { ...@@ -227,6 +229,7 @@ public class KSADUtils {
listener.onAdVideoBarClick(entity); listener.onAdVideoBarClick(entity);
if (entity.getClk_tracking() != null && entity.getClk_tracking().size() > 0) { if (entity.getClk_tracking() != null && entity.getClk_tracking().size() > 0) {
EventUtils.INSTANCE.apiClient(entity.getClk_tracking().get(0)); EventUtils.INSTANCE.apiClient(entity.getClk_tracking().get(0));
EventUtils.INSTANCE.onEventUM("ad_reward_video_click","快手激励视频");
} }
} }
...@@ -258,6 +261,7 @@ public class KSADUtils { ...@@ -258,6 +261,7 @@ public class KSADUtils {
Log.e("huang", "快手 onVideoPlayStart"); Log.e("huang", "快手 onVideoPlayStart");
if (entity.getImp_tracking() != null && entity.getImp_tracking().size() > 0) { if (entity.getImp_tracking() != null && entity.getImp_tracking().size() > 0) {
EventUtils.INSTANCE.apiClient(entity.getImp_tracking().get(0)); EventUtils.INSTANCE.apiClient(entity.getImp_tracking().get(0));
EventUtils.INSTANCE.onEventUM("ad_reward_video_show","快手激励视频");
} }
// ToastUtil.showToast(mContext, "激励视频广告播放开始"); // ToastUtil.showToast(mContext, "激励视频广告播放开始");
} }
...@@ -354,6 +358,7 @@ public class KSADUtils { ...@@ -354,6 +358,7 @@ public class KSADUtils {
if (ad != null) { if (ad != null) {
EventUtils.INSTANCE.apiClient(entity.getClk_tracking().get(0)); EventUtils.INSTANCE.apiClient(entity.getClk_tracking().get(0));
// Toast.makeText(mContext, "广告" + ad.getAppName() + "被点击", Toast.LENGTH_SHORT).show(); // Toast.makeText(mContext, "广告" + ad.getAppName() + "被点击", Toast.LENGTH_SHORT).show();
EventUtils.INSTANCE.onEventUM("ad_feed_click","快手大图");
} }
} }
...@@ -362,6 +367,7 @@ public class KSADUtils { ...@@ -362,6 +367,7 @@ public class KSADUtils {
if (ad != null) { if (ad != null) {
// Toast.makeText(mContext, "广告" + ad.getAppName() + "展示", Toast.LENGTH_SHORT).show(); // Toast.makeText(mContext, "广告" + ad.getAppName() + "展示", Toast.LENGTH_SHORT).show();
EventUtils.INSTANCE.apiClient(entity.getImp_tracking().get(0)); EventUtils.INSTANCE.apiClient(entity.getImp_tracking().get(0));
EventUtils.INSTANCE.onEventUM("ad_feed_show","快手大图");
} }
} }
}); });
......
...@@ -73,7 +73,9 @@ object EventUtils { ...@@ -73,7 +73,9 @@ object EventUtils {
apiClient(jsonObj) apiClient(jsonObj)
MobclickAgent.onEvent(AppliContext.get(), action, value) MobclickAgent.onEvent(AppliContext.get(), action, value)
} }
fun onEventUM(action: String, value: String) {
MobclickAgent.onEvent(AppliContext.get(), action, value)
}
fun onVideoEvent(action: String, id: String?, viewTime: Int, value: String) { fun onVideoEvent(action: String, id: String?, viewTime: Int, value: String) {
val jsonObj = getJSON(action) val jsonObj = getJSON(action)
jsonObj.put("viewTime", viewTime) jsonObj.put("viewTime", viewTime)
......
...@@ -43,12 +43,14 @@ object WNManager { ...@@ -43,12 +43,14 @@ object WNManager {
listener.onAdShow() listener.onAdShow()
callback.onAdSuccess() callback.onAdSuccess()
EventUtils.apiClient(entity?.imp_tracking[0]) EventUtils.apiClient(entity?.imp_tracking[0])
EventUtils.onEventUM("ad_reward_video_show","优量宝激励视频")
} }
override fun onAdClick() { override fun onAdClick() {
Log.d("WNManager", "激励视频点击") Log.d("WNManager", "激励视频点击")
listener.onAdVideoBarClick(entity) listener.onAdVideoBarClick(entity)
EventUtils.apiClient(entity?.clk_tracking[0]) EventUtils.apiClient(entity?.clk_tracking[0])
EventUtils.onEventUM("ad_reward_video_click","优量宝激励视频")
} }
override fun onAdClose() { override fun onAdClose() {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
android:textStyle="bold" /> android:textStyle="bold" />
</RelativeLayout> </RelativeLayout>
<WebView <com.ym.library.activity.CustomWebView
android:id="@+id/activity_webview2" android:id="@+id/activity_webview2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment