Commit 171b3485 authored by 张释方's avatar 张释方

添加小满科技

parent 09e6c4c2
......@@ -251,13 +251,8 @@
<activity
android:name=".call.detail.DetailApplyActivity"
android:screenOrientation="portrait" />
<activity android:name=".ui.activitys.ZaActivity"
android:screenOrientation="portrait"/>
<activity android:name=".ui.activitys.XiaomanActivity"
android:screenOrientation="portrait"/>
<activity android:name=".ui.activitys.XiaomanActivity2"
android:screenOrientation="portrait"/>
<service
android:name=".service.UpdateService"
......
......@@ -13,6 +13,7 @@ import com.bytedance.sdk.openadsdk.TTAdSdk
import com.fendasz.moku.planet.exception.MokuException
import com.fendasz.moku.planet.helper.MokuHelper
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.utils.LogUtil
import com.qq.e.comm.managers.GDTADManager
import kotlinx.android.synthetic.main.activity_layout_xiaoman.*
......@@ -23,12 +24,9 @@ object XmManager {
private var placeMateId = ""
private var materialId = ""
private var userId=""
private const val ACCESSKEY = "hzq-az_rvkvdy"
private const val SECRETKEY = "22FvHjUzvQ516214"
fun initXm(application: Application) {
// //打开日志,上线之前记得关闭
try {
......@@ -36,8 +34,6 @@ object XmManager {
AdSdk.setDebug(true);
//初始化 需要在Applicaiton 中
AdSdk.init(application, ACCESSKEY, SECRETKEY)
userId = UserManager.getInstance().userID
Log.d("MyFragment","*****************$userId*********************")
} catch (e: Exception) {//这里应该是小满的异常
e.printStackTrace()
}
......@@ -46,21 +42,22 @@ object XmManager {
fun loadMater(placeid: String) {
if (placeMateId.equals("")) {
val tm: MaterialTm by lazy { MaterialTm() }
tm!!.loadMaterialData(userId, placeid, object : MaterialTm.Callback {
tm!!.loadMaterialData(UserManager.getInstance().userID, placeid, object : MaterialTm.Callback {
//对应PlaceID会有对应的素材
override fun onSuccess(imgUrl: String, placeMateId2: String, materialId2: String) {
placeMateId = placeMateId2
materialId = materialId2
AdSdk.exposure(userId, placeid, placeMateId, materialId);
Log.d("loadMater", "******exposure*********$userId******$placeMateId********$materialId****************$placeid**")
AdSdk.exposure(UserManager.getInstance().userID, placeid, placeMateId, materialId);
LogUtil.d("******exposure*********${UserManager.getInstance().userID}******$placeMateId********$materialId****************$placeid**")
}
override fun onFailure(code: String, errmsg: String) {
Log.d("onFailure", "$code$errmsg")
LogUtil.d("$code$errmsg")
}
})
} else {
AdSdk.exposure(UserManager.getInstance().userID, placeid, placeMateId, materialId);
}
}
......@@ -69,8 +66,8 @@ object XmManager {
* @param view
*/
fun exprotClick(placeid: String) {
AdSdk.click(userId, placeid, materialId, materialId);
Log.d("loadMater", "******exprotClick*******$userId*******$placeMateId********$materialId******$placeid")
AdSdk.click(UserManager.getInstance().userID, placeid, materialId, materialId);
Log.d("loadMater", "******exprotClick*******${UserManager.getInstance().userID}*******$placeMateId********$materialId******$placeid")
}
}
\ No newline at end of file
package com.mints.goodmoney.ui.activitys
import android.text.TextUtils
import android.view.View
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.R
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.mvp.model.*
import com.mints.goodmoney.mvp.presenters.MyPresenter
import com.mints.goodmoney.mvp.views.MyView
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.library.utils.CommonUtils
import com.mints.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.activity_zmain.*
//当使用第三方登录的时候需要继承OnLoginListener
class ZaActivity : BaseActivity(), MyView, View.OnClickListener {
private val myPresenter by lazy { MyPresenter() }
private var channel: String = ""//获取渠道,类比oppo,vivo等应用商店,方便统计使用人数
override fun toggleOverridePendingTransition() = true
override fun getOverridePendingTransitionMode() = TransitionMode.BOTTOM
override fun initViewsAndEvents() {
myPresenter.attachView(this)
channel = CommonUtils.getAppMetaData(MintsApplication.getContext(), "CHANNEL_NAME")
initListener()
}
private fun initListener() {
back_z.setOnClickListener(this)
Login_z.setOnClickListener(this)
}
override fun getContentViewLayoutID() = R.layout.activity_zmain
override fun isApplyKitKatTranslucency() = false
override fun onDestroy() {
super.onDestroy()
myPresenter.detachView()
}
override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) {
R.id.back_z->{
if (!TextUtils.equals(channel, Constant.CHANNEL_SHARE)) {
finish()
}
}
R.id.Login_z -> {
readyGo(XiaomanActivity::class.java)
}
}
}
override fun getUserTaskMsgSuc(data: MyInfo?) {
//
}
override fun getUserTaskMsgFail() {
}
override fun getMyHotActivitySuc(data: BannerBean?) {
}
override fun getSignInHomePageMsgSuc(signBean: SignCardBean?) {
}
override fun signInHomePageSuc() {
}
override fun userLoginSuc() {
}
override fun getHallBaseMsgSuc(data: UserTaskMsgBean) {
}
override fun getMyRotationChartSuc(data: RotationChartBean) {
showToast("登录成功")
}
}
......@@ -9,7 +9,6 @@ import android.content.Intent
import android.content.IntentFilter
import android.os.Bundle
import android.text.TextUtils
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.widget.AdapterView
......@@ -17,7 +16,6 @@ import android.widget.GridView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.viewpager.widget.ViewPager
import com.chineseall.reader17ksdk.binds.bindRecycleViewLayoutManager
import com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import com.fly.scenemodule.SceneUtil
import com.mints.goodmoney.BuildConfig
......@@ -247,10 +245,9 @@ class MyFragment : BaseFragment(),
// 生成热门活动数据
private fun generateGridData(data: List<BannerBean.ListBean>) {
val inflater = LayoutInflater.from(mContext)
for (i in 0 until data.size){
if (data.get(i).toUrl.equals(Constant.HOT_ACTIVITY_SHEEP)){
for (i in 0 until data.size) {
if (data.get(i).toUrl.equals(Constant.HOT_ACTIVITY_SHEEP)) {
XmManager.loadMater(data.get(i).xmPlaceId)
Log.d("MyFragment","*****************MYFragment*********************")
break
}
}
......@@ -951,12 +948,13 @@ class MyFragment : BaseFragment(),
when (hotBean.toUrl) {
Constant.HOT_ACTIVITY_SHEEP -> {
XmManager.exprotClick(hotBean.xmPlaceId)
readyGo(XiaomanActivity2::class.java)
val bundle = Bundle()
bundle.putString(Constant.MAIN_CARRIER_TYPE, hotBean.xmPlaceId)
readyGo(XiaomanActivity::class.java, bundle)
}
Constant.HOT_ACTIVITY_WATER -> {
TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WATER)
readyGo(WaterActivity::class.java)
}
Constant.HOT_ACTIVITY_WALK -> {
TTPreLoadCarrierExpressManager.getInstance().loadTtFrameLayout(TtCsjAdManager.TT_AD_NATIVEEXPRESS_WALK)
......
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