Commit 51f4a26b authored by 张释方's avatar 张释方

提交代码(待解决UserManager)

parent 98e429ed
package com.mints.street.adapter package com.mints.street.adapter
import android.content.Context import android.content.Context
import com.alibaba.android.vlayout.LayoutHelper
import com.alibaba.android.vlayout.layout.GridLayoutHelper import com.alibaba.android.vlayout.layout.GridLayoutHelper
import com.fry.base.adapter.AbstractVLayoutBaseAdapter import com.fry.base.adapter.AbstractVLayoutBaseAdapter
import com.fry.base.adapter.BindingViewHolder import com.fry.base.adapter.BindingViewHolder
......
...@@ -21,7 +21,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ConsumerBe ...@@ -21,7 +21,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ConsumerBe
holder.binding.tvOldprice.paint.flags = Paint.STRIKE_THRU_TEXT_FLAG holder.binding.tvOldprice.paint.flags = Paint.STRIKE_THRU_TEXT_FLAG
var a = holder.binding.bg.layoutParams var a = holder.binding.bg.layoutParams
holder.binding.bg.setMargin(AppUtils.dp2Px(context, 10F), 0, AppUtils.dp2Px(context, 10F), 0, null, null, null) holder.binding.bg.setMargin(AppUtils.dp2Px(context, 10F), 0, AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F), null, null, null)
if (mposition == position) { if (mposition == position) {
holder.binding.bg.setBackgroundResource(R.drawable.shape_bg_payment_down) holder.binding.bg.setBackgroundResource(R.drawable.shape_bg_payment_down)
......
...@@ -62,14 +62,14 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList ...@@ -62,14 +62,14 @@ class MyFragment : BaseFragment<FragmentMyBinding, MyViewModel>(), OnRefreshList
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
// if (!TextUtils.isEmpty(userManager.getUserID())) { if (!TextUtils.isEmpty(userManager.getUserID())) {
//查询用户登录信息 //查询用户登录信息
viewModel.getmyInfo() viewModel.getmyInfo()
// refreshHighTask() // refreshHighTask()
// } else { } else {
// 游客登录 // 游客登录
// myPresenter.userLogin() // myPresenter.userLogin()
// } }
} }
private fun initListener() { private fun initListener() {
......
...@@ -38,6 +38,8 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>() ...@@ -38,6 +38,8 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
private fun initListener() { private fun initListener() {
iv_left_icon.setOnClickListener(this) iv_left_icon.setOnClickListener(this)
bt_try.setOnClickListener(this) bt_try.setOnClickListener(this)
ly_weixin.setOnClickListener(this)
ly_alipay.setOnClickListener(this)
} }
private fun initView() { private fun initView() {
...@@ -98,12 +100,33 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>() ...@@ -98,12 +100,33 @@ class OpenvipActivity : BaseActivity<ActivityOpenvipBinding, OpenvipViewModel>()
override fun onClick(v: View?) { override fun onClick(v: View?) {
when (v?.id) { when (v?.id) {
R.id.iv_left_icon -> finish() R.id.iv_left_icon -> finish()
R.id.ly_weixin->{//支付宝支付
//设置选中样式
setOnChecked(1)
}
R.id.ly_alipay->{//支付宝支付
//设置选中样式
setOnChecked(2)
}
R.id.bt_try -> { R.id.bt_try -> {
} }
} }
} }
private fun setOnChecked(paymentflag: Int?) {
when(paymentflag){
1->{//选中微信
iv_weixin.setImageResource(R.mipmap.pay_select)
iv_alipay.setImageResource(R.mipmap.pay_unselect)
}
2->{//选中支付宝
iv_weixin.setImageResource(R.mipmap.pay_unselect)
iv_alipay.setImageResource(R.mipmap.pay_select)
}
}
}
} }
...@@ -92,7 +92,7 @@ public class GsonConverterFactory extends Converter.Factory { ...@@ -92,7 +92,7 @@ public class GsonConverterFactory extends Converter.Factory {
int code = br.getstatus(); int code = br.getstatus();
if (code == 401) { if (code == 401) {
try { try {
UserManager.Companion.getINSTANCE().userLogout(); // UserManager.Companion.getINSTANCE().userLogout();
// Activity forwardActivity = ForegroundOrBackground.getApp_activity(); // Activity forwardActivity = ForegroundOrBackground.getApp_activity();
// if (forwardActivity != null) { // if (forwardActivity != null) {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:overScrollMode="never"> android:overScrollMode="never">
...@@ -51,11 +51,6 @@ ...@@ -51,11 +51,6 @@
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
</com.mints.street.widget.CoverFlowViewPager> </com.mints.street.widget.CoverFlowViewPager>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -360,17 +355,10 @@ ...@@ -360,17 +355,10 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/listview" android:id="@+id/listview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="100dp" /> android:layout_height="100dp" />
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ly_weixin" android:id="@+id/ly_weixin"
...@@ -397,10 +385,12 @@ ...@@ -397,10 +385,12 @@
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="18sp" /> android:textSize="18sp" />
<CheckBox <ImageView
style="@style/MyCheckBox" android:layout_gravity="center"
android:layout_width="wrap_content" android:id="@+id/iv_weixin"
android:layout_height="wrap_content" /> android:src="@mipmap/pay_unselect"
android:layout_width="20dp"
android:layout_height="20dp" />
</LinearLayout> </LinearLayout>
<View <View
...@@ -435,10 +425,12 @@ ...@@ -435,10 +425,12 @@
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="18sp" /> android:textSize="18sp" />
<CheckBox <ImageView
style="@style/MyCheckBox" android:layout_gravity="center"
android:layout_width="wrap_content" android:src="@mipmap/pay_unselect"
android:layout_height="wrap_content" /> android:id="@+id/iv_alipay"
android:layout_width="20dp"
android:layout_height="20dp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
......
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