中建365-二期开发-优化

develop
wlh 1 year ago
parent d3c1305b62
commit c8bc5dd436

@ -479,7 +479,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
mViewModel.getAllInfo(showIdInfo, false)
// mViewModel.getMySetting()
mViewModel.getTips()
mViewModel.getRank(2)
// mViewModel.getRank(2)
if(MMkvHelper.contains(Const.LATITUDE) && MMkvHelper.contains(Const.LONGITUDE)){

@ -566,9 +566,9 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
// 刷新注册
private fun refresh() {
refresh.setRefresh(binding.mRefresh) {
/* refresh.setRefresh(binding.mRefresh) {
request()
}
}*/
}
private fun request() {

@ -103,6 +103,24 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
//刷新注册
refresh()
Const.mainLiveData.value?.let {
user = it.user
binding.mName.text = it.user.name
binding.mPhone.text = "${it.user.phone}"
// binding.mDk.text = it.clock.toString()
// binding.mLevel.text = it.grade
if (it.user.avatarUrl.isNullOrEmpty()) {
binding.mImage.setImageResource(defaultIcon[if (it.user.sex - 1 < 0) 0 else it.user.sex - 1])
} else {
binding.mImage.setImageUser(
requireContext(),
it.user.avatarUrl,
it.user.sex.toString()
)
Const.CHAT_IMAGE = it.user.avatarUrl
}
}
binding.mNoNetwork.mRefreshBtn.isSelected = true
binding.mNoNetwork.mRefreshBtn.setOnClickListener {
mViewModel.getMySetting()
@ -489,7 +507,9 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
override fun onResume() {
super.onResume()
if (!TextUtils.isEmpty(showIdInfo)){
mViewModel.getMySetting()
Const.mainLiveData.value?: mViewModel.getMySetting()
// mViewModel.getAllInfo(showIdInfo,false)
mViewModel.searchInviteInfo()
// mViewModel.getUserOtherInfo()
@ -551,21 +571,7 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
if (null == it) {
return@observe
}
user = it.user
binding.mName.text = it.user.name
binding.mPhone.text = "${it.user.phone}"
// binding.mDk.text = it.clock.toString()
// binding.mLevel.text = it.grade
if (it.user.avatarUrl.isNullOrEmpty()) {
binding.mImage.setImageResource(defaultIcon[if (it.user.sex - 1 < 0) 0 else it.user.sex - 1])
} else {
binding.mImage.setImageUser(
requireContext(),
it.user.avatarUrl,
it.user.sex.toString()
)
Const.CHAT_IMAGE = it.user.avatarUrl
}
}
@ -583,6 +589,22 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
)
}
Const.mainLiveData.value = settingBean
user = settingBean.user
binding.mName.text = settingBean.user.name
binding.mPhone.text = "${settingBean.user.phone}"
// binding.mDk.text = it.clock.toString()
// binding.mLevel.text = it.grade
if (settingBean.user.avatarUrl.isNullOrEmpty()) {
binding.mImage.setImageResource(defaultIcon[if (settingBean.user.sex - 1 < 0) 0 else settingBean.user.sex - 1])
} else {
binding.mImage.setImageUser(
requireContext(),
settingBean.user.avatarUrl,
settingBean.user.sex.toString()
)
Const.CHAT_IMAGE = settingBean.user.avatarUrl
}
// binding.mNoNetwork.root.visibility = View.GONE
}
}

@ -6,10 +6,12 @@ import android.text.TextUtils
import android.view.KeyEvent
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.LinearLayout
import android.widget.TextView
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager
import com.tamsiree.rxkit.RxKeyboardTool
import com.xty.base.fragment.BaseFragList
import com.xty.base.fragment.BaseVmFrag
@ -17,6 +19,7 @@ import com.xty.base.vm.BaseVm
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
import com.xty.common.util.CommonToastUtils
import com.xty.common.weight.ExpandStaggeredManager
import com.xty.network.model.GoodsRecordsBean
import com.xty.network.model.ShopCategoryBean
import com.zj365.dc.BuildConfig
@ -38,7 +41,8 @@ class ShopFragment: BaseFragList<ShopMallVm>() {
override fun initAdapter() {
binding.recyclerView.adapter = mGoodsAdapter
binding.recyclerView.layoutManager = GridLayoutManager(requireContext(),2)
binding.recyclerView.layoutManager = ExpandStaggeredManager(2,
StaggeredGridLayoutManager.VERTICAL)
binding.categoryRecyclerView.adapter = mCategoryAdapter

@ -154,18 +154,6 @@ class DynamicManagementVm : BaseVm() {
}
}
/**
* 获取家人
*/
fun getMyFamilyList() {
startHttp(false) {
val json = JSONObject()
/* json.put("pageNum","1")
json.put("pageSize",Const.PAGE_SIZE)*/
val request = apiInterface().getMyFamily(retrofits.getRequestBody(json.toString()))
request.getCodeStatus(familyLive, nowData)
}
}
/**
* 首页小贴士

@ -6,6 +6,7 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.xty.base.vm.BaseVm
import com.xty.common.Const
import com.xty.common.LogUtils
import com.xty.common.MMkvHelper
import com.xty.common.util.CommonUtils
import com.xty.network.model.BannerBean
@ -154,14 +155,6 @@ class MainVm : BaseVm() {
}
}
fun searchInviteInfo(){
startHttp(false) {
var json = JSONObject()
val response = apiInterface().findConfirmInfo(retrofits.getRequestBody(json.toString()))
response.getCodeStatus(findInfoLiveData, nowData)
}
}
fun confirmInvite(id:String, status:String){
startHttp(false) {
var json = JSONObject()
@ -193,6 +186,8 @@ class MainVm : BaseVm() {
*/
fun getMySetting() {
startHttp(false) {
LogUtils.e("eeeeee","主界面请求个人中心数据啦")
val body = apiInterface().getMySetting()
body.getCodeStatus(settingLive, nowData)
}

@ -39,7 +39,7 @@ class ShopMallVm : BaseVm() {
}
json.put("categoryId",categoryId)
json.put("isRec",isRec)
json.put("pageSize",20)
json.put("pageSize",10)
json.put("pageNum",pageSize)
var code = apiInterface().getGoodsList(retrofits.getRequestBody(json.toString()))
code.getCodeStatus(goodsLiveData, nowData)

@ -64,7 +64,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/child_recyclerView"
android:layout_width="@dimen/dp_76"
android:layout_width="@dimen/dp_88"
android:layout_height="match_parent"
android:background="@color/white"/>

@ -17,21 +17,6 @@
<!-- 下拉刷新控件 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/mRefresh"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:srlAccentColor="@color/white">
<!-- 经典下拉头部 -->
<com.scwang.smart.refresh.header.ClassicsHeader
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foregroundTint="@color/white"
app:srlAccentColor="@color/black"
app:srlPrimaryColor="@color/white" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
@ -168,5 +153,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>

@ -13,6 +13,7 @@
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginRight="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_56"
android:layout_marginBottom="@dimen/dp_17"
app:corner_radius="@dimen/dp_18"
android:focusable="true"
android:focusableInTouchMode="true"
@ -45,41 +46,60 @@
</com.ruffian.library.widget.RRelativeLayout>
<androidx.recyclerview.widget.RecyclerView
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_17"
android:background="@color/white"
android:layout_marginBottom="@dimen/dp_5"
android:id="@+id/category_recyclerView"/>
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/mRefresh"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<com.scwang.smart.refresh.header.ClassicsHeader
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foregroundTint="@color/white"
app:srlAccentColor="@color/black"
app:srlPrimaryColor="@color/white" />
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/mRefresh"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/col_6f7"
android:layout_marginTop="@dimen/dp_30"
app:srlAccentColor="@color/col_6f7">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.scwang.smart.refresh.header.ClassicsHeader
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foregroundTint="@color/white"
app:srlAccentColor="@color/black"
app:srlPrimaryColor="@color/white" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:layout_marginBottom="@dimen/dp_5"
android:id="@+id/category_recyclerView"/>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginLeft="@dimen/dp_7"
android:layout_marginRight="@dimen/dp_7"
android:id="@+id/recyclerView"/>
<com.scwang.smart.refresh.footer.ClassicsFooter
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/col_6f7"
android:paddingTop="@dimen/dp_15"
app:srlAccentColor="@color/col_6f7"
android:paddingLeft="@dimen/dp_15"
android:paddingRight="@dimen/dp_15"
android:id="@+id/recyclerView"/>
</LinearLayout>
<com.scwang.smart.refresh.footer.ClassicsFooter
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>

@ -2,12 +2,15 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/tv_child_category"
android:layout_width="@dimen/dp_76"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_39"
android:minWidth="@dimen/dp_88"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:textStyle="bold"
tools:text="女士"
android:maxLines="1"
android:ellipsize="end"
android:maxEms="5"
tools:text="女士女士女士女士女士女士"
android:gravity="center"
android:background="@color/white"
/>

@ -5,6 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_round_white"
android:layout_marginTop="@dimen/dp_15"
tools:ignore="MissingDefaultResource">
<com.ruffian.library.widget.RImageView
@ -15,26 +16,22 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginBottom="@dimen/dp_12"
android:scaleType="fitXY"
app:is_circle="false"
app:corner_radius_bottom_left="@dimen/dp_0"
app:corner_radius_bottom_right="@dimen/dp_0"
app:corner_radius_top_right="@dimen/dp_8"
app:corner_radius_top_left="@dimen/dp_8"/>
app:corner_radius="@dimen/dp_5"/>
<TextView
android:id="@+id/tv_goods_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintTop_toTopOf="@+id/img_goods"
app:layout_constraintLeft_toRightOf="@+id/img_goods"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toTopOf="@+id/tv_price"
android:gravity="left"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_12"
android:layout_marginLeft="@dimen/dp_7"
tools:text="中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航..."
@ -45,26 +42,22 @@
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/tv_goods_name"
app:layout_constraintLeft_toRightOf="@+id/img_goods"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@+id/tv_line_price"
android:textColor="@color/col_2621"
android:textSize="@dimen/sp_15"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_16"
tools:text="¥1999.00"/>
<TextView
android:id="@+id/tv_line_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/tv_goods_name"
app:layout_constraintLeft_toRightOf="@+id/tv_price"
android:layout_height="0dp"
app:layout_constraintLeft_toRightOf="@+id/img_goods"
android:textColor="@color/col_c7c"
app:layout_constraintBottom_toBottomOf="parent"
android:textSize="@dimen/sp_15"
android:layout_marginLeft="@dimen/dp_7"
android:layout_marginTop="@dimen/dp_16"
app:layout_constraintBottom_toBottomOf="@+id/img_goods"
android:textSize="@dimen/sp_13"
android:layout_marginLeft="@dimen/dp_10"
tools:text="¥1999.00"/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -6,7 +6,7 @@
android:layout_gravity="center"
android:id="@+id/root"
android:gravity="center"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.ruffian.library.widget.RImageView
@ -26,7 +26,10 @@
android:textColor="@color/col_313"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
android:maxLines="1"
android:ellipsize="end"
android:maxEms="5"
android:layout_marginTop="@dimen/dp_12"
tools:text="低卡零食"/>
tools:text="低卡零食低卡零食"/>
</LinearLayout>

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_round_white"
android:paddingBottom="@dimen/dp_21"
android:paddingBottom="@dimen/dp_11"
tools:ignore="MissingDefaultResource">
<com.ruffian.library.widget.RImageView
@ -29,10 +29,13 @@
app:layout_constraintTop_toBottomOf="@+id/img_goods"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toTopOf="@+id/tv_price"
android:gravity="left"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:layout_margin="@dimen/dp_10"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
tools:text="中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航..."
android:maxLines="2"
android:ellipsize="end"/>
@ -46,7 +49,7 @@
android:textColor="@color/col_2621"
android:textSize="@dimen/sp_15"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_10"
tools:text="¥1999.00"/>
<TextView
@ -56,9 +59,9 @@
app:layout_constraintTop_toBottomOf="@+id/tv_goods_name"
app:layout_constraintLeft_toRightOf="@+id/tv_price"
android:textColor="@color/col_c7c"
android:layout_marginTop="@dimen/dp_10"
android:textSize="@dimen/sp_15"
android:layout_marginLeft="@dimen/dp_7"
android:layout_marginTop="@dimen/dp_16"
tools:text="¥1999.00"/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -60,13 +60,10 @@ import org.json.JSONObject
}
var data = Bundle()
//true表示标准全屏false表示X5全屏不设置默认false
//true表示标准全屏false表示X5全屏不设置默认false
data.putBoolean("standardFullScreen", false)
//false关闭小窗true开启小窗不设置默认true
//false关闭小窗true开启小窗不设置默认true
data.putBoolean("supportLiteWnd", false)
//1以页面内开始播放2以全屏开始播放不设置默认1
//1以页面内开始播放2以全屏开始播放不设置默认1
data.putInt("DefaultVideoScreen", 2)
@ -127,7 +124,7 @@ import org.json.JSONObject
mWebSetting!!.layoutAlgorithm = WebSettings.LayoutAlgorithm.NARROW_COLUMNS
mWebSetting!!.setSupportZoom(true) //设置支持缩放
mWebSetting!!.setSupportZoom(false) //设置支持缩放
mWebSetting!!.builtInZoomControls = true
mWebSetting!!.useWideViewPort = true //将图片调整到合适的webView大小

@ -187,6 +187,7 @@ open class CloudJSBridge(val context: Context, val listener: IJsBridge) {
baseActivity.bundle.clear()
baseActivity.bundle.putLong("answerId", bean.id)
RouteManager.goAct(ARouterUrl.PSYCHOLOGICAL_RESULT_ACT, baseActivity.bundle)
baseActivity.finish()
}
}

@ -0,0 +1,44 @@
package com.xty.common.weight;
import android.content.Context;
import android.util.AttributeSet;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
public class ExpandStaggeredManager extends StaggeredGridLayoutManager {
public ExpandStaggeredManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
public ExpandStaggeredManager(int spanCount, int orientation) {
super(spanCount, orientation);
}
@Override
public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {
try {
super.onLayoutChildren(recycler, state);
}catch (Exception e){
e.printStackTrace();
}
}
/**
* try catch
* @param state
*/
@Override
public void onScrollStateChanged(int state) {
try {
super.onScrollStateChanged(state);
}catch (Exception e){
e.printStackTrace();
}
}
}

@ -33,8 +33,6 @@ class UricCalibrationSubmitAct : BaseVmAct<UricAcidVm>() {
private var userId: String = ""
private val MAX_LENGTH = 10
private var recordNumber = 0
private val timSelect by lazy {
TimeSelect(this) {
}.apply {
@ -47,6 +45,7 @@ class UricCalibrationSubmitAct : BaseVmAct<UricAcidVm>() {
override fun initData() {
super.initData()
addChildViews()
userId = intent.getStringExtra("userId").toString()
}
@ -103,11 +102,9 @@ class UricCalibrationSubmitAct : BaseVmAct<UricAcidVm>() {
PointLengthFilter(2)
)
val mTvTimeView = childView.findViewById<TextView>(R.id.mVTimeView)
mTvTimeView.tag = viewNum - 1
mTvTimeView.setOnClickListener {
RxKeyboardTool.hideSoftInput(this)
timSelect.selectTime(it, "yyyy-MM-dd HH:mm")
recordNumber = it.tag.toString().toInt()
}
childView.setPadding(0, 0, 0, dp2px(0))
@ -120,14 +117,10 @@ class UricCalibrationSubmitAct : BaseVmAct<UricAcidVm>() {
val list: MutableList<UricCalibrationBean> = mutableListOf()
for (i in 0 until binding.childLayout.childCount) {
val uricCalibrationBean = UricCalibrationBean()
uricCalibrationBean.bpTime = (getChildView(
i,
R.id.mVTimeView
) as TextView).text.toString()
uricCalibrationBean.uaValue = (getChildView(
i,
R.id.edUricValue
) as TextView).text.toString()
uricCalibrationBean.bpTime =
(getChildView(i, R.id.mVTimeView) as TextView).text.toString()
uricCalibrationBean.uaValue =
(getChildView(i, R.id.edUricValue) as TextView).text.toString()
if (uricCalibrationBean.bpTime.isNullOrEmpty()) {
CommonToastUtils.showToast("请选择测量时间")
@ -146,11 +139,8 @@ class UricCalibrationSubmitAct : BaseVmAct<UricAcidVm>() {
}
private fun getChildView(index: Int, childId: Int = 0): View {
return if (childId == 0) {
binding.childLayout[index]
} else {
binding.childLayout[index].findViewById(childId)
}
return if (childId == 0) binding.childLayout[index]
else binding.childLayout[index].findViewById(childId)
}
override fun liveObserver() {
@ -165,27 +155,5 @@ class UricCalibrationSubmitAct : BaseVmAct<UricAcidVm>() {
CommonToastUtils.showToast("提交失败:${it.msg}")
}
}
//获取尿酸检测数据
mViewModel.getUricAcidMeasurementRecordLive.observe(this) {
if (it.code == 0) {
if (it.data != null) {
val data = it.data
val line = getChildView(recordNumber, R.id.vUricAcidLine)
line.isVisible = false
val lastLayout = getChildView(recordNumber, R.id.llUricAcidLyout)
lastLayout.isVisible = true
(getChildView(
recordNumber,
R.id.tvUricAcidLastValue
) as TextView).text = data.uaValue.toString()
} else {
val line = getChildView(recordNumber, R.id.vUricAcidLine)
line.isVisible = true
val lastLayout = getChildView(recordNumber, R.id.llUricAcidLyout)
lastLayout.isVisible = false
}
}
}
}
}

@ -19,7 +19,7 @@ class UricCalibrationListAdapter : BaseAdapter<UricCalibrationListBean>(
val textColor by lazy {
arrayOf(
R.color.col_9BD,
R.color.col_25C,
R.color.col_02c,
R.color.col_FDA481
)
}
@ -36,25 +36,45 @@ class UricCalibrationListAdapter : BaseAdapter<UricCalibrationListBean>(
val view = holder.getView<ImageView>(R.id.ivSelected)
view.isSelected = item.isSelected
var result = ""
val colorIndex = when (item.upType) {
1 -> 0
2, 5 -> 1
else -> 2
1 -> {
0
}
2, 5 -> {
1
}
else -> {
2
}
}
val result = when (item.upType) {
1 -> "用户上传"
2 -> "管家上传"
3 -> "物联网上传"
4 -> "管理员上传"
else -> "家人上传"
when (item.upType) {
1 -> {
result = "用户上传"
}
2 -> {
result = "管家上传"
}
3 -> {
result = "物联网上传"
}
4 -> {
result = "管理员上传"
}
else -> {
result = "家人上传"
}
}
holder.setBackgroundResource(R.id.tvStatus, bg[colorIndex])
holder.setTextColor(
R.id.tvStatus,
ContextCompat.getColor(
context,
textColor[colorIndex]
)
ContextCompat.getColor(context, textColor[colorIndex])
)
holder.getView<TextView>(R.id.tvStatus).apply {
text = result
@ -70,15 +90,7 @@ class UricCalibrationListAdapter : BaseAdapter<UricCalibrationListBean>(
holder.setText(R.id.tvUploadingName, "上传人:${item.upName}")
holder.setText(R.id.tvMeasurementTime, "测量时间:${item.bpTime}")
holder.setText(R.id.tvMeasurementValue, "尿酸数值:${item.uaValue.toFloat().toInt()}μmol/L")
val sysValue = item.sysValue
if (sysValue > 0) {
holder.setGone(R.id.llLastValueLayout, false)
holder.setText(R.id.tvItemLastUricAcidValue, "尿酸数值:${sysValue}μmol/L")
} else {
holder.setGone(R.id.llLastValueLayout, true)
}
holder.setText(R.id.tvMeasurementValue, "测量值:${item.uaValue.toFloat().toInt()}μmol/L")
}
fun getSelectData(): MutableList<UricCalibrationListBean> {

@ -27,8 +27,6 @@ class UricAcidVm : BaseVm() {
val submitUricCalibrationLive by lazy { MutableLiveData<RespBody<Any>>() }
val getUricCalibrationListLive by lazy { MutableLiveData<RespBody<PaingBean<UricCalibrationListBean>>>() }
val deteleUricCalibrationLive by lazy { MutableLiveData<RespBody<Any>>() }
val servicePeriodData by lazy { MutableLiveData<RespBody<String>>() }
val getUricAcidMeasurementRecordLive by lazy { MutableLiveData<RespBody<BoodfatFatMeasurementRecordBean>>() }
fun getUserInfo(id:String){
startHttp(false) {

@ -8,12 +8,11 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_14"
android:paddingHorizontal="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginHorizontal="@dimen/dp_14"
android:background="@drawable/shape_8round_white"
android:orientation="vertical"
android:paddingHorizontal="@dimen/dp_16"
android:paddingBottom="@dimen/dp_20">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
@ -44,8 +43,8 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_14"
android:gravity="center_vertical"
android:layout_marginTop="@dimen/dp_14"
android:orientation="horizontal">
<TextView
@ -54,17 +53,17 @@
android:layout_height="wrap_content"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_17"
tools:text="上传人:张晓峰" />
tools:text="上传人:张晓峰"/>
<TextView
android:id="@+id/tvStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
tools:text="用户上传"
android:textColor="@color/col_96D"
android:textSize="@dimen/sp_11"
android:textStyle="bold"
tools:text="用户上传" />
android:textStyle="bold" />
</LinearLayout>
@ -72,7 +71,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_marginTop="@dimen/dp_14"
android:background="@color/col_0F2" />
android:background="@color/col_0F2"/>
<TextView
android:id="@+id/tvMeasurementTime"
@ -81,53 +80,17 @@
android:layout_marginTop="@dimen/dp_17"
android:textColor="@color/col_c7c"
android:textSize="@dimen/sp_15"
tools:text="测量时间2023-03-09 14:46" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_23"
android:text="测量值"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_17"
tools:ignore="HardcodedText" />
tools:text="测量时间2023-03-09 14:46"/>
<TextView
android:id="@+id/tvMeasurementValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_17"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginBottom="@dimen/dp_20"
android:textColor="@color/col_c7c"
android:textSize="@dimen/sp_15"
tools:text="测量值380" />
<LinearLayout
android:id="@+id/llLastValueLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_23"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="监测值"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_17"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tvItemLastUricAcidValue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_17"
android:textColor="@color/col_c7c"
android:textSize="@dimen/sp_15"
tools:text="低密度脂蛋白1.68mmol/L" />
</LinearLayout>
tools:text="测量值380"/>
</LinearLayout>

@ -60,37 +60,28 @@
android:drawablePadding="@dimen/dp_4"
android:gravity="end|center_vertical"
android:hint="@string/please_select_time"
android:textColorHint="@color/col_c7c"
android:paddingTop="@dimen/dp_10"
android:paddingBottom="@dimen/dp_10"
android:textColor="@color/col_3a4"
android:textColorHint="@color/col_c7c"
android:textSize="@dimen/sp_15"
tools:ignore="UseCompatTextViewDrawableXml" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_10"
android:text="测量值"
android:textColor="@color/col_c7c"
android:textSize="@dimen/sp_17"
tools:ignore="HardcodedText" />
<LinearLayout
android:id="@+id/llEditCholesterol"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginHorizontal="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_18"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="尿酸数值"
android:text="测量值"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15"
tools:ignore="HardcodedText" />
@ -99,16 +90,16 @@
android:id="@+id/edUricValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_6"
android:layout_weight="1"
android:background="@null"
android:gravity="end"
android:hint="@string/please_input_gdbp"
android:inputType="number"
android:paddingVertical="@dimen/dp_10"
android:textColor="@color/col_3a4"
android:layout_marginHorizontal="@dimen/dp_6"
android:inputType="number"
android:textColorHint="@color/col_c7c"
android:textSize="@dimen/sp_15"
android:textColor="@color/col_3a4"
app:layout_constraintRight_toLeftOf="@+id/mUnit" />
<TextView
@ -116,8 +107,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="μmol/L"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15"
android:textColor="@color/col_313"
app:layout_constraintBottom_toBottomOf="@+id/mEditGdbp"
app:layout_constraintLeft_toRightOf="@+id/mEditGdbp"
app:layout_constraintRight_toRightOf="parent"
@ -126,82 +117,6 @@
</LinearLayout>
<View
android:id="@+id/vUricAcidLine"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_18"
android:layout_marginHorizontal="@dimen/dp_16"
android:visibility="visible" />
<LinearLayout
android:id="@+id/llUricAcidLyout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_8"
android:layout_marginBottom="@dimen/dp_28"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0_5"
android:background="@color/col_0F2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_21"
android:text="监测值"
android:textColor="@color/col_c7c"
android:textSize="@dimen/sp_17"
tools:ignore="HardcodedText" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_25">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:text="尿酸数值"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15"
tools:ignore="HardcodedText" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tvUricAcidLastValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15"
tools:text="345" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:text="μmol/L"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15"
tools:ignore="HardcodedText" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>

@ -3,6 +3,7 @@ package com.zj365.mime.vm
import androidx.lifecycle.MutableLiveData
import com.xty.base.vm.BaseVm
import com.xty.common.Const
import com.xty.common.LogUtils
import com.xty.network.model.FamilyBean
import com.xty.network.model.InviteCustodyBean
import com.xty.network.model.MainBean
@ -73,6 +74,7 @@ class SettingVm : BaseVm() {
*/
fun getMySetting() {
startHttp {
LogUtils.e("eeeeee","请求个人中心数据啦")
val body = apiInterface().getMySetting()
body.getCodeStatus(settingLive, nowData)
}

@ -2,6 +2,7 @@ package com.xty.network.model
data class PsychologicalResultBean(
var title:String,
var conclusionText:String,
var recList:ArrayList<RecommendPsychologicalBean>

Loading…
Cancel
Save