Commit c9f2ead1 authored by mengcuiguang's avatar mengcuiguang

1.3.6风控修改

parent 9e2ba768
......@@ -9,8 +9,8 @@ android {
applicationId "com.mints.goldspace"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 35
versionName "1.3.5"
versionCode 36
versionName "1.3.6"
flavorDimensions "default"
// dex突破65535的限制
......@@ -182,6 +182,10 @@ dependencies {
implementation 'com.mindorks.android:prdownloader:0.6.0'
// 圆角库
implementation 'com.github.SheHuan:NiceImageView:1.0.5'
// 跑马灯
implementation 'com.sunfusheng:marqueeview:1.2.0'
// 检测运行设备是否模拟器
implementation 'com.snail:antifake:1.4'
// 工具类
// gson
......@@ -236,11 +240,11 @@ dependencies {
implementation 'com.liulishuo.filedownloader:library:1.7.7'
implementation "org.greenrobot:eventbus:3.1.0-RC"
// 掌阅书城
implementation(name: 'iReader-release-1.0.1', ext: 'aar')
implementation 'com.alibaba:fastjson:1.2.11'
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.core:core:1.0.0'
implementation 'androidx.fragment:fragment:1.0.0'
// implementation(name: 'iReader-release-1.0.1', ext: 'aar')
// implementation 'com.alibaba:fastjson:1.2.11'
// implementation 'androidx.annotation:annotation:1.0.0'
// implementation 'androidx.core:core:1.0.0'
// implementation 'androidx.fragment:fragment:1.0.0'
// 变现猫
implementation(name: 'bxmsdk-release-3.3.1', ext: 'aar')
// 闪电盒子
......@@ -253,10 +257,10 @@ dependencies {
implementation(name: 'mh-adsdk-ext', ext: 'aar')
// implementation(name: 'ks_3.3.5.3', ext: 'aar')
// 聚乐云
implementation(name: 'okgo-2.2', ext: 'aar')
implementation(name: 'scenemodule-2.2', ext: 'aar')
implementation(name: 'scenead-2.2', ext: 'aar')
implementation 'com.just.agentweb:agentweb:4.1.2'
// implementation(name: 'okgo-2.2', ext: 'aar')
// implementation(name: 'scenemodule-2.2', ext: 'aar')
// implementation(name: 'scenead-2.2', ext: 'aar')
// implementation 'com.just.agentweb:agentweb:4.1.2'
// 喜马拉雅 已集成
// 微转阅读(集成h5)
//天卓SDK的珊瑚2.0组件
......
......@@ -65,18 +65,18 @@ public class TTPreLoadExpressXmlyManager {
if (view == null) {
ttFrameLayout = null;
AppConfig.xmlyAdFlag = false;
LogUtil.d("TTPreLoadExpressXmlyManager",AppConfig.xmlyAdFlag+"");
// LogUtil.d("TTPreLoadExpressXmlyManager",AppConfig.xmlyAdFlag+"");
} else {
try {
ttFrameLayout = view;
AppConfig.xmlyAdFlag = true;
LogUtil.d("TTPreLoadExpressXmlyManager",AppConfig.xmlyAdFlag+"");
// LogUtil.d("TTPreLoadExpressXmlyManager",AppConfig.xmlyAdFlag+"");
} catch (Exception e) {
e.printStackTrace();
ttFrameLayout = null;
AppConfig.xmlyAdFlag = false;
LogUtil.d("TTPreLoadExpressXmlyManager",AppConfig.xmlyAdFlag+"");
// LogUtil.d("TTPreLoadExpressXmlyManager",AppConfig.xmlyAdFlag+"");
}
}
});
......
......@@ -97,12 +97,11 @@ class KsVideoAdManager private constructor() :
override fun onVideoPlayStart() {
// ToastUtil.show(activity, "快手激励视频⼴告播放开始")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ZERO, "", "")
}
override fun onRewardVerify() {
// ToastUtil.show(activity, "快手激励视频⼴告获取激励")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ZERO, "", "")
}
})
......
......@@ -7,6 +7,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.text.TextUtils;
import com.mints.goldspace.MintsApplication;
import com.mints.goldspace.ad.video.base.VideoAdStatusListener;
import com.mints.goldspace.common.AppConfig;
import com.mints.goldspace.common.Constant;
......@@ -16,9 +17,13 @@ import com.mints.goldspace.mvp.model.WeightBean;
import com.mints.goldspace.service.AppInstallService;
import com.mints.goldspace.utils.AppUtil;
import com.mints.goldspace.utils.LogUtil;
import com.mints.goldspace.utils.ToastUtil;
import com.mints.library.utils.json.JsonUtil;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
/**
......@@ -57,6 +62,9 @@ public class VideoAdingManager {
private Activity activity;
private boolean isVideoAdDownload = false;// 是否点击广告下载 true-点击
private ArrayList<String> currentRandomAdList;//当前随机出的广告渠道
private ArrayList<String> adList;//广告渠道
public static VideoAdingManager getInstance(Activity activity) {
if (_inst == null) {
WeakReference<Activity> activityWeakReference = new WeakReference<>(activity);
......@@ -199,11 +207,13 @@ public class VideoAdingManager {
this.activity = activityWeakReference.get();
isVideoAdDownload = false;
loadAdVideo(getNextAdType(), bean);
loadAdVideo(getNextFailAdType(), bean);
}
/**
* 根据广告优先级获取下一个
* <p>
* 穿山甲>优量汇>穿山甲全屏>快手>珊瑚>闪电盒子>枫岚(兜底)
*/
private String getNextAdType() {
String nextAdType;
......@@ -213,16 +223,35 @@ public class VideoAdingManager {
nextAdType = Constant.YLH_VEDIO_AD;
} else if (AppConfig.csjFullVedioAdCount > 0) {
nextAdType = Constant.CSJ_FULL_AD;
} else if (AppConfig.ksVideoAdCount > 0) {
nextAdType = Constant.KS_VEDIO_AD;
} else if (AppConfig.wnVideoAdCount > 0) {
nextAdType = Constant.SDHZ_VEDIO_AD;
} else if (AppConfig.shVideoAdCount > 0) {
nextAdType = Constant.SH_VEDIO_AD;
} else if (AppConfig.ksVideoAdCount > 0) {
nextAdType = Constant.KS_VEDIO_AD;
} else {
nextAdType = Constant.FL_VEDIO_AD;
}
return nextAdType;
}
private String getNextFailAdType() {
String nextAdType = Constant.FL_VEDIO_AD;
try {
List<String> tempList = listrem(adList, currentRandomAdList);
for (String code : tempList) {
nextAdType = getAdtype(code);
currentRandomAdList.add(code);
LogUtil.d(TAG, "失败返回adType:" + nextAdType);
break;
}
} catch (Exception e) {
LogUtil.d(TAG, "失败返回Error");
e.printStackTrace();
}
return nextAdType;
}
/**
* 获取广告类型配置
*/
......@@ -236,6 +265,8 @@ public class VideoAdingManager {
}
isHighWeight = false;
currentRandomAdList.add(getCode(adType));
LogUtil.d(TAG, "权重结果返回的广告类型:" + adType);
return adType;
}
......@@ -264,6 +295,15 @@ public class VideoAdingManager {
* @return
*/
private String getRandomWeight() {
if (currentRandomAdList == null) {
currentRandomAdList = new ArrayList<>();
}
currentRandomAdList.clear();
if (adList == null) {
adList = new ArrayList<>();
}
adList.clear();
if (weightList != null) {
weightList.clear();
}
......@@ -273,36 +313,43 @@ public class VideoAdingManager {
weightList.add(new WeightBean(csjVideoWeight, Constant.CSJ_VEDIO_AD));
weight = weight + csjVideoWeight;
LogUtil.d(TAG, "权重值:csjVideoWeight:" + csjVideoWeight);
adList.add("a");
}
if (AppConfig.ylhAdCount > 0) {
weightList.add(new WeightBean(ylhWeight, Constant.YLH_VEDIO_AD));
weight = weight + ylhWeight;
LogUtil.d(TAG, "权重值:ylhWeight:" + ylhWeight);
adList.add("b");
}
if (AppConfig.csjFullVedioAdCount > 0) {
weightList.add(new WeightBean(csjFullVideoWeight, Constant.CSJ_FULL_AD));
weight = weight + csjFullVideoWeight;
LogUtil.d(TAG, "权重值:csjFullVideoWeight:" + csjFullVideoWeight);
adList.add("c");
}
if (AppConfig.ksVideoAdCount > 0) {
weightList.add(new WeightBean(ksVideoWeight, Constant.KS_VEDIO_AD));
weight = weight + ksVideoWeight;
LogUtil.d(TAG, "权重值:ksWeight:" + ksVideoWeight);
if (AppConfig.wnVideoAdCount > 0) {
weightList.add(new WeightBean(wnWeight, Constant.SDHZ_VEDIO_AD));
weight = weight + wnWeight;
LogUtil.d(TAG, "权重值:sdhzWeight:" + wnWeight);
adList.add("d");
}
if (AppConfig.shVideoAdCount > 0) {
weightList.add(new WeightBean(shVideoWeight, Constant.SH_VEDIO_AD));
weight = weight + shVideoWeight;
LogUtil.d(TAG, "权重值:shWeight:" + shVideoWeight);
adList.add("e");
}
if (AppConfig.wnVideoAdCount > 0) {
weightList.add(new WeightBean(wnWeight, Constant.SDHZ_VEDIO_AD));
weight = weight + wnWeight;
LogUtil.d(TAG, "权重值:sdhzWeight:" + wnWeight);
if (AppConfig.ksVideoAdCount > 0) {
weightList.add(new WeightBean(ksVideoWeight, Constant.KS_VEDIO_AD));
weight = weight + ksVideoWeight;
LogUtil.d(TAG, "权重值:ksWeight:" + ksVideoWeight);
adList.add("f");
}
if (AppConfig.flVideoAdCount > 0) {
weightList.add(new WeightBean(flVideoWeight, Constant.FL_VEDIO_AD));
weight = weight + flVideoWeight;
LogUtil.d(TAG, "权重值:flVideoWeight:" + flVideoWeight);
adList.add("g");
}
// 权重随机
......@@ -345,7 +392,6 @@ public class VideoAdingManager {
int tzVideoAdCount = AppConfig.shVideoAdCount;
if (ylhAdCount <= 0 && csjVideoAdCount <= 0 && wnAdCount <= 0 && flVideoAdCount <= 0 && tzVideoAdCount <= 0) {
// showToast("今日视频已看完,请明天再来吧");
return true;
}
return false;
......@@ -392,9 +438,30 @@ public class VideoAdingManager {
mReceiverBroadcastReceiver = null;
}
currentRandomAdList = null;
adList = null;
activity = null;
}
/**
* 从listA里删除listB里有的数据
*
* @param adList
* @param currentRandomAdList
* @return
*/
public List<String> listrem(List<String> adList, List<String> currentRandomAdList) {
HashSet hs1 = new HashSet(adList);
HashSet hs2 = new HashSet(currentRandomAdList);
// LogUtil.d(TAG, "权重List:" + JsonUtil.toJson(adList));
// LogUtil.d(TAG, "过滤List:" + JsonUtil.toJson(currentRandomAdList));
hs1.removeAll(hs2);
List<String> listC = new ArrayList<String>();
listC.addAll(hs1);
return listC;
}
public void setVideoAdingListener(VideoAdingListener videoAdingListener) {
this.videoAdingListener = videoAdingListener;
}
......@@ -687,4 +754,53 @@ public class VideoAdingManager {
}
}
private String getCode(String adtype) {
String code = "g";
switch (adtype) {
case Constant.CSJ_VEDIO_AD:
code = "a";
break;
case Constant.YLH_VEDIO_AD:
code = "b";
break;
case Constant.CSJ_FULL_AD:
code = "c";
break;
case Constant.SDHZ_VEDIO_AD:
code = "d";
break;
case Constant.SH_VEDIO_AD:
code = "e";
break;
case Constant.KS_VEDIO_AD:
code = "f";
break;
}
return code;
}
private String getAdtype(String code) {
String adtype = Constant.FL_VEDIO_AD;
switch (code) {
case "a":
adtype = Constant.CSJ_VEDIO_AD;
break;
case "b":
adtype = Constant.YLH_VEDIO_AD;
break;
case "c":
adtype = Constant.CSJ_FULL_AD;
break;
case "d":
adtype = Constant.SDHZ_VEDIO_AD;
break;
case "e":
adtype = Constant.SH_VEDIO_AD;
break;
case "f":
adtype = Constant.KS_VEDIO_AD;
break;
}
return adtype;
}
}
\ No newline at end of file
......@@ -79,11 +79,11 @@ public class AppConfig {
/**
* csjFull 剩余广告播放数
*/
public static int csjFullVedioAdCount = 5;
public static int csjFullVedioAdCount = 0;
/**
* flVideo 剩余广告播放数
*/
public static int flVideoAdCount = 5;
public static int flVideoAdCount = 0;
/**
* shVideo 剩余广告播放数
*/
......@@ -127,4 +127,9 @@ public class AppConfig {
* 按渠道包 动态更新一次代码位
*/
public static boolean isUpdateForPkg = false;
/**
* 激励视频是否休眠 false-不休眠 提示:加载失败,请稍后重试。
*/
public static boolean isVideoSleep = false;
}
......@@ -26,6 +26,7 @@ import com.mints.library.utils.json.JsonUtil
import java.io.*
import java.net.NetworkInterface
import java.util.*
import kotlin.collections.HashMap
/**
* 描述:设备信息
......@@ -1017,6 +1018,39 @@ class DeviceInfo private constructor() {
return 0
}
/**
* 获取后台运行APP
*/
fun getRunningApp(): String {
try {
val appList: MutableList<MutableMap<String, String>> = ArrayList()
val localPackageManager = mContext?.packageManager
localPackageManager?.let {
val localList = localPackageManager.getInstalledPackages(0)
for (i in 0 until localList.size) {
val pinfo = localList.get(i) as PackageInfo
if (pinfo.applicationInfo.flags and ApplicationInfo.FLAG_SYSTEM > 0) {
//系统程序 忽略
continue
}
if (ApplicationInfo.FLAG_UPDATED_SYSTEM_APP and pinfo.applicationInfo.flags == 0
&& ApplicationInfo.FLAG_STOPPED and pinfo.applicationInfo.flags == 0) {
val appMap: MutableMap<String, String> = HashMap()
appMap["appName"] = pinfo.applicationInfo.loadLabel(mContext!!.packageManager) as String
appMap["appPkg"] = pinfo.packageName
appList.add(appMap)
}
}
return JsonUtil.toJson(appList)
}
}catch (e:Exception){
}
return ""
}
companion object {
private var _inst: DeviceInfo? = null
val instance: DeviceInfo
......
package com.mints.goldspace.manager
import android.app.Activity
import android.text.TextUtils
import com.fly.scenemodule.SceneUtil
import com.fly.scenemodule.model.GDTInfo
import com.fly.scenemodule.model.TTInfo
import com.mints.goldspace.MintsApplication
import com.mints.goldspace.common.AppConfig
/**
* 描述:聚乐云SDK
*/
object SceneManager {
const val SCENE_CHANNEL_Id = ""
/**
* 初始化
*/
fun initScene() {
val userId = UserManager.getInstance().userID
// 初始化聚乐云
SceneUtil.initSdk(SCENE_CHANNEL_Id, userId, MintsApplication.OAID)
//穿山甲-------
val ttInfo = TTInfo()
ttInfo.csJ_Appid = TtCsjAdManager.TT_AD_APPID
ttInfo.csJ_VideoId = TtCsjAdManager.TT_AD_VEDIO_JULEYUN
ttInfo.csJ_BannerId = TtCsjAdManager.TT_AD_BANNER_JULEYUN
ttInfo.csJ_InteractionId = TtCsjAdManager.TT_AD_INSERT_LOADING_ID_JULEYUN
SceneUtil.initCSJConfig(ttInfo)
//广点通-------
val gdtInfo = GDTInfo()
gdtInfo.gdT_Appid = YlhAdManager.YLH_AD_APPID
// gdtInfo.gdT_VideoId = YlhAdManager.YLH_AD_VEDIO_JULEYUN_POSTID
gdtInfo.gdT_ExpressId = YlhAdManager.YLH_AD_NATIVEEXPRESS_JULEYUN
gdtInfo.GDT_InteractionId = YlhAdManager.YLH_AD_INTERSTITIALAD_JULEYUN
SceneUtil.initGDTConfig(gdtInfo)
}
/**
* 账号同步
*/
fun signIn(activity: Activity) {
if (!TextUtils.isEmpty(UserManager.getInstance().userID)) {
SceneUtil.signIn(activity, SCENE_CHANNEL_Id, UserManager.getInstance().userID, MintsApplication.OAID)
AppConfig.scene_flag = true
}
}
}
\ No newline at end of file
//package com.mints.goldspace.manager
//
//import android.app.Activity
//import android.text.TextUtils
//import com.fly.scenemodule.SceneUtil
//import com.fly.scenemodule.model.GDTInfo
//import com.fly.scenemodule.model.TTInfo
//import com.mints.goldspace.MintsApplication
//import com.mints.goldspace.common.AppConfig
//
///**
// * 描述:聚乐云SDK
// */
//object SceneManager {
//
// const val SCENE_CHANNEL_Id = ""
//
// /**
// * 初始化
// */
// fun initScene() {
// val userId = UserManager.getInstance().userID
//
// // 初始化聚乐云
// SceneUtil.initSdk(SCENE_CHANNEL_Id, userId, MintsApplication.OAID)
//
// //穿山甲-------
// val ttInfo = TTInfo()
// ttInfo.csJ_Appid = TtCsjAdManager.TT_AD_APPID
// ttInfo.csJ_VideoId = TtCsjAdManager.TT_AD_VEDIO_JULEYUN
// ttInfo.csJ_BannerId = TtCsjAdManager.TT_AD_BANNER_JULEYUN
// ttInfo.csJ_InteractionId = TtCsjAdManager.TT_AD_INSERT_LOADING_ID_JULEYUN
// SceneUtil.initCSJConfig(ttInfo)
//
// //广点通-------
// val gdtInfo = GDTInfo()
// gdtInfo.gdT_Appid = YlhAdManager.YLH_AD_APPID
//// gdtInfo.gdT_VideoId = YlhAdManager.YLH_AD_VEDIO_JULEYUN_POSTID
// gdtInfo.gdT_ExpressId = YlhAdManager.YLH_AD_NATIVEEXPRESS_JULEYUN
// gdtInfo.GDT_InteractionId = YlhAdManager.YLH_AD_INTERSTITIALAD_JULEYUN
// SceneUtil.initGDTConfig(gdtInfo)
// }
//
// /**
// * 账号同步
// */
// fun signIn(activity: Activity) {
// if (!TextUtils.isEmpty(UserManager.getInstance().userID)) {
// SceneUtil.signIn(activity, SCENE_CHANNEL_Id, UserManager.getInstance().userID, MintsApplication.OAID)
// AppConfig.scene_flag = true
// }
// }
//}
\ No newline at end of file
package com.mints.goldspace.manager
import com.mints.goldspace.MintsApplication
import com.snail.antifake.jni.EmulatorDetectUtil
/**
* 描述:模拟器校验
* 作者:孟崔广
*/
object SimulatorManager {
/**
* 是否是模拟器 0-不是模拟器
*/
fun isEmulator(): Int {
try {
return if (EmulatorDetectUtil.isEmulator(MintsApplication.getContext())) 1 else 0
} catch (e: Exception) {
e.printStackTrace()
}
return 0
}
}
\ No newline at end of file
......@@ -133,4 +133,16 @@ public class TrackManager {
trackPresenter.reportAddCoinMsg(activity, vo);
}
}
public void getAdWeight() {
if (trackPresenter != null && !TextUtils.isEmpty(UserManager.getInstance().getUserID())) {
trackPresenter.getAdWeight();
}
}
public void riskinfo() {
if (trackPresenter != null && !TextUtils.isEmpty(UserManager.getInstance().getUserID())) {
trackPresenter.riskinfo();
}
}
}
package com.mints.goldspace.manager
import com.mints.goldspace.ad.video.VideoAdingManager
import com.mints.goldspace.common.AppConfig
import com.mints.goldspace.mvp.model.UserTaskMsgBean
import com.mints.goldspace.ui.fragment.MainFragment
import com.mints.goldspace.utils.ForegroundOrBackground
import com.mints.goldspace.utils.LogUtil
/**
* 描述:用户广告视频数和权重
* 作者:孟崔广
*/
object UserWeight {
private val TAG = UserWeight::class.java.simpleName
private val videoAdingManager by lazy { VideoAdingManager.getInstance(ForegroundOrBackground.getApp_activity()) }
fun initAdWeight(data: UserTaskMsgBean) {
AppConfig.isVideoSleep=data.vedioRules.isVedioSleep
videoAdingManager.initAdWeight(data.vedioRules.csJ_VEDIO.rate,
data.vedioRules.ylH_VEDIO.rate,
data.vedioRules.sdhZ_VEDIO.rate,
data.vedioRules.fL_VEDIO.rate,
data.vedioRules.corAl_VIDEO.rate,
data.vedioRules.csjfulL_VEDIO.rate,
data.vedioRules.kS_VEDIO.rate)
LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} " +
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} " +
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} " +
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} " +
"shWeight:${data.vedioRules.corAl_VIDEO.rate} " +
"flWeight:${data.vedioRules.fL_VEDIO.rate} " +
"ksWeight:${data.vedioRules.kS_VEDIO.rate} ")
// 广告视频数
AppConfig.csjVideoAdCount = data.vedioRules.csJ_VEDIO.surplus
AppConfig.ylhAdCount = data.vedioRules.ylH_VEDIO.surplus
AppConfig.wnVideoAdCount = data.vedioRules.sdhZ_VEDIO.surplus
AppConfig.flVideoAdCount = data.vedioRules.fL_VEDIO.surplus
AppConfig.csjFullVedioAdCount = data.vedioRules.csjfulL_VEDIO.surplus
AppConfig.shVideoAdCount = data.vedioRules.corAl_VIDEO.surplus
AppConfig.ksVideoAdCount = data.vedioRules.kS_VEDIO.surplus
LogUtil.d(TAG, "首页视频数:csjCount:${AppConfig.csjVideoAdCount} " +
"ylhCount:${AppConfig.ylhAdCount} " +
"sdhzCount:${AppConfig.wnVideoAdCount} " +
"csjFullCount:${AppConfig.csjFullVedioAdCount} " +
"shCount:${AppConfig.shVideoAdCount} " +
"flCount:${AppConfig.flVideoAdCount} " +
"ksCount:${AppConfig.ksVideoAdCount} ")
}
}
\ No newline at end of file
package com.mints.goldspace.manager
import android.app.Application
import com.ireader.ireadersdk.IreaderApi
import java.lang.Exception
/**
* 描述:掌阅书城
* 作者:孟崔广
*/
object ZhangyueManager {
private const val APPID = ""
fun onCreateIreader(application: Application) {
try {
IreaderApi.attachBaseContext(application)
IreaderApi.onCreate(application, APPID)
} catch (e: Exception) {
e.printStackTrace()
}
}
}
\ No newline at end of file
//package com.mints.goldspace.manager
//
//import android.app.Application
//import com.ireader.ireadersdk.IreaderApi
//import java.lang.Exception
//
///**
// * 描述:掌阅书城
// * 作者:孟崔广
// */
//object ZhangyueManager {
//
// private const val APPID = ""
//
// fun onCreateIreader(application: Application) {
// try {
// IreaderApi.attachBaseContext(application)
// IreaderApi.onCreate(application, APPID)
// } catch (e: Exception) {
// e.printStackTrace()
// }
// }
//}
\ No newline at end of file
package com.mints.goldspace.mvp.model;
import java.io.Serializable;
public class ClickTurnBean implements Serializable {
/**
* config : {"count":250,"type":"coin","key":"t5","index":5,"title":"250金币"}
* sumCoin : 7580
* coinKey : 2108214495303800003
* turntableKey : 2108214495303800003
*/
private ConfigBean config;
private int sumCoin;
private String coinKey;
private String turntableKey;
public ConfigBean getConfig() {
return config;
}
public void setConfig(ConfigBean config) {
this.config = config;
}
public int getSumCoin() {
return sumCoin;
}
public void setSumCoin(int sumCoin) {
this.sumCoin = sumCoin;
}
public String getCoinKey() {
return coinKey;
}
public void setCoinKey(String coinKey) {
this.coinKey = coinKey;
}
public String getTurntableKey() {
return turntableKey;
}
public void setTurntableKey(String turntableKey) {
this.turntableKey = turntableKey;
}
public class ConfigBean implements Serializable{
/**
* count : 250
* type : coin
* key : t5
* index : 5
* title : 250金币
*/
private int count;
private String type;
private String key;
private int index;
private String title;
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
}
package com.mints.goldspace.mvp.model;
import java.io.Serializable;
import java.util.List;
public class TurnBean implements Serializable {
/**
* configs : [{"count":150,"type":"coin","key":"t1","index":0,"title":"150金币"},{"count":10,"type":"cash","key":"t2","index":1,"title":"现金10元"},{"count":200,"type":"coin","key":"t8","index":2,"title":"200金币"},{"count":100,"type":"coin","key":"t3","index":3,"title":"100金币"},{"count":300,"type":"coin","key":"t4","index":4,"title":"300金币"},{"count":250,"type":"coin","key":"t5","index":5,"title":"250金币"},{"count":350,"type":"coin","key":"t6","index":6,"title":"350金币"},{"count":40,"type":"cash","key":"t7","index":7,"title":"现金40元"}]
* max : 30
*/
private List<ConfigsBean> configs;
private int max;
private String titleMsg;
private int surplus;
private List<BottomsBean> bottoms;
public List<ConfigsBean> getConfigs() {
return configs;
}
public String getTitleMsg() {
return titleMsg;
}
public void setTitleMsg(String titleMsg) {
this.titleMsg = titleMsg;
}
public int getSurplus() {
return surplus;
}
public void setSurplus(int surplus) {
this.surplus = surplus;
}
public void setConfigs(List<ConfigsBean> configs) {
this.configs = configs;
}
public int getMax() {
return max;
}
public void setMax(int max) {
this.max = max;
}
public List<BottomsBean> getBottoms() {
return bottoms;
}
public void setBottoms(List<BottomsBean> bottoms) {
this.bottoms = bottoms;
}
public class BottomsBean implements Serializable {
/**
* title : 高额赚
* icon : https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg_goodmoney/img/readnews.png
* toOtherKey : 1
* rewardTitle : 抽奖 +1
*/
private String title;
private String icon;
private String toOtherKey;
private String rewardTitle;
private ParamsBean params;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getToOtherKey() {
return toOtherKey;
}
public void setToOtherKey(String toOtherKey) {
this.toOtherKey = toOtherKey;
}
public String getRewardTitle() {
return rewardTitle;
}
public void setRewardTitle(String rewardTitle) {
this.rewardTitle = rewardTitle;
}
public class ParamsBean implements Serializable {
private int max;
private int complete;
private int coin;
public int getMax() {
return max;
}
public int getComplete() {
return complete;
}
public int getCoin() {
return coin;
}
}
}
public class ConfigsBean implements Serializable {
/**
* count : 150
* type : coin
* key : t1
* index : 0
* title : 150金币
*/
private int count;
private String type;
private String key;
private int index;
private String title;
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
}
......@@ -21,6 +21,7 @@ public class VedioRulesBean implements Serializable {
private KsVedioBean KS_VEDIO;
private boolean flVideoFlag;
private boolean vedioSleep;
public class CsjVedioBean implements Serializable {
private int surplus;//剩余可看视频数
......@@ -142,4 +143,8 @@ public class VedioRulesBean implements Serializable {
public boolean isFlVideoFlag() {
return flVideoFlag;
}
public boolean isVedioSleep() {
return vedioSleep;
}
}
......@@ -81,6 +81,7 @@ public class AwardPresenter extends BasePresenter<AwardView> {
public void saveTerminalInfo() {
DeviceInfo deviceInfo = DeviceInfo.Companion.getInstance();
HashMap<String, Object> vo = new HashMap<>();
RxjavaUtil.executeRxTask(new CommonRxTask<String>("") {
@Override
public void doInIOThread() {
......@@ -89,7 +90,6 @@ public class AwardPresenter extends BasePresenter<AwardView> {
@Override
public void doInUIThread() {
HashMap<String, Object> vo = new HashMap<>();
String macAddress = deviceInfo.getMacAddress();
if (!TextUtils.isEmpty(macAddress)) {
String mac = macAddress.replace(":", "");
......@@ -108,38 +108,51 @@ public class AwardPresenter extends BasePresenter<AwardView> {
if (!TextUtils.isEmpty(MintsApplication.OAID)) {
vo.put("oaid", MintsApplication.OAID);
}
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
new BaseSubscriber<BaseResponse<UserBean>>() {
@Override
public void onCompleted() {
if (isLinkView()) return;
view.hideLoading();
}
@Override
public void onError(Throwable e) {
if (isLinkView()) return;
view.hideLoading();
}
@Override
public void onNext(BaseResponse<UserBean> baseResponse) {
if (isLinkView()) return;
int code = baseResponse.getStatus();
String message = baseResponse.getMessage();
switch (code) {
case 200://成功
break;
default:
view.showToast(message);
break;
}
}
});
RxjavaUtil.executeRxTask(new CommonRxTask<String>("") {
@Override
public void doInIOThread() {
setT(deviceInfo.getRunningApp());
}
@Override
public void doInUIThread() {
vo.put("appRunningPkgList", getT());
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
new BaseSubscriber<BaseResponse<UserBean>>() {
@Override
public void onCompleted() {
if (isLinkView()) return;
view.hideLoading();
}
@Override
public void onError(Throwable e) {
if (isLinkView()) return;
view.hideLoading();
}
@Override
public void onNext(BaseResponse<UserBean> baseResponse) {
if (isLinkView()) return;
int code = baseResponse.getStatus();
String message = baseResponse.getMessage();
switch (code) {
case 200://成功
break;
default:
view.showToast(message);
break;
}
}
});
}
});
}
});
}
......@@ -199,53 +212,4 @@ public class AwardPresenter extends BasePresenter<AwardView> {
});
}
public void riskinfo() {
DeviceInfo deviceInfo = DeviceInfo.Companion.getInstance();
RxjavaUtil.executeRxTask(new CommonRxTask<String>("") {
@Override
public void doInIOThread() {
setT(deviceInfo.getAppInfoMap());
}
@Override
public void doInUIThread() {
HashMap<String, Object> vo = new HashMap<>();
vo.put("androidid", deviceInfo.getAndroidId(null));
vo.put("os", "android");
vo.put("model", deviceInfo.getBrand() + " " + deviceInfo.getMobileModel());
vo.put("uuid", new DeviceUuidFactory().getDeviceUuid());
vo.put("osversion", deviceInfo.getOSVersion());
vo.put("appversion", deviceInfo.getVersionName());
vo.put("applist", getT());
vo.put("eventid", Constant.RISK_EVENT_ID_TASK);
vo.put("ischarge", deviceInfo.isCharging());
vo.put("isusbdebug", deviceInfo.getGetUsbStatus());
vo.put("iswifi", deviceInfo.getGetWifiConnected());
vo.put("isroot", deviceInfo.isRoot());
vo.put("isvpn", deviceInfo.isVPN());
vo.put("memory", deviceInfo.getTotalMemory() + "+" + deviceInfo.getTotalStorage());
vo.put("operator", deviceInfo.getOperator());
vo.put("idfa", "");
vo.put("imei", deviceInfo.getIMEI());
vo.put("oaid", MintsApplication.OAID);
AppHttpManager.getInstance(loanApplication)
.call(loanService.riskinfo(vo),
new BaseSubscriber<BaseResponse<Object>>() {
@Override
public void onCompleted() {
if (isLinkView()) return;
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(BaseResponse<Object> baseResponse) {
}
});
}
});
}
}
......@@ -8,6 +8,7 @@ import com.mints.goldspace.common.Constant;
import com.mints.goldspace.common.DeviceInfo;
import com.mints.goldspace.manager.AppHttpManager;
import com.mints.goldspace.manager.ShumeiManager;
import com.mints.goldspace.manager.TrackManager;
import com.mints.goldspace.manager.UserManager;
import com.mints.goldspace.mvp.model.BaseResponse;
import com.mints.goldspace.mvp.model.DrawcashBean;
......@@ -152,7 +153,7 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
vo.put("oaid", MintsApplication.OAID);
}
riskinfo(deviceInfo, getT());
TrackManager.getInstance().riskinfo();
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
......@@ -310,47 +311,4 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
}
});
}
/**
* 风控信息
*/
private void riskinfo(DeviceInfo deviceInfo, String appPkgList) {
HashMap<String, Object> vo = new HashMap<>();
vo.put("androidid", deviceInfo.getAndroidId(null));
vo.put("os", "android");
vo.put("model", deviceInfo.getBrand() + " " + deviceInfo.getMobileModel());
vo.put("uuid", new DeviceUuidFactory().getDeviceUuid());
vo.put("osversion", deviceInfo.getOSVersion());
vo.put("appversion", deviceInfo.getVersionName());
vo.put("applist", appPkgList);
vo.put("eventid", Constant.RISK_EVENT_ID_DRAWCASH);
vo.put("ischarge", deviceInfo.isCharging());
vo.put("isusbdebug", deviceInfo.getGetUsbStatus());
vo.put("iswifi", deviceInfo.getGetWifiConnected());
vo.put("isroot", deviceInfo.isRoot());
vo.put("isvpn", deviceInfo.isVPN());
vo.put("memory", deviceInfo.getTotalMemory() + "+" + deviceInfo.getTotalStorage());
vo.put("operator", deviceInfo.getOperator());
vo.put("idfa", "");
vo.put("imei", deviceInfo.getIMEI());
vo.put("oaid", MintsApplication.OAID);
AppHttpManager.getInstance(loanApplication)
.call(loanService.riskinfo(vo),
new BaseSubscriber<BaseResponse<Object>>() {
@Override
public void onCompleted() {
if (isLinkView()) return;
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(BaseResponse<Object> baseResponse) {
}
});
}
}
......@@ -4,10 +4,7 @@ import android.text.TextUtils
import com.mints.goldspace.MintsApplication
import com.mints.goldspace.common.Constant
import com.mints.goldspace.common.DeviceInfo
import com.mints.goldspace.manager.AppHttpManager
import com.mints.goldspace.manager.JpushManager
import com.mints.goldspace.manager.ShumeiManager
import com.mints.goldspace.manager.UserManager
import com.mints.goldspace.manager.*
import com.mints.goldspace.mvp.model.BaseResponse
import com.mints.goldspace.mvp.model.UserBean
import com.mints.goldspace.mvp.views.LoginView
......@@ -251,7 +248,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
vo["shumeiId"] = ShumeiManager.getInstance().getShumeiDeviceId()
vo["appPkgList"] = t.toString()
riskinfo(deviceInfo, t.toString())
TrackManager.getInstance().riskinfo()
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
......@@ -277,46 +274,6 @@ class LoginPresenter : BasePresenter<LoginView>() {
})
}
})
}
/**
* 风控信息
*/
fun riskinfo(deviceInfo: DeviceInfo, appPkgList: String) {
val vo = HashMap<String, Any>()
vo["androidid"] = deviceInfo.getAndroidId(null)
vo["os"] = "android"
vo["model"] = deviceInfo.brand + " " + deviceInfo.mobileModel
vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["applist"] = appPkgList
vo["eventid"] = Constant.RISK_EVENT_ID_LOGIN
vo["ischarge"] = deviceInfo.isCharging
vo["isusbdebug"] = deviceInfo.getUsbStatus
vo["iswifi"] = deviceInfo.getWifiConnected
vo["isroot"] = deviceInfo.isRoot
vo["isvpn"] = deviceInfo.isVPN
vo["memory"] = deviceInfo.totalMemory + "+" + deviceInfo.totalStorage
vo["operator"] = deviceInfo.operator
vo["idfa"] = ""
vo["imei"] = deviceInfo.iMEI
vo["oaid"] = MintsApplication.OAID
AppHttpManager.getInstance(loanApplication)
.call(loanService.riskinfo(vo),
object : BaseSubscriber<BaseResponse<Object>>() {
override fun onCompleted() {
}
override fun onError(e: Throwable) {
}
override fun onNext(baseResponse: BaseResponse<Object>) {
}
})
}
}
\ No newline at end of file
package com.mints.goldspace.mvp.presenters;
import android.app.Activity;
import android.text.TextUtils;
import com.google.gson.JsonObject;
import com.mints.goldspace.MintsApplication;
import com.mints.goldspace.common.AppConfig;
import com.mints.goldspace.common.Constant;
import com.mints.goldspace.common.DeviceInfo;
import com.mints.goldspace.manager.AppHttpManager;
import com.mints.goldspace.manager.ChannelManager;
import com.mints.goldspace.manager.SimulatorManager;
import com.mints.goldspace.manager.UserWeight;
import com.mints.goldspace.mvp.model.BaseResponse;
import com.mints.goldspace.mvp.model.CommonParamBean;
import com.mints.goldspace.mvp.model.ServerAdBean;
import com.mints.goldspace.mvp.model.UserBean;
import com.mints.goldspace.mvp.model.UserTaskMsgBean;
import com.mints.goldspace.utils.AccessibilityUtils;
import com.mints.goldspace.utils.DeviceUuidFactory;
import com.mints.goldspace.utils.rxutil.CommonRxTask;
import com.mints.goldspace.utils.rxutil.RxjavaUtil;
import com.mints.library.net.neterror.BaseSubscriber;
import com.mints.library.net.neterror.Throwable;
......@@ -69,6 +78,9 @@ public class TrackPresenter extends BaseTrackPresenter {
@Override
public void onNext(BaseResponse<Object> baseResponse) {
if (TextUtils.equals(Constant.EVENT_TYPE_ONE, eventType)) {
getAdWeight();
}
}
});
}
......@@ -305,4 +317,90 @@ public class TrackPresenter extends BaseTrackPresenter {
}
});
}
/**
* 获取权重
*/
public void getAdWeight() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.vedioPlans(),
new BaseSubscriber<BaseResponse<UserTaskMsgBean>>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(BaseResponse<UserTaskMsgBean> baseResponse) {
UserWeight.INSTANCE.initAdWeight(baseResponse.getData());
}
});
}
public void riskinfo() {
DeviceInfo deviceInfo = DeviceInfo.Companion.getInstance();
HashMap<String, Object> vo = new HashMap<>();
RxjavaUtil.executeRxTask(new CommonRxTask<String>("") {
@Override
public void doInIOThread() {
setT(deviceInfo.getAppInfoMap());
}
@Override
public void doInUIThread() {
vo.put("androidid", deviceInfo.getAndroidId(null));
vo.put("os", "android");
vo.put("model", deviceInfo.getBrand() + " " + deviceInfo.getMobileModel());
vo.put("uuid", new DeviceUuidFactory().getDeviceUuid());
vo.put("osversion", deviceInfo.getOSVersion());
vo.put("appversion", deviceInfo.getVersionName());
vo.put("applist", getT());
vo.put("eventid", Constant.RISK_EVENT_ID_TASK);
vo.put("ischarge", deviceInfo.isCharging());
vo.put("isusbdebug", deviceInfo.getGetUsbStatus());
vo.put("iswifi", deviceInfo.getGetWifiConnected());
vo.put("isroot", deviceInfo.isRoot());
vo.put("isvpn", deviceInfo.isVPN());
vo.put("memory", deviceInfo.getTotalMemory() + "+" + deviceInfo.getTotalStorage());
vo.put("operator", deviceInfo.getOperator());
vo.put("idfa", "");
vo.put("imei", deviceInfo.getIMEI());
vo.put("oaid", MintsApplication.OAID);
vo.put("isSimulator", SimulatorManager.INSTANCE.isEmulator());
vo.put("isAccessibility", AccessibilityUtils.isAccessibilityEnabled());
RxjavaUtil.executeRxTask(new CommonRxTask<String>("") {
@Override
public void doInIOThread() {
setT(deviceInfo.getRunningApp());
}
@Override
public void doInUIThread() {
vo.put("appRunningPkgList", getT());
AppHttpManager.getInstance(loanApplication)
.call(loanService.riskinfo(vo),
new BaseSubscriber<BaseResponse<Object>>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(BaseResponse<Object> baseResponse) {
}
});
}
});
}
});
}
}
package com.mints.goldspace.mvp.presenters
import android.text.TextUtils
import com.google.gson.Gson
import com.google.gson.JsonObject
import com.google.gson.reflect.TypeToken
import com.mints.goldspace.MintsApplication
import com.mints.goldspace.common.DeviceInfo
import com.mints.goldspace.manager.AppHttpManager
import com.mints.goldspace.manager.ShumeiManager
import com.mints.goldspace.manager.UserManager
import com.mints.goldspace.mvp.model.BaseResponse
import com.mints.goldspace.mvp.model.ClickTurnBean
import com.mints.goldspace.mvp.model.TurnBean
import com.mints.goldspace.mvp.model.UserBean
import com.mints.goldspace.mvp.views.TurnTableView
import com.mints.goldspace.utils.DeviceUuidFactory
import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable
import java.util.*
class TurnTablePresenter : BasePresenter<TurnTableView>() {
fun getTurnMsg() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.getTurnMsg(),
object : BaseSubscriber<BaseResponse<TurnBean>>() {
override fun onCompleted() {
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
}
override fun onNext(baseResponse: BaseResponse<TurnBean>) {
if (isLinkView) return
val code = baseResponse.getStatus()
val message = baseResponse.getMessage()
when (code) {
200 -> {
view.getTurnTableSuc(baseResponse.data)
}
else -> view.showToast(message)
}
}
})
}
fun addTurnToOtherMsg(toOtherKey: String) {
val vo = HashMap<String, Any>()
vo["toOther"] = toOtherKey
AppHttpManager.getInstance(loanApplication)
.call(loanService.addTurnToOtherMsg(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
override fun onCompleted() {
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
}
override fun onNext(baseResponse: BaseResponse<Any>) {
if (isLinkView) return
val code = baseResponse.getStatus()
val message = baseResponse.getMessage()
when (code) {
200 -> {
}
else -> view.showToast(message)
}
}
})
}
fun cashoutLeaders() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.cashoutLeaders(),
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
}
override fun onError(e: Throwable) {
}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return
val code = baseResponse.getStatus()
val message = baseResponse.getMessage()
when (code) {
200 -> {
val data = baseResponse.data
if (data.get("list") != null) {
val listArray = Gson().fromJson(data.get("list"),
object : TypeToken<ArrayList<String>>() {}.type) as ArrayList<String>
view.cashoutLeadersSuc(listArray)
}
}
else -> view.showToast(message)
}
}
})
}
fun clickForTurn() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.clickForTurn(),
object : BaseSubscriber<BaseResponse<ClickTurnBean>>() {
override fun onCompleted() {
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
}
override fun onNext(baseResponse: BaseResponse<ClickTurnBean>) {
if (isLinkView) return
val code = baseResponse.getStatus()
val message = baseResponse.getMessage()
when (code) {
200 -> {
view.clickForTurnSuc(baseResponse.data)
}
else -> view.showToast(message)
}
}
})
}
/**
* 游客登录
*/
fun userLogin() {
val vo = HashMap<String, Any>()
vo["device"] = DeviceUuidFactory().deviceUuid.toString()
vo["shumeiId"] = ShumeiManager.getInstance().shumeiDeviceId
AppHttpManager.getInstance(loanApplication)
.call(loanService.visitorlogin(vo),
object : BaseSubscriber<BaseResponse<UserBean>>() {
override fun onCompleted() {
}
override fun onError(e: Throwable) {
}
override fun onNext(baseResponse: BaseResponse<UserBean>) {
if (isLinkView) return
val code = baseResponse.getStatus()
val message = baseResponse.getMessage()
val data: UserBean? = baseResponse.getData()
when (code) {
200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo()
}
else -> view.showToast(message)
}
}
})
}
/**
* 提交设备信息
*
* @param context
*/
fun saveTerminalInfo() {
val vo = HashMap<String, Any>()
val deviceInfo: DeviceInfo = DeviceInfo.instance
val macAddress: String = deviceInfo.getMacAddress()
val mac = macAddress.replace(":", "")
vo["mac"] = mac
vo["mac1"] = macAddress
vo["androidid"] = deviceInfo.getAndroidId(null)
vo["imei"] = deviceInfo.iMEI
if (!TextUtils.isEmpty(MintsApplication.OAID)) {
vo["oaid"] = MintsApplication.OAID
}
vo["os"] = "android"
vo["model"] = deviceInfo.newModel
vo["uuid"] = DeviceUuidFactory().deviceUuid
vo["osversion"] = deviceInfo.oSVersion
vo["appversion"] = deviceInfo.versionName
vo["shumeiId"] = ShumeiManager.getInstance().getShumeiDeviceId()
AppHttpManager.getInstance(loanApplication)
.call(loanService.saveTerminalInfo(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
}
override fun onNext(baseResponse: BaseResponse<Any>) {
if (isLinkView) return
val code = baseResponse.status
when (code) {
200 -> {
getTurnMsg()
}
}
}
})
}
}
\ No newline at end of file
package com.mints.goldspace.mvp.views
import com.mints.goldspace.mvp.model.ClickTurnBean
import com.mints.goldspace.mvp.model.TurnBean
interface TurnTableView : BaseView {
fun getTurnTableSuc(data: TurnBean)
fun cashoutLeadersSuc(data:ArrayList<String>)
fun clickForTurnSuc(data: ClickTurnBean)
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import com.mints.goldspace.BuildConfig;
import com.mints.goldspace.mvp.model.AccountMsgBean;
import com.mints.goldspace.mvp.model.BannerBean;
import com.mints.goldspace.mvp.model.BaseResponse;
import com.mints.goldspace.mvp.model.ClickTurnBean;
import com.mints.goldspace.mvp.model.CommonParamBean;
import com.mints.goldspace.mvp.model.DrawcashBean;
import com.mints.goldspace.mvp.model.DrawcashRecordBean;
......@@ -21,6 +22,7 @@ import com.mints.goldspace.mvp.model.MyInfo;
import com.mints.goldspace.mvp.model.ServerAdBean;
import com.mints.goldspace.mvp.model.SignCardBean;
import com.mints.goldspace.mvp.model.TaskCpdBean;
import com.mints.goldspace.mvp.model.TurnBean;
import com.mints.goldspace.mvp.model.UserBean;
import com.mints.goldspace.mvp.model.UserTaskMsgBean;
import com.mints.goldspace.mvp.model.Version;
......@@ -578,6 +580,47 @@ public interface LoanService {
@POST("common/baseCarrierAdcodeConfig")
Observable<BaseResponse<ServerAdBean>> baseCarrierAdcodeConfig();
/**
* 获取大转盘信息
*
* @return
*/
@POST("api/turn/getTurnMsg")
Observable<BaseResponse<TurnBean>> getTurnMsg();
/**
* 点击获取转盘信息
*
* @return
*/
@POST("api/turn/clickForTurn")
Observable<BaseResponse<ClickTurnBean>> clickForTurn();
/**
* 提现列表展示
*
* @return
*/
@POST("common/cashoutLeadersForApp")
Observable<BaseResponse<JsonObject>> cashoutLeaders();
/**
* 大转盘点击入口
*
* @return
*/
@POST("api/turn/addTurnToOtherMsg")
Observable<BaseResponse<Object>> addTurnToOtherMsg(@Body Map<String, Object> vo);
/**
* 获取权重信息
*
* @return
*/
@POST("api/vedioPlans")
Observable<BaseResponse<UserTaskMsgBean>> vedioPlans();
/**
* 默认http工厂
*/
......
......@@ -8,7 +8,6 @@ import com.mints.goldspace.R
import com.mints.goldspace.common.Constant
import com.mints.goldspace.manager.BxmManager
import com.mints.goldspace.manager.RsNewsManager
import com.mints.goldspace.manager.SceneManager
import com.mints.goldspace.mvp.model.AccountMsgBean
import com.mints.goldspace.mvp.presenters.AccountMergePresenter
import com.mints.goldspace.mvp.views.AccountMergeView
......@@ -146,7 +145,7 @@ class AccountMergeActivity : BaseActivity(), View.OnClickListener, AccountMergeV
override fun toKeepAccountSuc() {
showToast("账号合并成功!")
SceneManager.signIn(this)
// SceneManager.signIn(this)
RsNewsManager.init(baseApplication)
BxmManager.bindUserData()
......
......@@ -174,7 +174,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
Constant.CARRIER_GAME_ONLINE, Constant.CARRIER_EATMEAL,
Constant.CARRIER_RUISHINEWS_CHALLANGE, Constant.CARRIER_ZHANGYUE_CHALLENGE,
Constant.CARRIER_XMLY_CHALLENGE, Constant.CARRIER_SHARE_NEWS,
Constant.CARRIER_MC_FIRSTDOWNLOAD-> {
Constant.CARRIER_MC_FIRSTDOWNLOAD -> {
val vo = HashMap<String, Any>()
vo["carrierType"] = carrierType
awardPresenter.reportAddCoinMsg(vo)
......@@ -500,7 +500,10 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
* 获取激励视频
*/
private fun awardVideo() {
if (videoAdingManager.videoFinishFlag) {
if (AppConfig.isVideoSleep) {
showToast("加载失败,请稍后重试。")
return
} else if (videoAdingManager.videoFinishFlag) {
showToast("今日视频已看完,请明天再来吧")
return
}
......@@ -527,7 +530,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
override fun videoAdingListenerFail(adType: String) {
loadVideoFailCount++
if (loadVideoFailCount >= 2) {
if (loadVideoFailCount >= 3) {
hideLoading()
showToast("加载失败,请稍后重试!")
} else {
......@@ -606,7 +609,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 上传风控信息
if (riskFlag) {
awardPresenter.riskinfo()
TrackManager.getInstance().riskinfo()
}
}
......
......@@ -316,7 +316,6 @@ class DrawcashActivity : BaseActivity(),
// 广告视频数
AppConfig.csjVideoAdCount = 10
AppConfig.ylhAdCount = 10
AppConfig.csjFullVedioAdCount = 10
}
/**
......
......@@ -14,6 +14,7 @@ import com.mints.goldspace.call.business.VideoDBHelper
import com.mints.goldspace.call.detail.DetailApplyActivity
import com.mints.goldspace.call.permission.PermissionActivity
import com.mints.goldspace.call.permission.PermissionManager
import com.mints.goldspace.common.AppConfig
import com.mints.goldspace.common.Constant
import com.mints.goldspace.manager.UserManager
import com.mints.goldspace.mvp.model.VideoAdingBean
......@@ -163,7 +164,10 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
* 获取激励视频
*/
private fun awardVideo() {
if (videoAdingManager.videoFinishFlag) {
if (AppConfig.isVideoSleep) {
showToast("加载失败,请稍后重试。")
return
} else if (videoAdingManager.videoFinishFlag) {
showToast("今日视频已看完,请明天再来吧")
return
}
......@@ -187,7 +191,7 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
override fun videoAdingListenerFail(adType: String) {
loadVideoFailCount++
if (loadVideoFailCount >= 2) {
if (loadVideoFailCount >= 3) {
hideLoading()
showToast("加载失败,请稍后重试!")
} else {
......
......@@ -8,7 +8,6 @@ import android.view.View
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction
import com.ireader.ireadersdk.IreaderApi
import com.mints.goldspace.R
import com.mints.goldspace.ad.video.VideoAdingManager
import com.mints.goldspace.common.AppConfig
......@@ -86,8 +85,6 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override fun isApplyKitKatTranslucency() = false
public override fun onDestroy() {
IreaderApi.onAppExit()
super.onDestroy()
TTPreLoadCarrierExpressManager.getInstance().onDestroy()
......@@ -242,7 +239,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
private fun clickTab3Layout() {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_THREE
if (panFragment == null) {
panFragment = PanFragment()
panFragment = TurnTableFragment()
}
addOrShowFragment(supportFragmentManager, panFragment!!, Constant.FRAGMENT_TAG_THREE)
tab_iv_one.isSelected = false
......
......@@ -99,7 +99,7 @@ class MobileLoginActivity : BaseActivity(), LoginView, View.OnClickListener {
// 每日任务是否刷新任务数
TrackManager.getInstance().innerApp()
SceneManager.signIn(this)
// SceneManager.signIn(this)
RsNewsManager.init(baseApplication)
BxmManager.bindUserData()
......
......@@ -7,6 +7,7 @@ import com.mints.goldspace.R
import com.mints.goldspace.ad.video.VideoAdingManager
import com.mints.goldspace.common.Constant
import com.mints.goldspace.ad.express.TTPreLoadCarrierExpressManager
import com.mints.goldspace.common.AppConfig
import com.mints.goldspace.manager.TtCsjAdManager
import com.mints.goldspace.mvp.model.MorningClockBean
import com.mints.goldspace.mvp.model.VideoAdingBean
......@@ -107,7 +108,10 @@ class MorningClockActivity : BaseActivity()
* 获取激励视频
*/
private fun awardVideo() {
if (videoAdingManager.videoFinishFlag) {
if (AppConfig.isVideoSleep) {
showToast("加载失败,请稍后重试。")
return
} else if (videoAdingManager.videoFinishFlag) {
showToast("今日视频已看完,请明天再来吧")
return
}
......@@ -131,7 +135,7 @@ class MorningClockActivity : BaseActivity()
override fun videoAdingListenerFail(adType: String) {
loadVideoFailCount++
if (loadVideoFailCount >= 2) {
if (loadVideoFailCount >= 3) {
hideLoading()
showToast("加载失败,请稍后重试!")
} else {
......
......@@ -51,10 +51,10 @@ class WrapperActivity : BaseActivity(), View.OnClickListener {
tv_title.text = "新闻"
currentFragment = RsNewsFragment()
}
Constant.WRAPPER_TYPE_BOOK -> {
tv_title.text = "书城"
currentFragment = MyZhangyueFragment()
}
// Constant.WRAPPER_TYPE_BOOK -> {
// tv_title.text = "书城"
// currentFragment = MyZhangyueFragment()
// }
Constant.WRAPPER_TYPE_FRIENDS -> {
tv_title.text = "瓜分百万现金福利"
currentFragment = FriendsFragment(true)
......
......@@ -16,7 +16,6 @@ import com.mints.goldspace.login.LoginApi
import com.mints.goldspace.login.OnLoginListener
import com.mints.goldspace.manager.BxmManager
import com.mints.goldspace.manager.RsNewsManager
import com.mints.goldspace.manager.SceneManager
import com.mints.goldspace.manager.TrackManager
import com.mints.goldspace.manager.YwhzManager
import com.mints.goldspace.mvp.model.WXInfo
......@@ -126,7 +125,7 @@ class WxLoginActivity : BaseActivity()
// 每日任务是否刷新任务数
TrackManager.getInstance().innerApp()
SceneManager.signIn(this)
// SceneManager.signIn(this)
RsNewsManager.init(baseApplication)
BxmManager.bindUserData()
......
......@@ -16,6 +16,7 @@ import android.view.KeyEvent;
import android.view.View;
import android.view.WindowManager;
import com.mints.goldspace.BuildConfig;
import com.mints.goldspace.MintsApplication;
import com.mints.goldspace.R;
import com.mints.goldspace.common.Constant;
......@@ -34,6 +35,9 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// if (!BuildConfig.DEBUG) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
// }
if (android.os.Build.VERSION.SDK_INT != Build.VERSION_CODES.O) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
......
package com.mints.goldspace.ui.adapter;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.daimajia.androidanimations.library.Techniques;
import com.daimajia.androidanimations.library.YoYo;
import com.mints.goldspace.R;
import com.mints.goldspace.mvp.model.TurnBean;
import com.mints.goldspace.utils.rxutil.CommonRxTask;
import com.mints.goldspace.utils.rxutil.RxjavaUtil;
import com.mints.library.utils.GlideUtils;
import java.util.List;
public class TurnTableAdapter extends BaseAdapter {
private List<TurnBean.BottomsBean> orders;
private Activity activity;
private YoYo.AnimationComposer rope;
public TurnTableAdapter(Activity activity, List<TurnBean.BottomsBean> orders) {
this.orders = orders;
this.activity = activity;
rope = YoYo.with(Techniques.Pulse).duration(1000).repeat(0);
}
@Override
public int getCount() {
return orders == null ? 0 : orders.size();
}
@Override
public Object getItem(int position) {
return orders.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@SuppressLint("WrongViewCast")
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder viewHolder;
if (convertView == null) {
LayoutInflater inflater = LayoutInflater.from(activity);
convertView = inflater.inflate(R.layout.item_list_turn, null);
viewHolder = new ViewHolder();
viewHolder.ic_turn_icon = convertView.findViewById(R.id.ic_turn_icon);
viewHolder.tv_turn_top = convertView.findViewById(R.id.tv_turn_top);
viewHolder.tv_turn_bottom = convertView.findViewById(R.id.tv_turn_bottom);
convertView.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) convertView.getTag();
}
TurnBean.BottomsBean data = orders.get(position);
if (data != null) {
GlideUtils.loadImageView(activity, data.getIcon(), viewHolder.ic_turn_icon);
viewHolder.tv_turn_top.setText(TextUtils.isEmpty(data.getRewardTitle()) ? "" : data.getRewardTitle());
viewHolder.tv_turn_bottom.setText(data.getTitle());
if (!TextUtils.isEmpty(data.getRewardTitle())) {
RxjavaUtil.executeRxTask(new CommonRxTask<String>("") {
@Override
public void doInIOThread() {
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
@Override
public void doInUIThread() {
rope.playOn(viewHolder.ic_turn_icon);
}
});
}
}
return convertView;
}
class ViewHolder {
public ImageView ic_turn_icon;
public TextView tv_turn_top;
public TextView tv_turn_bottom;
}
}
......@@ -235,7 +235,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 新人福利 放到个人中心展示 防止首页红包转动异常
// 设置视频权重
initAdWeight(data)
UserWeight.initAdWeight(data)
initExpress(data.flowAdRules)
......@@ -572,41 +572,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
powerDialog!!.show()
}
/**
* 设置视频权重
*/
private fun initAdWeight(data: UserTaskMsgBean) {
videoAdingManager?.initAdWeight(data.vedioRules.csJ_VEDIO.rate,
data.vedioRules.ylH_VEDIO.rate,
data.vedioRules.sdhZ_VEDIO.rate,
data.vedioRules.fL_VEDIO.rate,
data.vedioRules.corAl_VIDEO.rate,
data.vedioRules.csjfulL_VEDIO.rate,
data.vedioRules.kS_VEDIO.rate)
LogUtil.d(TAG, "首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} " +
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} " +
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} " +
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} " +
"shWeight:${data.vedioRules.corAl_VIDEO.rate} " +
"flWeight:${data.vedioRules.fL_VEDIO.rate} " +
"ksWeight:${data.vedioRules.kS_VEDIO.rate} ")
// 广告视频数
AppConfig.csjVideoAdCount = data.vedioRules.csJ_VEDIO.surplus
AppConfig.ylhAdCount = data.vedioRules.ylH_VEDIO.surplus
AppConfig.wnVideoAdCount = data.vedioRules.sdhZ_VEDIO.surplus
AppConfig.flVideoAdCount = data.vedioRules.fL_VEDIO.surplus
AppConfig.csjFullVedioAdCount = data.vedioRules.csjfulL_VEDIO.surplus
AppConfig.shVideoAdCount = data.vedioRules.corAl_VIDEO.surplus
AppConfig.ksVideoAdCount = data.vedioRules.kS_VEDIO.surplus
LogUtil.d(TAG, "首页视频数:csjCount:${AppConfig.csjVideoAdCount} " +
"ylhCount:${AppConfig.ylhAdCount} " +
"sdhzCount:${AppConfig.wnVideoAdCount} " +
"csjFullCount:${AppConfig.csjFullVedioAdCount} " +
"shCount:${AppConfig.shVideoAdCount} " +
"flCount:${AppConfig.flVideoAdCount} " +
"ksCount:${AppConfig.ksVideoAdCount} ")
}
private fun initExpress(flowAdRules: FlowAdRulesBean) {
PreLoadExpressManager.init(flowAdRules.csj, flowAdRules.ylh, flowAdRules.ks)
}
......
......@@ -155,12 +155,12 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
fun selectBook() {
// vpFragmentMoney.currentItem = 1
xtFragmentMoney.getTabAt(1)?.select()
if (bookStoreFragment == null) {
bookStoreFragment = ZhangyueFragment()
}
addOrShowFragment(childFragmentManager, bookStoreFragment!!, FRAGMENT_TAG_BOOKSTORE)
// xtFragmentMoney.getTabAt(1)?.select()
// if (bookStoreFragment == null) {
// bookStoreFragment = ZhangyueFragment()
// }
//
// addOrShowFragment(childFragmentManager, bookStoreFragment!!, FRAGMENT_TAG_BOOKSTORE)
}
fun selectXmly() {
......
package com.mints.goldspace.ui.fragment
import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import com.ireader.ireadersdk.IreaderApi
import com.mints.goldspace.R
import com.mints.goldspace.common.AppConfig
import com.mints.goldspace.common.Constant
import com.mints.goldspace.mvp.presenters.BookPresenter
import com.mints.goldspace.mvp.views.BookView
import com.mints.goldspace.ui.activitys.AwardActivity
import com.mints.goldspace.ui.fragment.base.LazyLoadBaseFragment
import com.mints.goldspace.utils.SpanUtils
import kotlinx.android.synthetic.main.fragment_main_zy.*
/**
* 描述:我的-掌阅书城
* 作者:孟崔广
*/
class MyZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChangeListener {
private val bookPresenter by lazy { BookPresenter() }
private var bookFragment: Fragment? = null
override fun getContentViewLayoutID() = R.layout.fragment_main_zy
override fun initViewsAndEvents() {
bookPresenter.attachView(this)
val transaction: FragmentTransaction = supportFragmentManager.beginTransaction()
if (bookFragment == null) {
// bookFragment = IreaderApi.getNovelBookStoreFragment()
bookFragment = IreaderApi.getNovelChannelFragment()
transaction.add(R.id.fragment, bookFragment!!, bookFragment!!::class.java.simpleName)
IreaderApi.setReadChangeListener(this)
} else {
transaction.show(bookFragment!!)
}
transaction.commitAllowingStateLoss()
}
override fun onFragmentFirstVisible() {
}
override fun onFragmentResume() {
super.onFragmentResume()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_ONE) {
bookPresenter.getReadInfo()
}
}
override fun onDestroy() {
super.onDestroy()
IreaderApi.setReadChangeListener(null)
bookPresenter.detachView()
}
override fun onReadStart() {
}
override fun onReadEnd(time: Long) {
// LogUtil.d(TAG, "onReadEnd time:" + time)
// LogUtil.d(TAG, "onReadEnd time(Int):" + (time/1000).toInt())
val seconds = (time / 1000).toInt()
// 阅读5秒以上 保存时长
if (seconds > 5) {
bookPresenter.addReadSeconds(seconds)
}
}
override fun onReadPage(time: Long) {
}
override fun readSecondsSuc(coin: Int) {
if (coin > 0) {
val bundle = Bundle()
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_ZHANGYUE)
bundle.putInt(Constant.MAIN_CUR_COIN, coin)
readyGo(AwardActivity::class.java, bundle)
}
}
override fun readInfo(sumTime: Int, sumCoin: Int, readTime: Int) {
//阅读{10}分钟,奖励{xx}金币,已读{x}分钟
tvZhangContent.visibility = View.VISIBLE
if (readTime >= sumTime) {
tvZhangContent.text = "今日阅读任务已完成"
} else {
tvZhangContent.text = SpanUtils()
.append("阅读").append("${sumTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟, ")
.append("奖励").append("$sumCoin").setForegroundColor(mContext.resources.getColor(R.color.color_cb4a39)).append("金币, ")
.append("已读").append("${readTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟")
.create()
}
}
}
\ No newline at end of file
//package com.mints.goldspace.ui.fragment
//
//import android.os.Bundle
//import android.view.View
//import androidx.fragment.app.Fragment
//import androidx.fragment.app.FragmentTransaction
//import com.ireader.ireadersdk.IreaderApi
//import com.mints.goldspace.R
//import com.mints.goldspace.common.AppConfig
//import com.mints.goldspace.common.Constant
//import com.mints.goldspace.mvp.presenters.BookPresenter
//import com.mints.goldspace.mvp.views.BookView
//import com.mints.goldspace.ui.activitys.AwardActivity
//import com.mints.goldspace.ui.fragment.base.LazyLoadBaseFragment
//import com.mints.goldspace.utils.SpanUtils
//import kotlinx.android.synthetic.main.fragment_main_zy.*
//
///**
// * 描述:我的-掌阅书城
// * 作者:孟崔广
// */
//class MyZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChangeListener {
//
// private val bookPresenter by lazy { BookPresenter() }
// private var bookFragment: Fragment? = null
//
// override fun getContentViewLayoutID() = R.layout.fragment_main_zy
//
// override fun initViewsAndEvents() {
// bookPresenter.attachView(this)
//
// val transaction: FragmentTransaction = supportFragmentManager.beginTransaction()
// if (bookFragment == null) {
//// bookFragment = IreaderApi.getNovelBookStoreFragment()
// bookFragment = IreaderApi.getNovelChannelFragment()
// transaction.add(R.id.fragment, bookFragment!!, bookFragment!!::class.java.simpleName)
// IreaderApi.setReadChangeListener(this)
// } else {
// transaction.show(bookFragment!!)
// }
// transaction.commitAllowingStateLoss()
// }
//
// override fun onFragmentFirstVisible() {
//
// }
//
// override fun onFragmentResume() {
// super.onFragmentResume()
// if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_ONE) {
// bookPresenter.getReadInfo()
// }
// }
//
// override fun onDestroy() {
// super.onDestroy()
//
// IreaderApi.setReadChangeListener(null)
// bookPresenter.detachView()
// }
//
// override fun onReadStart() {
// }
//
// override fun onReadEnd(time: Long) {
//// LogUtil.d(TAG, "onReadEnd time:" + time)
//// LogUtil.d(TAG, "onReadEnd time(Int):" + (time/1000).toInt())
//
// val seconds = (time / 1000).toInt()
// // 阅读5秒以上 保存时长
// if (seconds > 5) {
// bookPresenter.addReadSeconds(seconds)
// }
// }
//
// override fun onReadPage(time: Long) {
// }
//
// override fun readSecondsSuc(coin: Int) {
// if (coin > 0) {
// val bundle = Bundle()
// bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_ZHANGYUE)
// bundle.putInt(Constant.MAIN_CUR_COIN, coin)
// readyGo(AwardActivity::class.java, bundle)
// }
// }
//
// override fun readInfo(sumTime: Int, sumCoin: Int, readTime: Int) {
// //阅读{10}分钟,奖励{xx}金币,已读{x}分钟
// tvZhangContent.visibility = View.VISIBLE
// if (readTime >= sumTime) {
// tvZhangContent.text = "今日阅读任务已完成"
// } else {
// tvZhangContent.text = SpanUtils()
// .append("阅读").append("${sumTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟, ")
// .append("奖励").append("$sumCoin").setForegroundColor(mContext.resources.getColor(R.color.color_cb4a39)).append("金币, ")
// .append("已读").append("${readTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟")
// .create()
// }
// }
//}
\ No newline at end of file
package com.mints.goldspace.ui.fragment
import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import com.ireader.ireadersdk.IreaderApi
import com.mints.goldspace.R
import com.mints.goldspace.common.AppConfig
import com.mints.goldspace.common.Constant
import com.mints.goldspace.mvp.presenters.BookPresenter
import com.mints.goldspace.mvp.views.BookView
import com.mints.goldspace.ui.activitys.AwardActivity
import com.mints.goldspace.ui.fragment.base.LazyLoadBaseFragment
import com.mints.goldspace.utils.SpanUtils
import kotlinx.android.synthetic.main.fragment_main_zy.*
/**
* 描述:掌阅书城
* 作者:孟崔广
*/
class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChangeListener {
private val bookPresenter by lazy { BookPresenter() }
private var bookFragment: Fragment? = null
override fun getContentViewLayoutID() = R.layout.fragment_main_zy
override fun initViewsAndEvents() {
}
override fun onFragmentFirstVisible() {
bookPresenter.attachView(this)
val transaction: FragmentTransaction = supportFragmentManager.beginTransaction()
if (bookFragment == null) {
bookFragment = IreaderApi.getNovelBookStoreFragment()
transaction.add(R.id.fragment, bookFragment!!, bookFragment!!::class.java.simpleName)
IreaderApi.setReadChangeListener(this)
} else {
transaction.show(bookFragment!!)
}
transaction.commitAllowingStateLoss()
}
override fun onFragmentResume() {
super.onFragmentResume()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_ONE) {
bookPresenter.getReadInfo()
}
}
override fun onDestroy() {
super.onDestroy()
IreaderApi.setReadChangeListener(null)
bookPresenter.detachView()
}
override fun onReadStart() {
}
override fun onReadEnd(time: Long) {
// LogUtil.d(TAG, "onReadEnd time:" + time)
// LogUtil.d(TAG, "onReadEnd time(Int):" + (time/1000).toInt())
val seconds = (time / 1000).toInt()
// 阅读5秒以上 保存时长
if (seconds > 5) {
bookPresenter.addReadSeconds(seconds)
}
}
override fun onReadPage(time: Long) {
}
override fun readSecondsSuc(coin: Int) {
if (coin > 0) {
val bundle = Bundle()
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_ZHANGYUE)
bundle.putInt(Constant.MAIN_CUR_COIN, coin)
readyGo(AwardActivity::class.java, bundle)
}
}
override fun readInfo(sumTime: Int, sumCoin: Int, readTime: Int) {
//阅读{10}分钟,奖励{xx}金币,已读{x}分钟
tvZhangContent.visibility = View.VISIBLE
if (readTime >= sumTime) {
tvZhangContent.text = "今日阅读任务已完成"
} else {
tvZhangContent.text = SpanUtils()
.append("阅读").append("${sumTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟, ")
.append("奖励").append("$sumCoin").setForegroundColor(mContext.resources.getColor(R.color.color_cb4a39)).append("金币, ")
.append("已读").append("${readTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟")
.create()
}
}
}
\ No newline at end of file
//package com.mints.goldspace.ui.fragment
//
//import android.os.Bundle
//import android.view.View
//import androidx.fragment.app.Fragment
//import androidx.fragment.app.FragmentTransaction
//import com.mints.goldspace.R
//import com.mints.goldspace.common.AppConfig
//import com.mints.goldspace.common.Constant
//import com.mints.goldspace.mvp.presenters.BookPresenter
//import com.mints.goldspace.mvp.views.BookView
//import com.mints.goldspace.ui.activitys.AwardActivity
//import com.mints.goldspace.ui.fragment.base.LazyLoadBaseFragment
//import com.mints.goldspace.utils.SpanUtils
//import kotlinx.android.synthetic.main.fragment_main_zy.*
//
///**
// * 描述:掌阅书城
// * 作者:孟崔广
// */
//class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChangeListener {
//
// private val bookPresenter by lazy { BookPresenter() }
// private var bookFragment: Fragment? = null
//
// override fun getContentViewLayoutID() = R.layout.fragment_main_zy
//
// override fun initViewsAndEvents() {
//
// }
//
// override fun onFragmentFirstVisible() {
// bookPresenter.attachView(this)
//
// val transaction: FragmentTransaction = supportFragmentManager.beginTransaction()
// if (bookFragment == null) {
// bookFragment = IreaderApi.getNovelBookStoreFragment()
// transaction.add(R.id.fragment, bookFragment!!, bookFragment!!::class.java.simpleName)
// IreaderApi.setReadChangeListener(this)
// } else {
// transaction.show(bookFragment!!)
// }
// transaction.commitAllowingStateLoss()
// }
//
// override fun onFragmentResume() {
// super.onFragmentResume()
// if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_ONE) {
// bookPresenter.getReadInfo()
// }
// }
//
// override fun onDestroy() {
// super.onDestroy()
//
// IreaderApi.setReadChangeListener(null)
// bookPresenter.detachView()
// }
//
// override fun onReadStart() {
// }
//
// override fun onReadEnd(time: Long) {
//// LogUtil.d(TAG, "onReadEnd time:" + time)
//// LogUtil.d(TAG, "onReadEnd time(Int):" + (time/1000).toInt())
//
// val seconds = (time / 1000).toInt()
// // 阅读5秒以上 保存时长
// if (seconds > 5) {
// bookPresenter.addReadSeconds(seconds)
// }
// }
//
// override fun onReadPage(time: Long) {
// }
//
// override fun readSecondsSuc(coin: Int) {
// if (coin > 0) {
// val bundle = Bundle()
// bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_ZHANGYUE)
// bundle.putInt(Constant.MAIN_CUR_COIN, coin)
// readyGo(AwardActivity::class.java, bundle)
// }
// }
//
// override fun readInfo(sumTime: Int, sumCoin: Int, readTime: Int) {
// //阅读{10}分钟,奖励{xx}金币,已读{x}分钟
// tvZhangContent.visibility = View.VISIBLE
// if (readTime >= sumTime) {
// tvZhangContent.text = "今日阅读任务已完成"
// } else {
// tvZhangContent.text = SpanUtils()
// .append("阅读").append("${sumTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟, ")
// .append("奖励").append("$sumCoin").setForegroundColor(mContext.resources.getColor(R.color.color_cb4a39)).append("金币, ")
// .append("已读").append("${readTime / 60}").setForegroundColor(mContext.resources.getColor(R.color.color_FF9837)).append("分钟")
// .create()
// }
// }
//}
\ No newline at end of file
......@@ -108,7 +108,7 @@ class DrawcashVideoDialog(activity: Activity) :
override fun videoAdingListenerFail(adType: String) {
loadVideoFailCount++
if (loadVideoFailCount >= 2) {
if (loadVideoFailCount >= 3) {
ToastUtil.show(activity, "加载超时,请休息一下")
} else {
loadVideo(videoAdingManager, bean, false)
......
package com.mints.goldspace.ui.widgets.wheelsruf.listener;
import android.animation.ValueAnimator;
import android.widget.ImageView;
/**
* 用于回调动画过程和结果
*/
public interface RotateListener {
/**
* 动画结束 返回当前位置 注意 位置是最上面是1 然后依次逆时针递增
*
* @param position
* @param des 所指分区文字描述
*/
void rotateEnd(int position, String des);
/**
* 动画进行中 返回动画中间量
*
* @param valueAnimator
*/
void rotating(ValueAnimator valueAnimator);
/**
* 点击了按钮 但是没有旋转 调用者可以在这里处理一些逻辑 比如弹出对话框确定用户是否要抽奖
*
* @param goImg
*/
void rotateBefore(ImageView goImg);
}
package com.mints.goldspace.utils;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.accessibility.AccessibilityManager;
import com.mints.goldspace.MintsApplication;
import java.util.ArrayList;
import java.util.List;
/**
* 无障碍服务
*/
public class AccessibilityUtils {
/**
* 判断用户是否开启无障碍服务
*
* @return 0-未开启无障碍功能
* @throws RuntimeException
*/
public static int isAccessibilityEnabled() {
try {
// 检查AccessibilityService是否开启
AccessibilityManager am = (AccessibilityManager) MintsApplication.getContext().getSystemService(android.content.Context.ACCESSIBILITY_SERVICE);
boolean isAccessibilityEnabled_flag = am.isEnabled();
return isAccessibilityEnabled_flag ? 1 : 0;
} catch (Exception e) {
e.printStackTrace();
}
return 0;
// boolean isExploreByTouchEnabled_flag = false;
//
// // 检查无障碍服务是否以语音播报的方式开启
// isExploreByTouchEnabled_flag = isScreenReaderActive(context);
//
// return (isAccessibilityEnabled_flag && isExploreByTouchEnabled_flag);
}
private final static String SCREEN_READER_INTENT_ACTION = "android.accessibilityservice.AccessibilityService";
private final static String SCREEN_READER_INTENT_CATEGORY = "android.accessibilityservice.category.FEEDBACK_SPOKEN";
private static boolean isScreenReaderActive(Context context) {
// 通过Intent方式判断是否存在以语音播报方式提供服务的Service,还需要判断开启状态
Intent screenReaderIntent = new Intent(SCREEN_READER_INTENT_ACTION);
screenReaderIntent.addCategory(SCREEN_READER_INTENT_CATEGORY);
List<ResolveInfo> screenReaders = context.getPackageManager().queryIntentServices(screenReaderIntent, 0);
// 如果没有,返回false
if (screenReaders == null || screenReaders.size() <= 0) {
return false;
}
boolean hasActiveScreenReader = false;
if (Build.VERSION.SDK_INT <= 15) {
ContentResolver cr = context.getContentResolver();
Cursor cursor = null;
int status = 0;
for (ResolveInfo screenReader : screenReaders) {
cursor = cr.query(Uri.parse("content://" + screenReader.serviceInfo.packageName
+ ".providers.StatusProvider"), null, null, null, null);
if (cursor != null && cursor.moveToFirst()) {
status = cursor.getInt(0);
cursor.close();
// 状态1为开启状态,直接返回true即可
if (status == 1) {
return true;
}
}
}
} else if (Build.VERSION.SDK_INT >= 26) {
// 高版本可以直接判断服务是否处于开启状态
for (ResolveInfo screenReader : screenReaders) {
hasActiveScreenReader |= isAccessibilitySettingsOn(context, screenReader.serviceInfo.packageName + "/" + screenReader.serviceInfo.name);
}
} else {
// 判断正在运行的Service里有没有上述存在的Service
List<String> runningServices = new ArrayList<String>();
android.app.ActivityManager manager = (android.app.ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
for (android.app.ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
runningServices.add(service.service.getPackageName());
}
for (ResolveInfo screenReader : screenReaders) {
if (runningServices.contains(screenReader.serviceInfo.packageName)) {
hasActiveScreenReader |= true;
}
}
}
return hasActiveScreenReader;
}
// To check if service is enabled
private static boolean isAccessibilitySettingsOn(Context context, String service) {
TextUtils.SimpleStringSplitter mStringColonSplitter = new TextUtils.SimpleStringSplitter(':');
String settingValue = Settings.Secure.getString(
context.getApplicationContext().getContentResolver(),
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
if (settingValue != null) {
mStringColonSplitter.setString(settingValue);
while (mStringColonSplitter.hasNext()) {
String accessibilityService = mStringColonSplitter.next();
if (accessibilityService.equalsIgnoreCase(service)) {
return true;
}
}
}
return false;
}
/**
* 判断AccessibilityService服务是否已经启动
*
* @param context
* @param name
* @return
*/
public static boolean isStartAccessibilityService(Context context, String name) {
AccessibilityManager am = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
List<AccessibilityServiceInfo> serviceInfos = am.getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_GENERIC);
for (AccessibilityServiceInfo info : serviceInfos) {
String id = info.getId();
LogUtil.d("all -->" + id);
if (id.contains(name)) {
return true;
}
}
return false;
}
}
......@@ -11,7 +11,7 @@ import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.os.Build
import android.provider.Settings
import com.fly.scenemodule.util.StringUtilMy
import android.text.TextUtils
import com.mints.goldspace.MintsApplication
......@@ -127,7 +127,7 @@ object AppUtil {
}
fun getTimePkgUsed(paramContext: Context, paramString: String): Int {
if (StringUtilMy.stringAvalable(paramString) && checkPackInfo(paramContext, paramString) && Build.VERSION.SDK_INT >= 21) {
if (!TextUtils.isEmpty(paramString) && checkPackInfo(paramContext, paramString) && Build.VERSION.SDK_INT >= 21) {
val usageStatsManager = paramContext.getSystemService("usagestats") as UsageStatsManager
var l = System.currentTimeMillis()
val list = usageStatsManager.queryUsageStats(UsageStatsManager.INTERVAL_BEST, l - 5 * 60 * 1000L, l)
......
......@@ -40,13 +40,13 @@ public class SimUtils {
public static String getSimPhonenumber(Context context, int slotIdx) {
if (PermissionUtil.checkPermission(context, Manifest.permission.READ_PHONE_STATE) ||
PermissionUtil.checkPermission(context, "android.permission.READ_PRIVILEGED_PHONE_STATE")) {
Log.d(TAG, "READ_PHONE_STATE permission has BEEN granted to getSimPhonenumber().");
// Log.d(TAG, "READ_PHONE_STATE permission has BEEN granted to getSimPhonenumber().");
if (getSimStateBySlotIdx(context, slotIdx)) {
return (String) getSimByMethod(context, SIM_LINE_NUMBER, getSubidBySlotId(context, slotIdx));
}
return null;
} else {
Log.d(TAG, "READ_PHONE_STATE permission has NOT been granted to getSimPhonenumber().");
// Log.d(TAG, "READ_PHONE_STATE permission has NOT been granted to getSimPhonenumber().");
return null;
}
}
......@@ -61,10 +61,10 @@ public class SimUtils {
public static String getSimImei(Context context, int slotIdx) {
if (PermissionUtil.checkPermission(context, Manifest.permission.READ_PHONE_STATE) ||
PermissionUtil.checkPermission(context, "android.permission.READ_PRIVILEGED_PHONE_STATE")) {
Log.d(TAG, "READ_PHONE_STATE permission has BEEN granted to getSimImei().");
// Log.d(TAG, "READ_PHONE_STATE permission has BEEN granted to getSimImei().");
return (String) getSimByMethod(context, SIM_IMEI, slotIdx);
} else {
Log.d(TAG, "READ_PHONE_STATE permission has NOT been granted to getSimImei().");
// Log.d(TAG, "READ_PHONE_STATE permission has NOT been granted to getSimImei().");
return null;
}
}
......@@ -79,12 +79,12 @@ public class SimUtils {
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP_MR1)
public static int getSimNetworkType(Context context, int slotIdx) {
if (PermissionUtil.checkPermission(context, Manifest.permission.READ_PHONE_STATE)) {
Log.d(TAG, "READ_PHONE_STATE permission has BEEN granted to getSimNetworkType().");
// Log.d(TAG, "READ_PHONE_STATE permission has BEEN granted to getSimNetworkType().");
if (getSimStateBySlotIdx(context, slotIdx)) {
return (int) getSimByMethod(context, SIM_NETWORK_TYPE, getSubidBySlotId(context, slotIdx));
}
} else {
Log.d(TAG, "READ_PHONE_STATE permission has NOT been granted to getSimNetworkType().");
// Log.d(TAG, "READ_PHONE_STATE permission has NOT been granted to getSimNetworkType().");
}
return TelephonyManager.NETWORK_TYPE_UNKNOWN;
}
......@@ -210,7 +210,7 @@ public class SimUtils {
}
} catch (Exception e) {
e.printStackTrace();
LogUtil.d(e.getMessage());
// LogUtil.d(e.getMessage());
}
return null;
......@@ -250,7 +250,7 @@ public class SimUtils {
TelephonyManager tm = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
assert tm != null;
Log.d(TAG, "state:" + tm.getSimState());
// Log.d(TAG, "state:" + tm.getSimState());
if (networkInfo != null) {
if (networkInfo.getType() == ConnectivityManager.TYPE_MOBILE) {
boolean status = networkInfo.isConnected();
......@@ -331,7 +331,7 @@ public class SimUtils {
Object ob_phone = getSimState.invoke(subscriptionManager, obParameter);
if (ob_phone != null) {
Log.d(TAG, "slotId:" + slotId + ";" + ((int[]) ob_phone)[0]);
// Log.d(TAG, "slotId:" + slotId + ";" + ((int[]) ob_phone)[0]);
return ((int[]) ob_phone)[0];
}
} catch (Exception e) {
......
......@@ -6,9 +6,9 @@
<item android:id="@android:id/background">
<shape>
<stroke
android:width="@dimen/dp_1"
android:width="1dp"
android:color="#E5E5E5" />
<corners android:radius="@dimen/dp_5" />
<corners android:radius="5dp" />
<solid android:color="#FAFAFA" />
<gradient
......@@ -26,7 +26,7 @@
<clip>
<shape android:shape="rectangle">
<solid android:color="#E9DDB6" />
<corners android:radius="@dimen/dp_5" />
<corners android:radius="5dp" />
</shape>
</clip>
</item>
......@@ -38,9 +38,9 @@
<clip>
<shape>
<stroke
android:width="@dimen/dp_1"
android:width="1dp"
android:color="#E5E5E5" />
<corners android:radius="@dimen/dp_5" />
<corners android:radius="5dp" />
<gradient
android:angle="0"
android:centerColor="#FB560C"
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#50ffffff" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="10dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:wheelSurfView="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/bg_turn"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginTop="40dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="6dp"
android:src="@mipmap/ic_voice" />
<com.sunfusheng.marqueeview.MarqueeView
android:id="@+id/marqueeView"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
app:mvAnimDuration="1000"
app:mvInterval="4000"
app:mvSingleLine="true"
app:mvTextColor="@color/color_cb4a39"
app:mvTextSize="15sp" />
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:src="@mipmap/bg_turn_font" />
<TextView
android:id="@+id/tvHintTurnTable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:textColor="@color/red"
android:textSize="18sp"
tools:text="每日0点重置抽奖次数" />
<com.mints.goldspace.ui.widgets.wheelsruf.view.WheelSurfView
android:id="@+id/turnTableView"
android:layout_width="330dp"
android:layout_height="330dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
wheelSurfView:typenum="-1" />
<include layout="@layout/layout_turn_btn" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical">
<TextView
android:id="@+id/tv_turn_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="6dp"
tools:text="抽奖+1"
android:textColor="@color/red"
android:textSize="14sp" />
<ImageView
android:id="@+id/ic_turn_icon"
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_gravity="center_horizontal"
android:scaleType="fitXY"
tools:src="@mipmap/ic_launcher_main" />
<TextView
android:id="@+id/tv_turn_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
tools:text="搜索赚"
android:textColor="@color/red"
android:textSize="14sp" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="5dp"
android:background="@drawable/shape_turn_btn"
android:elevation="18dp"
android:orientation="vertical"
android:paddingTop="4dp"
android:paddingBottom="10dp">
<TextView
android:id="@+id/tvTurnTimes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textColor="@color/black"
android:layout_marginBottom="6dp"
android:textSize="12sp" />
<com.mints.goldspace.ui.widgets.ExpandableGridView
android:id="@+id/gvTurnTable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnWidth="80dp"
android:divider="@null"
android:dividerHeight="10pt"
android:elevation="6dip"
android:listSelector="#00000000"
android:numColumns="4"
android:scrollbars="none"
android:stretchMode="spacingWidthUniform" />
<TextView
android:id="@+id/tvTurnMore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:drawableTop="@mipmap/ic_arrow_down"
android:drawablePadding="4dp"
android:text="点击获取更多奖励"
android:textColor="@color/red"
android:textSize="14sp"></TextView>
</LinearLayout>
\ No newline at end of file
......@@ -180,4 +180,31 @@
<attr name="text" format="string" />
<attr name="radius" format="integer" />
</declare-styleable>
<declare-styleable name="wheelSurfView">
<!--类型 根据类型来加载资源 1 默认类型 用户需要提供文字和图片 2 暴力模式 用户只需要提供一张圆形的用来旋转的图片-->
<attr name="type" format="integer"/>
<!--最低圈数 默认值3 也就是说每次旋转都会最少转3圈-->
<attr name="minTimes" format="integer"/>
<!--扇形的数量 也就是奖品的份数-->
<attr name="typenum" format="integer"/>
<!--每一个扇形旋转消耗的时间-->
<attr name="vartime" format="integer"/>
<!--类型为1的时候 需要提供每个扇形上面的文字描述 长度必须和typenum一致-->
<attr name="deses" format="reference"/>
<!--类型为1的时候 需要提供每个扇形上面的图片展示 长度必须和typenum一致-->
<attr name="icons" format="reference"/>
<!--类型为1的时候 需要提供每个扇形背景颜色 长度必须和typenum一致-->
<attr name="colors" format="reference"/>
<!--中间图片的引用 有默认值 不填则使用默认值-->
<attr name="goImg" format="reference"/>
<!--圆环的图片引用 有默认值 不填则使用默认值-->
<attr name="huanImg" format="reference"/>
<!--如果类型为2 此值必填-->
<attr name="mainImg" format="reference"/>
<!--文字大小-->
<attr name="textSize" format="dimension"/>
<!--文字颜色-->
<attr name="textColor" format="reference|color"/>
</declare-styleable>
</resources>
\ No newline at end of file
......@@ -17,7 +17,7 @@ org.gradle.jvmargs=-Xmx1536m
# org.gradle.parallel=true
DEBUG_URL="http://39.97.65.143:9082/api/"
#DEBUG_URL="http://192.168.31.193:8101/"
#DEBUG_URL="http://192.168.110.7:8101/"
RELEASE_URL="https://api.mints-id.com/gsnew-api/"
RELEASE_KEY_PASSWORD=gold.space
......
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