Commit de66b7fb authored by jyx's avatar jyx

代码优化

parent 23d1a954
......@@ -10,8 +10,8 @@ android {
applicationId "com.duben.infinitefunjia"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 726
versionName "7.2.6"
versionCode 728
versionName "7.2.8"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -56,8 +56,6 @@ object GravityEngineManager {
override fun onSuccess(responseJson: JSONObject?, initializeBody: JSONObject?) {
//responseJson=={"nameValuePairs":{"token":"b10c4ce9-b40b-3f89-b442-237fe82e5efd"}}
var json = ""
var json2 = ""
......
......@@ -401,7 +401,7 @@ public interface LoanService {
*
* @return
*/
@POST("api/appNa/ylclReport")
@POST("appNa/ylclReport")
Observable<BaseResponse<Object>> ylclReport(@Body Map<String, Object> vo);
/**
......
......@@ -202,7 +202,6 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
if (!TextUtils.isEmpty(bean.remarks)) {
tv_vip_hint.text = bean.remarks
tv_vip_hint.visibility = View.VISIBLE
tv_vip_back.visibility = View.VISIBLE
if (bean.isShowCycTips) {
tv_vip_hint.setTextColor(Color.parseColor("#FFAC5E"))
......@@ -213,7 +212,6 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
}
} else {
tv_vip_hint.visibility = View.INVISIBLE
tv_vip_back.visibility = View.INVISIBLE
}
if (!TextUtils.isEmpty(bean.buttonText)) {
......@@ -404,9 +402,6 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
}
R.id.tv_vip_back -> {
VipBackDialog(this).show()
}
}
}
......@@ -430,7 +425,6 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
ic_vip_quit.setOnClickListener(this)
tvVipPay.setOnClickListener(this)
tvVipAgreement.setOnClickListener(this)
tv_vip_back.setOnClickListener(this)
ll_vip_alipay.setOnClickListener(this)
ll_vip_wx.setOnClickListener(this)
cbVipAgreement.setOnCheckedChangeListener(this)
......
package com.duben.infinitefunjia.ui.widgets
import android.app.Dialog
import android.content.Context
import android.graphics.Color
import android.view.Gravity
import android.view.View
import android.view.WindowManager
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.duben.infinitefunjia.R
import com.duben.infinitefunjia.utils.SpanUtils
class VipBackDialog(private val context: Context) : Dialog(context, R.style.dialog) {
private val lp: WindowManager.LayoutParams
private val tv_text1: TextView
private val tv_text2: TextView
private val tv_ok: TextView
init {
setContentView(R.layout.dialog_vip_back)
// 设置window属性
lp = window!!.attributes
lp.gravity = Gravity.CENTER
lp.width = WindowManager.LayoutParams.MATCH_PARENT
lp.windowAnimations = R.style.DialogAnimBottom
window!!.attributes = lp
tv_text1 = findViewById<View>(R.id.tv_text1) as TextView
tv_text2 = findViewById<View>(R.id.tv_text2) as TextView
tv_ok = findViewById<View>(R.id.tv_ok) as TextView
tv_text1.text = SpanUtils()
.append("参与条件:")
.setBold()
.setForegroundColor(Color.BLACK)
.append(" 全额返活动仅限带有“下单立返标签的会员套餐参与,购买套餐且开通自动续费持续30分钟以上的用户可获得全额返资格;")
.setForegroundColor(ContextCompat.getColor(context,R.color.gray))
.create()
tv_text2.text = SpanUtils()
.append("返还时间:")
.setBold()
.setForegroundColor(Color.BLACK)
.append(" 获得资格的用户在购买套餐并开通自动续费后的30分钟内返还。")
.setForegroundColor(ContextCompat.getColor(context,R.color.gray))
.create()
tv_ok.setOnClickListener { dismiss() }
}
}
\ No newline at end of file
......@@ -264,14 +264,5 @@
android:textSize="20sp" />
</io.supercharge.shimmerlayout.ShimmerLayout>
<TextView
android:id="@+id/tv_vip_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="全额返规则"
android:textColor="#97ffffff"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:background="@drawable/shape_vip_back"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="客服联系方式"
android:textColor="@color/black"
android:textSize="18sp" />
<TextView
android:id="@+id/tv_text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:lineSpacingExtra="4dp"
android:text="点击拨打"
android:textColor="#828383"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_4"
android:lineSpacingExtra="4dp"
android:text="点击拨打"
android:textColor="#828383"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:id="@+id/tv_ok"
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_gravity="center"
android:layout_marginStart="20dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
android:background="@drawable/shape_red"
android:gravity="center"
android:text="我知道了"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
</RelativeLayout>
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