资料修改-司机资料编辑功能
This commit is contained in:
parent
ce822d0845
commit
69276f7a58
@ -34,7 +34,7 @@ android {
|
||||
|
||||
ndk {
|
||||
//设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
|
||||
abiFilters "armeabi", "arm64-v8a"
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
// abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86","x86_64"
|
||||
}
|
||||
}
|
||||
@ -142,11 +142,13 @@ dependencies {
|
||||
implementation project(path: ':mylibrary')
|
||||
|
||||
//高德地图
|
||||
implementation 'com.amap.api:3dmap:9.8.3'
|
||||
// implementation 'com.amap.api:3dmap:9.8.3'
|
||||
|
||||
//定位功能
|
||||
// implementation 'com.amap.api:location:6.4.2'//6.4.2
|
||||
implementation 'com.amap.api:search:9.7.0'
|
||||
implementation 'com.amap.api:navi-3dmap:latest.integration'
|
||||
// implementation 'com.amap.api:navi-3dmap:9.8.3_3dmap9.8.3'
|
||||
|
||||
//易签宝
|
||||
implementation files('libs/EsignSDK.aar')
|
||||
|
@ -34,6 +34,13 @@
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||
<!--用于用户链接蓝牙时,在导航组件页面的蓝牙连接提醒,建立链接后开发者可选用蓝牙通道进行tts播报-->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
|
||||
<!--用与导航状态中保持屏幕常亮-->
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<!--允许读设备等信息,用于问题排查-->
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
|
||||
<!-- Android 13版本适配,细化存储权限-->
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||
@ -85,6 +92,7 @@
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
android:value="e0c32c80b14f78b770b3671add9c4515" />
|
||||
|
||||
<service android:name="com.amap.api.location.APSService" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.LauncherActivity"
|
||||
@ -149,16 +157,32 @@
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
|
||||
<activity
|
||||
android:name=".ui.account.authperson.EditPersonActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".ui.account.authperson.AuthDriverActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".ui.account.authperson.EditDriverActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".ui.account.authperson.AuthQualificationActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".ui.account.authperson.EditQualificationActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".ui.account.authperson.AuthBankCardActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
@ -300,7 +324,12 @@
|
||||
|
||||
<!-- 我的相关end -->
|
||||
|
||||
|
||||
<!-- 导航相关end -->
|
||||
<activity
|
||||
android:name="com.amap.api.navi.AmapRouteActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize|navigation"
|
||||
android:launchMode="singleInstance" />
|
||||
<!-- 导航相关end -->
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -11,6 +11,7 @@ import com.dahe.mylibrary.CommonBaseLibrary
|
||||
import com.esign.esignsdk.EsignSdk
|
||||
import com.github.gzuliyujiang.dialog.DialogConfig
|
||||
import com.github.gzuliyujiang.dialog.DialogStyle
|
||||
import com.tencent.bugly.crashreport.CrashReport
|
||||
import com.umeng.commonsdk.UMConfigure
|
||||
import com.umeng.message.PushAgent
|
||||
import com.umeng.umverify.UMVerifyHelper
|
||||
@ -34,7 +35,7 @@ class App : Application() {
|
||||
// CrashHandler.getInstance().init(this);
|
||||
// CrashHandler2.getInstance().init(getApplicationContext());
|
||||
}
|
||||
// CrashReport.initCrashReport(getApplicationContext(), AppConfig.BUGLY_APP_ID, false);
|
||||
CrashReport.initCrashReport(getApplicationContext(), AppConfig.BUGLY_APP_ID, false);
|
||||
|
||||
|
||||
// SophixManager.getInstance().queryAndLoadNewPatch();
|
||||
@ -95,28 +96,34 @@ class App : Application() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun initUmeng(){
|
||||
private fun initUmeng() {
|
||||
// thread {
|
||||
//友盟
|
||||
UMConfigure.preInit(this,AppConfig.APP_KEY,"Umeng");
|
||||
//友盟
|
||||
UMConfigure.preInit(this, AppConfig.APP_KEY, "Umeng");
|
||||
|
||||
// 推送注册
|
||||
val api = PushAgent.getInstance(this)
|
||||
PushHelper.setting(api)
|
||||
// 推送注册
|
||||
val api = PushAgent.getInstance(this)
|
||||
PushHelper.setting(api)
|
||||
|
||||
UMConfigure.init(this,AppConfig.APP_KEY,"Umeng",UMConfigure.DEVICE_TYPE_PHONE,AppConfig.MESSAGE_SECRET)
|
||||
//实名认证
|
||||
val authHelper = UMVerifyHelper.getInstance(this, object : UMTokenResultListener {
|
||||
override fun onTokenSuccess(ret: String) {
|
||||
Log.e("Umenginit", "onTokenSuccess: $ret")
|
||||
}
|
||||
UMConfigure.init(
|
||||
this,
|
||||
AppConfig.APP_KEY,
|
||||
"Umeng",
|
||||
UMConfigure.DEVICE_TYPE_PHONE,
|
||||
AppConfig.MESSAGE_SECRET
|
||||
)
|
||||
//实名认证
|
||||
val authHelper = UMVerifyHelper.getInstance(this, object : UMTokenResultListener {
|
||||
override fun onTokenSuccess(ret: String) {
|
||||
Log.e("Umenginit", "onTokenSuccess: $ret")
|
||||
}
|
||||
|
||||
override fun onTokenFailed(ret: String) {
|
||||
Log.e("Umenginit", "onTokenFailed: $ret")
|
||||
}
|
||||
})
|
||||
authHelper.setLoggerEnable(true)
|
||||
authHelper.setAuthSDKInfo("iiBVGHSKbUML/NTbj187eM1N1KMvRzh1sJbM+2FMbV7FNOnmngDlPr2reqlvouhK/8dXcaNGJuI9B+Kv7C6IlBMoGE0PMVWvwY754T8zxSgSfLUM6s7e0dVxmtMFRrCDawKBiv6g/5+X1mSK5OXNG+H//8rtDDf0vePyUUPCAU26tIX/7BCJ4wvUjobAHBDtSbMMhzqWR5MC7jTCnR0k1OwwvEYxIH6jZuRqT4QgBBO4AMKvFjboqj3rsrr5uE6Gn28fWQrBBrOkPS830GnZFU8ND/0LedGgTlMllBAXLy0gbZZ/8LKJOQ==")
|
||||
override fun onTokenFailed(ret: String) {
|
||||
Log.e("Umenginit", "onTokenFailed: $ret")
|
||||
}
|
||||
})
|
||||
authHelper.setLoggerEnable(true)
|
||||
authHelper.setAuthSDKInfo("iiBVGHSKbUML/NTbj187eM1N1KMvRzh1sJbM+2FMbV7FNOnmngDlPr2reqlvouhK/8dXcaNGJuI9B+Kv7C6IlBMoGE0PMVWvwY754T8zxSgSfLUM6s7e0dVxmtMFRrCDawKBiv6g/5+X1mSK5OXNG+H//8rtDDf0vePyUUPCAU26tIX/7BCJ4wvUjobAHBDtSbMMhzqWR5MC7jTCnR0k1OwwvEYxIH6jZuRqT4QgBBO4AMKvFjboqj3rsrr5uE6Gn28fWQrBBrOkPS830GnZFU8ND/0LedGgTlMllBAXLy0gbZZ/8LKJOQ==")
|
||||
|
||||
// }.start()
|
||||
|
||||
|
@ -7,7 +7,7 @@ package com.dahe.gldriver.base
|
||||
* @Description TODO
|
||||
*/
|
||||
object AppConfig {
|
||||
const val BUGLY_APP_ID = "a5b894cef7"
|
||||
const val BUGLY_APP_ID = "0487c49b52"
|
||||
const val TIME = "DA_HE_TIME"
|
||||
const val ID = "DA_HE_ID"
|
||||
const val PHONE = "DA_HE_PHONE"
|
||||
|
@ -60,7 +60,7 @@ data class Face(
|
||||
)
|
||||
|
||||
data class DataX(
|
||||
val address: String = "",
|
||||
var address: String = "",
|
||||
val birthDate: String = "",
|
||||
val ethnicity: String = "",
|
||||
val idNumber: String = "",
|
||||
|
@ -42,39 +42,40 @@ data class UserBean(
|
||||
)
|
||||
|
||||
data class UserDetail(
|
||||
val createBy: String,
|
||||
val createTime: String,
|
||||
val driverBankcardAddress: String,
|
||||
val driverBankcardNumber: String,
|
||||
val driverBankcardPhotoUrl: String,
|
||||
val driverId: Int,
|
||||
val idcardAddress: String,
|
||||
val idcardBackUrl: String,
|
||||
val idcardEffectiveEnd: String,
|
||||
val idcardEffectiveStart: String,
|
||||
val idcardEthnicity: String,
|
||||
val idcardFrontUrl: String,
|
||||
val idcardIsEndless: String,
|
||||
val idcardName: String,
|
||||
val idcardNo: String,
|
||||
val idcardSex: String,
|
||||
val licenseApproveOrganization: String,
|
||||
val licenseEffectiveEnd: String,
|
||||
val licenseEffectiveStart: String,
|
||||
val licenseFirstGetDate: String,
|
||||
val licenseName: String,
|
||||
val licenseNo: String,
|
||||
val licensePhotoBackUrl: String,
|
||||
val licensePhotoFaceUrl: String,
|
||||
val licenseRecordNumber: String,
|
||||
val licenseType: String,
|
||||
val qualificationCertificateEffectiveEnd: String,
|
||||
val qualificationCertificateExamineDate: String,
|
||||
val qualificationCertificateNo: String,
|
||||
val qualificationCertificatePhotoUrl: String,
|
||||
val remark: String,
|
||||
val taxpayerCaptainId: String,
|
||||
val updateBy: String,
|
||||
val updateTime: String
|
||||
var createBy: String="",
|
||||
var createTime: String="",
|
||||
var isRealName: String="",
|
||||
var driverBankcardAddress: String="",
|
||||
var driverBankcardNumber: String="",
|
||||
var driverBankcardPhotoUrl: String="",
|
||||
var driverId: String="",
|
||||
var idcardAddress: String="",
|
||||
var idcardBackUrl: String="",
|
||||
var idcardEffectiveEnd: String="",
|
||||
var idcardEffectiveStart: String="",
|
||||
var idcardEthnicity: String="",
|
||||
var idcardFrontUrl: String="",
|
||||
var idcardIsEndless: String="",
|
||||
var idcardName: String="",
|
||||
var idcardNo: String="",
|
||||
var idcardSex: String="",
|
||||
var licenseApproveOrganization: String="",
|
||||
var licenseEffectiveEnd: String="",
|
||||
var licenseEffectiveStart: String="",
|
||||
var licenseFirstGetDate: String="",
|
||||
var licenseName: String="",
|
||||
var licenseNo: String="",
|
||||
var licensePhotoBackUrl: String="",
|
||||
var licensePhotoFaceUrl: String="",
|
||||
var licenseRecordNumber: String="",
|
||||
var licenseType: String="",
|
||||
var qualificationCertificateEffectiveEnd: String="",
|
||||
var qualificationCertificateExamineDate: String="",
|
||||
var qualificationCertificateNo: String="",
|
||||
var qualificationCertificatePhotoUrl: String="",
|
||||
var remark: String="",
|
||||
var taxpayerCaptainId: String="",
|
||||
var updateBy: String="",
|
||||
var updateTime: String=""
|
||||
)
|
||||
|
||||
|
@ -0,0 +1,76 @@
|
||||
package com.dahe.gldriver.callback
|
||||
|
||||
import android.view.View
|
||||
import com.amap.api.navi.INaviInfoCallback
|
||||
import com.amap.api.navi.model.AMapNaviLocation
|
||||
|
||||
/**
|
||||
* @ClassName MyOnInitNaviFailure
|
||||
* @Author john
|
||||
* @Date 2024/3/21 16:12
|
||||
* @Description TODO
|
||||
*/
|
||||
abstract class MyINaviInfoCallback : INaviInfoCallback {
|
||||
override fun onInitNaviFailure() {
|
||||
}
|
||||
|
||||
override fun onGetNavigationText(p0: String?) {
|
||||
}
|
||||
|
||||
override fun onLocationChange(p0: AMapNaviLocation?) {
|
||||
}
|
||||
|
||||
override fun onArriveDestination(p0: Boolean) {
|
||||
}
|
||||
|
||||
override fun onStartNavi(p0: Int) {
|
||||
}
|
||||
|
||||
override fun onCalculateRouteSuccess(p0: IntArray?) {
|
||||
}
|
||||
|
||||
override fun onCalculateRouteFailure(p0: Int) {
|
||||
}
|
||||
|
||||
override fun onStopSpeaking() {
|
||||
}
|
||||
|
||||
override fun onReCalculateRoute(p0: Int) {
|
||||
}
|
||||
|
||||
override fun onExitPage(p0: Int) {
|
||||
}
|
||||
|
||||
override fun onStrategyChanged(p0: Int) {
|
||||
}
|
||||
|
||||
override fun onArrivedWayPoint(p0: Int) {
|
||||
}
|
||||
|
||||
override fun onMapTypeChanged(p0: Int) {
|
||||
}
|
||||
|
||||
override fun onNaviDirectionChanged(p0: Int) {
|
||||
}
|
||||
|
||||
override fun onDayAndNightModeChanged(p0: Int) {
|
||||
}
|
||||
|
||||
override fun onBroadcastModeChanged(p0: Int) {
|
||||
}
|
||||
|
||||
override fun onScaleAutoChanged(p0: Boolean) {
|
||||
}
|
||||
|
||||
override fun getCustomMiddleView(): View? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getCustomNaviView(): View? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getCustomNaviBottomView(): View? {
|
||||
return null
|
||||
}
|
||||
}
|
@ -139,6 +139,12 @@ interface Api {
|
||||
@POST(BASE_URL + "driver/driver/setUpDriverIdCard")
|
||||
fun setUpDriverIdCard(@Body carBean: UpPersonInfoBean): Observable<CommonResponseBean<Any>>
|
||||
|
||||
/**
|
||||
* 司机重新上传身份证
|
||||
* */
|
||||
@POST(BASE_URL + "driver/driver/reUpDriverIdCard")
|
||||
fun reUpDriverIdCard(@Body carBean: UserDetail): Observable<CommonResponseBean<Any>>
|
||||
|
||||
|
||||
/**
|
||||
* 司机上传驾驶证
|
||||
@ -146,12 +152,24 @@ interface Api {
|
||||
@POST(BASE_URL + "driver/driver/setUpDriverLicense")
|
||||
fun setUpDriverLicense(@Body driverBean: UpDriverInfoBean): Observable<CommonResponseBean<Any>>
|
||||
|
||||
/**
|
||||
* 司机重新上传驾驶证
|
||||
* */
|
||||
@POST(BASE_URL + "driver/driver/reUpDriverLicense")
|
||||
fun reUpDriverLicense(@Body driverBean: UserDetail): Observable<CommonResponseBean<Any>>
|
||||
|
||||
/**
|
||||
* 司机上传从业资格证
|
||||
* */
|
||||
@POST(BASE_URL + "driver/driver/setUpDriverQualificationCertificate")
|
||||
fun setUpDriverQualificationCertificate(@Body qualiBean: UpQualiInfoBean): Observable<CommonResponseBean<Any>>
|
||||
|
||||
/**
|
||||
* 司机重新上传从业资格证
|
||||
* */
|
||||
@POST(BASE_URL + "driver/driver/reUpDriverQualificationCertificate")
|
||||
fun reUpDriverQualificationCertificate(@Body qualiBean: UserDetail): Observable<CommonResponseBean<Any>>
|
||||
|
||||
/**
|
||||
* 上传车辆的道路运输证
|
||||
* */
|
||||
@ -164,6 +182,19 @@ interface Api {
|
||||
@POST(BASE_URL + "driver/driver/setUpDriverBankCard")
|
||||
fun setUpDriverBankCard(@Body bankBean: UpBankInfoBean): Observable<CommonResponseBean<Any>>
|
||||
|
||||
/**
|
||||
* 司机重新上传银行卡
|
||||
* */
|
||||
@POST(BASE_URL + "driver/driver/reUpDriverBankCard")
|
||||
fun reUpDriverBankCard(@Body bankBean: UpBankInfoBean): Observable<CommonResponseBean<Any>>
|
||||
|
||||
/**
|
||||
* 查询司机证件完整度信息
|
||||
* @return Observable<CommonResponseBean<UserDetail>>
|
||||
*/
|
||||
@GET(BASE_URL + "driver/driver/getDriverDocIntegrity")
|
||||
fun getDriverDocIntegrity(): Observable<CommonResponseBean<UserDetail>>
|
||||
|
||||
|
||||
/**
|
||||
* 司机认证成为车队长
|
||||
@ -376,7 +407,7 @@ interface Api {
|
||||
* @return Observable<CommonResponseBean<CaptainBean>>
|
||||
*/
|
||||
@GET(BASE_URL + "driver/opinions/list")
|
||||
fun waybillRate(@Query("opinionsType") opinionsType : String): Observable<CommonResponseBean<MutableList<RateBean>>>
|
||||
fun waybillRate(@Query("opinionsType") opinionsType: String): Observable<CommonResponseBean<MutableList<RateBean>>>
|
||||
|
||||
/**
|
||||
* 查询司机总评价信息
|
||||
@ -392,7 +423,7 @@ interface Api {
|
||||
* @return Observable<CommonResponseBean<RateBean>>
|
||||
*/
|
||||
@GET(BASE_URL + "driver/order/orderPhoto")
|
||||
fun orderPhoto(@Query("orderId") orderId :String): Observable<CommonResponseBean<MutableList<OrderChild>>>
|
||||
fun orderPhoto(@Query("orderId") orderId: String): Observable<CommonResponseBean<MutableList<OrderChild>>>
|
||||
|
||||
|
||||
companion object {
|
||||
|
@ -91,6 +91,9 @@ class HomeActivity : BaseActivity<ActivityHomeBinding>(), OnTabSelectListener,
|
||||
.permissions(
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.WRITE_EXTERNAL_STORAGE,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION,
|
||||
Manifest.permission.ACCESS_BACKGROUND_LOCATION,
|
||||
)
|
||||
.request { allGranted, grantedList, deniedList ->
|
||||
if (allGranted) {
|
||||
|
@ -1,18 +1,14 @@
|
||||
package com.dahe.gldriver.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.WindowManager
|
||||
import com.amap.api.location.AMapLocationClient
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.amap.api.maps.MapsInitializer
|
||||
import com.dahe.gldriver.databinding.ActivityLauncherBinding
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.gldriver.ui.account.LoginActivity
|
||||
import com.dahe.gldriver.ui.account.SelectRoleActivity
|
||||
import com.dahe.gldriver.utils.CommonPopUtils
|
||||
import com.dahe.gldriver.utils.SPUtils
|
||||
import com.dahe.mylibrary.utils.BaseSPUtils
|
||||
import com.dahe.mylibrary.utils.StringUtils
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.core.Observable
|
||||
import io.reactivex.rxjava3.disposables.Disposable
|
||||
@ -45,10 +41,12 @@ class LauncherActivity : BaseActivity<ActivityLauncherBinding>() {
|
||||
override fun initDate() {
|
||||
val isFirstOpenApp = SPUtils.instance.getIsFirstOpenApp(mContext)
|
||||
if (isFirstOpenApp) {
|
||||
MapsInitializer.updatePrivacyShow(this, true, true)
|
||||
CommonPopUtils.getInstance().showCenterAgreement(mContext) {
|
||||
SPUtils.instance.setIsFirstOpenApp(mContext, false)
|
||||
AMapLocationClient.updatePrivacyShow(mContext, true, true)
|
||||
AMapLocationClient.updatePrivacyAgree(mContext, true)
|
||||
MapsInitializer.updatePrivacyAgree(this, true)
|
||||
goNext()
|
||||
}
|
||||
} else {
|
||||
|
@ -82,6 +82,7 @@ class AuthDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
||||
private fun subMit() {
|
||||
binding.run {
|
||||
driverInfoBean.run {
|
||||
licenseName = etName.text.toString().trim()
|
||||
licenseNo = etId.text.toString()
|
||||
licenseType = tvCarType.text.toString()
|
||||
licenseEffectiveStart = tvStart.text.toString()
|
||||
|
@ -38,16 +38,14 @@ import java.io.File
|
||||
class AuthPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
||||
|
||||
|
||||
lateinit var ossServiceUtil: OssServiceUtil
|
||||
var isOnlyShow = false
|
||||
// var isOnlyShow = false
|
||||
|
||||
var perInfoBean: UpPersonInfoBean = UpPersonInfoBean()
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
setStatusBarColor(R.color.white)
|
||||
setTitleBar("实名认证", true)
|
||||
isOnlyShow = intent.extras?.getBoolean(AppConfig.IS_ONLY_SHOW, false) == true
|
||||
// isOnlyShow = intent.extras?.getBoolean(AppConfig.IS_ONLY_SHOW, false) == true
|
||||
|
||||
ossServiceUtil = OssServiceUtil.getInstance()
|
||||
binding.run {
|
||||
var inBinding = this
|
||||
btnOk.setOnClickListener {
|
||||
@ -98,6 +96,7 @@ class AuthPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
||||
perInfoBean.run {
|
||||
idcardNo = idNumber
|
||||
idcardName = name
|
||||
idcardAddress = address
|
||||
idcardEthnicity = ethnicity
|
||||
idcardSex = if (sex == "男") "0" else "1"
|
||||
}
|
||||
@ -111,54 +110,23 @@ class AuthPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
||||
}
|
||||
|
||||
ivBack.setOnClickListener {
|
||||
PopsUtils.getInstance().showSimSelPic(mContext) {
|
||||
var data = it[0]
|
||||
val path: String
|
||||
if (data.isCut && !data.isCompressed) {
|
||||
// 裁剪过
|
||||
path = data.cutPath
|
||||
} else if (data.isCompressed || (data.isCut && data.isCompressed)) {
|
||||
// 压缩过,或者裁剪同时压缩过,以最终压缩过图片为准
|
||||
path = data.compressPath
|
||||
} else {
|
||||
// 原图
|
||||
path = data.path
|
||||
OcrUtils.getInstance().ocrPerson(mContext,this@AuthPersonActivity) { picPath, result ->
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, ivBack)
|
||||
result?.data?.back?.let {
|
||||
if (it.data.validPeriod?.contains("-") == true) {
|
||||
val split = it.data.validPeriod.split("-")
|
||||
binding.run {
|
||||
tvStart.text =
|
||||
TimeUtil.changeDateFormat(split[0])
|
||||
tvEnd.text =
|
||||
if (split.size == 2) TimeUtil.changeDateFormat(
|
||||
split[1]
|
||||
) else ""
|
||||
}
|
||||
}
|
||||
}
|
||||
ImageLoader.getInstance().loadRoundImage(mContext, data.realPath, 12, ivBack)
|
||||
|
||||
val file = File(data.realPath)
|
||||
val filePic: MultipartBody.Part = MultipartBody.Part.createFormData(
|
||||
"file",
|
||||
file.getName(),
|
||||
file.asRequestBody("multipart/form-data".toMediaTypeOrNull())
|
||||
)
|
||||
|
||||
DataManager.getInstance().uploadToOss(filePic).flatMap {
|
||||
perInfoBean.idcardBackUrl = it.data.url
|
||||
DataManager.getInstance().recognizeIdcard(it.data.url)
|
||||
}.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(
|
||||
BaseObserver(
|
||||
mContext,
|
||||
object : RxHttpCallBack<OcrPersonBean>(this@AuthPersonActivity) {
|
||||
override fun onSuccess(t: CommonResponseBean<OcrPersonBean>) {
|
||||
super.onSuccess(t)
|
||||
t.data.data.back?.let {
|
||||
if (it.data.validPeriod?.contains("-") == true) {
|
||||
val split = it.data.validPeriod.split("-")
|
||||
binding.run {
|
||||
tvStart.text =
|
||||
TimeUtil.changeDateFormat(split[0])
|
||||
tvEnd.text =
|
||||
if (split.size == 2) TimeUtil.changeDateFormat(
|
||||
split[1]
|
||||
) else ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -167,41 +135,41 @@ class AuthPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
val data =
|
||||
Gson().fromJson(intent.extras?.getString(USER_DETAIL), UserDetail::class.java)
|
||||
if (isOnlyShow) {
|
||||
binding.run {
|
||||
llBtn.visibility = View.GONE
|
||||
etName.isEnabled = false
|
||||
etId.isEnabled = false
|
||||
tvStart.isEnabled = false
|
||||
tvEnd.isEnabled = false
|
||||
ivFront.isEnabled = false
|
||||
ivBack.isEnabled = false
|
||||
|
||||
etName.setText(data.idcardName)
|
||||
etId.setText(data.idcardNo)
|
||||
tvStart.text = data.idcardEffectiveStart
|
||||
tvEnd.text = data.idcardEffectiveEnd
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.idcardFrontUrl, 12, ivFront)
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.idcardBackUrl, 12, ivBack)
|
||||
}
|
||||
} else {
|
||||
if (data != null) {
|
||||
binding.run {
|
||||
etName.setText(data.idcardName)
|
||||
etId.setText(data.idcardNo)
|
||||
tvStart.text = data.idcardEffectiveStart
|
||||
tvEnd.text = data.idcardEffectiveEnd
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.idcardFrontUrl, 12, ivFront)
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, data.idcardBackUrl, 12, ivBack)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// val data =
|
||||
// Gson().fromJson(intent.extras?.getString(USER_DETAIL), UserDetail::class.java)
|
||||
// if (isOnlyShow) {
|
||||
// binding.run {
|
||||
// llBtn.visibility = View.GONE
|
||||
// etName.isEnabled = false
|
||||
// etId.isEnabled = false
|
||||
// tvStart.isEnabled = false
|
||||
// tvEnd.isEnabled = false
|
||||
// ivFront.isEnabled = false
|
||||
// ivBack.isEnabled = false
|
||||
//
|
||||
// etName.setText(data.idcardName)
|
||||
// etId.setText(data.idcardNo)
|
||||
// tvStart.text = data.idcardEffectiveStart
|
||||
// tvEnd.text = data.idcardEffectiveEnd
|
||||
// ImageLoader.getInstance()
|
||||
// .loadRoundImage(mContext, data.idcardFrontUrl, 12, ivFront)
|
||||
// ImageLoader.getInstance()
|
||||
// .loadRoundImage(mContext, data.idcardBackUrl, 12, ivBack)
|
||||
// }
|
||||
// } else {
|
||||
// if (data != null) {
|
||||
// binding.run {
|
||||
// etName.setText(data.idcardName)
|
||||
// etId.setText(data.idcardNo)
|
||||
// tvStart.text = data.idcardEffectiveStart
|
||||
// tvEnd.text = data.idcardEffectiveEnd
|
||||
// ImageLoader.getInstance()
|
||||
// .loadRoundImage(mContext, data.idcardFrontUrl, 12, ivFront)
|
||||
// ImageLoader.getInstance()
|
||||
// .loadRoundImage(mContext, data.idcardBackUrl, 12, ivBack)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
}
|
||||
}
|
@ -0,0 +1,192 @@
|
||||
package com.dahe.gldriver.ui.account.authperson
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.OcrPersonBean
|
||||
import com.dahe.gldriver.bean.UpDriverInfoBean
|
||||
import com.dahe.gldriver.databinding.ActivityAuthDriverBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.oss.OssServiceUtil
|
||||
import com.dahe.gldriver.utils.OcrUtils
|
||||
import com.dahe.glex.bean.UserDetail
|
||||
import com.dahe.mylibrary.utils.PickerUtils
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.mylibrary.utils.ImageLoader
|
||||
import com.dahe.mylibrary.utils.PopsUtils
|
||||
import com.dahe.mylibrary.utils.TimeUtil
|
||||
import com.dahe.mylibrary.utils.ToastUtils
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
|
||||
/**
|
||||
* @ClassName AuthRoleActivity
|
||||
* @Author 用户
|
||||
* @Date 2024/1/25 11:15
|
||||
* @Description 驾驶证认证-编辑
|
||||
*/
|
||||
class EditDriverActivity : BaseActivity<ActivityAuthDriverBinding>() {
|
||||
|
||||
|
||||
var driverInfoBean = UserDetail()
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
setStatusBarColor(R.color.white)
|
||||
setTitleBar("实名认证", true)
|
||||
|
||||
binding.run {
|
||||
btnOk.text = "确定"
|
||||
btnOk.setOnClickListener {
|
||||
subMit()
|
||||
}
|
||||
tvStart.run {
|
||||
setOnClickListener {
|
||||
PickerUtils.getInstance()
|
||||
.showDate(this@EditDriverActivity, "有效起始日期") { date ->
|
||||
this.text = date
|
||||
}
|
||||
}
|
||||
}
|
||||
tvEnd.run {
|
||||
setOnClickListener {
|
||||
PickerUtils.getInstance()
|
||||
.showDate(this@EditDriverActivity, "有效结束日期") { date ->
|
||||
this.text = date
|
||||
}
|
||||
}
|
||||
}
|
||||
tvCarType.setOnClickListener {
|
||||
PickerUtils.getInstance()
|
||||
.showSelectCarType(this@EditDriverActivity, "选择准驾车型") { _, item ->
|
||||
tvCarType.text = item.toString()
|
||||
}
|
||||
}
|
||||
|
||||
ivFront.setOnClickListener {
|
||||
selFrontPic()
|
||||
}
|
||||
|
||||
ivBack.setOnClickListener {
|
||||
selBackPic()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
DataManager.getInstance().getUserDetail()
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserDetail>() {
|
||||
override fun onSuccess(t: CommonResponseBean<UserDetail>) {
|
||||
super.onSuccess(t)
|
||||
driverInfoBean = t.data
|
||||
|
||||
var isOnlyShow =
|
||||
intent.extras?.getBoolean(AppConfig.IS_ONLY_SHOW, false) == true
|
||||
if (isOnlyShow) {
|
||||
binding.run {
|
||||
llBtn.visibility = View.GONE
|
||||
etName.isEnabled = false
|
||||
etId.isEnabled = false
|
||||
tvCarType.isEnabled = false
|
||||
tvStart.isEnabled = false
|
||||
tvEnd.isEnabled = false
|
||||
ivFront.isEnabled = false
|
||||
ivBack.isEnabled = false
|
||||
}
|
||||
}
|
||||
|
||||
binding.run {
|
||||
etName.setText(driverInfoBean.licenseName)
|
||||
etId.setText(driverInfoBean.licenseNo)
|
||||
tvStart.text = driverInfoBean.licenseEffectiveStart
|
||||
tvEnd.text = driverInfoBean.licenseEffectiveEnd
|
||||
tvCarType.text = driverInfoBean.licenseType
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, driverInfoBean.licensePhotoFaceUrl, 12, ivFront)
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, driverInfoBean.licensePhotoBackUrl, 12, ivBack)
|
||||
}
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
private fun subMit() {
|
||||
binding.run {
|
||||
driverInfoBean.run {
|
||||
licenseName = etName.text.toString().trim()
|
||||
licenseNo = etId.text.toString()
|
||||
licenseType = tvCarType.text.toString()
|
||||
licenseEffectiveStart = tvStart.text.toString()
|
||||
licenseEffectiveEnd = tvEnd.text.toString()
|
||||
}
|
||||
}
|
||||
if (driverInfoBean.licenseNo.isNullOrBlank() || driverInfoBean.licensePhotoBackUrl.isNullOrBlank()) {
|
||||
ToastUtils.showToast(mContext, "请完善信息")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
DataManager.getInstance().reUpDriverLicense(driverInfoBean)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {
|
||||
override fun onSuccess(t: CommonResponseBean<Any>) {
|
||||
super.onSuccess(t)
|
||||
showToast("修改成功")
|
||||
setResult(RESULT_OK)
|
||||
finish()
|
||||
}
|
||||
}))
|
||||
|
||||
}
|
||||
|
||||
private fun selFrontPic() {
|
||||
|
||||
OcrUtils.getInstance().ocrDriver(mContext, this) { picPath, result ->
|
||||
result?.data?.face?.data.let {
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivFront)
|
||||
driverInfoBean.licensePhotoFaceUrl = picPath.picPath
|
||||
it?.run {
|
||||
driverInfoBean.run {
|
||||
licenseApproveOrganization =
|
||||
issueAuthority //发证机关
|
||||
}
|
||||
binding.run {
|
||||
etName.setText(it.name)
|
||||
etId.setText(it.licenseNumber)
|
||||
tvCarType.text = it.approvedType
|
||||
if (validPeriod.contains("至")) {
|
||||
val split = validPeriod.split("至")
|
||||
tvStart.text = split[0]
|
||||
tvEnd.text =
|
||||
if (split.size == 2) split[1] else ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun selBackPic() {
|
||||
|
||||
OcrUtils.getInstance().ocrDriver(mContext, this) { picPath, result ->
|
||||
result?.data?.back?.data.let {
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, binding.ivBack)
|
||||
driverInfoBean.licensePhotoBackUrl = picPath.picPath
|
||||
ToastUtils.showToast(mContext, "驾驶证副页上传成功")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
package com.dahe.gldriver.ui.account.authperson
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.base.AppConfig.USER_DETAIL
|
||||
import com.dahe.gldriver.bean.OcrPersonBean
|
||||
import com.dahe.gldriver.bean.UpPersonInfoBean
|
||||
import com.dahe.gldriver.databinding.ActivityAuthPersonBinding
|
||||
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.glex.bean.UserDetail
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.mylibrary.utils.ImageLoader
|
||||
import com.dahe.mylibrary.utils.PickerUtils
|
||||
import com.dahe.mylibrary.utils.PopsUtils
|
||||
import com.dahe.mylibrary.utils.TimeUtil
|
||||
import com.google.gson.Gson
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||
import okhttp3.MultipartBody
|
||||
import okhttp3.RequestBody.Companion.asRequestBody
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* @ClassName AuthRoleActivity
|
||||
* @Author 用户
|
||||
* @Date 2024/1/25 11:15
|
||||
* @Description 身份证认证-编辑
|
||||
*/
|
||||
class EditPersonActivity : BaseActivity<ActivityAuthPersonBinding>() {
|
||||
|
||||
var perInfoBean: UserDetail = UserDetail()
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
setStatusBarColor(R.color.white)
|
||||
setTitleBar("实名认证", true)
|
||||
binding.run {
|
||||
btnOk.text = "确定"
|
||||
|
||||
var inBinding = this
|
||||
btnOk.setOnClickListener {
|
||||
|
||||
perInfoBean.run {
|
||||
idcardNo = inBinding.etId.text.toString()
|
||||
idcardName = inBinding.etName.text.toString()
|
||||
idcardEffectiveStart = inBinding.tvStart.text.toString()
|
||||
idcardEffectiveEnd = inBinding.tvEnd.text.toString()
|
||||
}
|
||||
|
||||
|
||||
DataManager.getInstance().reUpDriverIdCard(perInfoBean)
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {
|
||||
override fun onSuccess(t: CommonResponseBean<Any>) {
|
||||
super.onSuccess(t)
|
||||
showToast("修改成功")
|
||||
setResult(RESULT_OK)
|
||||
finish()
|
||||
}
|
||||
}))
|
||||
|
||||
|
||||
}
|
||||
tvStart.run {
|
||||
setOnClickListener {
|
||||
PickerUtils.getInstance()
|
||||
.showDate(this@EditPersonActivity, "有效起始日期") { date ->
|
||||
this.text = date
|
||||
}
|
||||
}
|
||||
}
|
||||
tvEnd.run {
|
||||
setOnClickListener {
|
||||
PickerUtils.getInstance()
|
||||
.showDate(this@EditPersonActivity, "有效结束日期") { date ->
|
||||
this.text = date
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ivFront.setOnClickListener {
|
||||
OcrUtils.getInstance()
|
||||
.ocrPerson(mContext, this@EditPersonActivity) { picPath, result ->
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, ivFront)
|
||||
perInfoBean.idcardFrontUrl = picPath.picPath
|
||||
result?.data?.face?.data.let {
|
||||
it?.run {
|
||||
perInfoBean.run {
|
||||
idcardNo = idNumber
|
||||
idcardName = name
|
||||
idcardAddress = address
|
||||
idcardEthnicity = ethnicity
|
||||
idcardSex = if (sex == "男") "0" else "1"
|
||||
}
|
||||
}
|
||||
binding.run {
|
||||
etName.setText(it?.name)
|
||||
etId.setText(it?.idNumber)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ivBack.setOnClickListener {
|
||||
OcrUtils.getInstance()
|
||||
.ocrPerson(mContext, this@EditPersonActivity) { picPath, result ->
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, ivBack)
|
||||
result?.data?.back?.let {
|
||||
if (it.data.validPeriod?.contains("-") == true) {
|
||||
val split = it.data.validPeriod.split("-")
|
||||
binding.run {
|
||||
tvStart.text =
|
||||
TimeUtil.changeDateFormat(split[0])
|
||||
tvEnd.text =
|
||||
if (split.size == 2) TimeUtil.changeDateFormat(
|
||||
split[1]
|
||||
) else ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
DataManager.getInstance().getUserDetail()
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserDetail>() {
|
||||
override fun onSuccess(t: CommonResponseBean<UserDetail>) {
|
||||
super.onSuccess(t)
|
||||
perInfoBean = t.data
|
||||
var isOnlyShow =
|
||||
intent.extras?.getBoolean(AppConfig.IS_ONLY_SHOW, false) == true
|
||||
if (isOnlyShow) {
|
||||
binding.run {
|
||||
llBtn.visibility = View.GONE
|
||||
etName.isEnabled = false
|
||||
etId.isEnabled = false
|
||||
tvStart.isEnabled = false
|
||||
tvEnd.isEnabled = false
|
||||
ivFront.isEnabled = false
|
||||
ivBack.isEnabled = false
|
||||
}
|
||||
}
|
||||
binding.run {
|
||||
etName.setText(perInfoBean.idcardName)
|
||||
etId.setText(perInfoBean.idcardNo)
|
||||
tvStart.text = perInfoBean.idcardEffectiveStart
|
||||
tvEnd.text = perInfoBean.idcardEffectiveEnd
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, perInfoBean.idcardFrontUrl, 12, ivFront)
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, perInfoBean.idcardBackUrl, 12, ivBack)
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package com.dahe.gldriver.ui.account.authperson
|
||||
|
||||
import android.os.Bundle
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.UpQualiInfoBean
|
||||
import com.dahe.gldriver.databinding.ActivityAuthQualificationBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.oss.OssServiceUtil
|
||||
import com.dahe.gldriver.utils.OcrUtils
|
||||
import com.dahe.glex.bean.UserDetail
|
||||
import com.dahe.mylibrary.utils.PickerUtils
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.mylibrary.utils.ImageLoader
|
||||
import com.dahe.mylibrary.utils.PopsUtils
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
|
||||
/**
|
||||
* @ClassName AuthQualificationActivity
|
||||
* @Author john
|
||||
* @Date 2024/1/25 15:20
|
||||
* @Description 从业资格证认证-编辑
|
||||
*/
|
||||
class EditQualificationActivity : BaseActivity<ActivityAuthQualificationBinding>() {
|
||||
|
||||
var upQuaInfo = UserDetail()
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
setStatusBarColor(R.color.white)
|
||||
setTitleBar("实名认证", true)
|
||||
binding.btnOk.setOnClickListener {
|
||||
subMit()
|
||||
}
|
||||
|
||||
binding.run {
|
||||
btnOk.text = "确定"
|
||||
tvDate.run {
|
||||
setOnClickListener {
|
||||
PickerUtils.getInstance()
|
||||
.showDateSim(
|
||||
this@EditQualificationActivity,
|
||||
"选择有效期至"
|
||||
) { date ->
|
||||
this.text = date
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ivFront.setOnClickListener {
|
||||
OcrUtils.getInstance()
|
||||
.noOcrUpPic(mContext, this@EditQualificationActivity) { picPath, _ ->
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(mContext, picPath.locPic, 12, ivFront)
|
||||
upQuaInfo.qualificationCertificatePhotoUrl = picPath.picPath
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
DataManager.getInstance().getUserDetail()
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserDetail>() {
|
||||
override fun onSuccess(t: CommonResponseBean<UserDetail>) {
|
||||
super.onSuccess(t)
|
||||
upQuaInfo = t.data
|
||||
binding.run {
|
||||
|
||||
var isOnlyShow =
|
||||
intent.extras?.getBoolean(AppConfig.IS_ONLY_SHOW, false) == true
|
||||
if (isOnlyShow) {
|
||||
tvDate.isEnabled = false
|
||||
etId.isEnabled = false
|
||||
ivFront.isEnabled = false
|
||||
}
|
||||
|
||||
tvDate.setText(upQuaInfo.qualificationCertificateEffectiveEnd)
|
||||
etId.setText(upQuaInfo.qualificationCertificateNo)
|
||||
|
||||
ImageLoader.getInstance()
|
||||
.loadRoundImage(
|
||||
mContext,
|
||||
upQuaInfo.qualificationCertificatePhotoUrl,
|
||||
12,
|
||||
ivFront
|
||||
)
|
||||
}
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
private fun subMit() {
|
||||
|
||||
upQuaInfo.run {
|
||||
qualificationCertificateNo = binding.etId.text.toString()
|
||||
qualificationCertificateEffectiveEnd = binding.tvDate.text.toString()
|
||||
|
||||
|
||||
if (qualificationCertificateNo.isNullOrEmpty() || qualificationCertificateEffectiveEnd.isNullOrEmpty()) {
|
||||
showToast("请完善信息")
|
||||
return@run
|
||||
}
|
||||
|
||||
DataManager.getInstance().reUpDriverQualificationCertificate(upQuaInfo)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<Any>() {
|
||||
override fun onSuccess(t: CommonResponseBean<Any>) {
|
||||
super.onSuccess(t)
|
||||
showToast("修改成功")
|
||||
setResult(RESULT_OK)
|
||||
finish()
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
@ -21,6 +21,7 @@ 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.tencent.bugly.crashreport.CrashReport
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.dahe.gldriver.ui.mine.activity
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import com.dahe.gldriver.R
|
||||
@ -8,7 +9,12 @@ import com.dahe.gldriver.databinding.ActivityPersonInfoBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.ui.account.authperson.AuthDriverActivity
|
||||
import com.dahe.gldriver.ui.account.authperson.AuthPersonActivity
|
||||
import com.dahe.gldriver.ui.account.authperson.AuthQualificationActivity
|
||||
import com.dahe.gldriver.ui.account.authperson.EditDriverActivity
|
||||
import com.dahe.gldriver.ui.account.authperson.EditPersonActivity
|
||||
import com.dahe.gldriver.ui.account.authperson.EditQualificationActivity
|
||||
import com.dahe.gldriver.utils.OrderUtils
|
||||
import com.dahe.gldriver.utils.SPUtils
|
||||
import com.dahe.glex.bean.UserDetail
|
||||
@ -57,7 +63,7 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
||||
}
|
||||
|
||||
override fun initDate() {
|
||||
DataManager.getInstance().getUserDetail()
|
||||
DataManager.getInstance().getDriverDocIntegrity()
|
||||
.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(BaseObserver(mContext, object : RxHttpCallBack<UserDetail>() {
|
||||
override fun onSuccess(t: CommonResponseBean<UserDetail>) {
|
||||
@ -71,27 +77,41 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
||||
super.onClick(view)
|
||||
binding.run {
|
||||
when (view?.id) {
|
||||
btnId.id, llAgainId.id -> ActivityUtils.startActivity(
|
||||
mContext,
|
||||
AuthPersonActivity::class.java,
|
||||
Bundle().apply {
|
||||
putBoolean(AppConfig.IS_ONLY_SHOW, false)
|
||||
putString(AppConfig.USER_DETAIL, Gson().toJson(userDetail))
|
||||
})
|
||||
btnId.id, llAgainId.id -> ActivityUtils.startActivityForResult(
|
||||
this@PersonInfoActivity,
|
||||
EditPersonActivity::class.java, 1
|
||||
)
|
||||
|
||||
llSeeId.id -> ActivityUtils.startActivity(
|
||||
mContext,
|
||||
AuthPersonActivity::class.java,
|
||||
EditPersonActivity::class.java,
|
||||
Bundle().apply {
|
||||
putBoolean(AppConfig.IS_ONLY_SHOW, true)
|
||||
putString(AppConfig.USER_DETAIL, Gson().toJson(userDetail))
|
||||
})
|
||||
|
||||
btnDriver.id, llAgainDriver.id -> {}
|
||||
llSeeDriver.id -> {}
|
||||
btnDriver.id, llAgainDriver.id -> ActivityUtils.startActivityForResult(
|
||||
this@PersonInfoActivity,
|
||||
EditDriverActivity::class.java, 1
|
||||
)
|
||||
|
||||
btnQua.id, llAgainQua.id -> {}
|
||||
llSeeQua.id -> {}
|
||||
llSeeDriver.id -> ActivityUtils.startActivity(
|
||||
mContext,
|
||||
EditDriverActivity::class.java,
|
||||
Bundle().apply {
|
||||
putBoolean(AppConfig.IS_ONLY_SHOW, true)
|
||||
})
|
||||
|
||||
btnQua.id, llAgainQua.id -> ActivityUtils.startActivityForResult(
|
||||
this@PersonInfoActivity,
|
||||
EditQualificationActivity::class.java, 1
|
||||
)
|
||||
|
||||
llSeeQua.id -> ActivityUtils.startActivity(
|
||||
mContext,
|
||||
EditQualificationActivity::class.java,
|
||||
Bundle().apply {
|
||||
putBoolean(AppConfig.IS_ONLY_SHOW, true)
|
||||
})
|
||||
|
||||
btnFace.id -> {}
|
||||
}
|
||||
@ -100,9 +120,9 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
||||
}
|
||||
|
||||
private fun initViewByData(data: UserDetail) {
|
||||
doneInfoCount = 0
|
||||
userDetail = data
|
||||
binding.run {
|
||||
val userInfo = SPUtils.instance.getUserInfo(mContext)
|
||||
var missInfo = ""
|
||||
|
||||
if (data.idcardNo.isNullOrEmpty()) {
|
||||
@ -127,8 +147,8 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
||||
tvQualiInfo.text = """${data.qualificationCertificateNo}"""
|
||||
}
|
||||
|
||||
if (userInfo?.isRealName == "0") {
|
||||
btnFace.text = "未实名认证将无法进行接单"
|
||||
if (data?.isRealName == "0") {
|
||||
tvFaceInfo.text = "未实名认证将无法进行接单"
|
||||
missInfo.plus("实名认证缺失")
|
||||
} else {
|
||||
doneInfoCount++
|
||||
@ -148,10 +168,17 @@ class PersonInfoActivity : BaseActivity<ActivityPersonInfoBinding>(), View.OnCli
|
||||
if (data.qualificationCertificateNo.isNullOrEmpty()) View.GONE else View.VISIBLE
|
||||
btnQua.visibility =
|
||||
if (data.qualificationCertificateNo.isNullOrEmpty()) View.VISIBLE else View.GONE
|
||||
btnFace.visibility = if (userInfo?.isRealName == "0") View.VISIBLE else View.GONE
|
||||
btnFace.visibility = if (data?.isRealName == "0") View.VISIBLE else View.GONE
|
||||
|
||||
circleBarView2.progress = doneInfoCount * 100 / 4
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (resultCode == RESULT_OK && requestCode == 1) {
|
||||
initDate()
|
||||
}
|
||||
}
|
||||
}
|
@ -1,23 +1,25 @@
|
||||
package com.dahe.gldriver.ui.waybill.activity
|
||||
|
||||
import android.Manifest
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.Toast
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.amap.api.maps.AMap
|
||||
import com.amap.api.maps.CameraUpdateFactory
|
||||
import com.amap.api.maps.MapView
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.amap.api.maps.model.Poi
|
||||
import com.amap.api.navi.AmapNaviPage
|
||||
import com.amap.api.navi.AmapNaviParams
|
||||
import com.amap.api.navi.AmapNaviType
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.adapter.WaybillNodeAdapter
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.OrderDetailBean
|
||||
import com.dahe.gldriver.callback.MyINaviInfoCallback
|
||||
import com.dahe.gldriver.databinding.ActivityWaybillLoadBinding
|
||||
import com.dahe.gldriver.event.RefreshEvent
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
@ -31,11 +33,9 @@ import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.mylibrary.utils.BaseUtils
|
||||
import com.dahe.mylibrary.utils.ConvertUtils
|
||||
import com.dahe.mylibrary.utils.LoadingUtils
|
||||
import com.dahe.mylibrary.utils.ToastUtils
|
||||
import com.permissionx.guolindev.PermissionX
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
|
||||
/**
|
||||
@ -50,11 +50,16 @@ class WaybillLoadActivity : BaseActivity<ActivityWaybillLoadBinding>() {
|
||||
|
||||
var orderId: String = ""
|
||||
lateinit var orderBean: OrderDetailBean
|
||||
|
||||
@SuppressLint("SuspiciousIndentation")
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
orderId = intent.extras?.getString(AppConfig.ORDER_ID, "").toString()
|
||||
setStatusHeightParams(binding.rlTop)
|
||||
setTitleBar("运单详情",true,true,"查看单据"){
|
||||
ActivityUtils.startActivity(mContext,SeeDocActivity::class.java,Bundle().apply { putString(AppConfig.ORDER_ID,orderId) })
|
||||
setTitleBar("运单详情", true, true, "查看单据") {
|
||||
ActivityUtils.startActivity(
|
||||
mContext,
|
||||
SeeDocActivity::class.java,
|
||||
Bundle().apply { putString(AppConfig.ORDER_ID, orderId) })
|
||||
}
|
||||
|
||||
|
||||
@ -67,6 +72,16 @@ class WaybillLoadActivity : BaseActivity<ActivityWaybillLoadBinding>() {
|
||||
aMap = mapView.map.apply {
|
||||
uiSettings.run { isZoomControlsEnabled = false }
|
||||
}
|
||||
llGoStart.setOnClickListener {
|
||||
if (!::loadPos.isInitialized)
|
||||
showToast("请等待定位成功")
|
||||
return@setOnClickListener
|
||||
AmapNaviPage.getInstance().showRouteActivity(
|
||||
applicationContext,
|
||||
AmapNaviParams(null, null, Poi("天安门", loadPos, ""), AmapNaviType.DRIVER),
|
||||
object : MyINaviInfoCallback() {}
|
||||
)
|
||||
}
|
||||
|
||||
btnRight.setOnClickListener {
|
||||
var data = orderBean.orderChildList.first { it.type == "1" }
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.dahe.gldriver.ui.waybill.activity
|
||||
|
||||
import android.Manifest
|
||||
import android.content.res.Resources
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
@ -10,16 +11,24 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.amap.api.maps.AMap
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.amap.api.maps.model.Poi
|
||||
import com.amap.api.navi.AmapNaviPage
|
||||
import com.amap.api.navi.AmapNaviParams
|
||||
import com.amap.api.navi.AmapNaviType
|
||||
import com.amap.api.navi.INaviInfoCallback
|
||||
import com.amap.api.navi.model.AMapNaviLocation
|
||||
import com.dahe.gldriver.R
|
||||
import com.dahe.gldriver.adapter.WaybillNodeAdapter
|
||||
import com.dahe.gldriver.base.AppConfig
|
||||
import com.dahe.gldriver.bean.OrderDetailBean
|
||||
import com.dahe.gldriver.callback.MyINaviInfoCallback
|
||||
import com.dahe.gldriver.databinding.ActivityWaybillUnloadBinding
|
||||
import com.dahe.gldriver.net.BaseObserver
|
||||
import com.dahe.gldriver.net.DataManager
|
||||
import com.dahe.gldriver.net.RxHttpCallBack
|
||||
import com.dahe.gldriver.utils.GDLocationUtils
|
||||
import com.dahe.gldriver.utils.LocationUtils
|
||||
import com.dahe.gldriver.utils.NaviUtils
|
||||
import com.dahe.gldriver.utils.OrderUtils
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dahe.mylibrary.net.CommonResponseBean
|
||||
@ -28,7 +37,6 @@ import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.mylibrary.utils.BaseUtils
|
||||
import com.dahe.mylibrary.utils.ConvertUtils
|
||||
import com.dahe.mylibrary.utils.LoadingUtils
|
||||
import com.dahe.mylibrary.utils.ToastUtils
|
||||
import com.permissionx.guolindev.PermissionX
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
@ -47,11 +55,15 @@ class WaybillUnlLoadActivity : BaseActivity<ActivityWaybillUnloadBinding>() {
|
||||
var orderId: String = ""
|
||||
var waybillId: String = ""
|
||||
lateinit var orderBean: OrderDetailBean
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
orderId = intent.extras?.getString(AppConfig.ORDER_ID, "").toString()
|
||||
setStatusHeightParams(binding.rlTop)
|
||||
setTitleBar("运单详情",true,true,"查看单据"){
|
||||
ActivityUtils.startActivity(mContext,SeeDocActivity::class.java,Bundle().apply { putString(AppConfig.ORDER_ID,orderId) })
|
||||
setTitleBar("运单详情", true, true, "查看单据") {
|
||||
ActivityUtils.startActivity(
|
||||
mContext,
|
||||
SeeDocActivity::class.java,
|
||||
Bundle().apply { putString(AppConfig.ORDER_ID, orderId) })
|
||||
}
|
||||
|
||||
initRecy()
|
||||
@ -61,6 +73,15 @@ class WaybillUnlLoadActivity : BaseActivity<ActivityWaybillUnloadBinding>() {
|
||||
aMap = mapView.map.apply {
|
||||
uiSettings.run { isZoomControlsEnabled = false }
|
||||
}
|
||||
llGoStart.setOnClickListener {
|
||||
if (!::loadPos.isInitialized) {
|
||||
showToast("请等待定位成功")
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
NaviUtils.getInstance().goNextPoint(mContext,loadPos)
|
||||
}
|
||||
|
||||
|
||||
btnRight.setOnClickListener {
|
||||
ActivityUtils.startActivity(
|
||||
|
40
app/src/main/java/com/dahe/gldriver/utils/NaviUtils.kt
Normal file
40
app/src/main/java/com/dahe/gldriver/utils/NaviUtils.kt
Normal file
@ -0,0 +1,40 @@
|
||||
package com.dahe.gldriver.utils
|
||||
|
||||
import android.content.Context
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.amap.api.maps.model.Poi
|
||||
import com.amap.api.navi.AmapNaviPage
|
||||
import com.amap.api.navi.AmapNaviParams
|
||||
import com.amap.api.navi.AmapNaviType
|
||||
import com.dahe.gldriver.callback.MyINaviInfoCallback
|
||||
import com.dahe.mylibrary.base.SingletonNoPHolder
|
||||
|
||||
/**
|
||||
* @ClassName NaviUtils
|
||||
* @Author john
|
||||
* @Date 2024/3/22 09:10
|
||||
* @Description TODO
|
||||
*/
|
||||
class NaviUtils private constructor(){
|
||||
companion object : SingletonNoPHolder<NaviUtils>(::NaviUtils)
|
||||
|
||||
fun goNextPoint(context: Context,latLng: LatLng,startName:String = ""){
|
||||
AmapNaviPage.getInstance().showRouteActivity(
|
||||
context,
|
||||
AmapNaviParams(null, null, Poi(startName, latLng, ""), AmapNaviType.DRIVER),
|
||||
object : MyINaviInfoCallback() {}
|
||||
)
|
||||
}
|
||||
|
||||
fun getRoute(context: Context,startLatLng: LatLng,endLatLng: LatLng,startName:String = "",endName:String = ""){
|
||||
val params = AmapNaviParams(
|
||||
Poi(startName, startLatLng, ""),
|
||||
null,
|
||||
Poi(endName, endLatLng, ""),
|
||||
AmapNaviType.DRIVER
|
||||
)
|
||||
params.setUseInnerVoice(true)
|
||||
AmapNaviPage.getInstance()
|
||||
.showRouteActivity(context, params, object : MyINaviInfoCallback() {})
|
||||
}
|
||||
}
|
@ -59,11 +59,11 @@ class OcrUtils private constructor() {
|
||||
// super.onCodeError(mContext, t)
|
||||
LoadingUtils.instance.dissLoading()
|
||||
if (t.code == 500) {
|
||||
if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||
// if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||
ToastUtils.showToast(mContext, "图片识别失败,请重新上传")
|
||||
} else {
|
||||
ToastUtils.showToast(mContext, t.msg)
|
||||
}
|
||||
// } else {
|
||||
// ToastUtils.showToast(mContext, t.msg)
|
||||
// }
|
||||
}
|
||||
}
|
||||
}))
|
||||
@ -108,14 +108,14 @@ class OcrUtils private constructor() {
|
||||
// super.onCodeError(mContext, t)
|
||||
LoadingUtils.instance.dissLoading()
|
||||
if (t.code == 500) {
|
||||
if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||
// if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||
ToastUtils.showToast(
|
||||
mContext,
|
||||
"图片识别失败,请重新上传"
|
||||
)
|
||||
} else {
|
||||
ToastUtils.showToast(mContext, t.msg)
|
||||
}
|
||||
// } else {
|
||||
// ToastUtils.showToast(mContext, t.msg)
|
||||
// }
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -166,14 +166,14 @@ class OcrUtils private constructor() {
|
||||
// super.onCodeError(mContext, t)
|
||||
LoadingUtils.instance.dissLoading()
|
||||
if (t.code == 500) {
|
||||
if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||
// if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||
ToastUtils.showToast(
|
||||
mContext,
|
||||
"图片识别失败,请重新上传"
|
||||
)
|
||||
} else {
|
||||
ToastUtils.showToast(mContext, t.msg)
|
||||
}
|
||||
// } else {
|
||||
// ToastUtils.showToast(mContext, t.msg)
|
||||
// }
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -222,14 +222,14 @@ class OcrUtils private constructor() {
|
||||
// super.onCodeError(mContext, t)
|
||||
LoadingUtils.instance.dissLoading()
|
||||
if (t.code == 500) {
|
||||
if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||
// if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||
ToastUtils.showToast(
|
||||
mContext,
|
||||
"图片识别失败,请重新上传"
|
||||
)
|
||||
} else {
|
||||
ToastUtils.showToast(mContext, t.msg)
|
||||
}
|
||||
// } else {
|
||||
// ToastUtils.showToast(mContext, t.msg)
|
||||
// }
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -278,14 +278,14 @@ class OcrUtils private constructor() {
|
||||
// super.onCodeError(mContext, t)
|
||||
LoadingUtils.instance.dissLoading()
|
||||
if (t.code == 500) {
|
||||
if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||
// if (t.msg.contains("code: 400, The image type does not match the API operation")) {
|
||||
ToastUtils.showToast(
|
||||
mContext,
|
||||
"图片识别失败,请重新上传"
|
||||
)
|
||||
} else {
|
||||
ToastUtils.showToast(mContext, t.msg)
|
||||
}
|
||||
// } else {
|
||||
// ToastUtils.showToast(mContext, t.msg)
|
||||
// }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -254,6 +254,7 @@
|
||||
android:background="@color/white"></View>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llBtn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
android:background="@color/white"
|
||||
|
@ -315,6 +315,7 @@
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llGoStart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
|
@ -253,6 +253,7 @@
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llGoStart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
|
@ -86,7 +86,9 @@ class PopNorBottomPic(
|
||||
.setCompressEngine(ImageFileCompressEngine())
|
||||
.isPreviewImage(true)
|
||||
.isMaxSelectEnabledMask(true)
|
||||
.setMaxSelectNum(1)
|
||||
// .setMaxSelectNum(1)
|
||||
.setSelectionMode(SelectModeConfig.SINGLE)
|
||||
.isDirectReturnSingle(true)
|
||||
.setSelectionMode(SelectModeConfig.SINGLE)
|
||||
.isGif(false)
|
||||
// .isDirectReturnSingle(true)
|
||||
|
Loading…
Reference in New Issue
Block a user