我的信息完善
This commit is contained in:
parent
f1b89e85af
commit
a4dda3564b
@ -166,3 +166,38 @@ data class UpCaptain(
|
|||||||
var reason: String=""
|
var reason: String=""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交党员认证资料
|
||||||
|
* @property address String
|
||||||
|
* @property area String
|
||||||
|
* @property areaCode String
|
||||||
|
* @property city String
|
||||||
|
* @property cityCode String
|
||||||
|
* @property materialList List<Material>
|
||||||
|
* @property partyMembershipTime String
|
||||||
|
* @property province String
|
||||||
|
* @property provinceCityArea String
|
||||||
|
* @property provinceCode String
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
data class UpPart(
|
||||||
|
var address: String = "",
|
||||||
|
var area: String = "",
|
||||||
|
var areaCode: String = "",
|
||||||
|
var city: String = "",
|
||||||
|
var cityCode: String = "",
|
||||||
|
var materialList: MutableList<Material> = mutableListOf(),
|
||||||
|
var partyMembershipTime: String = "",
|
||||||
|
var province: String = "",
|
||||||
|
var provinceCityArea: String = "",
|
||||||
|
var provinceCode: String = ""
|
||||||
|
)
|
||||||
|
|
||||||
|
data class Material(
|
||||||
|
var isDel: String="",
|
||||||
|
var materialId: String="",
|
||||||
|
var materialUrl: String="",
|
||||||
|
var sortValue: String=""
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ data class UserBean(
|
|||||||
var token :String,
|
var token :String,
|
||||||
var id :String,
|
var id :String,
|
||||||
var roleId :String,
|
var roleId :String,
|
||||||
|
var contactPhone :String,
|
||||||
var uname :String,
|
var uname :String,
|
||||||
var registerPhone :String,
|
var registerPhone :String,
|
||||||
var companyName :String,
|
var companyName :String,
|
||||||
@ -32,6 +33,9 @@ data class UserBean(
|
|||||||
var isCarCaptain :String,
|
var isCarCaptain :String,
|
||||||
var contactName :String,
|
var contactName :String,
|
||||||
var idcardName :String,
|
var idcardName :String,
|
||||||
|
var avatar :String,
|
||||||
|
var approvedType :String,//准驾类型
|
||||||
|
var partyMemberCertification :String,//党员认证(0=未认证,1=已认证)
|
||||||
var captainId :String
|
var captainId :String
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import com.dahe.gldriver.bean.UpBankInfoBean
|
|||||||
import com.dahe.gldriver.bean.UpCaptain
|
import com.dahe.gldriver.bean.UpCaptain
|
||||||
import com.dahe.gldriver.bean.UpDriverInfoBean
|
import com.dahe.gldriver.bean.UpDriverInfoBean
|
||||||
import com.dahe.gldriver.bean.UpDrivingInfoBean
|
import com.dahe.gldriver.bean.UpDrivingInfoBean
|
||||||
|
import com.dahe.gldriver.bean.UpPart
|
||||||
import com.dahe.gldriver.bean.UpPersonInfoBean
|
import com.dahe.gldriver.bean.UpPersonInfoBean
|
||||||
import com.dahe.gldriver.bean.UpPicBean
|
import com.dahe.gldriver.bean.UpPicBean
|
||||||
import com.dahe.gldriver.bean.UpQualiInfoBean
|
import com.dahe.gldriver.bean.UpQualiInfoBean
|
||||||
@ -168,6 +169,23 @@ interface Api {
|
|||||||
fun authenticationCaptain(@Body bankBean: AuthTeamBean): Observable<CommonResponseBean<String>>
|
fun authenticationCaptain(@Body bankBean: AuthTeamBean): Observable<CommonResponseBean<String>>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交党员认证资料
|
||||||
|
* @param upPart UpPart
|
||||||
|
* @return Observable<CommonResponseBean<String>>
|
||||||
|
*/
|
||||||
|
@POST(BASE_URL+"driver/driver/submitToCpcAuthentication")
|
||||||
|
fun submitToCpcAuthentication(@Body upPart: UpPart): Observable<CommonResponseBean<String>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询党员认证资料
|
||||||
|
* @param upPart UpPart
|
||||||
|
* @return Observable<CommonResponseBean<String>>
|
||||||
|
*/
|
||||||
|
@POST(BASE_URL+"driver/driver/getCpcAuthenticationInfo")
|
||||||
|
fun getCpcAuthenticationInfo(): Observable<CommonResponseBean<UpPart>>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 货源列表
|
* 货源列表
|
||||||
* */
|
* */
|
||||||
|
@ -2,9 +2,21 @@ package com.dahe.gldriver.ui.account.authperson
|
|||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import com.dahe.gldriver.R
|
import com.dahe.gldriver.R
|
||||||
|
import com.dahe.gldriver.bean.Material
|
||||||
|
import com.dahe.gldriver.bean.UpDrivingInfoBean
|
||||||
|
import com.dahe.gldriver.bean.UpPart
|
||||||
import com.dahe.gldriver.databinding.ActivityAuthPartyBinding
|
import com.dahe.gldriver.databinding.ActivityAuthPartyBinding
|
||||||
|
import com.dahe.gldriver.net.BaseObserver
|
||||||
|
import com.dahe.gldriver.net.DataManager
|
||||||
|
import com.dahe.gldriver.net.RxHttpCallBack
|
||||||
|
import com.dahe.gldriver.utils.OcrUtils
|
||||||
|
|
||||||
import com.dahe.mylibrary.base.BaseActivity
|
import com.dahe.mylibrary.base.BaseActivity
|
||||||
|
import com.dahe.mylibrary.net.CommonResponseBean
|
||||||
|
import com.dahe.mylibrary.utils.ImageLoader
|
||||||
|
import com.dahe.mylibrary.utils.PickerUtils
|
||||||
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
|
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName AuthPartyActivity
|
* @ClassName AuthPartyActivity
|
||||||
@ -13,11 +25,68 @@ import com.dahe.mylibrary.base.BaseActivity
|
|||||||
* @Description 党员认证
|
* @Description 党员认证
|
||||||
*/
|
*/
|
||||||
class AuthPartyActivity : BaseActivity<ActivityAuthPartyBinding>() {
|
class AuthPartyActivity : BaseActivity<ActivityAuthPartyBinding>() {
|
||||||
|
|
||||||
|
var upPart = UpPart()
|
||||||
override fun initView(savedInstanceState: Bundle?) {
|
override fun initView(savedInstanceState: Bundle?) {
|
||||||
setStatusBarColor(R.color.white)
|
setStatusBarColor(R.color.white)
|
||||||
setTitleBar("党员认证", true)
|
setTitleBar("党员认证", true)
|
||||||
|
binding.run {
|
||||||
|
tvData.setOnClickListener {
|
||||||
|
PickerUtils.getInstance().showDate(this@AuthPartyActivity) {
|
||||||
|
upPart.partyMembershipTime = it
|
||||||
|
tvData.text = it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tvAddress.setOnClickListener {
|
||||||
|
PickerUtils.getInstance()
|
||||||
|
.showAddress(this@AuthPartyActivity) { province, city, county ->
|
||||||
|
upPart.run {
|
||||||
|
this.province = province.name
|
||||||
|
this.city = city.name
|
||||||
|
this.area = county.name
|
||||||
|
this.provinceCode = county.code
|
||||||
|
this.cityCode = city.code
|
||||||
|
this.areaCode = county.code
|
||||||
|
this.provinceCityArea =
|
||||||
|
"""${province.name}-${city.name}-${county.name}"""
|
||||||
|
}
|
||||||
|
tvAddress.text = """${province.name}-${city.name}-${county.name}"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ivUp.setOnClickListener {
|
||||||
|
OcrUtils.getInstance().noOcrUpPic(mContext, this@AuthPartyActivity) { picPath, _ ->
|
||||||
|
upPart.materialList.add(0,Material(materialUrl = picPath.picPath))
|
||||||
|
ImageLoader.getInstance()
|
||||||
|
.loadRoundImage(mContext, picPath.locPic, 12, ivUp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
btnOk.setOnClickListener {
|
||||||
|
subMit()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initDate() {
|
override fun initDate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun subMit() {
|
||||||
|
if (binding.tvData.text.isNullOrEmpty() ||
|
||||||
|
binding.tvAddress.text.isNullOrEmpty() ||
|
||||||
|
binding.etAddress.text.isNullOrEmpty()||
|
||||||
|
upPart.materialList.size==0
|
||||||
|
) {
|
||||||
|
showToast("请完善信息")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
DataManager.getInstance().submitToCpcAuthentication(upPart)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<String>() {
|
||||||
|
override fun onSuccess(t: CommonResponseBean<String>) {
|
||||||
|
super.onSuccess(t)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
}
|
||||||
}
|
}
|
@ -16,6 +16,9 @@ import com.dahe.gldriver.ui.mine.activity.WalletActivity
|
|||||||
import com.dahe.gldriver.utils.SPUtils
|
import com.dahe.gldriver.utils.SPUtils
|
||||||
import com.dahe.mylibrary.base.BaseFragment
|
import com.dahe.mylibrary.base.BaseFragment
|
||||||
import com.dahe.mylibrary.utils.ActivityUtils
|
import com.dahe.mylibrary.utils.ActivityUtils
|
||||||
|
import com.dahe.mylibrary.utils.BaseUtils
|
||||||
|
import com.dahe.mylibrary.utils.ImageLoader
|
||||||
|
import com.dahe.mylibrary.utils.PhoneFormatCheckUtils
|
||||||
import com.dahe.mylibrary.utils.ToastUtils
|
import com.dahe.mylibrary.utils.ToastUtils
|
||||||
|
|
||||||
class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener {
|
class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener {
|
||||||
@ -46,9 +49,20 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener {
|
|||||||
|
|
||||||
override fun onFragmentFirstVisible() {
|
override fun onFragmentFirstVisible() {
|
||||||
|
|
||||||
// val userInfo = SPUtils.instance.getUserInfo(mContext)
|
val userInfo = SPUtils.instance.getUserInfo(mContext)
|
||||||
// if (null==userInfo)
|
if (userInfo != null) {
|
||||||
// return
|
binding.run {
|
||||||
|
tvName.text = userInfo.idcardName
|
||||||
|
tvCarType.text = userInfo.approvedType
|
||||||
|
tvPhone.text = PhoneFormatCheckUtils.hintPhone(userInfo.contactPhone)
|
||||||
|
tvCarType.visibility =
|
||||||
|
if (userInfo.approvedType.isNullOrEmpty()) View.GONE else View.VISIBLE
|
||||||
|
ivPart.visibility =
|
||||||
|
if (userInfo.partyMemberCertification == "1") View.VISIBLE else View.GONE
|
||||||
|
ImageLoader.getInstance()
|
||||||
|
.loadCircleImage(mContext, userInfo.avatar, ivHead, R.drawable.head_defaut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
binding.run {
|
binding.run {
|
||||||
//初始化常用工具
|
//初始化常用工具
|
||||||
|
@ -3,14 +3,15 @@ package com.dahe.gldriver.utils
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.dahe.gldriver.event.RefreshEvent
|
||||||
import com.dahe.gldriver.net.BaseObserver
|
import com.dahe.gldriver.net.BaseObserver
|
||||||
import com.dahe.gldriver.net.DataManager
|
import com.dahe.gldriver.net.DataManager
|
||||||
import com.dahe.gldriver.net.RxHttpCallBack
|
import com.dahe.gldriver.net.RxHttpCallBack
|
||||||
import com.dahe.gldriver.temp.AuthPageConfig
|
import com.dahe.gldriver.temp.AuthPageConfig
|
||||||
import com.dahe.gldriver.temp.FullPortConfig
|
import com.dahe.gldriver.temp.FullPortConfig
|
||||||
import com.dahe.gldriver.ui.HomeActivity
|
import com.dahe.gldriver.ui.HomeActivity
|
||||||
import com.dahe.gldriver.ui.account.CodeLoginActivity
|
|
||||||
import com.dahe.gldriver.ui.account.LoginActivity
|
import com.dahe.gldriver.ui.account.LoginActivity
|
||||||
|
import com.dahe.gldriver.ui.account.SelectRoleActivity
|
||||||
import com.dahe.glex.bean.UserBean
|
import com.dahe.glex.bean.UserBean
|
||||||
import com.dahe.mylibrary.base.SingletonNoPHolder
|
import com.dahe.mylibrary.base.SingletonNoPHolder
|
||||||
import com.dahe.mylibrary.net.CommonResponseBean
|
import com.dahe.mylibrary.net.CommonResponseBean
|
||||||
@ -22,6 +23,7 @@ import com.umeng.umverify.listener.UMTokenResultListener
|
|||||||
import com.umeng.umverify.model.UMTokenRet
|
import com.umeng.umverify.model.UMTokenRet
|
||||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||||
|
import org.greenrobot.eventbus.EventBus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName OneKeyLoginUtils
|
* @ClassName OneKeyLoginUtils
|
||||||
@ -89,10 +91,7 @@ class OneKeyLoginUtils private constructor() {
|
|||||||
Toast.LENGTH_SHORT
|
Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
//获取token失败,去获取验证码页面
|
//获取token失败,去获取验证码页面
|
||||||
ActivityUtils.startActivity(
|
EventBus.getDefault().post(RefreshEvent(1))
|
||||||
context,
|
|
||||||
CodeLoginActivity::class.java
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
} catch (e: java.lang.Exception) {
|
} catch (e: java.lang.Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
@ -116,7 +115,7 @@ class OneKeyLoginUtils private constructor() {
|
|||||||
Toast.LENGTH_SHORT
|
Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
//获取token失败,去获取验证码页面
|
//获取token失败,去获取验证码页面
|
||||||
ActivityUtils.startActivity(context, CodeLoginActivity::class.java)
|
EventBus.getDefault().post(RefreshEvent(1))
|
||||||
}
|
}
|
||||||
} catch (e: java.lang.Exception) {
|
} catch (e: java.lang.Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
@ -153,7 +152,7 @@ class OneKeyLoginUtils private constructor() {
|
|||||||
Toast.LENGTH_SHORT
|
Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
//获取token失败,去获取验证码页面
|
//获取token失败,去获取验证码页面
|
||||||
ActivityUtils.startActivity(context, CodeLoginActivity::class.java)
|
EventBus.getDefault().post(RefreshEvent(1))
|
||||||
}
|
}
|
||||||
} catch (e: java.lang.Exception) {
|
} catch (e: java.lang.Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
|
BIN
app/src/main/res/drawable-xxhdpi/welcome_bg_default.jpg
Normal file
BIN
app/src/main/res/drawable-xxhdpi/welcome_bg_default.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 107 KiB |
Binary file not shown.
Before Width: | Height: | Size: 102 KiB |
@ -57,6 +57,9 @@
|
|||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tvData"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="right"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawableRight="@drawable/right_gray"
|
android:drawableRight="@drawable/right_gray"
|
||||||
@ -85,6 +88,9 @@
|
|||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tvAddress"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="right"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawableRight="@drawable/right_gray"
|
android:drawableRight="@drawable/right_gray"
|
||||||
@ -106,16 +112,20 @@
|
|||||||
android:paddingRight="@dimen/dp_13">
|
android:paddingRight="@dimen/dp_13">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp_170"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="党组织关系所在地区 (县)街道(乡)"
|
android:text="党组织关系所在地区 (县)街道(乡)"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:textSize="@dimen/sp_15" />
|
android:textSize="@dimen/sp_15" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
|
android:id="@+id/etAddress"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="right"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
android:drawableRight="@drawable/right_gray"
|
android:drawableRight="@drawable/right_gray"
|
||||||
android:drawablePadding="@dimen/dp_6"
|
android:drawablePadding="@dimen/dp_6"
|
||||||
android:hint="请输入详细地址"
|
android:hint="请输入详细地址"
|
||||||
@ -154,6 +164,7 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/ivUp"
|
||||||
android:layout_width="@dimen/dp_100"
|
android:layout_width="@dimen/dp_100"
|
||||||
android:layout_height="@dimen/dp_100"
|
android:layout_height="@dimen/dp_100"
|
||||||
android:background="@drawable/icon_add_pic" />
|
android:background="@drawable/icon_add_pic" />
|
||||||
|
@ -277,6 +277,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:visibility=""
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/tvDriverInfo"
|
android:layout_below="@+id/tvDriverInfo"
|
||||||
@ -604,264 +605,6 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
|
||||||
app:cardBackgroundColor="@color/white"
|
|
||||||
app:cardCornerRadius="@dimen/dp_8">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/ivIcon5"
|
|
||||||
android:layout_width="@dimen/dp_21"
|
|
||||||
android:layout_height="@dimen/dp_21"
|
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_18"
|
|
||||||
android:background="@drawable/icon_quali" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignBottom="@+id/ivIcon5"
|
|
||||||
android:layout_marginLeft="@dimen/dp_10"
|
|
||||||
android:layout_toRightOf="@+id/ivIcon5"
|
|
||||||
android:text="行驶证"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="@dimen/sp_16" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvDrivingInfo"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/ivIcon5"
|
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
|
||||||
android:layout_marginBottom="@dimen/dp_15"
|
|
||||||
android:text="王师傅 412************062"
|
|
||||||
android:textColor="@color/color_c"
|
|
||||||
android:textSize="@dimen/sp_12" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_width="@dimen/dp_55"
|
|
||||||
android:layout_height="@dimen/dp_22"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_marginTop="@dimen/dp_24"
|
|
||||||
android:layout_marginRight="@dimen/dp_14"
|
|
||||||
android:background="@drawable/shape_btn_11"
|
|
||||||
android:text="去上传"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="@dimen/sp_12" />
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/tvDrivingInfo"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/dp_1"
|
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
|
||||||
android:background="@color/color_c" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/dp_46"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="@dimen/dp_14"
|
|
||||||
android:layout_height="@dimen/dp_14"
|
|
||||||
android:background="@drawable/icon_refre" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="@dimen/dp_4"
|
|
||||||
android:text="重新上传"
|
|
||||||
android:textColor="#917349"
|
|
||||||
android:textSize="@dimen/sp_12" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="@dimen/dp_1"
|
|
||||||
android:layout_height="@dimen/dp_16"
|
|
||||||
android:background="@color/color_c" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="@dimen/dp_14"
|
|
||||||
android:layout_height="@dimen/dp_14"
|
|
||||||
android:background="@drawable/icon_check" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="@dimen/dp_4"
|
|
||||||
android:text="查看证件"
|
|
||||||
android:textColor="#917349"
|
|
||||||
android:textSize="@dimen/sp_12" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
|
||||||
app:cardBackgroundColor="@color/white"
|
|
||||||
app:cardCornerRadius="@dimen/dp_8">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/ivIcon6"
|
|
||||||
android:layout_width="@dimen/dp_21"
|
|
||||||
android:layout_height="@dimen/dp_21"
|
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_18"
|
|
||||||
android:background="@drawable/icon_road" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignBottom="@+id/ivIcon6"
|
|
||||||
android:layout_marginLeft="@dimen/dp_10"
|
|
||||||
android:layout_toRightOf="@+id/ivIcon6"
|
|
||||||
android:text="道路运输许可证"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="@dimen/sp_16" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvLoadInfo"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/ivIcon6"
|
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
|
||||||
android:layout_marginBottom="@dimen/dp_15"
|
|
||||||
android:text="王师傅 412************062"
|
|
||||||
android:textColor="@color/color_c"
|
|
||||||
android:textSize="@dimen/sp_12" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_width="@dimen/dp_55"
|
|
||||||
android:layout_height="@dimen/dp_22"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_marginTop="@dimen/dp_24"
|
|
||||||
android:layout_marginRight="@dimen/dp_14"
|
|
||||||
android:background="@drawable/shape_btn_11"
|
|
||||||
android:text="去上传"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="@dimen/sp_12" />
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/tvLoadInfo"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/dp_1"
|
|
||||||
android:layout_marginLeft="@dimen/dp_15"
|
|
||||||
android:layout_marginRight="@dimen/dp_15"
|
|
||||||
android:background="@color/color_c" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/dp_46"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="@dimen/dp_14"
|
|
||||||
android:layout_height="@dimen/dp_14"
|
|
||||||
android:background="@drawable/icon_refre" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="@dimen/dp_4"
|
|
||||||
android:text="重新上传"
|
|
||||||
android:textColor="#917349"
|
|
||||||
android:textSize="@dimen/sp_12" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="@dimen/dp_1"
|
|
||||||
android:layout_height="@dimen/dp_16"
|
|
||||||
android:background="@color/color_c" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="@dimen/dp_14"
|
|
||||||
android:layout_height="@dimen/dp_14"
|
|
||||||
android:background="@drawable/icon_check" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="@dimen/dp_4"
|
|
||||||
android:text="查看证件"
|
|
||||||
android:textColor="#917349"
|
|
||||||
android:textSize="@dimen/sp_12" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
<View
|
<View
|
||||||
|
@ -71,7 +71,20 @@
|
|||||||
android:textSize="15dp"
|
android:textSize="15dp"
|
||||||
tools:text="189****1230" />
|
tools:text="189****1230" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCarType"
|
||||||
|
android:layout_marginLeft="@dimen/dp_10"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="@dimen/dp_8"
|
||||||
|
android:paddingRight="@dimen/dp_8"
|
||||||
|
android:text="B1"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:textColor="@color/main_red"
|
||||||
|
android:background="@drawable/shape_orange_2" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/ivPart"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp_10"
|
android:layout_marginLeft="@dimen/dp_10"
|
||||||
@ -274,8 +287,7 @@
|
|||||||
android:layout_below="@+id/tvplatTitle"
|
android:layout_below="@+id/tvplatTitle"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:numColumns="4"
|
android:numColumns="4"
|
||||||
android:verticalSpacing="@dimen/dp_20"
|
android:verticalSpacing="@dimen/dp_20"></GridView>
|
||||||
></GridView>
|
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -57,6 +57,11 @@ public class JsonInterceptor implements Interceptor {
|
|||||||
// jsonObject.put("data", new JSONObject());
|
// jsonObject.put("data", new JSONObject());
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
if (code != 200) {
|
||||||
|
if (TextUtils.isEmpty(str)) {
|
||||||
|
jsonObject.put("data", new String());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String data = jsonObject.toString();
|
String data = jsonObject.toString();
|
||||||
responseBody = ResponseBody.create(MediaType.parse("application/json; charset=utf-8"), data);
|
responseBody = ResponseBody.create(MediaType.parse("application/json; charset=utf-8"), data);
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
package com.dahe.mylibrary.utils
|
package com.dahe.mylibrary.utils
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.dahe.mylibrary.base.SingletonNoPHolder
|
import com.dahe.mylibrary.base.SingletonNoPHolder
|
||||||
import com.dahe.mylibrary.callback.OnMyDatePickedListener
|
import com.dahe.mylibrary.callback.OnMyDatePickedListener
|
||||||
|
import com.github.gzuliyujiang.wheelpicker.AddressPicker
|
||||||
import com.github.gzuliyujiang.wheelpicker.BirthdayPicker
|
import com.github.gzuliyujiang.wheelpicker.BirthdayPicker
|
||||||
import com.github.gzuliyujiang.wheelpicker.DatePicker
|
import com.github.gzuliyujiang.wheelpicker.DatePicker
|
||||||
import com.github.gzuliyujiang.wheelpicker.OptionPicker
|
import com.github.gzuliyujiang.wheelpicker.OptionPicker
|
||||||
|
import com.github.gzuliyujiang.wheelpicker.annotation.AddressMode
|
||||||
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode
|
import com.github.gzuliyujiang.wheelpicker.annotation.DateMode
|
||||||
import com.github.gzuliyujiang.wheelpicker.contract.OnDatePickedListener
|
import com.github.gzuliyujiang.wheelpicker.contract.OnAddressPickedListener
|
||||||
import com.github.gzuliyujiang.wheelpicker.contract.OnOptionPickedListener
|
import com.github.gzuliyujiang.wheelpicker.contract.OnOptionPickedListener
|
||||||
import com.github.gzuliyujiang.wheelpicker.entity.DateEntity
|
import com.github.gzuliyujiang.wheelpicker.entity.DateEntity
|
||||||
import com.github.gzuliyujiang.wheelview.contract.TextProvider
|
import com.github.gzuliyujiang.wheelview.contract.TextProvider
|
||||||
import java.util.ArrayList
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName PickUtils
|
* @ClassName PickUtils
|
||||||
@ -39,7 +41,6 @@ class PickerUtils private constructor() {
|
|||||||
) {
|
) {
|
||||||
val picker = BirthdayPicker(activity)
|
val picker = BirthdayPicker(activity)
|
||||||
picker.setTitle(title)
|
picker.setTitle(title)
|
||||||
picker.setDefaultValue(1991, 11, 11)
|
|
||||||
picker.setDefaultValue(dateEntity.year, dateEntity.month, dateEntity.day)
|
picker.setDefaultValue(dateEntity.year, dateEntity.month, dateEntity.day)
|
||||||
picker.setOnDatePickedListener { year, month, day ->
|
picker.setOnDatePickedListener { year, month, day ->
|
||||||
if (listener != null)
|
if (listener != null)
|
||||||
@ -75,6 +76,28 @@ class PickerUtils private constructor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址选择
|
||||||
|
* @param activity AppCompatActivity
|
||||||
|
* @param lis OnAddressPickedListener
|
||||||
|
*/
|
||||||
|
fun showAddress(activity: AppCompatActivity,lis:OnAddressPickedListener) {
|
||||||
|
val picker = AddressPicker(activity)
|
||||||
|
picker.setAddressMode(AddressMode.PROVINCE_CITY_COUNTY)
|
||||||
|
picker.setDefaultValue("河南省", "郑州市", "金水区")
|
||||||
|
picker.setOnAddressPickedListener(lis)
|
||||||
|
picker.wheelLayout.setOnLinkageSelectedListener { first, second, third ->
|
||||||
|
picker.titleView.text = String.format(
|
||||||
|
"%s%s%s",
|
||||||
|
picker.firstWheelView.formatItem(first),
|
||||||
|
picker.secondWheelView.formatItem(second),
|
||||||
|
picker.thirdWheelView.formatItem(third)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
picker.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选择驾驶证类型
|
* 选择驾驶证类型
|
||||||
* @param activity
|
* @param activity
|
||||||
|
Loading…
Reference in New Issue
Block a user