Commit 80ea840b authored by wangxuewei's avatar wangxuewei

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	library/src/main/java/com/ym/library/utils/CenterDialog.kt
parents a88bd3b7 503b2f4c
package com.ym.xync.wxapi;
import com.umeng.socialize.weixin.view.WXCallbackActivity;
public class WXEntryActivity extends WXCallbackActivity {
}
......@@ -880,12 +880,14 @@ abstract class JavaInterface {
fun eventUtils(action: String) {
EventUtils.onEvent(action)
}
/**
* h5跳h5
*/
@JavascriptInterface
fun h5Jump(h5: String) {
mWebView?.loadUrl(h5)
JumpUtils.h5Jump("", h5, false)
// mWebView?.loadUrl(h5)
}
/**
......@@ -895,13 +897,19 @@ abstract class JavaInterface {
@JavascriptInterface
fun showDialog(waterDropCount: Int, type: Int) {
mWebView.context.runOnUiThread {
CenterDialog.showgetWaterDrop(mWebView.context,type,waterDropCount,object :DialogInterface.OnCancelListener {
CenterDialog.showgetWaterDrop(
mWebView.context,
type,
waterDropCount,
object : DialogInterface.OnCancelListener {
override fun onCancel(p0: DialogInterface?) {
mWebView.context.runOnUiThread {
mWebView?.loadUrl("javascript:onResume()")
}
}
},mWebView)
},
mWebView
)
}
}
......
......@@ -2,6 +2,7 @@ package com.ym.library.activity
import android.app.Dialog
import android.content.Context
import android.content.Intent
import android.graphics.Bitmap
import android.graphics.Color
import android.net.http.SslError
......@@ -375,4 +376,8 @@ class NewWebActivity : BaseActivity(), NewWebContract.View, ScrollWebView.OnScro
// webview?.loadUrl("javascript:onPause()")
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
}
}
\ No newline at end of file
......@@ -38,10 +38,10 @@ interface IUserApi {
* @return
*/
@GET(NetConfig.User.URL_USER_WITHDRAW_BIND_WX)
@POST(NetConfig.User.URL_USER_WITHDRAW_BIND_WX)
fun bindWx(
@Query("openId") oppenid: String,
@Query("token") token: String
@Query("openid") oppenid: String,
@Query("accessToken") token: String
): Observable<Response<WxBindEntity>>
/**
......
......@@ -175,7 +175,8 @@ public class NetConfig {
public static final String URL_DEVEICE_LOGIN_ = "app/v1/auth/tourist-login";//
public static final String URL_USER_GET_USERINFO_ = "app/v1/location/user/info";
public static final String URL_TASK_ADD_COINS = "app/v2/novel/storeCoin";
public static final String URL_USER_WITHDRAW_BIND_WX = "app/v2/novel/setWithdrawWx";// 微信绑定
//public static final String URL_USER_WITHDRAW_BIND_WX = "app/v2/novel/setWithdrawWx";// 微信绑定
public static final String URL_USER_WITHDRAW_BIND_WX = "app/v1/auth/wxLogin";// 微信绑定
public static final String URL_USER_ISBINDWITHDRAWWX = "/app/v1/novel/isBindWithdrawWx";// 微信是否绑定
public static final String URL_USER_MIND = "app/v1/gs/mind";// 注意事项
public static final String URL_USER_COIN2CASH_CHECK = "app/v1/gs/coin2cash_check";// 兑换接口
......
......@@ -331,73 +331,73 @@ object CenterDialog : BaseDialog() {
listener: DialogInterface.OnCancelListener,
mWebView: WebView
) {
// if (context == null) {
// return
// }
// val mDialog = Dialog(context, R.style.UpdateVersionCompatDialogTheme)
// val mDialogView =
// showBottomDialog(
// R.layout.dialog_get_water_drop,
// context,
// mDialog,
// 0,
// Gravity.CENTER
// )
//
// val ivGetDropLoght = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_loght)
// val ivGetDropBg = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_bg)
// val tvGetDropCount = mDialogView?.findViewById<TextView>(R.id.tv_get_drop_count)
// val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_get_drop_ad)
//
// ivGetDropLoght.animation = AnimationUtils.loadAnimation(context, R.anim.rotate_anim_lib)
//
// if (type == 1) {
// tvGetDropCount.text = "+${rewardCount}g"
// ivGetDropBg.setImageResource(R.drawable.icon_main_dialog_popupwater_icon_lib)
// } else if (type == 2) {
// tvGetDropCount.text = "+${rewardCount}"
// ivGetDropBg.setImageResource(R.drawable.icon_main_dialog_popupwater_coin_lib)
// }
if (context == null) {
return
}
val mDialog = Dialog(context, R.style.UpdateVersionCompatDialogTheme)
val mDialogView =
showBottomDialog(
R.layout.dialog_get_water_drop,
context,
mDialog,
0,
Gravity.CENTER
)
// ToponManager.loadNative((context as Activity),layoutAd,object : ToponNativeListener {
// override fun onAdImpressed(atAdInf: ATAdInfo) {
// EventUtils.onEvent(
// "ad_show",
// Utils.obj2Str(AdEntity(atAdInf.adNetworkType, AdID.mPlacementId_daily_task_finish_bigimage, "福利中心大图广告"))
// )
// }
//
// override fun onAdClicked(atAdInf: ATAdInfo, view: ATNativeAdView) {
// EventUtils.onEvent(
// "ad_click",
// Utils.obj2Str(AdEntity(atAdInf.adNetworkType, AdID.mPlacementId_daily_task_finish_bigimage, "福利中心大图广告"))
// )
// }
//
// override fun onAdVideoStart() {
// }
//
// override fun onAdVideoEnd() {
// }
//
// },AdID.mPlacementId_Reward_video_luck_farm)
val ivGetDropLoght = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_loght)
val ivGetDropBg = mDialogView?.findViewById<ImageView>(R.id.iv_get_drop_bg)
val tvGetDropCount = mDialogView?.findViewById<TextView>(R.id.tv_get_drop_count)
val layoutAd = mDialogView?.findViewById<FrameLayout>(R.id.layout_get_drop_ad)
// mDialogView.findViewById<ImageView>(R.id.btn_get_drop_happy_accept).setOnClickListener {
// mWebView?.loadUrl("javascript:onResume()")
// mDialog?.dismiss()
// }
// mDialogView.findViewById<ImageView>(R.id.lv_get_drop_close).setOnClickListener {
// mWebView?.loadUrl("javascript:onResume()")
// mDialog?.dismiss()
// }
//
// mDialog?.setOnCancelListener {
// listener.onCancel(it)
// }
//
// mDialog?.setCanceledOnTouchOutside(false)
// mDialog?.setCancelable(false)
// mDialog?.show()
// ivGetDropLoght.animation = AnimationUtils.loadAnimation(context, R.anim.rotate_anim_lib)
if (type == 1) {
tvGetDropCount.text = "+${rewardCount}g"
ivGetDropBg.setImageResource(R.drawable.icon_main_dialog_popupwater_icon_lib)
} else if (type == 2) {
tvGetDropCount.text = "+${rewardCount}"
ivGetDropBg.setImageResource(R.drawable.icon_main_dialog_popupwater_coin_lib)
}
ToponManager.loadNative((context as Activity),layoutAd,object : ToponNativeListener {
override fun onAdImpressed(atAdInf: ATAdInfo) {
EventUtils.onEvent(
"ad_show",
Utils.obj2Str(AdEntity(atAdInf.adNetworkType, AdID.mPlacementId_daily_task_finish_bigimage, "福利中心大图广告"))
)
}
override fun onAdClicked(atAdInf: ATAdInfo, view: ATNativeAdView) {
EventUtils.onEvent(
"ad_click",
Utils.obj2Str(AdEntity(atAdInf.adNetworkType, AdID.mPlacementId_daily_task_finish_bigimage, "福利中心大图广告"))
)
}
override fun onAdVideoStart() {
}
override fun onAdVideoEnd() {
}
},AdID.mPlacementId_Reward_video_luck_farm)
mDialogView.findViewById<TextView>(R.id.btn_get_drop_happy_accept).setOnClickListener {
mWebView?.loadUrl("javascript:onResume()")
mDialog?.dismiss()
}
mDialogView.findViewById<ImageView>(R.id.lv_get_drop_close).setOnClickListener {
mWebView?.loadUrl("javascript:onResume()")
mDialog?.dismiss()
}
mDialog?.setOnCancelListener {
listener.onCancel(it)
}
mDialog?.setCanceledOnTouchOutside(false)
mDialog?.setCancelable(false)
mDialog?.show()
}
......
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