Commit ddb9925d authored by mengcuiguang's avatar mengcuiguang

添加提现方式,代码优化

parent ebb71992
......@@ -75,9 +75,6 @@ class InitAppService : IntentService("InitializeService") {
//logger
initLogger()
// 一览视频
initYL()
// 数美
ShumeiManager.getInstance().initShumei()
......@@ -142,32 +139,6 @@ class InitAppService : IntentService("InitializeService") {
}
}
/**
* 一览视频
*/
private fun initYL() {
YLUIInit.getInstance()
.setCrashOpen(false)
.setApplication(application)
.setAccessKey("ylxgszgwjrr8")
.setAccessToken("lmnzhm9yjdlc86xiy74cjgixnqpxe4o2")
.build()
//页面个性化配置
YLUIConfig.getInstance() //抖音样式小视频配置
.littleLikeShow(true) //是否显示点赞
.littleShareShow(false) //是否显示分享
.littleComment(CommentConfig.CommentType.DISMISS_COMMENT) //评论,参数详见文档;
//feed流短视频样式配置
.videoComment(CommentConfig.CommentType.DISMISS_COMMENT) //评论,参数详见文档;
.videoLikeShow(false) //是否显示点赞
.videoShareShow(false) //是否显示分享
.followAvailable(false) //关注功能是否可用
.feedAvatarClickable(true) //头像是否支持点击跳转到作者页面
.feedSwipeRefreshEnable(true) //feed是否可以下拉刷新
FeedConfig.getInstance().playerStyle = FeedConfig.STYLE_NATIVE //FeedConfig.STYLE_STYLE_FEED_PLAY当前页面播放
}
/**
* 绑定jpush
*/
......
......@@ -16,6 +16,10 @@ import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.net.LoanService;
import com.mints.goodmoney.utils.ForegroundOrBackground;
import com.mints.goodmoney.utils.SystemUtils;
import com.yilan.sdk.ui.YLUIInit;
import com.yilan.sdk.ui.configs.CommentConfig;
import com.yilan.sdk.ui.configs.FeedConfig;
import com.yilan.sdk.ui.configs.YLUIConfig;
import rx.Scheduler;
import rx.schedulers.Schedulers;
......@@ -85,6 +89,9 @@ public class MintsApplication extends MultiDexApplication {
// 穿山甲
// initCsj();
// 一览视频
initYL();
}
/**
......@@ -101,6 +108,32 @@ public class MintsApplication extends MultiDexApplication {
TtCsjAdManager.init(this);
}
/**
* 一览视频
*/
private void initYL() {
YLUIInit.getInstance()
.setCrashOpen(false)
.setApplication(this)
.setAccessKey("ylxgszgwjrr8")
.setAccessToken("lmnzhm9yjdlc86xiy74cjgixnqpxe4o2")
.build();
//页面个性化配置
YLUIConfig.getInstance() //抖音样式小视频配置
.littleLikeShow(true) //是否显示点赞
.littleShareShow(false) //是否显示分享
.littleComment(CommentConfig.CommentType.DISMISS_COMMENT) //评论,参数详见文档;
//feed流短视频样式配置
.videoComment(CommentConfig.CommentType.DISMISS_COMMENT) //评论,参数详见文档;
.videoLikeShow(false) //是否显示点赞
.videoShareShow(false) //是否显示分享
.followAvailable(false) //关注功能是否可用
.feedAvatarClickable(true) //头像是否支持点击跳转到作者页面
.feedSwipeRefreshEnable(true); //feed是否可以下拉刷新
FeedConfig.getInstance().setPlayerStyle(FeedConfig.STYLE_NATIVE); //FeedConfig.STYLE_STYLE_FEED_PLAY当前页面播放
}
/**
* app退出
*/
......
......@@ -64,8 +64,8 @@ object Constant {
const val FRAGMENT_CLICK_MY = 3
// 协议地址
var REGISTER_URL = BuildConfig.MainIp + "agreement/register.html"//服务协议
var PRIVACY_URL = BuildConfig.MainIp + "agreement/privacy.html"//隐私协议
var REGISTER_URL = BuildConfig.MainIp + "gm/register.html"//服务协议
var PRIVACY_URL = BuildConfig.MainIp + "gm/privacy.html"//隐私协议
/**
......
......@@ -5,74 +5,10 @@ import java.util.List;
public class DrawcashBean implements Serializable {
/**
* msg : 微信账户目前正在维护中,预计3月28日前恢复,请优先用支付宝提现。
* realName : null
* wxDrawFlag : true
* surplus : 0
* openid : null
* lastCashOutType : WEIXIN
* cashOutMoneyArr : [{"money":"1","canUseOnce":true,"needFs":2,"nowFriends":0,"fsGiveCoin":800,"once":true,"canCashOut":false},{"money":"100","canUseOnce":true,"needFs":20,"nowFriends":0,"fsGiveCoin":1800,"once":true,"canCashOut":false},{"money":"150","canUseOnce":null,"needFs":30,"nowFriends":0,"fsGiveCoin":2800,"once":false,"canCashOut":false},{"money":"200","canUseOnce":null,"needFs":40,"nowFriends":0,"fsGiveCoin":3800,"once":false,"canCashOut":false},{"money":"500","canUseOnce":null,"needFs":50,"nowFriends":0,"fsGiveCoin":4800,"once":false,"canCashOut":false}]
* coinRate : 10000
* alipayAccount : null
* coin : 5562
*/
private String msg;
private String realName;
private boolean wxDrawFlag;
private int surplus;
private String openid;
private String lastCashOutType;
private int coinRate;
private String alipayAccount;
private String nickName;
private int coin;
private int diamonds;
private int vedioCompleteSum;
private int vedioNeedSum;
private double firstValue;
private List<CashOutMoneyArrBean> cashOutMoneyArr;
private List<CashOutMoneyArrBean> cashOutDiamondsArr;
public int getDiamonds() {
return diamonds;
}
public void setDiamonds(int diamonds) {
this.diamonds = diamonds;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
public boolean isWxDrawFlag() {
return wxDrawFlag;
}
public void setWxDrawFlag(boolean wxDrawFlag) {
this.wxDrawFlag = wxDrawFlag;
}
public int getSurplus() {
return surplus;
}
public void setSurplus(int surplus) {
this.surplus = surplus;
}
public String getOpenid() {
return openid;
......@@ -82,28 +18,12 @@ public class DrawcashBean implements Serializable {
this.openid = openid;
}
public String getLastCashOutType() {
return lastCashOutType;
}
public void setLastCashOutType(String lastCashOutType) {
this.lastCashOutType = lastCashOutType;
}
public int getCoinRate() {
return coinRate;
}
public void setCoinRate(int coinRate) {
this.coinRate = coinRate;
}
public String getAlipayAccount() {
return alipayAccount;
public String getNickName() {
return nickName;
}
public void setAlipayAccount(String alipayAccount) {
this.alipayAccount = alipayAccount;
public void setNickName(String nickName) {
this.nickName = nickName;
}
public int getCoin() {
......@@ -122,105 +42,18 @@ public class DrawcashBean implements Serializable {
this.cashOutMoneyArr = cashOutMoneyArr;
}
public int getVedioCompleteSum() {
return vedioCompleteSum;
}
public void setVedioCompleteSum(int vedioCompleteSum) {
this.vedioCompleteSum = vedioCompleteSum;
}
public int getVedioNeedSum() {
return vedioNeedSum;
}
public void setVedioNeedSum(int vedioNeedSum) {
this.vedioNeedSum = vedioNeedSum;
}
public double getFirstValue() {
return firstValue;
}
public void setFirstValue(double firstValue) {
this.firstValue = firstValue;
}
public List<CashOutMoneyArrBean> getCashOutDiamondsArr() {
return cashOutDiamondsArr;
}
public void setCashOutDiamondsArr(List<CashOutMoneyArrBean> cashOutDiamondsArr) {
this.cashOutDiamondsArr = cashOutDiamondsArr;
}
public class CashOutMoneyArrBean implements Serializable{
/**
* money : 1
* canUseOnce : true
* needFs : 2
* nowFriends : 0
* fsGiveCoin : 800
* once : true
* canCashOut : false
*/
private int money;
private boolean canUseOnce;//还有没有新人专享的机会
private int needFs;//需要多少朋友才能提现
private int nowFriends;//现在有多少了
private int fsGiveCoin;//朋友可以返给我多少
private boolean once;//是否是新人专享
private boolean canCashOut;//最终能不能提现
public int getMoney() {
private double money;
private boolean canCashOut;
public double getMoney() {
return money;
}
public void setMoney(int money) {
public void setMoney(double money) {
this.money = money;
}
public boolean isCanUseOnce() {
return canUseOnce;
}
public void setCanUseOnce(boolean canUseOnce) {
this.canUseOnce = canUseOnce;
}
public int getNeedFs() {
return needFs;
}
public void setNeedFs(int needFs) {
this.needFs = needFs;
}
public int getNowFriends() {
return nowFriends;
}
public void setNowFriends(int nowFriends) {
this.nowFriends = nowFriends;
}
public int getFsGiveCoin() {
return fsGiveCoin;
}
public void setFsGiveCoin(int fsGiveCoin) {
this.fsGiveCoin = fsGiveCoin;
}
public boolean isOnce() {
return once;
}
public void setOnce(boolean once) {
this.once = once;
}
public boolean isCanCashOut() {
return canCashOut;
}
......
......@@ -213,6 +213,7 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
switch (code) {
case 200://成功
view.showToast("提现成功");
getUserTaskMsg();
break;
default:
view.showToast(message);
......
package com.mints.goodmoney.mvp.presenters
import android.text.TextUtils
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.common.DeviceInfo
import com.mints.goodmoney.manager.AppHttpManager
import com.mints.goodmoney.manager.ShumeiManager
import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.mvp.model.*
import com.mints.goodmoney.mvp.model.BaseResponse
import com.mints.goodmoney.mvp.model.MainVedioMsgBean
import com.mints.goodmoney.mvp.model.UserBean
import com.mints.goodmoney.mvp.model.UserTaskMsgBean
import com.mints.goodmoney.mvp.views.HomeView
import com.mints.goodmoney.utils.DeviceUuidFactory
import com.mints.library.net.neterror.BaseSubscriber
......@@ -71,6 +73,7 @@ class HomePresenter : BasePresenter<HomeView>() {
if (isLinkView) return
view.hideLoading()
view.showToast(e.message)
view.getHallBaseMsgFail()
}
override fun onNext(baseResponse: BaseResponse<UserTaskMsgBean>) {
......@@ -79,7 +82,10 @@ class HomePresenter : BasePresenter<HomeView>() {
val message = baseResponse.getMessage()
when (code) {
200 -> view.getHallBaseMsgSuc(baseResponse.getData())
else -> view.showToast(message)
else ->{
view.getHallBaseMsgFail()
view.showToast(message)
}
}
}
})
......
......@@ -55,6 +55,45 @@ class LoginPresenter : BasePresenter<LoginView>() {
})
}
/**
* 绑定
*/
fun bindingMobile(mobile: String, smsCode: String) {
view.showLoading("加载中...")
val vo = HashMap<String, Any>()
vo["mobile"] = mobile
vo["smsCode"] = smsCode
vo["device"] = DeviceUuidFactory().deviceUuid.toString()
AppHttpManager.getInstance(loanApplication)
.call(loanService.bindingMobile(vo),
object : BaseSubscriber<BaseResponse<UserBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
view.showToast(e.message)
}
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)
view.loginSuc()
}
else -> view.showToast(message)
}
}
})
}
/**
* 登录
*/
......
......@@ -6,5 +6,6 @@ import com.mints.goodmoney.mvp.model.UserTaskMsgBean
interface HomeView : BaseView {
fun getHallBaseMsgSuc(data: UserTaskMsgBean)
fun getHallBaseMsgFail()
fun getHomeVedioMsgSuc(data: MainVedioMsgBean)
}
......@@ -150,6 +150,14 @@ public interface LoanService {
@POST("api/wechatlogin")
Observable<BaseResponse<UserBean>> wechatlogin(@Body Map<String, Object> vo);
/**
* 手机号绑定
*
* @return
*/
@POST("api/bindingMobile")
Observable<BaseResponse<UserBean>> bindingMobile(@Body Map<String, Object> vo);
/**
* 提交任务
*
......@@ -203,7 +211,7 @@ public interface LoanService {
*
* @return
*/
@POST("api/high/getUserCoinMsg")
@POST("api/getUserCoinMsg")
Observable<BaseResponse<DrawcashBean>> getDrawcashUserTaskMsg();
/**
......
......@@ -81,7 +81,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
Constant.CARRIER_OFFLINE_DOUBLE -> {
tvAwardContent.setText("离线收益奖励" + curCoin + "金币")
}
Constant.CARRIER_SIGNIN_HOMEPAGE_CARD -> {
Constant.CARRIER_SIGNIN_HOMEPAGE_AWARD -> {
tvAwardContent.setText("签到奖励" + curCoin + "金币")
}
Constant.CARRIER_GAME -> {
......
......@@ -37,10 +37,11 @@ class DrawcashActivity : BaseActivity(),
private val userManager by lazy { UserManager.getInstance() }
private val loginApi by lazy { LoginApi() }
private lateinit var drawcashAdapter: DrawcashAdapter
private var priceList: MutableList<DrawcashBean.CashOutMoneyArrBean>? = null
private var wxInfo: WXInfo? = null
private var userConfig: DrawcashBean? = null
private var isLoadRvItem: Boolean = true//是否首次加载rv item
private var isLoadRvItem: Boolean = true //是否首次加载rv item
override fun getContentViewLayoutID() = R.layout.activity_drawcash
......@@ -50,32 +51,9 @@ class DrawcashActivity : BaseActivity(),
tv_activity_title.text = "提现"
drawcashPresenter.attachView(this)
initText()
initRvView()
initListener()
}
private fun initText() {
tvDrawcashExplain.setText(
SpanUtils()
.append("提现说明:")
.append("\n")
.append("1、所有提现金额【无门槛】直接提现!新用户提现秒到账!")
.append("\n")
.append("2、由于提现需要实名制,非实名用户账号无法支持提现,请务必使用实名认证过的账号提现!")
.append("\n")
.append("3、单笔提现金额最低" + 0.3 + "元,最高" + 1000 + "元。")
.append("\n")
.append("4、提现申请将在3-5个工作日审核到账,请耐心等待。")
.append("\n")
.append("5、每日可申请提现一次,若当日限额已满,请次日申请。")
.append("\n")
.append("6、" + 0.3 + "元-" + 50 + "元,是新人专享福利,每个账号仅可享受一次。")
.create())
tvDrawcashHint.text = "* 如您或好友通过刷机等违规操作获取非法收益,平台将视情况扣除违规所得或冻结账号。" +
"\n* 最终解释权归本公司所有。"
}
override fun onResume() {
super.onResume()
......@@ -95,6 +73,10 @@ class DrawcashActivity : BaseActivity(),
when (v?.id) {
R.id.tv_activity_back -> finish()
R.id.tvDrawcashWx -> {
if (!TextUtils.isEmpty(userConfig?.openid)) {
return
}
val wechat = ShareSDK.getPlatform(Wechat.NAME)
if (!wechat.isClientValid) {
showToast("请先安装微信")
......@@ -106,30 +88,35 @@ class DrawcashActivity : BaseActivity(),
loginApi.login(this)
}
R.id.tvDrawcashNext -> {
// 校验当前金币< 选择金币 =提示 去做任务
// if(userConfig?.coin<)
// 是否登录
if (!userManager.userIsLogin()) {
readyGo(LoginActivity::class.java)
return
}
// 是否绑定手机号
if (TextUtils.isEmpty(userManager.mobile)) {
val bundle = Bundle()
bundle.putBoolean(Constant.LOGIN_FLAG, true)
readyGo(LoginActivity::class.java, bundle)
return
if (priceList != null && priceList!!.size > 0) {
// 校验当前金币< 选择金币 =提示 去做任务
if (userConfig?.coin!! < priceList!![drawcashAdapter?.getPosition()].money * 10000) {
showToast("金币不足,快去做任务吧")
return
}
// 是否登录
if (!userManager.userIsLogin()) {
readyGo(LoginActivity::class.java)
return
}
// 是否绑定手机号
if (TextUtils.isEmpty(userManager.mobile)) {
val bundle = Bundle()
bundle.putBoolean(Constant.LOGIN_FLAG, true)
readyGo(LoginActivity::class.java, bundle)
return
}
// 授权判断
if (TextUtils.isEmpty(userConfig?.openid)) {
showToast("微信未授权")
return
}
drawcashPresenter.saveTerminalInfo(ps, priceList!![drawcashAdapter?.getPosition()].money)
}
// 授权判断
if (TextUtils.isEmpty(userConfig?.openid)) {
showToast("微信未授权")
return
}
drawcashPresenter.saveTerminalInfo(ps, 0.0)
}
}
}
......@@ -140,11 +127,14 @@ class DrawcashActivity : BaseActivity(),
tvDrawcashGold.text = "${data.getCoin()}"
if (TextUtils.isEmpty(data.openid)) {
tvDrawcashWx.setText("去授权")
tvDrawcashName.setText("微信昵称")
} else {
tvDrawcashWx.setText("已授权")
tvDrawcashName.setText(data.nickName)
}
if (isLoadRvItem) {
priceList = data.cashOutMoneyArr
initRvView()
}
}
......@@ -178,11 +168,32 @@ class DrawcashActivity : BaseActivity(),
return false
}
private fun initText() {
tvDrawcashExplain.setText(
SpanUtils()
.append("提现说明:")
.append("\n")
.append("1、所有提现金额【无门槛】直接提现!新用户提现秒到账!")
.append("\n")
.append("2、由于提现需要实名制,非实名用户账号无法支持提现,请务必使用实名认证过的账号提现!")
.append("\n")
.append("3、单笔提现金额最低" + 0.3 + "元,最高" + 1000 + "元。")
.append("\n")
.append("4、提现申请将在3-5个工作日审核到账,请耐心等待。")
.append("\n")
.append("5、每日可申请提现一次,若当日限额已满,请次日申请。")
.append("\n")
.append("6、" + 0.3 + "元-" + 50 + "元,是新人专享福利,每个账号仅可享受一次。")
.create())
tvDrawcashHint.text = "* 如您或好友通过刷机等违规操作获取非法收益,平台将视情况扣除违规所得或冻结账号。" +
"\n* 最终解释权归本公司所有。"
}
private fun initRvView() {
val gridLayoutManager = GridLayoutManager(this, 3)
rvCash.layoutManager = gridLayoutManager
// vipAdapter = vipList?.let { VipAdapter(it) }!!
drawcashAdapter = DrawcashAdapter(null)
drawcashAdapter = priceList?.let { DrawcashAdapter(it) }!!
rvCash.adapter = drawcashAdapter
drawcashAdapter.setOnItemClickListener(this)
......
......@@ -109,9 +109,14 @@ class LoginActivity : BaseActivity()
.request(Manifest.permission.READ_PHONE_STATE)
.subscribe { granted: Boolean ->
if (granted) {
// 登录
mobile = mobile.replace(" ".toRegex(), "")
loginPresenter.login(mobile, code, ps)
if (loginFlag) {
loginPresenter.bindingMobile(mobile, code)
} else {
// 登录
loginPresenter.login(mobile, code, ps)
}
} else {
showMissingPermissionDialog("设备")
}
......@@ -152,10 +157,19 @@ class LoginActivity : BaseActivity()
}
override fun loginSuc() {
// false-登录 true-绑定手机号
if (loginFlag) {
showToast("绑定成功")
} else {
showToast("登录成功")
}
if (progressDialog != null) {
progressDialog.dismiss()
}
finish()
}
......@@ -185,6 +199,7 @@ class LoginActivity : BaseActivity()
private fun initView() {
// false-登录 true-绑定手机号
if (loginFlag) {
tvLoginWx.visibility = View.GONE
tvLoginNext.text = "绑定手机号"
}
......
......@@ -9,8 +9,10 @@ import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.mints.goodmoney.R
import com.mints.goodmoney.mvp.model.DrawcashBean
import java.lang.String
class DrawcashAdapter(val drawcashList: MutableList<String>?) :
class DrawcashAdapter(val priceList: MutableList<DrawcashBean.CashOutMoneyArrBean>) :
RecyclerView.Adapter<DrawcashAdapter.ViewHolder>() {
var myPos: Int = 0
......@@ -18,6 +20,17 @@ class DrawcashAdapter(val drawcashList: MutableList<String>?) :
lateinit var mOnItemClickListener: OnItemClickListener
init {
if (priceList != null && priceList.size > 0) {
for (i in 0..priceList.size - 1) {
if (priceList[i].isCanCashOut) {
myPos = i
break
}
}
}
}
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val llDrawItem: LinearLayout = view.findViewById(R.id.llDrawItem)
val tvDrawItemCash: TextView = view.findViewById(R.id.tvDrawItemCash)
......@@ -32,29 +45,46 @@ class DrawcashAdapter(val drawcashList: MutableList<String>?) :
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
// val drawcashBean = drawcashList[position]
val priceBean = priceList[position]
if (priceBean.money >= 1) {
holder.tvDrawItemCash.text = "${String.format("%.0f", priceBean.money)}元"
} else {
holder.tvDrawItemCash.text = "${priceBean.money}元"
}
holder.tvDrawItemGold.text = "约${String.format("%.0f", priceBean.money * 10000)}金币"
holder.llDrawItem.setOnClickListener {
mOnItemClickListener?.onItemClick(position)
notifyDataSetChanged()
if (priceBean.isCanCashOut) {
holder.llDrawItem.setEnabled(true)
mOnItemClickListener.onItemClick(position)
notifyDataSetChanged()
} else {
holder.llDrawItem.setEnabled(false)
}
}
if (getPosition() == position) {
//当前选中
holder.tvDrawItemCash.setTextColor(ContextCompat.getColor(context, R.color.white))
holder.tvDrawItemGold.setTextColor(ContextCompat.getColor(context, R.color.white))
holder.llDrawItem.setBackgroundResource(R.drawable.shape_vip_adapter_none)
} else {
holder.tvDrawItemCash.setTextColor(ContextCompat.getColor(context, R.color.black))
holder.tvDrawItemGold.setTextColor(ContextCompat.getColor(context, R.color.gray))
if (!priceBean.isCanCashOut) {
holder.tvDrawItemCash.setTextColor(ContextCompat.getColor(context, R.color.grayc))
holder.tvDrawItemGold.setTextColor(ContextCompat.getColor(context, R.color.grayc))
holder.llDrawItem.setBackgroundResource(R.drawable.shape_vip_adapter)
} else {
if (getPosition() == position) {
//当前选中
holder.tvDrawItemCash.setTextColor(ContextCompat.getColor(context, R.color.white))
holder.tvDrawItemGold.setTextColor(ContextCompat.getColor(context, R.color.white))
holder.llDrawItem.setBackgroundResource(R.drawable.shape_vip_adapter_none)
} else {
holder.tvDrawItemCash.setTextColor(ContextCompat.getColor(context, R.color.black))
holder.tvDrawItemGold.setTextColor(ContextCompat.getColor(context, R.color.gray))
holder.llDrawItem.setBackgroundResource(R.drawable.shape_vip_adapter)
}
}
holder.itemView.setTag(position)
}
// override fun getItemCount() = drawcashList!!.size
override fun getItemCount() = 15
override fun getItemCount() = priceList.size
interface OnItemClickListener {
fun onItemClick(position: Int)
......
......@@ -134,18 +134,23 @@ class MainFragment : BaseFragment(), HomeView, AdVideoCallback, View.OnClickList
}
// 离线收益
if (data.offlineBean.offlineIncome > 0) {
val bundle = Bundle()
bundle.putInt(Constant.MAIN_CUR_COIN, data.offlineBean.offlineIncome)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_OFFLINE_DOUBLE)
readyGo(AwardActivity::class.java, bundle)
}
// if (data.offlineBean.offlineIncome > 0) {
// val bundle = Bundle()
// bundle.putInt(Constant.MAIN_CUR_COIN, data.offlineBean.offlineIncome)
// bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_OFFLINE_DOUBLE)
// readyGo(AwardActivity::class.java, bundle)
// }
// 调用金币视频信息接口
homePresenter.getHomeVedioMsg()
}
override fun getHallBaseMsgFail() {
smallRewardCoin = 0
bigRewardCoin = 0
}
override fun getHomeVedioMsgSuc(data: MainVedioMsgBean) {
smallRewardCoin = data.smallRewardCoin
bigRewardCoin = data.bigRewardCoin
......@@ -178,8 +183,6 @@ class MainFragment : BaseFragment(), HomeView, AdVideoCallback, View.OnClickList
bundle.putInt(Constant.MAIN_CUR_COIN, smallRewardCoin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, Constant.CARRIER_HOMEVEDIO_SMALL)
readyGo(AwardActivity::class.java, bundle)
smallRewardCoin = 0
}
}
}
......
......@@ -24,10 +24,7 @@ import com.mints.goodmoney.manager.UserManager
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.AwardActivity
import com.mints.goodmoney.ui.activitys.LoginActivity
import com.mints.goodmoney.ui.activitys.MainActivity
import com.mints.goodmoney.ui.activitys.SettingsActivity
import com.mints.goodmoney.ui.activitys.*
import com.mints.goodmoney.ui.adapter.GvMyAdapter
import com.mints.goodmoney.ui.adapter.MainMyAdapter
import com.mints.goodmoney.ui.fragment.base.BaseFragment
......@@ -492,7 +489,7 @@ class MyFragment : BaseFragment(), MyView, MainMyAdapter.OnItemChildClickListene
return
}
// readyGo(GoldTryActivity::class.java)
readyGo(DrawcashActivity::class.java)
}
R.id.item_title_invitecode -> {
if (userConfig != null) {
......
......@@ -60,7 +60,7 @@ class BrowserLayout : LinearLayout {
mWebView!!.settings.builtInZoomControls = true
mWebView!!.settings.setSupportMultipleWindows(true)
//将图片调整到适合webview的大小
mWebView!!.settings.useWideViewPort = true
mWebView!!.settings.useWideViewPort = false
mWebView!!.settings.loadWithOverviewMode = true
mWebView!!.settings.setSupportZoom(true)
mWebView!!.settings.pluginState = WebSettings.PluginState.ON
......
......@@ -44,7 +44,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="30dp"
android:layout_marginTop="20dp"
android:layout_marginTop="26dp"
android:layout_marginRight="30dp"
android:background="@drawable/shape_bg_award"
android:orientation="vertical">
......@@ -54,7 +54,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="60dp"
android:layout_marginTop="70dp"
android:layout_marginBottom="10dp"
android:textColor="@color/black_text"
android:textSize="18sp"
......@@ -102,7 +102,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@mipmap/ic_launcher" />
android:src="@mipmap/ic_award" />
</FrameLayout>
......
......@@ -60,6 +60,7 @@
android:layout_margin="20dp">
<TextView
android:id="@+id/tvDrawcashName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@mipmap/ic_draw_wx"
......
......@@ -31,7 +31,7 @@
android:layout_marginTop="4dp"
android:layout_marginBottom="8dp"
android:gravity="center"
android:textSize="14sp" />
android:textSize="12sp" />
</LinearLayout>
\ No newline at end of file
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