Commit 48c73fdc authored by mengcuiguang's avatar mengcuiguang

添加提现接口

parent 79df58b6
...@@ -86,6 +86,14 @@ public class TrackManager { ...@@ -86,6 +86,14 @@ public class TrackManager {
trackPresenter.reportAddCoinMsg(vo); trackPresenter.reportAddCoinMsg(vo);
} }
} }
public void addCashoutReq(String unitId) {
HashMap<String, Object> vo = new HashMap<>();
vo.put("unitId", unitId);
if (trackPresenter != null) {
trackPresenter.addCashoutReq(vo);
}
}
} }
...@@ -22,8 +22,17 @@ public class SignInfoBean implements Serializable { ...@@ -22,8 +22,17 @@ public class SignInfoBean implements Serializable {
private double cashCashSecond;//第二次奖励0.01元 private double cashCashSecond;//第二次奖励0.01元
private int sumCash;//标题余额 private int sumCash;//标题余额
private int signDay; private int signDay;
private String unitId;
private ArrayList<Integer> signWeekCashArr;//前7天展示 private ArrayList<Integer> signWeekCashArr;//前7天展示
public String getUnitId() {
return unitId;
}
public void setUnitId(String unitId) {
this.unitId = unitId;
}
public double getSurCash() { public double getSurCash() {
return surCash; return surCash;
} }
......
...@@ -303,4 +303,22 @@ public class TrackPresenter extends BaseTrackPresenter { ...@@ -303,4 +303,22 @@ public class TrackPresenter extends BaseTrackPresenter {
} }
}); });
} }
public void addCashoutReq(HashMap<String, Object> vo) {
AppHttpManager.getInstance(loanApplication)
.call(loanService.addCashoutReq(vo),
new BaseSubscriber<BaseResponse<JsonObject>>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(BaseResponse<JsonObject> baseResponse) {
}
});
}
} }
...@@ -263,6 +263,14 @@ public interface LoanService { ...@@ -263,6 +263,14 @@ public interface LoanService {
@POST("api/cash/cashPage/di") @POST("api/cash/cashPage/di")
Observable<BaseResponse<DrawInfoBean>> cashPageDi(); Observable<BaseResponse<DrawInfoBean>> cashPageDi();
/**
* 提现
*
* @return
*/
@POST("api/cash/addCashoutReq")
Observable<BaseResponse<JsonObject>> addCashoutReq(@Body Map<String, Object> vo);
/** /**
* 默认http工厂 * 默认http工厂
*/ */
......
...@@ -28,6 +28,7 @@ import com.duben.dayplaylet.ad.half.HalfScreenManager ...@@ -28,6 +28,7 @@ import com.duben.dayplaylet.ad.half.HalfScreenManager
import com.duben.dayplaylet.common.AppConfig import com.duben.dayplaylet.common.AppConfig
import com.duben.dayplaylet.common.Constant import com.duben.dayplaylet.common.Constant
import com.duben.dayplaylet.manager.LocalVedioManager import com.duben.dayplaylet.manager.LocalVedioManager
import com.duben.dayplaylet.manager.TrackManager
import com.duben.dayplaylet.manager.UserManager import com.duben.dayplaylet.manager.UserManager
import com.duben.dayplaylet.mvp.model.* import com.duben.dayplaylet.mvp.model.*
import com.duben.dayplaylet.mvp.presenters.HomePresenter import com.duben.dayplaylet.mvp.presenters.HomePresenter
...@@ -218,6 +219,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -218,6 +219,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
Constant.CARRIERTYPE_SIGN_DRAW -> { Constant.CARRIERTYPE_SIGN_DRAW -> {
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
// 1、第二次打款 // 1、第二次打款
TrackManager.getInstance().addCashoutReq(signMsg?.unitId)
showDrawAlipayDialog(signMsg?.cashCashSecond ?: 0.01) showDrawAlipayDialog(signMsg?.cashCashSecond ?: 0.01)
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
// 2、第二次展示签到余额 // 2、第二次展示签到余额
...@@ -431,6 +434,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR ...@@ -431,6 +434,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
* 首次打款弹窗 * 首次打款弹窗
*/ */
private fun showDrawAlipayDialog(cash: Double) { private fun showDrawAlipayDialog(cash: Double) {
TrackManager.getInstance().addCashoutReq(signMsg?.unitId)
drawAlipayDialog = DrawAlipayDialog(requireContext(), cash) drawAlipayDialog = DrawAlipayDialog(requireContext(), cash)
drawAlipayDialog!!.show() drawAlipayDialog!!.show()
} }
......
...@@ -84,12 +84,12 @@ class DrawCashDialog(private val index: Int = 0) : BaseBottomSheetDialog() { ...@@ -84,12 +84,12 @@ class DrawCashDialog(private val index: Int = 0) : BaseBottomSheetDialog() {
if (isSelected) { if (isSelected) {
indicator.visibility = View.VISIBLE indicator.visibility = View.VISIBLE
text.typeface = Typeface.defaultFromStyle(Typeface.BOLD) text.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
text.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18f) text.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22f)
text.setTextColor(ContextCompat.getColor(requireContext(), R.color.black_text)) text.setTextColor(ContextCompat.getColor(requireContext(), R.color.black_text))
} else { } else {
indicator.visibility = View.INVISIBLE indicator.visibility = View.INVISIBLE
text.typeface = Typeface.defaultFromStyle(Typeface.NORMAL) text.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
text.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16f) text.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20f)
text.setTextColor(ContextCompat.getColor(requireContext(), R.color.color_8D8F90)) text.setTextColor(ContextCompat.getColor(requireContext(), R.color.color_8D8F90))
} }
} }
......
...@@ -16,6 +16,7 @@ import com.duben.dayplaylet.ad.AdStatusListener ...@@ -16,6 +16,7 @@ import com.duben.dayplaylet.ad.AdStatusListener
import com.duben.dayplaylet.ad.NoPreAdManager import com.duben.dayplaylet.ad.NoPreAdManager
import com.duben.dayplaylet.common.AppConfig import com.duben.dayplaylet.common.AppConfig
import com.duben.dayplaylet.common.Constant import com.duben.dayplaylet.common.Constant
import com.duben.dayplaylet.manager.TrackManager
import com.duben.dayplaylet.mvp.model.DrawInfoBean import com.duben.dayplaylet.mvp.model.DrawInfoBean
import com.duben.dayplaylet.mvp.presenters.DrawCashPresenter import com.duben.dayplaylet.mvp.presenters.DrawCashPresenter
import com.duben.dayplaylet.mvp.views.DrawCashView import com.duben.dayplaylet.mvp.views.DrawCashView
...@@ -206,6 +207,8 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O ...@@ -206,6 +207,8 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
showAd(Constant.CARRIERTYPE_ONLY_SHOW) showAd(Constant.CARRIERTYPE_ONLY_SHOW)
} else { } else {
//发起提现 //发起提现
TrackManager.getInstance().addCashoutReq(currentDrawInfo?.unitId)
showToast("提现成功")
} }
} }
11 -> { 11 -> {
...@@ -294,13 +297,16 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O ...@@ -294,13 +297,16 @@ class DrawCashFragment : LazyLoadBaseFragment(), DrawCashView, DrawCashAdapter.O
private fun adCloseNext(carrierType: String) { private fun adCloseNext(carrierType: String) {
when (carrierType) { when (carrierType) {
Constant.CARRIERTYPE_ONLY_SHOW -> { Constant.CARRIERTYPE_ONLY_SHOW -> {
TrackManager.getInstance().addCashoutReq(currentDrawInfo?.unitId)
Handler(Looper.getMainLooper()).postDelayed({ Handler(Looper.getMainLooper()).postDelayed({
showToast("提现成功") showToast("提现成功")
}, 800) }, 800)
} }
Constant.CARRIERTYPE_REWARD_COIN -> { Constant.CARRIERTYPE_REWARD_COIN -> {
} }
Constant.CARRIERTYPE_REWARD_DI -> { Constant.CARRIERTYPE_REWARD_DI -> {
} }
} }
} }
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/bottom_tab_main" android:text="@string/bottom_tab_main"
android:textColor="@drawable/item_txt_sel" android:textColor="@drawable/item_txt_sel"
android:textSize="11sp" /> android:textSize="13sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/bottom_tab_music" android:text="@string/bottom_tab_music"
android:textColor="@drawable/item_txt_sel" android:textColor="@drawable/item_txt_sel"
android:textSize="11sp" /> android:textSize="13sp" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/bottom_tab_redpkg" android:text="@string/bottom_tab_redpkg"
android:textColor="@drawable/item_txt_sel" android:textColor="@drawable/item_txt_sel"
android:textSize="11sp" /> android:textSize="13sp" />
</LinearLayout> </LinearLayout>
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/bottom_tab_my" android:text="@string/bottom_tab_my"
android:textColor="@drawable/item_txt_sel" android:textColor="@drawable/item_txt_sel"
android:textSize="11sp" /> android:textSize="13sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
......
...@@ -238,15 +238,14 @@ ...@@ -238,15 +238,14 @@
android:layout_weight="2" android:layout_weight="2"
android:background="@mipmap/bg_sign_green7" android:background="@mipmap/bg_sign_green7"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:paddingLeft="10dp" android:paddingLeft="10dp">
android:paddingRight="10dp">
<LinearLayout <LinearLayout
android:id="@+id/ll_sign7" android:id="@+id/ll_sign7"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:layout_marginLeft="30dp" android:layout_marginLeft="20dp"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
...@@ -270,10 +269,11 @@ ...@@ -270,10 +269,11 @@
</LinearLayout> </LinearLayout>
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="50dp"
android:layout_height="wrap_content" android:layout_height="20dp"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:layout_toRightOf="@+id/ll_sign7" android:layout_alignParentRight="true"
android:scaleType="fitXY"
android:src="@mipmap/ic_sign_draw"></ImageView> android:src="@mipmap/ic_sign_draw"></ImageView>
</RelativeLayout> </RelativeLayout>
......
...@@ -9,10 +9,13 @@ ...@@ -9,10 +9,13 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp" android:layout_marginStart="12dp"
android:layout_marginTop="10dp" android:layout_marginTop="12dp"
android:layout_marginEnd="12dp" android:layout_marginEnd="12dp"
android:background="@drawable/shape_withdraw" android:background="@drawable/shape_withdraw"
android:padding="6dp"> android:paddingLeft="6dp"
android:paddingTop="12dp"
android:paddingRight="6dp"
android:paddingBottom="12dp">
<TextView <TextView
android:id="@+id/tv_title" android:id="@+id/tv_title"
...@@ -20,7 +23,8 @@ ...@@ -20,7 +23,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_10" android:layout_marginStart="@dimen/dp_10"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:text="红包余额(元)" /> android:text="红包余额(元)"
android:textSize="16sp" />
<TextView <TextView
android:id="@+id/tv_cash" android:id="@+id/tv_cash"
...@@ -31,7 +35,7 @@ ...@@ -31,7 +35,7 @@
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:text="90.00 ≈ 900000个" android:text="90.00 ≈ 900000个"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="20sp" /> android:textSize="24sp" />
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -45,42 +49,44 @@ ...@@ -45,42 +49,44 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/ry_draw" android:id="@+id/ry_draw"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:padding="@dimen/dp_10" /> android:padding="@dimen/dp_10" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="14dp" android:layout_marginStart="14dp"
android:text="提现方式" android:text="提现方式:"
android:textColor="@color/black" /> android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold" />
<RadioGroup <RadioGroup
android:id="@+id/rg_draw" android:id="@+id/rg_draw"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="46dp" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:orientation="horizontal" android:layout_gravity="center_horizontal"
android:paddingStart="15dp" android:gravity="center_horizontal"
android:paddingEnd="15dp"> android:orientation="horizontal">
<RadioButton <RadioButton
android:id="@+id/rb_wechat" android:id="@+id/rb_wechat"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_10"
android:layout_weight="1"
android:background="@drawable/selector_withdraw_wx" android:background="@drawable/selector_withdraw_wx"
android:button="@null" android:button="@null"
android:checked="false" /> android:checked="false" />
<RadioButton <RadioButton
android:id="@+id/rb_alipay" android:id="@+id/rb_alipay"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_10" android:layout_marginLeft="10dp"
android:layout_weight="1"
android:background="@drawable/selector_withdraw_zfb" android:background="@drawable/selector_withdraw_zfb"
android:button="@null" android:button="@null"
android:checked="true" /> android:checked="true" />
...@@ -92,8 +98,9 @@ ...@@ -92,8 +98,9 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginTop="@dimen/dp_10" android:layout_marginTop="12dp"
android:layout_marginEnd="15dp" android:layout_marginEnd="15dp"
android:layout_marginBottom="12dp"
android:background="@drawable/shape_withdraw_header"> android:background="@drawable/shape_withdraw_header">
<ImageView <ImageView
......
...@@ -173,17 +173,17 @@ ...@@ -173,17 +173,17 @@
<FrameLayout <FrameLayout
android:id="@+id/iv_main_sign" android:id="@+id/iv_main_sign"
android:visibility="gone"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="400dp" android:layout_marginTop="400dp"
android:visibility="gone"
android:layout_marginRight="20dp" android:layout_marginRight="20dp"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="80dp"
android:layout_height="wrap_content" android:layout_height="80dp"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
android:src="@mipmap/ic_main_sign" /> android:src="@mipmap/ic_main_sign" />
......
...@@ -24,11 +24,12 @@ ...@@ -24,11 +24,12 @@
<TextView <TextView
android:id="@+id/title_tv" android:id="@+id/title_tv"
android:maxLines="2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2"
android:text="重回80年代" android:text="重回80年代"
android:textColor="@color/black" /> android:textColor="@color/black"
android:textSize="15sp" />
<TextView <TextView
android:id="@+id/info_tv_max" android:id="@+id/info_tv_max"
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:text="重回80年代" android:text="重回80年代"
android:textColor="@color/gray" android:textColor="@color/gray"
android:textSize="12sp" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/info_tv" android:id="@+id/info_tv"
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,7 @@
android:maxLines="2" android:maxLines="2"
android:text="重回80年代" android:text="重回80年代"
android:textColor="@color/red" android:textColor="@color/red"
android:textSize="12sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
...@@ -59,8 +60,8 @@ ...@@ -59,8 +60,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:visibility="gone"
android:orientation="vertical" android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
......
...@@ -51,19 +51,20 @@ ...@@ -51,19 +51,20 @@
<com.duben.dayplaylet.ui.widgets.CountDownVideoView <com.duben.dayplaylet.ui.widgets.CountDownVideoView
android:id="@+id/cdvv" android:id="@+id/cdvv"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<TextView <TextView
android:layout_width="42dp" android:layout_width="82dp"
android:layout_height="18dp" android:layout_height="26dp"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginTop="-6dp" android:layout_marginTop="-6dp"
android:background="@drawable/shape_tv_video" android:background="@drawable/shape_tv_video"
android:gravity="center" android:gravity="center"
android:text="+20元" android:text="+20元"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
app:cd_arc_color="@color/color_fea54c" app:cd_arc_color="@color/color_fea54c"
app:cd_arc_width="3dp" app:cd_arc_width="3dp"
app:cd_bg_color="@color/white" app:cd_bg_color="@color/white"
app:cd_circle_radius="25dp" app:cd_circle_radius="32dp"
app:cd_location="top" app:cd_location="top"
app:cd_retreat_type="forward" app:cd_retreat_type="forward"
app:cd_text_color="#00000000" app:cd_text_color="#00000000"
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
<ImageView <ImageView
android:id="@+id/iv_count_redbox" android:id="@+id/iv_count_redbox"
android:layout_width="28dp" android:layout_width="45dp"
android:layout_height="32dp" android:layout_height="52dp"
android:layout_gravity="center" android:layout_gravity="center"
android:src="@mipmap/withdraw_wx" android:src="@mipmap/withdraw_wx"
tools:visibility="gone" /> tools:visibility="gone" />
......
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