我的信息完善
This commit is contained in:
@@ -57,6 +57,11 @@ public class JsonInterceptor implements Interceptor {
|
||||
// jsonObject.put("data", new JSONObject());
|
||||
// }
|
||||
// }
|
||||
if (code != 200) {
|
||||
if (TextUtils.isEmpty(str)) {
|
||||
jsonObject.put("data", new String());
|
||||
}
|
||||
}
|
||||
|
||||
String data = jsonObject.toString();
|
||||
responseBody = ResponseBody.create(MediaType.parse("application/json; charset=utf-8"), data);
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
package com.dahe.mylibrary.utils
|
||||
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.dahe.mylibrary.base.SingletonNoPHolder
|
||||
import com.dahe.mylibrary.callback.OnMyDatePickedListener
|
||||
import com.github.gzuliyujiang.wheelpicker.AddressPicker
|
||||
import com.github.gzuliyujiang.wheelpicker.BirthdayPicker
|
||||
import com.github.gzuliyujiang.wheelpicker.DatePicker
|
||||
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.contract.OnDatePickedListener
|
||||
import com.github.gzuliyujiang.wheelpicker.contract.OnAddressPickedListener
|
||||
import com.github.gzuliyujiang.wheelpicker.contract.OnOptionPickedListener
|
||||
import com.github.gzuliyujiang.wheelpicker.entity.DateEntity
|
||||
import com.github.gzuliyujiang.wheelview.contract.TextProvider
|
||||
import java.util.ArrayList
|
||||
|
||||
/**
|
||||
* @ClassName PickUtils
|
||||
@@ -39,7 +41,6 @@ class PickerUtils private constructor() {
|
||||
) {
|
||||
val picker = BirthdayPicker(activity)
|
||||
picker.setTitle(title)
|
||||
picker.setDefaultValue(1991, 11, 11)
|
||||
picker.setDefaultValue(dateEntity.year, dateEntity.month, dateEntity.day)
|
||||
picker.setOnDatePickedListener { year, month, day ->
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user