Commit 27f42887 authored by mengcuiguang's avatar mengcuiguang

添加本地代码位

parent 52c55851
......@@ -132,6 +132,9 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// 只有Lifecycles (不带 ViewModel or LiveData)
implementation "androidx.lifecycle:lifecycle-runtime:2.2.0"
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
......@@ -256,7 +259,7 @@ dependencies {
implementation 'com.just.agentweb:agentweb:4.1.2'
// 喜马拉雅 已集成
// 微转阅读
implementation(name: 'articlesdk-v1.0.6.202012121917-x', ext: 'aar')
// implementation(name: 'articlesdk-v1.0.6.202012121917-x', ext: 'aar')
//天卓SDK的珊瑚2.0组件
implementation(name: 'adapt-1.3.3', ext: 'aar')
implementation(name: 'commonbase-1.0.2', ext: 'aar')
......
......@@ -10,8 +10,6 @@ import com.downloader.PRDownloader
import com.downloader.PRDownloaderConfig
import com.mints.goldspace.manager.BxmManager.initBxm
import com.mob.MobSDK
import com.tencent.mm.opensdk.openapi.WXAPIFactory
import com.xiangzi.articlesdk.XzArticleSdk
/**
* 子线程初始化SDK
......@@ -56,7 +54,7 @@ class InitAppService : IntentService("InitializeService") {
*/
private fun initApplication() {
// 微转分享
initWzShare()
// initWzShare()
// 初始化ShareSDK
MobSDK.init(this)
......@@ -85,11 +83,11 @@ class InitAppService : IntentService("InitializeService") {
/**
* 微转分享
*/
private fun initWzShare() {
val iwxapi = WXAPIFactory.createWXAPI(this, "wxc8ac2985f6a805e2", false)
iwxapi.registerApp("wxc8ac2985f6a805e2")
XzArticleSdk.get().init(this.application, iwxapi, "151", "haozhuanqian")
}
// private fun initWzShare() {
// val iwxapi = WXAPIFactory.createWXAPI(this, "wxc8ac2985f6a805e2", false)
// iwxapi.registerApp("wxc8ac2985f6a805e2")
// XzArticleSdk.get().init(this.application, iwxapi, "151", "haozhuanqian")
// }
/**
* 绑定jpush
......
......@@ -165,8 +165,8 @@ public class MintsApplication extends MultiDexApplication {
if (BaseUtil.isMainProcess(this)) {
ConstantsOpenSdk.isDebug = BuildConfig.DEBUG;
CommonRequest mXimalaya = CommonRequest.getInstanse();
String mAppSecret = "db3cb9e3ec5943f4987e78ddc5aec728";
String mAppKey = "ff71a11162f20808f9f349452dd9e141";
String mAppSecret = "e31c08462e63e0c3f71ffd7fbba85850";
String mAppKey = "fe44f14a0fcfbb101632099787eadd04";
mXimalaya.setAppkey(mAppKey);
mXimalaya.setPackid(Constant.MINTS_PKG_NAME);
mXimalaya.init(this, mAppSecret);
......
......@@ -216,12 +216,13 @@ object Constant {
const val MERGE_KEY = "merge_key"
// wrapper type 0-新闻 1-小说 2-平台分红 3-来电秀
// wrapper type 0-新闻 1-小说 2-平台分红 3-来电秀 4-微转
const val WRAPPER_TYPE = "wrapper_type"
const val WRAPPER_TYPE_NEWS = 0
const val WRAPPER_TYPE_BOOK = 1
const val WRAPPER_TYPE_FRIENDS = 2
const val WRAPPER_TYPE_KYL = 3
const val WRAPPER_TYPE_WZ = 4
//1登录,2提现,3任务
const val RISK_EVENT_ID_LOGIN = 1
......
......@@ -18,8 +18,8 @@ import com.mints.goldspace.common.Constant
*/
object BxmManager {
private const val APP_ID = ""
private const val BUTTON_AD_SPOT_ID = ""
private const val APP_ID = "85f06dc1a84a4c2abe503d13f7f88721"
private const val BUTTON_AD_SPOT_ID = "807020003001"
private var bdAdvanceButtonAd: BDAdvanceButtonAd? = null
......
......@@ -9,8 +9,8 @@ import com.maplehaze.adsdk.MaplehazeSDK
*/
object MhManager {
const val APP_ID = ""
const val POS_ID = ""
const val APP_ID = "10212"
const val POS_ID = "56865"
/**
* 初始化
......
......@@ -10,8 +10,8 @@ import com.xr.xrsdk.XRNewsManager
*/
object RsNewsManager {
private const val APP_ID = ""
private const val WX_APP_ID = ""
private const val APP_ID = "7ef25833adcd4c08ac5d91e9d5543871 "
private const val WX_APP_ID = "85b57367477947e5b33ca10f785d752d"
/**
* 初始化
......
......@@ -35,7 +35,7 @@ object SceneManager {
//广点通-------
val gdtInfo = GDTInfo()
gdtInfo.gdT_Appid = YlhAdManager.YLH_AD_APPID
gdtInfo.gdT_VideoId = YlhAdManager.YLH_AD_VEDIO_JULEYUN_POSTID
// 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)
......
......@@ -23,42 +23,42 @@ public class TtCsjAdManager {
public static final String TT_AD_NAME = Constant.MINTS_APP_NAME;
/*banner*/
public static String TT_AD_BANNER_MY = "";// 个人中心
public static String TT_AD_BANNER_MY = "945812059";// 个人中心
public static String TT_AD_BANNER_JULEYUN = "";// 聚乐云
/*激励视频*/
public static String TT_AD_VEDIO_MAIN_DEV = "938593319";// 开发使用
public static String TT_AD_VEDIO_DRINK = "";//喝水打卡
public static String TT_AD_VEDIO_WALK = "";//走路打卡
public static String TT_AD_VEDIO_MAIN = "";// 我的界面视频
public static String TT_AD_VEDIO_ERASE = "";// 刮刮乐
public static String TT_AD_VEDIO_TURNABLE = "";// 大转盘
public static String TT_AD_VEDIO_MOREDIALOG = "";// 气泡
public static String TT_AD_VEDIO_SIGN = "";// 签到
public static String TT_AD_VEDIO_EAT = "";// 饭补
public static String TT_AD_VEDIO_OFFINELINE = "";// 离线弹框
public static String TT_AD_VEDIO_DRAWCASH = "";// 提现
public static String TT_AD_VEDIO_MOST = "";// 超级翻倍/高额任务
public static String TT_AD_VEDIO_GAME = "";// 猎豹
public static String TT_AD_VEDIO_JULEYUN = "";// 聚乐云
public static String TT_AD_VEDIO_BIANXIANMAO = "";// 变现猫
public static String TT_AD_VEDIO_BLESSINGBAG = "";// 福袋
public static String TT_AD_VEDIO_HOMEVEDIO = "";// 首页视频翻倍
public static String TT_AD_VEDIO_SMALLHOMEVEDIO = "";// 短视频翻倍
public static String TT_AD_VEDIO_KYLVEDIO = "";// 来电秀视频
public static String TT_AD_VEDIO_DRINK = "945811826";//喝水打卡
public static String TT_AD_VEDIO_WALK = "945811826";//走路打卡
public static String TT_AD_VEDIO_MAIN = "945811826";// 我的界面视频
public static String TT_AD_VEDIO_ERASE = "945811826";// 刮刮乐
public static String TT_AD_VEDIO_TURNABLE = "945811826";// 大转盘
public static String TT_AD_VEDIO_MOREDIALOG = "945811826";// 气泡
public static String TT_AD_VEDIO_SIGN = "945811826";// 签到
public static String TT_AD_VEDIO_EAT = "945811826";// 饭补
public static String TT_AD_VEDIO_OFFINELINE = "945811826";// 离线弹框
public static String TT_AD_VEDIO_DRAWCASH = "945811826";// 提现
public static String TT_AD_VEDIO_MOST = "945811826";// 超级翻倍/高额任务
public static String TT_AD_VEDIO_GAME = "945811826";// 猎豹
public static String TT_AD_VEDIO_JULEYUN = "945811826";// 聚乐云
public static String TT_AD_VEDIO_BIANXIANMAO = "945811826";// 变现猫
public static String TT_AD_VEDIO_BLESSINGBAG = "945811826";// 福袋
public static String TT_AD_VEDIO_HOMEVEDIO = "945811826";// 首页视频翻倍
public static String TT_AD_VEDIO_SMALLHOMEVEDIO = "945811826";// 短视频翻倍
public static String TT_AD_VEDIO_KYLVEDIO = "945811826";// 来电秀视频
/*全屏视频*/
public static String TT_AD_FULLVEDIO_ALL = "";// 通用
public static String TT_AD_FULLVEDIO_ALL = "945811843";// 通用
/*信息流*/
public static String TT_AD_NATIVEEXPRESS_XMLY = "";//喜马拉雅信息流
public static String TT_AD_NATIVEEXPRESS_AWARD = "";//信息流弹窗
public static String TT_AD_NATIVEEXPRESS_WALK = "";//走路
public static String TT_AD_NATIVEEXPRESS_WATER = "";//喝水
public static String TT_AD_NATIVEEXPRESS_MORNINGCLOCK = "";//早上打卡
public static String TT_AD_NATIVEEXPRESS_EAT = "";//餐补
public static String TT_AD_NATIVEEXPRESS_ID_LIEBAO_LISTEXIT = "";//猎豹列表和退出
public static String TT_AD_NATIVEEXPRESS_XMLY = "945811816";//喜马拉雅信息流
public static String TT_AD_NATIVEEXPRESS_AWARD = "945811936";//信息流弹窗
public static String TT_AD_NATIVEEXPRESS_WALK = "945811899";//走路
public static String TT_AD_NATIVEEXPRESS_WATER = "945811899";//喝水
public static String TT_AD_NATIVEEXPRESS_MORNINGCLOCK = "945811899";//早上打卡
public static String TT_AD_NATIVEEXPRESS_EAT = "945811899";//餐补
public static String TT_AD_NATIVEEXPRESS_ID_LIEBAO_LISTEXIT = "945811899";//猎豹列表和退出
/*全屏广告*/
public static String TT_AD_ALLVEDIO_ID_LIEBAO = "";//猎豹全屏带跳过按钮
public static String TT_AD_ALLVEDIO_ID_LIEBAO = "945815287";//猎豹全屏带跳过按钮
/*插屏广告*/
public static String TT_AD_INSERT_LOADING_ID_LIEBAO = "";//猎豹游戏加载时
public static String TT_AD_INSERT_LOADING_ID_LIEBAO = "945813420";//猎豹游戏加载时
public static String TT_AD_INSERT_LOADING_ID_JULEYUN = "";//聚乐云
private static boolean sInit;
......@@ -122,51 +122,26 @@ public class TtCsjAdManager {
TT_AD_NATIVEEXPRESS_MORNINGCLOCK = idBean.getCsjv2();
TT_AD_NATIVEEXPRESS_EAT = idBean.getCsjv2();
// 激励视频
TT_AD_VEDIO_DRINK = idBean.getCsjv3();
TT_AD_VEDIO_MAIN = idBean.getCsjv3();
TT_AD_VEDIO_ERASE = idBean.getCsjv3();
TT_AD_VEDIO_TURNABLE = idBean.getCsjv3();
TT_AD_VEDIO_MOREDIALOG = idBean.getCsjv3();
TT_AD_VEDIO_OFFINELINE = idBean.getCsjv3();
TT_AD_VEDIO_BLESSINGBAG = idBean.getCsjv3();
TT_AD_VEDIO_SIGN = idBean.getCsjv3();
TT_AD_VEDIO_HOMEVEDIO = idBean.getCsjv3();
TT_AD_VEDIO_SMALLHOMEVEDIO = idBean.getCsjv3();
TT_AD_VEDIO_DRINK = idBean.getCsjv3();//喝水打卡
TT_AD_VEDIO_WALK = idBean.getCsjv3();//走路打卡
TT_AD_VEDIO_MAIN = idBean.getCsjv3();// 我的界面视频
TT_AD_VEDIO_ERASE = idBean.getCsjv3();// 刮刮乐
TT_AD_VEDIO_TURNABLE = idBean.getCsjv3();// 大转盘
TT_AD_VEDIO_MOREDIALOG = idBean.getCsjv3();// 气泡
TT_AD_VEDIO_SIGN = idBean.getCsjv3();// 签到
TT_AD_VEDIO_EAT = idBean.getCsjv3();// 饭补
TT_AD_VEDIO_OFFINELINE = idBean.getCsjv3();// 离线弹框
TT_AD_VEDIO_DRAWCASH = idBean.getCsjv3();// 提现
TT_AD_VEDIO_MOST = idBean.getCsjv3();// 超级翻倍/高额任务
TT_AD_VEDIO_GAME = idBean.getCsjv3();// 猎豹
TT_AD_VEDIO_JULEYUN = idBean.getCsjv3();// 聚乐云
TT_AD_VEDIO_BIANXIANMAO = idBean.getCsjv3();// 变现猫
TT_AD_VEDIO_BLESSINGBAG = idBean.getCsjv3();// 福袋
TT_AD_VEDIO_HOMEVEDIO = idBean.getCsjv3();// 首页视频翻倍
TT_AD_VEDIO_SMALLHOMEVEDIO = idBean.getCsjv3();// 短视频翻倍
TT_AD_VEDIO_KYLVEDIO = idBean.getCsjv3();// 来电秀视频
// banner
TT_AD_BANNER_MY = idBean.getCsjv4();
return;
}
// 对象为空,加载本地渠道
loadLocalChannel();
}
/**
* 加载本地渠道
*/
private static void loadLocalChannel() {
String channel = CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME");
if (channel.contains(ChannelManager.CHANNEL_TOUTIAO)) {
// 信息流
TT_AD_NATIVEEXPRESS_AWARD = "945666217";
TT_AD_NATIVEEXPRESS_WALK = "945666097";
TT_AD_NATIVEEXPRESS_WATER = "945666097";
TT_AD_NATIVEEXPRESS_MORNINGCLOCK = "945666097";
TT_AD_NATIVEEXPRESS_EAT = "945666097";
// 激励视频
TT_AD_VEDIO_DRINK = "945666029";
TT_AD_VEDIO_MAIN = "945666029";
TT_AD_VEDIO_ERASE = "945666029";
TT_AD_VEDIO_TURNABLE = "945666029";
TT_AD_VEDIO_MOREDIALOG = "945666029";
TT_AD_VEDIO_OFFINELINE = "945666029";
TT_AD_VEDIO_SIGN = "945666029";
TT_AD_VEDIO_BLESSINGBAG = "945666029";
TT_AD_VEDIO_HOMEVEDIO = "945666029";
TT_AD_VEDIO_SMALLHOMEVEDIO = "945666029";
// banner
TT_AD_BANNER_MY = "945666042";
}
}
}
......@@ -12,13 +12,13 @@ import com.wannuosili.sdk.WNAdSdk
*/
object WnManager {
private const val APP_ID = ""
private const val APP_ID = "10000454"
const val WN_AD_VEDIO_DRINK_POSTID = "" //喝水打卡
const val WN_AD_VEDIO_MAIN_POSTID = "" //我的界面视频
const val WN_AD_VEDIO_ERASE_POSTID = "" //刮刮乐
const val WN_AD_VEDIO_TURNABLE_POSTID = "" //大转盘
const val WN_AD_VEDIO_MOREDIALOG_POSTID = "" //签到、气泡、离线弹框
const val WN_AD_VEDIO_DRINK_POSTID = "100000512008" //喝水打卡
const val WN_AD_VEDIO_MAIN_POSTID = "100000512008" //我的界面视频
const val WN_AD_VEDIO_ERASE_POSTID = "100000512008" //刮刮乐
const val WN_AD_VEDIO_TURNABLE_POSTID = "100000512008" //大转盘
const val WN_AD_VEDIO_MOREDIALOG_POSTID = "100000512008" //签到、气泡、离线弹框
/**
* 初始化
......
......@@ -19,29 +19,32 @@ object YlhAdManager {
/* splash-postid */
var YLH_AD_SPLASH_POSTID = ""
var YLH_AD_SPLASH_POSTID = "1051659976719686"
/* 激励视频 */
var YLH_AD_VEDIO_DRINK = "" //喝水打卡
var YLH_AD_VEDIO_WALK = "" //走路打卡
var YLH_AD_VEDIO_MAIN = "" // 我的界面视频
var YLH_AD_VEDIO_ERASE = "" // 刮刮乐
var YLH_AD_VEDIO_TURNABLE = "" // 大转盘
var YLH_AD_VEDIO_MOREDIALOG = "" // 气泡
var YLH_AD_VEDIO_SIGN = "" // 签到
var YLH_AD_VEDIO_EAT = "" // 饭补
var YLH_AD_VEDIO_OFFINELINE = "" // 离线弹框
var YLH_AD_VEDIO_DRAWCASH = "" // 提现
var YLH_AD_VEDIO_MOST = "" // 超级翻倍/高额任务
var YLH_AD_VEDIO_GAME = "" // 猎豹
var YLH_AD_VEDIO_BLESSINGBAG = "" // 福袋
var YLH_AD_VEDIO_HOMEVEDIO = "" // 首页视频翻倍
var YLH_AD_VEDIO_SMALLHOMEVEDIO = "" // 短视频翻倍
var YLH_AD_VEDIO_KYLVEDIO = "" // 来电秀视频
var YLH_AD_VEDIO_DRINK = "7051055905193266" //喝水打卡
var YLH_AD_VEDIO_WALK = "7051055905193266" //走路打卡
var YLH_AD_VEDIO_MAIN = "7051055905193266" // 我的界面视频
var YLH_AD_VEDIO_ERASE = "7051055905193266" // 刮刮乐
var YLH_AD_VEDIO_TURNABLE = "7051055905193266" // 大转盘
var YLH_AD_VEDIO_MOREDIALOG = "7051055905193266" // 气泡
var YLH_AD_VEDIO_SIGN = "7051055905193266" // 签到
var YLH_AD_VEDIO_EAT = "7051055905193266" // 饭补
var YLH_AD_VEDIO_OFFINELINE = "7051055905193266" // 离线弹框
var YLH_AD_VEDIO_DRAWCASH = "7051055905193266" // 提现
var YLH_AD_VEDIO_MOST = "7051055905193266" // 超级翻倍/高额任务
var YLH_AD_VEDIO_GAME = "7051055905193266" // 猎豹
var YLH_AD_VEDIO_BLESSINGBAG = "7051055905193266" // 福袋
var YLH_AD_VEDIO_HOMEVEDIO = "7051055905193266" // 首页视频翻倍
var YLH_AD_VEDIO_SMALLHOMEVEDIO = "7051055905193266" // 短视频翻倍
var YLH_AD_VEDIO_KYLVEDIO = "7051055905193266" // 来电秀视频
/*信息流*/
var YLH_AD_NATIVEEXPRESS_JULEYUN = "" //聚乐云
var YLH_AD_NATIVEEXPRESS_AWARD = "" //奖励弹窗
var YLH_AD_NATIVEEXPRESS_AWARD = "4081450906109922" //奖励弹窗
/* 插屏 */
var YLH_AD_INTERSTITIALAD_LIEBAO = "" //猎豹
var YLH_AD_INTERSTITIALAD_LIEBAO = "9071052926611922" //猎豹
var YLH_AD_INTERSTITIALAD_JULEYUN = "" //聚乐云
/**
......@@ -61,44 +64,22 @@ object YlhAdManager {
// 开屏
YLH_AD_SPLASH_POSTID = idBean.ylhv1
// 激励视频
// YLH_AD_VEDIO_DRINK_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_MAIN_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_ERASE_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_TURNABLE_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_MOREDIALOG_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_BLESSINGBAG_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_SIGN_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_OFFINELINE_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_HOMEVEDIO_POSTID = idBean.ylhv2
// YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID = idBean.ylhv2
return
YLH_AD_VEDIO_DRINK = idBean.ylhv2 //喝水打卡
YLH_AD_VEDIO_WALK = idBean.ylhv2 //走路打卡
YLH_AD_VEDIO_MAIN = idBean.ylhv2 // 我的界面视频
YLH_AD_VEDIO_ERASE = idBean.ylhv2 // 刮刮乐
YLH_AD_VEDIO_TURNABLE = idBean.ylhv2 // 大转盘
YLH_AD_VEDIO_MOREDIALOG = idBean.ylhv2 // 气泡
YLH_AD_VEDIO_SIGN = idBean.ylhv2 // 签到
YLH_AD_VEDIO_EAT = idBean.ylhv2 // 饭补
YLH_AD_VEDIO_OFFINELINE = idBean.ylhv2 // 离线弹框
YLH_AD_VEDIO_DRAWCASH = idBean.ylhv2 // 提现
YLH_AD_VEDIO_MOST = idBean.ylhv2 // 超级翻倍/高额任务
YLH_AD_VEDIO_GAME = idBean.ylhv2 // 猎豹
YLH_AD_VEDIO_BLESSINGBAG = idBean.ylhv2 // 福袋
YLH_AD_VEDIO_HOMEVEDIO = idBean.ylhv2 // 首页视频翻倍
YLH_AD_VEDIO_SMALLHOMEVEDIO = idBean.ylhv2 // 短视频翻倍
YLH_AD_VEDIO_KYLVEDIO = idBean.ylhv2 // 来电秀视频
}
// 对象为空,加载本地渠道
loadLocalChannel()
}
private fun loadLocalChannel() {
val channel = CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME")
if (channel.contains(ChannelManager.CHANNEL_TOUTIAO)) {
// 头条
// 开屏
YLH_AD_SPLASH_POSTID = "4031840694338658"
// 激励视频
// YLH_AD_VEDIO_DRINK_POSTID = "1031552263176415"
// YLH_AD_VEDIO_MAIN_POSTID = "1031552263176415"
// YLH_AD_VEDIO_ERASE_POSTID = "1031552263176415"
// YLH_AD_VEDIO_TURNABLE_POSTID = "1031552263176415"
// YLH_AD_VEDIO_MOREDIALOG_POSTID = "1031552263176415"
// YLH_AD_VEDIO_SIGN_POSTID = "1031552263176415"
// YLH_AD_VEDIO_BLESSINGBAG_POSTID = "1031552263176415"
// YLH_AD_VEDIO_OFFINELINE_POSTID = "1031552263176415"
// YLH_AD_VEDIO_HOMEVEDIO_POSTID = "1031552263176415"
// YLH_AD_VEDIO_SMALLHOMEVEDIO_POSTID = "1031552263176415"
}
}
}
\ No newline at end of file
......@@ -213,7 +213,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FOUR
if (isMainShowWz) {
if (wzFragment == null) {
wzFragment = WzFragment()
wzFragment = WzFragment(true)
}
addOrShowFragment(supportFragmentManager, wzFragment!!, Constant.FRAGMENT_TAG_FOUR)
} else {
......
......@@ -6,10 +6,8 @@ import androidx.fragment.app.Fragment
import com.mints.goldspace.R
import com.mints.goldspace.common.Constant
import com.mints.goldspace.ui.activitys.base.BaseActivity
import com.mints.goldspace.ui.fragment.FriendsFragment
import com.mints.goldspace.ui.fragment.KuYinYueFragment
import com.mints.goldspace.ui.fragment.MyZhangyueFragment
import com.mints.goldspace.ui.fragment.RsNewsFragment
import com.mints.goldspace.ui.fragment.*
import kotlinx.android.synthetic.main.activity_wrapper.*
import kotlinx.android.synthetic.main.header_layout.*
/**
......@@ -65,6 +63,10 @@ class WrapperActivity : BaseActivity(), View.OnClickListener {
tv_title.text = "来电秀"
currentFragment = KuYinYueFragment()
}
Constant.WRAPPER_TYPE_WZ -> {
layoutWrapper.visibility = View.GONE
currentFragment = WzFragment(false)
}
}
if (!currentFragment!!.isAdded) {
......
......@@ -45,9 +45,6 @@ import com.mints.library.utils.nodoubleclick.AntiShake
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import com.tbruyelle.rxpermissions.RxPermissions
import com.xiangzi.articlesdk.callback.IXzArticleSdkInitCallback
import com.xiangzi.articlesdk.core.XzArticleCoreImpl
import com.xiangzi.articlesdk.exception.XzSdkException
import kotlinx.android.synthetic.main.fragment_main_my.*
import kotlinx.android.synthetic.main.header_layout.*
import kotlinx.android.synthetic.main.item_fragment_main_my_clock.*
......@@ -1182,24 +1179,27 @@ class MyFragment : BaseFragment(),
* 分享文章
*/
private fun shareArticle(coin: Int) {
if (XzArticleCoreImpl.get().initIsSuccess()) {
XzArticleCoreImpl.get().openArticleListActivity(requireActivity())
} else {
try {
XzArticleCoreImpl.get().initUser(userManager.userID, coin.toString(), "金币",
object : IXzArticleSdkInitCallback {
override fun initSuccess() {
shareArticle(coin)
}
override fun initFailed(errMsg: String) {
showToast("初始化失败,请稍候重试~")
}
})
} catch (e: XzSdkException) {
e.printStackTrace()
}
}
// if (XzArticleCoreImpl.get().initIsSuccess()) {
// XzArticleCoreImpl.get().openArticleListActivity(requireActivity())
// } else {
// try {
// XzArticleCoreImpl.get().initUser(userManager.userID, coin.toString(), "金币",
// object : IXzArticleSdkInitCallback {
// override fun initSuccess() {
// shareArticle(coin)
// }
//
// override fun initFailed(errMsg: String) {
// showToast("初始化失败,请稍候重试~")
// }
// })
// } catch (e: XzSdkException) {
// e.printStackTrace()
// }
// }
val bundle = Bundle()
bundle.putInt(Constant.WRAPPER_TYPE, Constant.WRAPPER_TYPE_WZ)
readyGo(WrapperActivity::class.java, bundle)
}
/**
......
......@@ -19,9 +19,6 @@ import com.mints.goldspace.mvp.views.PanView
import com.mints.goldspace.ui.activitys.*
import com.mints.goldspace.ui.fragment.base.BaseFragment
import com.mints.library.utils.json.JsonUtil
import com.xiangzi.articlesdk.callback.IXzArticleSdkInitCallback
import com.xiangzi.articlesdk.core.XzArticleCoreImpl
import com.xiangzi.articlesdk.exception.XzSdkException
import kotlinx.android.synthetic.main.fragment_main_pan.*
/**
......@@ -192,23 +189,8 @@ class PanFragment : BaseFragment(), PanView {
* 分享文章
*/
private fun shareArticle(coin: Int) {
if (XzArticleCoreImpl.get().initIsSuccess()) {
XzArticleCoreImpl.get().openArticleListActivity(requireActivity())
} else {
try {
XzArticleCoreImpl.get().initUser(userManager.userID, coin.toString(), "金币",
object : IXzArticleSdkInitCallback {
override fun initSuccess() {
shareArticle(coin)
}
override fun initFailed(errMsg: String) {
showToast("初始化失败,请稍候重试~")
}
})
} catch (e: XzSdkException) {
e.printStackTrace()
}
}
val bundle = Bundle()
bundle.putInt(Constant.WRAPPER_TYPE, Constant.WRAPPER_TYPE_WZ)
readyGo(WrapperActivity::class.java, bundle)
}
}
\ No newline at end of file
......@@ -28,7 +28,7 @@ import java.util.HashMap
* 时间:2020/9/20 17:30
*/
@SuppressLint("SetJavaScriptEnabled")
class WzFragment : BaseFragment(), BaseView {
class WzFragment(private var isResume: Boolean = false) : BaseFragment(), BaseView {
private val userManager by lazy { UserManager.getInstance() }
......@@ -55,7 +55,7 @@ class WzFragment : BaseFragment(), BaseView {
override fun onResume() {
super.onResume()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FOUR) {
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FOUR&&isResume) {
if (TextUtils.isEmpty(userManager?.userID)) {
// 游客登录
......@@ -84,7 +84,7 @@ class WzFragment : BaseFragment(), BaseView {
*/
private fun getWzUrl() {
val sb = StringBuilder()
sb.append("http://api.wenlv-kd.com/h5/init.html?appkey=haozhuanqian&appid=169")
sb.append("http://api.wenlv-kd.com/h5/init.html?appkey=taojinkongjian&appid=177")
.append("&userid=" + userManager.userID)
.append("&reward=" + AppConfig.wzReadCoin)
.append("&unit=" + "金币")
......
......@@ -5,7 +5,9 @@
android:background="@color/white"
android:orientation="vertical">
<include layout="@layout/header_layout" />
<include
android:id="@+id/layoutWrapper"
layout="@layout/header_layout" />
<FrameLayout
android:id="@+id/flWrapper"
......
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