Compare commits

...

68 Commits

Author SHA1 Message Date
wlh 2c0435938b 中建365-修改版本号 5 months ago
wlh 6ee2b06f2e 中建365-bug修复 9 months ago
wlh edfac21862 中建365-配置更换 1 year ago
wlh ada40501d9 中建365-1.2.2 1 year ago
wlh f8b4cbad5c 中建365-1.2.1 1 year ago
wlh abc608e326 中建365-兑换码 1 year ago
wlh 417542f6ad 中建365-oppo过审问题处理 1 year ago
wlh ee43f56b45 中建365-二期开发-线上健康监测显示问题修复 1 year ago
wlh c05475e96a 中建365-二期开发-线上高德版本更新/首页banner适配问题修复 1 year ago
wlh d6417c5d16 中建365-二期开发-上线优化 1 year ago
wlh d341d4cd19 中建365-二期开发-bug优化 1 year ago
wlh c8e33e9ceb 中建365-二期开发-bug优化 1 year ago
wlh 9ce9e3bcfc 中建365-二期开发-bug优化 1 year ago
wlh 50109919e0 中建365-二期开发-bug优化 1 year ago
wlh 8f30196252 中建365-二期开发-瘦包 1 year ago
wlh fa3b7f5f91 中建365-二期开发-增加埋点 1 year ago
wlh 7f8a277e74 中建365-二期开发-增加埋点 1 year ago
wlh 8ab6168b2c 中建365-二期开发-项目瘦包 1 year ago
wlh f25d554a79 中建365-二期开发-项目瘦包及bug修复 1 year ago
wlh c5831b0f18 中建365-二期开发-项目瘦包及bug修复 1 year ago
wlh 1b6900b0d3 中建365-二期开发-项目瘦包及bug修复 1 year ago
wlh 572205947c 中建365-二期开发-bug修复 1 year ago
wlh b90ec080e1 中建365-二期开发-bug修复 1 year ago
wlh 65928255f2 中建365-二期开发-bug修复 1 year ago
wlh c12c462f2a 中建365-二期开发-bug修复 1 year ago
wlh 3f31373b05 中建365-二期开发-bug修复 1 year ago
wlh 0709084f5e 中建365-二期开发-bug修复 1 year ago
wlh 6ee1c828f2 中建365-二期开发-bug修复 1 year ago
wlh a0554fb580 中建365-二期开发-bug修复 1 year ago
wlh 5dbace084c 中建365-二期开发-bug修复 1 year ago
wlh 9fd816ed10 中建365-二期开发-bug修复 1 year ago
wlh 638318bdf9 中建365-二期开发-bug修复 1 year ago
wlh 4547893d65 中建365-二期开发-优化 1 year ago
wlh ad11f62f87 中建365-二期开发-优化 1 year ago
wlh b87593ce06 中建365-二期开发-优化 1 year ago
wlh 21c2213ff1 中建365-二期开发-优化 1 year ago
wlh e0b4a9119b Merge branch 'develop' into dev_second
# Conflicts:
#	app/src/main/java/com/zj365/dc/activity/RegisterAct.kt
#	app/src/main/res/layout/frag_mine.xml
#	mine/src/main/java/com/zj365/mime/act/AgreementAct.kt
1 year ago
wlh edb90ce381 中建365-二期开发-权限优化 2 years ago
wlh 877247f577 中建365-二期开发-优化 2 years ago
wlh be8c4a5e7e 中建365-二期开发-优化 2 years ago
wlh c8bc5dd436 中建365-二期开发-优化 2 years ago
wlh d3c1305b62 中建365-二期开发-优化 2 years ago
wlh e5adb8e3ae 中建365-二期开发-优化 2 years ago
wlh 643141ae08 中建365-二期开发-优化 2 years ago
wlh c1af609169 中建365-二期开发-优化 2 years ago
wlh 7902e124a6 中建365-二期开发-优化 2 years ago
wlh abd6048cae 中建365-二期开发-优化 2 years ago
wlh 29d5da918a 中建365-二期开发-优化 2 years ago
wlh 6204cdd05e 中建365-二期开发-bug修复 2 years ago
wlh 74a931980f 中建365-二期开发-bug修复 2 years ago
wlh 84da7605ae 中建365-二期开发-bug修复 2 years ago
wlh ad130c609f 中建365-二期开发-优化相关页面 2 years ago
wlh 380b9694cc 中建365-二期开发-优化相关页面 2 years ago
wlh 886d9fcf30 中建365-二期开发-优化相关页面 2 years ago
wlh 9fa56534b6 中建365-二期开发-优化相关页面 2 years ago
wlh 423c32ae16 中建365-二期开发-优化相关页面 2 years ago
wlh d187dadab9 中建365-二期开发-优化相关页面 2 years ago
wlh 92f3f6f0f0 Merge branch 'develop' into dev_second 2 years ago
wlh dbd348d099 中建365-二期开发-商城开发/电子围栏 2 years ago
wlh 52075ffabc 中建365-二期开发-商城开发/电子围栏 2 years ago
wlh eda1955a7e 中建365-二期开发-商城开发/AI糖医/血脂 2 years ago
wlh 1faf1b65e5 中建365-二期开发-商城开发 2 years ago
wlh 35996556a9 中建365-二期开发-商城开发 2 years ago
wlh c31e4d3f7b 中建365-二期开发-合并代码 2 years ago
wlh ca2dfddaa7 中建365-二期开发-健康医典/电子围栏 2 years ago
wlh dd733d9367 中建365-二期开发-企业资料/健康档案 2 years ago
wlh 8921ed3cfa Merge remote-tracking branch 'origin/develop' into dev_second 2 years ago
wlh ce4d2d84b2 中建365-二期开发 2 years ago

@ -28,15 +28,21 @@ android {
} }
} }
ndk{
moduleName "libnew_native_libe"
ldLibs "log"
abiFilters "armeabi-v7a","arm64-v8a"
}
manifestPlaceholders = [ manifestPlaceholders = [
JPUSH_PKGNAME : applicationId, JPUSH_PKGNAME : applicationId,
JPUSH_APPKEY : "4469bc1d5cfba9e5aea1cac4", JPUSH_APPKEY : "4469bc1d5cfba9e5aea1cac4",
//. //.
JPUSH_CHANNEL : "developer-default", JPUSH_CHANNEL : "developer-default",
OPPO_APPKEY : "OP-", // OPPOappkey OPPO_APPKEY : "OP-5c4377948c564b09ba4894642e0bb6fc", // OPPOappkey
OPPO_APPID : "OP-", // OPPOappid OPPO_APPID : "OP-31015591", // OPPOappid
OPPO_APPSECRET: "OP-",//OPPOappsecret OPPO_APPSECRET: "OP-7240a5dfcb2b4017bd50193d18c74f79",//OPPOappsecret
XIAOMI_APPKEY : "MI-5992028541716",// appkey XIAOMI_APPKEY : "MI-5992028541716",// appkey
XIAOMI_APPID : "MI-2882303761520285716", // appid XIAOMI_APPID : "MI-2882303761520285716", // appid
@ -57,7 +63,7 @@ android {
buildConfigField("String" ,"appid" ,"\"${rootProject.ext.wx.appid}\"") buildConfigField("String" ,"appid" ,"\"${rootProject.ext.wx.appid}\"")
buildConfigField("String" ,"appSecret" ,"\"${rootProject.ext.wx.appSecret}\"") buildConfigField("String" ,"appSecret" ,"\"${rootProject.ext.wx.appSecret}\"")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" // testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
signingConfigs{ signingConfigs{
@ -105,7 +111,7 @@ android {
repositories { repositories {
flatDir { flatDir {
dirs 'libs' dirs 'libs','../common/libs'
} }
project.afterEvaluate { project.afterEvaluate {
@ -121,14 +127,14 @@ dependencies {
implementation (name: 'ycbtsdk-release', ext: 'aar') implementation (name: 'ycbtsdk-release', ext: 'aar')
implementation (name: 'push-3.0.0', ext: 'aar') implementation (name: 'push-3.0.0', ext: 'aar')
implementation files('libs/bluetooth-mini-fatscale-2.9.5.jar') // implementation files('libs/bluetooth-mini-fatscale-2.9.5.jar')
implementation files('libs/bluetooth-mini-core-2.9.5.jar') // implementation files('libs/bluetooth-mini-core-2.9.5.jar')
implementation project(':Health') implementation project(':Health')
implementation project(':server') implementation project(':server')
implementation project(':mine') implementation project(':mine')
// implementation project(':AYCrashGuard') // implementation project(':AYCrashGuard')
kapt rely.arouter_compiler kapt rely.arouter_compiler
kapt rely.GifDrawable // kapt rely.GifDrawable
kapt rely.xutil kapt rely.xutil
} }

Binary file not shown.

@ -84,6 +84,11 @@
<uses-sdk tools:overrideLibrary="com.yucheng.ycbtsdk" /> <uses-sdk tools:overrideLibrary="com.yucheng.ycbtsdk" />
<!-- ********OPPO 推送 start******** -->
<uses-permission android:name="com.coloros.mcs.permission.RECIEVE_MCS_MESSAGE" />
<uses-permission android:name="com.heytap.mcs.permission.RECIEVE_MCS_MESSAGE" />
<!--********OPPO 推送 end******** -->
<application <application
android:name="com.xty.common.app.MyApp" android:name="com.xty.common.app.MyApp"
android:allowBackup="true" android:allowBackup="true"
@ -100,6 +105,16 @@
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
tools:replace="android:allowBackup"> tools:replace="android:allowBackup">
<provider
android:authorities="com.zj365.dc.fileprovider"
android:exported="false"
android:grantUriPermissions="true"
android:name="androidx.core.content.FileProvider">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"/>
</provider>
<activity <activity
android:name=".activity.WelcomeAct" android:name=".activity.WelcomeAct"
android:exported="true" android:exported="true"
@ -128,10 +143,7 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity
android:name=".activity.InfoSimpleAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity android:name=".activity.HealthScienceAct" <activity android:name=".activity.HealthScienceAct"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
@ -149,6 +161,9 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity android:name="com.zj365.dc.activity.WarningMsgAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity android:name=".activity.OneKeyBinderDeviceAct" <activity android:name=".activity.OneKeyBinderDeviceAct"
android:launchMode="singleTop" android:launchMode="singleTop"
@ -159,6 +174,14 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity android:name=".activity.shop.ShopCategoryActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity android:name=".activity.shop.CreateGoodsOrderAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity <activity
android:name="com.zj365.health.act.BindFamilyAct" android:name="com.zj365.health.act.BindFamilyAct"
@ -294,6 +317,17 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity android:name="com.zj365.mime.act.electronicfence.ElectronicFenceSettingAct"
android:screenOrientation="portrait" />
<activity android:name="com.zj365.mime.act.electronicfence.ElectronicAddressChooseAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity android:name="com.zj365.mime.act.electronicfence.ElectronicAddOrModifyAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity <activity
android:name="com.zj365.mime.act.BaseInfoChangeAct" android:name="com.zj365.mime.act.BaseInfoChangeAct"
android:launchMode="singleTop" android:launchMode="singleTop"
@ -334,6 +368,10 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait"/> android:screenOrientation="portrait"/>
<activity android:name="com.zj365.mime.act.EnterpriseInformationForTypeAct"
android:launchMode="singleTop"
android:screenOrientation="portrait"/>
<activity android:name="com.xty.base.act.RichTextAct" <activity android:name="com.xty.base.act.RichTextAct"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait"/> android:screenOrientation="portrait"/>

@ -1,5 +1,6 @@
package com.zj365.dc.activity package com.zj365.dc.activity
import android.Manifest
import android.content.Intent import android.content.Intent
import android.view.LayoutInflater import android.view.LayoutInflater
import android.widget.TextView import android.widget.TextView
@ -13,12 +14,16 @@ import com.xty.base.vm.BaseVm
import com.xty.common.arouter.ARouterUrl import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager import com.xty.common.arouter.RouteManager
import com.xty.common.picture.PictureUtils import com.xty.common.picture.PictureUtils
import com.xty.common.util.JumpPermissionManagement
import com.zj365.dc.databinding.ActCalorieAnalyzeBinding import com.zj365.dc.databinding.ActCalorieAnalyzeBinding
import com.zj365.dc.vm.DietManagementVm import com.zj365.dc.vm.DietManagementVm
import com.zj365.health.R import com.zj365.health.R
import com.zj365.health.weight.DialogTip
import com.zj365.mime.weight.FactorySettingDialog
import pub.devrel.easypermissions.EasyPermissions
@Route(path = ARouterUrl.CALORIE_ANALYZE) @Route(path = ARouterUrl.CALORIE_ANALYZE)
class CalorieAnalyzeAct : BaseVmAct<BaseVm>() { class CalorieAnalyzeAct : BaseVmAct<BaseVm>() , EasyPermissions.PermissionCallbacks {
val binding by lazy { ActCalorieAnalyzeBinding.inflate(layoutInflater) } val binding by lazy { ActCalorieAnalyzeBinding.inflate(layoutInflater) }
@ -76,12 +81,73 @@ class CalorieAnalyzeAct : BaseVmAct<BaseVm>() {
} }
tvTakePhoto.setOnClickListener { tvTakePhoto.setOnClickListener {
if(EasyPermissions.hasPermissions(this,
Manifest.permission.CAMERA,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE)){
PictureUtils.openTheCamera(this, PictureMimeType.ofImage()) PictureUtils.openTheCamera(this, PictureMimeType.ofImage())
}else{
if(EasyPermissions.somePermissionDenied(this,
Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.READ_EXTERNAL_STORAGE)){
DialogTip(
this,
"中健365需要相机存储权限以便您上传图片分析菜谱"
) {
JumpPermissionManagement.GoToSetting(this@CalorieAnalyzeAct)
}.show()
}else {
FactorySettingDialog(
this,
"中健365需要相机存储权限以便您上传图片分析菜谱"
) {
EasyPermissions.requestPermissions(
this, "",
0x00012,
Manifest.permission.CAMERA,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE
)
}.show()
}
}
dialog.dismiss() dialog.dismiss()
} }
tvChoosePhotoAlbum.setOnClickListener { tvChoosePhotoAlbum.setOnClickListener {
if(EasyPermissions.hasPermissions(this,
Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.READ_EXTERNAL_STORAGE)){
PictureUtils.openCamera(this, PictureMimeType.ofImage(),9) PictureUtils.openCamera(this, PictureMimeType.ofImage(),9)
}else{
if(EasyPermissions.somePermissionDenied(this,
Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.READ_EXTERNAL_STORAGE)){
DialogTip(
this,
"中健365需要相机存储权限以便您上传图片分析菜谱"
) {
JumpPermissionManagement.GoToSetting(this@CalorieAnalyzeAct)
}.show()
}else{
FactorySettingDialog(
this,
"中健365需要相机存储权限以便您上传图片分析菜谱"
) {
EasyPermissions.requestPermissions(this,"",
0x00011,
Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.READ_EXTERNAL_STORAGE)
}.show()
}
}
dialog.dismiss() dialog.dismiss()
} }
@ -116,4 +182,19 @@ class CalorieAnalyzeAct : BaseVmAct<BaseVm>() {
} }
} }
} }
override fun onPermissionsGranted(requestCode: Int, perms: MutableList<String>) {
when(requestCode){
0x00012->{
PictureUtils.openTheCamera(this, PictureMimeType.ofImage())
}
0x00011->{
PictureUtils.openCamera(this, PictureMimeType.ofImage(),9)
}
}
}
override fun onPermissionsDenied(requestCode: Int, perms: MutableList<String>) {
}
} }

@ -30,6 +30,7 @@ import com.xty.common.event.BluetoothEvent
import com.xty.common.event.MyInfoEvent import com.xty.common.event.MyInfoEvent
import com.xty.common.util.CommonToastUtils import com.xty.common.util.CommonToastUtils
import com.xty.common.util.CommonUtils import com.xty.common.util.CommonUtils
import com.xty.common.util.JumpPermissionManagement
import com.xty.common.xqr_code.XQRCodeAct import com.xty.common.xqr_code.XQRCodeAct
@ -37,6 +38,7 @@ import com.xuexiang.xqrcode.XQRCode
import com.zj365.dc.databinding.ActDeviceActiveBinding import com.zj365.dc.databinding.ActDeviceActiveBinding
import com.zj365.dc.model.ScanInfoBean import com.zj365.dc.model.ScanInfoBean
import com.zj365.dc.vm.BasicInfoVm import com.zj365.dc.vm.BasicInfoVm
import com.zj365.health.weight.DialogTip
import com.zj365.health.weight.SignDialog import com.zj365.health.weight.SignDialog
import com.zj365.mime.weight.FactorySettingDialog import com.zj365.mime.weight.FactorySettingDialog
import com.zj365.mime.weight.NoticeSettingDialog import com.zj365.mime.weight.NoticeSettingDialog
@ -51,7 +53,7 @@ import pub.devrel.easypermissions.EasyPermissions
*/ */
@SuppressLint("ObsoleteSdkInt") @SuppressLint("ObsoleteSdkInt")
@Route(path = ARouterUrl.DEVICE_ACTIVE) @Route(path = ARouterUrl.DEVICE_ACTIVE)
class DeviceActiveAct : BaseVmAct<BasicInfoVm>() { class DeviceActiveAct : BaseVmAct<BasicInfoVm>() , EasyPermissions.PermissionCallbacks ,EasyPermissions.RationaleCallbacks{
val binding by lazy { ActDeviceActiveBinding.inflate(layoutInflater) } val binding by lazy { ActDeviceActiveBinding.inflate(layoutInflater) }
override fun setLayout() = binding.root override fun setLayout() = binding.root
@ -248,22 +250,31 @@ class DeviceActiveAct : BaseVmAct<BasicInfoVm>() {
com.zj365.health.R.style.XQRCodeTheme_Custom com.zj365.health.R.style.XQRCodeTheme_Custom
) )
}else{ }else{
if (EasyPermissions.somePermissionDenied(this,
Manifest.permission.CAMERA)){
DialogTip(
this,
"中健365需要相机权限,需要打开设置页面么?"
) {
JumpPermissionManagement.GoToSetting(this@DeviceActiveAct)
}.show()
}else{
DialogTip(
this,
"中健365需要相机权限以便您使用扫一扫功能"
) {
EasyPermissions.requestPermissions(this,"", EasyPermissions.requestPermissions(this,"",
0x00011, 0x00011,
Manifest.permission.CAMERA) Manifest.permission.CAMERA)
}.show()
} }
} }
override fun onSuccess(requestCode: Int) {
super.onSuccess(requestCode)
XQRCodeAct.start(
this@DeviceActiveAct,
XQRCodeAct.QRCODE_AGREEMENT,
com.zj365.health.R.style.XQRCodeTheme_Custom
)
} }
/** /**
* 隐私协议 * 隐私协议
*/ */
@ -525,4 +536,26 @@ class DeviceActiveAct : BaseVmAct<BasicInfoVm>() {
super.onBackPressed() super.onBackPressed()
} }
} }
override fun onPermissionsGranted(requestCode: Int, perms: MutableList<String>) {
XQRCodeAct.start(
this@DeviceActiveAct,
XQRCodeAct.QRCODE_AGREEMENT,
com.zj365.health.R.style.XQRCodeTheme_Custom
)
}
override fun onPermissionsDenied(requestCode: Int, perms: MutableList<String>) {
}
override fun onRationaleAccepted(requestCode: Int) {
XQRCodeAct.start(
this@DeviceActiveAct,
XQRCodeAct.QRCODE_AGREEMENT,
com.zj365.health.R.style.XQRCodeTheme_Custom
)
}
override fun onRationaleDenied(requestCode: Int) {
}
} }

@ -53,6 +53,7 @@ class DietManagementAct : BaseVmAct<BaseVm>(){
"web_site_url", "web_site_url",
"${BuildConfig.h5url}pages/index/index?pageId=cookbook" "${BuildConfig.h5url}pages/index/index?pageId=cookbook"
) )
bundle.putBoolean("isShowTitle",false)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle) RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
} }
// var url = "${BuildConfig.}" // var url = "${BuildConfig.}"
@ -67,6 +68,7 @@ class DietManagementAct : BaseVmAct<BaseVm>(){
"web_site_url", "web_site_url",
"${BuildConfig.h5url}pages/index/index?pageId=herbal" "${BuildConfig.h5url}pages/index/index?pageId=herbal"
) )
bundle.putBoolean("isShowTitle",false)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle) RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
} }

@ -36,7 +36,7 @@ class HealthScienceAct : BaseListAct<HomeVm> (){
bundle.clear() bundle.clear()
var bean = adapter.getItem(position) as ScienceBean var bean = adapter.getItem(position) as ScienceBean
bundle.putSerializable("bean", bean) bundle.putSerializable("bean", bean)
onEventObject(this, UmengEventId.HealthScience, "${bean.name}") // onEventObject(this, UmengEventId.HealthScience, "${bean.name}")
RouteManager.goAct(ARouterUrl.SCIENCE_DETAIL, bundle) RouteManager.goAct(ARouterUrl.SCIENCE_DETAIL, bundle)
} }

@ -1,200 +0,0 @@
package com.zj365.dc.activity
import android.content.Intent
import android.text.Editable
import android.text.TextWatcher
import android.util.Log
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.luck.picture.lib.PictureSelector
import com.luck.picture.lib.config.PictureConfig
import com.tamsiree.rxkit.RxActivityTool
import com.tamsiree.rxkit.RxKeyboardTool
import com.xty.base.act.BaseVmAct
import com.xty.common.TimeSelect
import com.xty.common.TimeUtils
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
import com.xty.common.event.MyInfoEvent
import com.xty.common.picture.PictureUtils
import com.xty.common.setImage
import com.xty.common.util.CommonToastUtils
import com.zj365.dc.R
import com.zj365.dc.databinding.ActInfoSimpleBinding
import com.zj365.dc.vm.InfoSimpleVm
import org.greenrobot.eventbus.EventBus
import java.util.regex.Pattern
/**
* 基本信息
* 简单信息填写
*/
@Route(path = ARouterUrl.INFO_SIMPLE)
class InfoSimpleAct : BaseVmAct<InfoSimpleVm>() {
val binding by lazy { ActInfoSimpleBinding.inflate(layoutInflater) }
override fun setLayout() = binding.root
private var isBinding: Boolean = false
private var sexType = 1
private var birthdayType = 1
var phone: String = ""
private var pwd: String = ""
private val timeSelect by lazy { TimeSelect(this) {} }
private val textListener by lazy {
object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
}
override fun afterTextChanged(s: Editable?) {
binding.mName.removeTextChangedListener(this)
val str = s.toString().trim()
if (str.isNotEmpty()) {
val isNum = Pattern.matches("[0-9]", str.substring(0, 1))
if (isNum) {
if (str.length > 2) {
binding.mName.setText(str.substring(1, str.length))
} else {
binding.mName.setText("")
}
CommonToastUtils.showToast(R.string.name_first_num)
}
}
binding.mName.addTextChangedListener(this)
}
}
}
override fun initData() {
super.initData()
isDarkBar = true
phone = intent.getStringExtra("phone").toString()
pwd = intent.getStringExtra("password").toString()
}
override fun initView() {
super.initView()
statusBar(binding.title.mView)
binding.title.mTvTitle.text = getString(R.string.base_info)
binding.title.mIvBack.setOnClickListener { finish() }
binding.mImage.setOnClickListener { PictureUtils.openCamera(this) }
timeSelect.startDate.set(1922, 0, 1)
binding.llBirthday.setOnClickListener {
RxKeyboardTool.hideSoftInput(this)
timeSelect.selectTime(binding.mBirthday)
}
sexType = if (binding.checkSex.isChecked) 2 else 1
birthdayType = if (binding.checkBirthday.isChecked) 2 else 1
binding.bindingTv.setOnClickListener {
isBinding = true
turnToSaveBaseData()
}
binding.mName.addTextChangedListener(textListener)
binding.mSubmit.setOnClickListener {
isBinding = false
turnToSaveBaseData()
}
}
/**
* 调用接口保存
*/
private fun turnToSaveBaseData() {
val birthDay = binding.mBirthday.text.toString().trim()
val name = binding.mName.text.toString().trim()
if (TimeUtils.getAgeByBirth(birthDay) < 14) {
CommonToastUtils.showToast("需要年满14岁才可使用")
isBinding = false
return
}
val avatar = binding.mImage.tag
val datanal = avatar?.toString() ?: ""
val sexValue = if (binding.checkSex.isChecked) "2" else "1"
birthdayType = if (binding.checkBirthday.isChecked) 2 else 1
//调用接口
if (name.trim().isEmpty()) {
mViewModel.submit(datanal, null, sexValue, birthdayType.toString(), birthDay)
} else {
mViewModel.submit(datanal, name, sexValue, birthdayType.toString(), birthDay)
}
}
override fun liveObserver() {
mViewModel.setBasic.observe(this) {
//不管点击绑定还是完成都会去登录
EventBus.getDefault().post(MyInfoEvent())
mViewModel.login(phone, pwd)
if (isBinding) {
return@observe
}
CommonToastUtils.showSucceedToast("信息设置成功")
}
mViewModel.mLogin.observe(this) {
//登录成功请求用户token
mViewModel.getImUserSig("user_${it.data.id}")
}
mViewModel.getImUserSig.observe(this) {
Log.e("simon", "login" + it.data)
/*TUILogin.login(
applicationContext,
0,
it.paramsData,
it.data,
object : TUICallback() {
override fun onSuccess() {
Log.e("simon", "onSuccess")
if (!isBinding) { //如果是直接点击完成,跳转到主页面
ARouter.getInstance().build(ARouterUrl.MAIN_ACT).navigation()
RxActivityTool.finishAllActivity()
} else { //如果是去绑定设备,跳转到设备选择界面,同是给予标记,告诉该界面已经登录
bundle.clear()
bundle.putBoolean("isLogin", true)
RouteManager.goAct(ARouterUrl.DEVICE_CHOICE, bundle)
}
}
override fun onError(errorCode: Int, errorMessage: String?) {
Log.e("simon", "onError")
}
})*/
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (resultCode === RESULT_OK) {
when (requestCode) {
PictureConfig.CHOOSE_REQUEST -> {
var result = PictureSelector.obtainMultipleResult(data)
if (result.size > 0) {
var path = if (result[0].compressPath.isEmpty()) {
result[0].androidQToPath
} else {
result[0].compressPath
}
binding.mImage.setImage(this, path)
binding.mImage.tag = path
}
}
1000 -> {
finish()
}
}
}
}
}

@ -49,11 +49,11 @@ class LoginAct : BaseVmAct<LoginVm>() {
val dialogBind by lazy { val dialogBind by lazy {
DialogTipNew(this,"温馨提示", "恭喜您成为中健三六五大家庭的一员,为了提供更好的信息服务,请完善您的基本信息。", "前往","取消",false,{ DialogTipNew(this,"温馨提示", "恭喜您成为中健三六五大家庭的一员,为了提供更好的信息服务,请完善您的基本信息。", "前往","取消",false,{
RouteManager.goAct(ARouterUrl.BASE_INFO_CHANGE) RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT)
EventBus.getDefault().post(LoginOrRegisterEvent())
finish() finish()
}){ }){
EventBus.getDefault().post(LoginOrRegisterEvent())
finish() finish()
} }
} }
@ -168,6 +168,7 @@ class LoginAct : BaseVmAct<LoginVm>() {
bundle.clear() bundle.clear()
bundle.putString("title", "用户协议") bundle.putString("title", "用户协议")
bundle.putBoolean("isAgree", false)
bundle.putString("url", "https://dc.zhongjian365.com/agreement.html") bundle.putString("url", "https://dc.zhongjian365.com/agreement.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle) RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
} }
@ -182,6 +183,7 @@ class LoginAct : BaseVmAct<LoginVm>() {
override fun onClick(widget: View) { override fun onClick(widget: View) {
bundle.clear() bundle.clear()
bundle.putString("title", "隐私政策") bundle.putString("title", "隐私政策")
bundle.putBoolean("isAgree", false)
bundle.putString("url", "https://dc.zhongjian365.com/privacy.html") bundle.putString("url", "https://dc.zhongjian365.com/privacy.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle) RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
} }
@ -283,49 +285,17 @@ class LoginAct : BaseVmAct<LoginVm>() {
override fun liveObserver() { override fun liveObserver() {
mViewModel.mLogin.observe(this) { mViewModel.mLogin.observe(this) {
loadingView.dismiss() loadingView.dismiss()
EventBus.getDefault().post(LoginOrRegisterEvent())
if (it.data.isPerfect == 0){ if (it.data.isPerfect == 0){
dialogBind.setContentNew("恭喜您成为中健三六五大家庭的医院,为了提供更好的信息服务,请完善您的基本信息。") dialogBind.setContentNew("恭喜您成为中健三六五大家庭的一员,为了提供更好的信息服务,请完善您的基本信息。")
dialogBind.show() dialogBind.show()
}else{ }else{
EventBus.getDefault().post(LoginOrRegisterEvent()) // EventBus.getDefault().post(LoginOrRegisterEvent())
finish()
}
// initTab()
// mViewModel.getImUserSig("user_${it.data.id}")
// RouteManager.goAct(ARouterUrl.MAIN_ACT)
}
// mViewModel.loginWx.observe(this) {
// loadingView.dismiss()
// initTab()
// mViewModel.getImUserSig("user_${it.data}")
// }
/* mViewModel.setLoginWxId.observe(this) {
loadingView.dismiss()
initTab()
mViewModel.getImUserSig("user_${it}")
}*/
/* mViewModel.getImUserSig.observe(this) {
Log.e("simon", "login"+it.data)
TUILogin.login(
applicationContext,
1400807230,
it.paramsData,
it.data,
object : TUICallback() {
override fun onSuccess() {
Log.e("simon","onSuccess")
RouteManager.goAct(ARouterUrl.MAIN_ACT)
finish() finish()
} }
override fun onError(errorCode: Int, errorMessage: String?) {
Log.e("simon","onError")
} }
})
}*/
mViewModel.codeLive.observe(this) { mViewModel.codeLive.observe(this) {
timeStart() timeStart()
binding.mTvCode.apply { binding.mTvCode.apply {

@ -1,55 +1,46 @@
package com.zj365.dc.activity package com.zj365.dc.activity
import android.Manifest
import android.content.BroadcastReceiver import android.content.BroadcastReceiver
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.IntentFilter import android.content.IntentFilter
import android.net.Uri
import android.os.Build import android.os.Build
import android.text.TextUtils import android.text.TextUtils
import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import androidx.cardview.widget.CardView import androidx.cardview.widget.CardView
import androidx.fragment.app.Fragment
import androidx.localbroadcastmanager.content.LocalBroadcastManager import androidx.localbroadcastmanager.content.LocalBroadcastManager
import cn.jpush.android.api.JPushInterface import cn.jpush.android.api.JPushInterface
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.fastjson.JSON
import com.amap.api.location.AMapLocationClient import com.amap.api.location.AMapLocationClient
import com.amap.api.location.AMapLocationClientOption import com.amap.api.location.AMapLocationClientOption
import com.blankj.utilcode.util.ArrayUtils
import com.google.android.material.bottomnavigation.BottomNavigationItemView import com.google.android.material.bottomnavigation.BottomNavigationItemView
import com.google.android.material.bottomnavigation.BottomNavigationMenuView import com.google.android.material.bottomnavigation.BottomNavigationMenuView
import com.lifesense.android.ble.core.serializer.AbstractMeasureData /*import com.lifesense.android.ble.core.serializer.AbstractMeasureData
import com.lifesense.android.ble.device.fatscale.model.WeightMeasureData import com.lifesense.android.ble.device.fatscale.model.WeightMeasureData*/
import com.tamsiree.rxkit.RxActivityTool import com.tamsiree.rxkit.RxActivityTool
import com.tamsiree.rxkit.RxSPTool
import com.xty.base.act.BaseVmAct import com.xty.base.act.BaseVmAct
import com.xty.base.dialog.AppUpdateDialog import com.xty.base.dialog.AppUpdateDialog
import com.xty.base.dialog.DialogActivities import com.xty.base.dialog.DialogActivities
import com.xty.base.vp2.VpAdapter import com.xty.base.vp2.VpAdapter
import com.xty.common.Const import com.xty.common.Const
import com.xty.common.LogUtils
import com.xty.common.MMkvHelper import com.xty.common.MMkvHelper
import com.xty.common.aMapUtils.AmapInit import com.xty.common.aMapUtils.AmapInit
import com.xty.common.app.MyApp
import com.xty.common.arouter.ARouterUrl import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager import com.xty.common.arouter.RouteManager
import com.xty.common.bracelet.checkBlueConnectPermission import com.xty.common.event.BackGroundEvent
import com.xty.common.event.AddSuccessEvent
import com.xty.common.event.BindDevEvent import com.xty.common.event.BindDevEvent
import com.xty.common.event.LoginOrRegisterEvent import com.xty.common.event.LoginOrRegisterEvent
import com.xty.common.event.MeasureWeightEvent
import com.xty.common.event.MqttReceive import com.xty.common.event.MqttReceive
import com.xty.common.event.MyInfoEvent import com.xty.common.event.MyInfoEvent
import com.xty.common.util.CommonToastUtils import com.xty.common.util.CommonToastUtils
import com.xty.common.util.CommonUtils import com.xty.common.util.CommonUtils
import com.xty.common.util.ViewScreenshotUtils
import com.xty.network.model.InviteCustodyBean import com.xty.network.model.InviteCustodyBean
import com.xty.network.utils.AppUtils
import com.zj365.dc.BuildConfig import com.zj365.dc.BuildConfig
import com.zj365.dc.R import com.zj365.dc.R
import com.zj365.dc.databinding.ActivityMainBinding import com.zj365.dc.databinding.ActivityMainBinding
@ -57,21 +48,18 @@ import com.zj365.dc.fragment.DynamicManagementFrag
import com.zj365.dc.fragment.HealthHomeFrag import com.zj365.dc.fragment.HealthHomeFrag
import com.zj365.dc.fragment.MessageFragment import com.zj365.dc.fragment.MessageFragment
import com.zj365.dc.fragment.MineFrag import com.zj365.dc.fragment.MineFrag
import com.zj365.dc.fragment.ShopFragment
import com.zj365.dc.vm.MainVm import com.zj365.dc.vm.MainVm
import com.zj365.health.act.binddevice.BaseDeviceBindListAct
import com.zj365.health.act.binddevice.BlueUtil
import com.zj365.health.weight.DialogTipNew import com.zj365.health.weight.DialogTipNew
import com.zj365.mime.act.DevInfoAct
import io.reactivex.functions.Consumer
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import me.leolin.shortcutbadger.ShortcutBadger
import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode import org.greenrobot.eventbus.ThreadMode
import java.util.Date
@Route(path = ARouterUrl.MAIN_ACT) @Route(path = ARouterUrl.MAIN_ACT)
class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> { class MainActivity : BaseVmAct<MainVm>()/*, Consumer<AbstractMeasureData>*/ {
private val binding by lazy { ActivityMainBinding.inflate(layoutInflater) } private val binding by lazy { ActivityMainBinding.inflate(layoutInflater) }
override fun setLayout(): View = binding.root override fun setLayout(): View = binding.root
@ -118,6 +106,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
// isShowReadAllButton = true // isShowReadAllButton = true
imunreadCount = unreadCount.toInt() imunreadCount = unreadCount.toInt()
setBadge(sysunreadCount + unreadCount.toInt()) setBadge(sysunreadCount + unreadCount.toInt())
// } else { // } else {
// isShowReadAllButton = false // isShowReadAllButton = false
// setBadge(unreadCount) // setBadge(unreadCount)
@ -134,6 +123,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
listOf( listOf(
HealthHomeFrag(), HealthHomeFrag(),
// Fragment(), // Fragment(),
ShopFragment(),
DynamicManagementFrag(), DynamicManagementFrag(),
MessageFragment(), MessageFragment(),
MineFrag() MineFrag()
@ -147,7 +137,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
initVp2() initVp2()
initBottomNav() initBottomNav()
addNv() addNv()
mViewModel.getVersionNew() mViewModel.getVersionNew(AppUtils.getVersionCode(this))
initUnreadCountReceiver() initUnreadCountReceiver()
JPushInterface.setBadgeNumber(this, 0) JPushInterface.setBadgeNumber(this, 0)
@ -170,9 +160,11 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
"user_release_${MMkvHelper.getLong(Const.USER_ID)}" "user_release_${MMkvHelper.getLong(Const.USER_ID)}"
) )
// } // }
}
mViewModel.getUserEquipmentInformationizationRequest(userId) mViewModel.getUserEquipmentInformationizationRequest(userId)
}
mViewModel.getBanners(userId,3) mViewModel.getBanners(userId,3)
@ -226,28 +218,28 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
return@setOnNavigationItemSelectedListener true return@setOnNavigationItemSelectedListener true
} }
/* R.id.nav_server -> { R.id.nav_server -> {
binding.mVp2.setCurrentItem(1, false) binding.mVp2.setCurrentItem(1, false)
return@setOnNavigationItemSelectedListener true return@setOnNavigationItemSelectedListener true
}*/ }
R.id.nav_dynamic_management -> { R.id.nav_dynamic_management -> {
if (MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if (MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else{ }else{
binding.mVp2.setCurrentItem(1, false) binding.mVp2.setCurrentItem(2, false)
return@setOnNavigationItemSelectedListener true return@setOnNavigationItemSelectedListener true
} }
} }
R.id.nav_message -> { R.id.nav_message -> {
binding.mVp2.setCurrentItem(2, false) binding.mVp2.setCurrentItem(3, false)
return@setOnNavigationItemSelectedListener true return@setOnNavigationItemSelectedListener true
} }
R.id.nav_mine -> { R.id.nav_mine -> {
binding.mVp2.setCurrentItem(3, false) binding.mVp2.setCurrentItem(4, false)
return@setOnNavigationItemSelectedListener true return@setOnNavigationItemSelectedListener true
} }
@ -398,6 +390,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
if (it.code != 0) { if (it.code != 0) {
CommonToastUtils.showLoserToast("获取设备信息失败") CommonToastUtils.showLoserToast("获取设备信息失败")
} }
Const.userDeviceLiveData.value =it.data
when (it.data.bindStatus) { when (it.data.bindStatus) {
0 -> { 0 -> {
binding.mVp2.currentItem = 0 binding.mVp2.currentItem = 0
@ -420,7 +413,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
private fun addNv() { private fun addNv() {
val menuView = binding.mBottom.getChildAt(0) as BottomNavigationMenuView val menuView = binding.mBottom.getChildAt(0) as BottomNavigationMenuView
//这里就是获取所添加的每一个Tab(或者叫menu) //这里就是获取所添加的每一个Tab(或者叫menu)
val tab = menuView.getChildAt(2) as BottomNavigationItemView val tab = menuView.getChildAt(3) as BottomNavigationItemView
//加载我们的角标View新创建的一个布局 //加载我们的角标View新创建的一个布局
badegView = LayoutInflater.from(this).inflate(R.layout.item_msg_count, tab, true) badegView = LayoutInflater.from(this).inflate(R.layout.item_msg_count, tab, true)
@ -435,6 +428,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
badegView?.let { badegView?.let {
var tv = it.findViewById<TextView>(R.id.mBadge) var tv = it.findViewById<TextView>(R.id.mBadge)
var carrdView = it.findViewById<CardView>(R.id.mCard) var carrdView = it.findViewById<CardView>(R.id.mCard)
ShortcutBadger.applyCount(applicationContext, num)
if (num > 0) { if (num > 0) {
tv.visibility = View.VISIBLE tv.visibility = View.VISIBLE
tv.text = if (num > 99) "99+" else "$num" tv.text = if (num > 99) "99+" else "$num"
@ -461,7 +455,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
fun reveiveMsg(event: MqttReceive) { fun reveiveMsg(event: MqttReceive) {
} }
override fun accept(abstractMeasureData: AbstractMeasureData) { /* override fun accept(abstractMeasureData: AbstractMeasureData) {
if (abstractMeasureData is WeightMeasureData) { if (abstractMeasureData is WeightMeasureData) {
if (!abstractMeasureData.isProcessingData) { if (!abstractMeasureData.isProcessingData) {
Log.i("LS-Bluetooth", "收到测量过程数据:${JSON.toJSONString(abstractMeasureData)}") Log.i("LS-Bluetooth", "收到测量过程数据:${JSON.toJSONString(abstractMeasureData)}")
@ -476,9 +470,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
return return
} }
} }
} }*/
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
@ -488,19 +480,19 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun bindDevSuccess(event: BindDevEvent){ fun bindDevSuccess(event: BindDevEvent){
mViewModel.getMySetting() // mViewModel.getMySetting()
mViewModel.getIsDemonstate() mViewModel.getIsDemonstate()
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun refreshUI(event: MyInfoEvent){ fun refreshUI(event: MyInfoEvent){
mViewModel.getMySetting() // mViewModel.getMySetting()
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun onLoginOrRegisterSuccess(event: LoginOrRegisterEvent){ fun onLoginOrRegisterSuccess(event: LoginOrRegisterEvent){
mViewModel.getMySetting() // mViewModel.getMySetting()
mViewModel.getIsDemonstate() mViewModel.getIsDemonstate()
} }

@ -6,11 +6,16 @@ import com.alibaba.android.arouter.facade.annotation.Route
import com.xty.base.act.BaseVmAct import com.xty.base.act.BaseVmAct
import com.xty.base.vm.BaseVm import com.xty.base.vm.BaseVm
import com.xty.common.Dateutils import com.xty.common.Dateutils
import com.xty.common.UmengEventId
import com.xty.common.arouter.ARouterUrl import com.xty.common.arouter.ARouterUrl
import com.xty.common.event.MessageReadEvent
import com.xty.common.onEventObject
import com.xty.common.util.ImageGetterUtils import com.xty.common.util.ImageGetterUtils
import com.xty.network.model.MessageBean import com.xty.network.model.MessageBean
import com.xty.network.model.MessageTypeDataBean import com.xty.network.model.MessageTypeDataBean
import com.zj365.dc.databinding.ActMessageDetailNewBinding import com.zj365.dc.databinding.ActMessageDetailNewBinding
import me.leolin.shortcutbadger.ShortcutBadger
import org.greenrobot.eventbus.EventBus
@Route(path = ARouterUrl.MESSAGE_DETAIL_NEW) @Route(path = ARouterUrl.MESSAGE_DETAIL_NEW)
class MessageDetailNewAct: BaseVmAct<BaseVm>() { class MessageDetailNewAct: BaseVmAct<BaseVm>() {
@ -18,6 +23,8 @@ class MessageDetailNewAct: BaseVmAct<BaseVm>() {
var msgBean : MessageTypeDataBean.MessageTypeBean? = null var msgBean : MessageTypeDataBean.MessageTypeBean? = null
var warningBean:MessageBean.SysMsg ? = null
override fun liveObserver() { override fun liveObserver() {
} }
@ -28,6 +35,7 @@ class MessageDetailNewAct: BaseVmAct<BaseVm>() {
super.initView() super.initView()
statusBar(binding.title.mView) statusBar(binding.title.mView)
binding.title.mTvTitle.text= "消息详情" binding.title.mTvTitle.text= "消息详情"
EventBus.getDefault().post(MessageReadEvent())
binding.title.mIvBack.setOnClickListener { binding.title.mIvBack.setOnClickListener {
finish() finish()
} }
@ -46,8 +54,24 @@ class MessageDetailNewAct: BaseVmAct<BaseVm>() {
} }
}else if(it.containsKey("WarnningBean")){
warningBean=it.getSerializable("WarnningBean") as MessageBean.SysMsg
warningBean?.let {
binding.tvMsgTitle.text = it.notifyTitle
binding.tvMsgTime.text = Dateutils.formatTime(it.notifyCreateTime,Dateutils.YYYY_MM_DD_HH_MM)
binding.tvMsgContent.text = Html.fromHtml(it.notifyContent,ImageGetterUtils.MyImageGetter(this,binding.tvMsgContent),null)
} }
}else{
}
} }
onEventObject(
baseContext,
UmengEventId.MESSAGEDETAIL
)
} }
} }

@ -11,17 +11,19 @@ import com.xty.common.LogUtils
import com.xty.common.arouter.ARouterUrl import com.xty.common.arouter.ARouterUrl
import com.xty.common.event.BindDevEvent import com.xty.common.event.BindDevEvent
import com.xty.common.util.CommonToastUtils import com.xty.common.util.CommonToastUtils
import com.xty.common.util.JumpPermissionManagement
import com.xty.common.xqr_code.XQRCodeAct import com.xty.common.xqr_code.XQRCodeAct
import com.xuexiang.xqrcode.XQRCode import com.xuexiang.xqrcode.XQRCode
import com.zj365.dc.databinding.ActBinderDeviceOneKeyBinding import com.zj365.dc.databinding.ActBinderDeviceOneKeyBinding
import com.zj365.dc.model.ScanInfoBean import com.zj365.dc.model.ScanInfoBean
import com.zj365.dc.vm.OneKeyBinderDeviceVm import com.zj365.dc.vm.OneKeyBinderDeviceVm
import com.zj365.health.R import com.zj365.health.R
import com.zj365.health.weight.DialogTip
import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.EventBus
import pub.devrel.easypermissions.EasyPermissions import pub.devrel.easypermissions.EasyPermissions
@Route(path = ARouterUrl.ONE_KEY_DEVICE_ACTIVE) @Route(path = ARouterUrl.ONE_KEY_DEVICE_ACTIVE)
class OneKeyBinderDeviceAct : BaseVmAct<OneKeyBinderDeviceVm>() { class OneKeyBinderDeviceAct : BaseVmAct<OneKeyBinderDeviceVm>() , EasyPermissions.PermissionCallbacks ,EasyPermissions.RationaleCallbacks{
val binding by lazy { ActBinderDeviceOneKeyBinding.inflate(layoutInflater) } val binding by lazy { ActBinderDeviceOneKeyBinding.inflate(layoutInflater) }
override fun liveObserver() { override fun liveObserver() {
@ -44,8 +46,10 @@ class OneKeyBinderDeviceAct : BaseVmAct<OneKeyBinderDeviceVm>() {
startScan() startScan()
} }
binding.tvBackHome.setOnClickListener { binding.tvBackHome.setOnClickListener {
// finish()
RxActivityTool.finishActivity(OneKeyBinderDeviceAct::class.java)
RxActivityTool.finishActivity(DeviceChoiceAct::class.java) RxActivityTool.finishActivity(DeviceChoiceAct::class.java)
finish()
} }
} }
@ -62,18 +66,27 @@ class OneKeyBinderDeviceAct : BaseVmAct<OneKeyBinderDeviceVm>() {
R.style.XQRCodeTheme_Custom R.style.XQRCodeTheme_Custom
) )
}else{ }else{
EasyPermissions.requestPermissions(this,"", if (EasyPermissions.somePermissionDenied(this,
Manifest.permission.CAMERA)){
DialogTip(
this,
"中健365需要相机权限,需要打开设置页面么?"
) {
JumpPermissionManagement.GoToSetting(this@OneKeyBinderDeviceAct)
}.show()
}else{
DialogTip(
this,
"中健365需要相机权限以便您使用扫一扫功能"
) {
EasyPermissions.requestPermissions(this,"中健365需要相机权限以便您使用扫一扫功能",
0x00011, 0x00011,
Manifest.permission.CAMERA) Manifest.permission.CAMERA)
}.show()
} }
} }
override fun onSuccess(requestCode: Int) {
super.onSuccess(requestCode)
XQRCodeAct.start(
this@OneKeyBinderDeviceAct,
XQRCodeAct.QRCODE_AGREEMENT,
R.style.XQRCodeTheme_Custom
)
} }
override fun setLayout() = binding.root override fun setLayout() = binding.root
@ -111,4 +124,30 @@ class OneKeyBinderDeviceAct : BaseVmAct<OneKeyBinderDeviceVm>() {
} }
} }
} }
override fun onPermissionsGranted(requestCode: Int, perms: MutableList<String>) {
LogUtils.e(TAG,"onPermissionsGranted")
XQRCodeAct.start(
this@OneKeyBinderDeviceAct,
XQRCodeAct.QRCODE_AGREEMENT,
R.style.XQRCodeTheme_Custom
)
}
override fun onPermissionsDenied(requestCode: Int, perms: MutableList<String>) {
LogUtils.e(TAG,"onPermissionsDenied")
}
override fun onRationaleAccepted(requestCode: Int) {
LogUtils.e(TAG,"onRationaleAccepted")
XQRCodeAct.start(
this@OneKeyBinderDeviceAct,
XQRCodeAct.QRCODE_AGREEMENT,
R.style.XQRCodeTheme_Custom
)
}
override fun onRationaleDenied(requestCode: Int) {
LogUtils.e(TAG,"onRationaleDenied")
}
} }

@ -98,7 +98,7 @@ class RegisterAct : BaseVmAct<RegisterVm>() {
binding.mRegister.setOnClickListener { binding.mRegister.setOnClickListener {
RxKeyboardTool.hideSoftInput(this) RxKeyboardTool.hideSoftInput(this)
if (!binding.mPrivate.isSelected) { if (!binding.seleck.isSelected) {
CommonToastUtils.showToast(R.string.please_agree_all) CommonToastUtils.showToast(R.string.please_agree_all)
return@setOnClickListener return@setOnClickListener
} }
@ -112,7 +112,7 @@ class RegisterAct : BaseVmAct<RegisterVm>() {
pwd pwd
) )
} }
binding.mPrivate.setOnClickListener { binding.seleck.setOnClickListener {
it.isSelected = !it.isSelected it.isSelected = !it.isSelected
} }
setPrv() setPrv()
@ -129,13 +129,9 @@ class RegisterAct : BaseVmAct<RegisterVm>() {
override fun onClick(widget: View) { override fun onClick(widget: View) {
bundle.clear() bundle.clear()
bundle.putString("title", "用户协议") bundle.putString("title", "用户协议")
bundle.putInt("type", Const.AGREEMENT_1) bundle.putBoolean("isAgree", false)
RouteManager.goActRequest( bundle.putString("url", "https://dc.zhongjian365.com/agreement.html")
ARouterUrl.RICH_TEXT, RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
this@RegisterAct,
USER_AGREEMENT,
bundle
)
} }
override fun updateDrawState(ds: TextPaint) { override fun updateDrawState(ds: TextPaint) {
@ -149,13 +145,9 @@ class RegisterAct : BaseVmAct<RegisterVm>() {
override fun onClick(widget: View) { override fun onClick(widget: View) {
bundle.clear() bundle.clear()
bundle.putString("title", "隐私政策") bundle.putString("title", "隐私政策")
bundle.putBoolean("isAgree", false)
bundle.putString("url", "https://dc.zhongjian365.com/privacy.html") bundle.putString("url", "https://dc.zhongjian365.com/privacy.html")
RouteManager.goActRequest( RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
ARouterUrl.AGREEMNT_READ_WEB_ACT,
this@RegisterAct,
PRIVACY,
bundle
)
} }
override fun updateDrawState(ds: TextPaint) { override fun updateDrawState(ds: TextPaint) {
@ -202,7 +194,7 @@ class RegisterAct : BaseVmAct<RegisterVm>() {
mViewModel.mLogin.observe(this){ mViewModel.mLogin.observe(this){
4 4
RouteManager.goAct(ARouterUrl.BASE_INFO_CHANGE) RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT)
EventBus.getDefault().post(LoginOrRegisterEvent()) EventBus.getDefault().post(LoginOrRegisterEvent())
this@RegisterAct.finish() this@RegisterAct.finish()

@ -40,13 +40,12 @@ class WarningMsgAct : BaseListAct<HealthVm>() {
binding.title.mIvBack.setOnClickListener { binding.title.mIvBack.setOnClickListener {
finish() finish()
} }
onEventObject(baseContext, UmengEventId.WarningMsg, "打开预警消息列表") // onEventObject(baseContext, UmengEventId.WarningMsg, "打开预警消息列表")
} }
override fun initAdapter() { override fun initAdapter() {
binding.mRecycle.layoutManager = LinearLayoutManager(this) binding.mRecycle.layoutManager = LinearLayoutManager(this)
binding.mRecycle.adapter = adapter binding.mRecycle.adapter = adapter
binding.mRecycle.addItemDecoration(RecycleItem(this, 30))
adapter.addChildClickViewIds(R.id.mContentView) adapter.addChildClickViewIds(R.id.mContentView)
adapter.setOnItemChildClickListener { adapter, view, position -> adapter.setOnItemChildClickListener { adapter, view, position ->
var bean = adapter.getItem(position) var bean = adapter.getItem(position)
@ -59,8 +58,8 @@ class WarningMsgAct : BaseListAct<HealthVm>() {
clickPosition = position clickPosition = position
} else { } else {
bundle.clear() bundle.clear()
bundle.putSerializable("bean", data) bundle.putSerializable("WarnningBean", data)
RouteManager.goAct(ARouterUrl.MESSAGE_DETAIL, bundle) RouteManager.goAct(ARouterUrl.MESSAGE_DETAIL_NEW, bundle)
} }
} }
} }
@ -73,8 +72,8 @@ class WarningMsgAct : BaseListAct<HealthVm>() {
(adapter.data[clickPosition]).notifyStatus = 1 (adapter.data[clickPosition]).notifyStatus = 1
adapter.notifyItemChanged(clickPosition) adapter.notifyItemChanged(clickPosition)
bundle.clear() bundle.clear()
bundle.putSerializable("bean", clickBean) bundle.putSerializable("WarnningBean", clickBean)
RouteManager.goAct(ARouterUrl.MESSAGE_DETAIL, bundle) RouteManager.goAct(ARouterUrl.MESSAGE_DETAIL_NEW, bundle)
} }
mViewModel.warningMsgLive.observe(this) { mViewModel.warningMsgLive.observe(this) {
it?.let { it?.let {

@ -83,6 +83,7 @@ class WelcomeAct : BaseVmAct<WelcomeVm>() {
.keyboardEnable(true) .keyboardEnable(true)
.fullScreen(true) .fullScreen(true)
.init() .init()
getTaskAct() getTaskAct()
binding.mCard.setOnClickListener { binding.mCard.setOnClickListener {
job?.let { job?.let {
@ -155,7 +156,7 @@ class WelcomeAct : BaseVmAct<WelcomeVm>() {
} }
private fun getBgImage(url: String) { private fun getBgImage(url: String) {
Glide.with(this).asBitmap().load(url).error(R.mipmap.ic_welcome_main_bg) /* Glide.with(this).asBitmap().load(url).error(R.mipmap.ic_welcome_main_bg)
.into(object : SimpleTarget<Bitmap?>() { .into(object : SimpleTarget<Bitmap?>() {
override fun onResourceReady( override fun onResourceReady(
resource: Bitmap, resource: Bitmap,
@ -165,11 +166,11 @@ class WelcomeAct : BaseVmAct<WelcomeVm>() {
binding.mBg.setImageBitmap(resource) binding.mBg.setImageBitmap(resource)
} }
} }
}) })*/
} }
private fun getLogoImage(url: String) { private fun getLogoImage(url: String) {
Glide.with(this).asBitmap().load(url).error(R.mipmap.ic_welcome_logo) /*Glide.with(this).asBitmap().load(url).error(R.mipmap.ic_welcome_logo)
.into(object : SimpleTarget<Bitmap?>() { .into(object : SimpleTarget<Bitmap?>() {
override fun onResourceReady( override fun onResourceReady(
resource: Bitmap, resource: Bitmap,
@ -196,7 +197,7 @@ class WelcomeAct : BaseVmAct<WelcomeVm>() {
} }
} }
} }
}) })*/
} }
private fun startTimer() { private fun startTimer() {

@ -0,0 +1,235 @@
package com.zj365.dc.activity.shop
import android.content.Intent
import android.view.View
import android.widget.Toast
import com.alibaba.android.arouter.facade.annotation.Route
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.tamsiree.rxkit.RxActivityTool
import com.tencent.mm.opensdk.modelbase.BaseResp
import com.xty.base.act.BaseTenCentWebViewActivity
import com.xty.base.act.BaseVmAct
import com.xty.network.model.ChooseAddressBean
import com.xty.base.model.ChooseCouponBean
import com.xty.base.model.CreateOrderBean
import com.xty.base.utils.PayUtils
import com.xty.common.UmengEventId
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
import com.xty.common.event.ReChangeEvent
import com.xty.common.event.WxPayEvent
import com.xty.common.onEventObject
import com.xty.common.setImage
import com.xty.common.util.NumUtils
import com.zj365.dc.BuildConfig
import com.zj365.dc.databinding.ActCreateGoodsOrderBinding
import com.zj365.dc.vm.ShopMallVm
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
@Route(path = ARouterUrl.CREATE_SHOP_ORDER_ACT)
class CreateGoodsOrderAct : BaseVmAct<ShopMallVm>() {
val binding by lazy { ActCreateGoodsOrderBinding.inflate(layoutInflater) }
var bean:CreateOrderBean?= null
var couponsId:Long? = null
var addrId:Long? = null
var bottomSheetDialog: BottomSheetDialog? = null
var hasCoup: Int = 2
var couponBean:ChooseCouponBean? = null
companion object{
const val REQUEST_ADDRESS = 0x000011
const val REQUEST_COUP = 0x000012
}
override fun liveObserver() {
mViewModel.createOrderLiveData.observe(this){
PayUtils(this).payForGoods(it.data.pay_price.toFloat(),it.data.order_no)
}
mViewModel.hasCouponLiveData.observe(this){
hasCoup = it.data
if (it.data == 2){ //1有 2无
binding.tvDiscounts.text = "暂无优惠券"
}else{
binding.tvDiscounts.text = "可用优惠券"
}
}
mViewModel.defaultAddressLiveData.observe(this){
if(it.data != null){
addrId = it.data.id
binding.tvChooseAddress.text = "${it.data.province}${it.data.city}${it.data.district}${it.data.address}"
}
}
mViewModel.computeAmountLiveData.observe(this){
binding.tvTotalPrice.text ="¥ ${NumUtils.format3(it.data.pay_price)}"
binding.tvPlatformDiscounts.text ="¥ ${it.data.discount_price}"
couponBean?.let {
couponsId = it.id
binding.tvDiscounts.text = "可优惠¥ ${it.as_amount}"
// binding.tvPlatformDiscounts.text = "${(bean!!.ori_price * bean!!.skuNum) - (it.skuPrice * it.skuNum) - couponBean.as_amount}"
}
}
}
override fun initView() {
super.initView()
statusBar(binding.title.mView)
binding.title.mTvTitle.text = "创建订单"
binding.title.mIvBack.setOnClickListener {
finish()
}
onEventObject(baseContext, UmengEventId.CREATE_ORDER)
bean = intent.getParcelableExtra("bean")
onClickedListener()
bean?.let {
refreshUI(it)
mViewModel.computeAmount(it.skuId,it.skuNum,couponsId)
}
mViewModel.hasCoupon()
}
fun refreshUI(bean: CreateOrderBean){
binding.imgGoods.setImage(this,bean.pic)
binding.tvGoodsName.text = bean.prod_name
binding.tvSpec.text = bean.skuName
binding.tvNum.text = "数量:${bean.skuNum}"
binding.tvPrice.text = "商品原价:¥ ${bean.ori_price}"
// binding.tvPlatformDiscounts.text = "¥ ${(bean.ori_price * bean.skuNum) - (bean.skuPrice * bean.skuNum)}"
if (bean.delivery_mode == 0){ //0,无需发货1需要发货
binding.rxAddress.visibility = View.GONE
}else{
binding.rxAddress.visibility = View.VISIBLE
mViewModel.getDefaultAddress()
}
}
fun onClickedListener(){
binding.tvPay.setOnClickListener {
bean?.let {
mViewModel.createOrder(it.skuId.toString(),it.skuNum,addrId,couponsId)
}
}
binding.tvChooseAddress.setOnClickListener {
bundle.clear()
bundle.putString(
"web_site_url",
"${BuildConfig.h5url}pages/index/index?pageId=address&type=order"
)
RouteManager.goActRequest(ARouterUrl.H5_ACT, this@CreateGoodsOrderAct,REQUEST_ADDRESS,bundle)
}
binding.tvDiscounts.setOnClickListener {
if(hasCoup == 1){
onEventObject(baseContext, UmengEventId.COUPON)
bundle.clear()
bundle.putString(
"web_site_url",
"${BuildConfig.h5url}pages/index/index?pageId=coupon&type=order"
)
RouteManager.goActRequest(ARouterUrl.H5_ACT, this@CreateGoodsOrderAct,REQUEST_COUP,bundle)
}
}
}
override fun setLayout()=binding.root
@Subscribe(threadMode = ThreadMode.MAIN)
fun paySuccess(event: ReChangeEvent){
RouteManager.goAct(ARouterUrl.SHOP_ORDER_LIST_ACT)
Toast.makeText(
this@CreateGoodsOrderAct,
"支付成功",
Toast.LENGTH_SHORT
)
.show()
finish()
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if(resultCode == RESULT_OK){
when(requestCode){
REQUEST_ADDRESS ->{
var addressBean = data?.extras!!.getParcelable<ChooseAddressBean>("address")
if (addressBean != null) {
addrId = addressBean.id
binding.tvChooseAddress.text = "${addressBean.province}${addressBean.city}${addressBean.district}${addressBean.address}"
}
}
REQUEST_COUP ->{
couponBean = data?.extras!!.getParcelable<ChooseCouponBean>("coupon")
if (couponBean != null) {
bean?.let {
// binding.tvTotalPrice.text ="¥ ${it.skuPrice * it.skuNum - couponBean.as_amount}"
mViewModel.computeAmount(it.skuId,it.skuNum,couponBean!!.id)
}
}
}
}
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun getWxPayResult(event: WxPayEvent) {
when (event.code) {
BaseResp.ErrCode.ERR_OK -> {
RouteManager.goAct(ARouterUrl.SHOP_ORDER_LIST_ACT)
Toast.makeText(
this@CreateGoodsOrderAct,
"支付成功",
Toast.LENGTH_SHORT
)
.show()
finish()
}
BaseResp.ErrCode.ERR_USER_CANCEL -> {
}
else -> {
Toast.makeText(
this@CreateGoodsOrderAct,
"支付失败,请联系客服",
Toast.LENGTH_SHORT
).show()
}
}
}
}

@ -0,0 +1,227 @@
package com.zj365.dc.activity.shop
import android.text.TextUtils
import android.view.KeyEvent
import android.view.LayoutInflater
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.TextView
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.tamsiree.rxkit.RxKeyboardTool
import com.xty.base.act.BaseListAct
import com.xty.base.act.BaseVmAct
import com.xty.common.Const
import com.xty.common.R
import com.xty.common.UmengEventId
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
import com.xty.common.onEventObject
import com.xty.common.util.CommonToastUtils
import com.xty.network.model.GoodsRecordsBean
import com.xty.network.model.ShopCategoryBean
import com.zj365.dc.BuildConfig
import com.zj365.dc.adapter.shop.ShopCategoryAdapter
import com.zj365.dc.adapter.shop.ShopChildCategoryAdapter
import com.zj365.dc.adapter.shop.ShopGoodsTwoAdapter
import com.zj365.dc.databinding.ActShopCategoryBinding
import com.zj365.dc.vm.ShopMallVm
import okhttp3.internal.notify
import java.util.ArrayList
@Route(path = ARouterUrl.SHOP_CATEGORY)
class ShopCategoryActivity : BaseVmAct<ShopMallVm>() {
val binding by lazy { ActShopCategoryBinding.inflate(layoutInflater) }
val mCategoryAdapter by lazy { ShopCategoryAdapter() }
val mGoodsAdapter by lazy { ShopGoodsTwoAdapter() }
val mChildCategoryAdapter by lazy { ShopChildCategoryAdapter() }
var goodsName:String? = null
var categoryId:Long = 0L
var mCategoryList = ArrayList<ShopCategoryBean>()
var parentId:Long = 0L
var index = 0
var page:Int = 1
fun initAdapter() {
binding.recyclerView.adapter = mGoodsAdapter
binding.recyclerView.layoutManager = LinearLayoutManager(this@ShopCategoryActivity)
binding.childRecyclerView.adapter = mChildCategoryAdapter
binding.childRecyclerView.layoutManager = LinearLayoutManager(this@ShopCategoryActivity)
mChildCategoryAdapter.setOnItemClickListener { adapter, view, position ->
var bean = adapter.data[position] as ShopCategoryBean
(adapter.data as ArrayList<ShopCategoryBean>).forEach {
it.isChecked = false
}
bean.isChecked = true
categoryId = bean.id
onEventObject(baseContext, UmengEventId.GOODS_CATEGORY,"id:${bean.id}")
mViewModel.getGoodsList(goodsName,categoryId,0,page)
mChildCategoryAdapter.notifyDataSetChanged()
}
binding.mRefresh.setOnRefreshListener {
page = 1
loadData()
binding.mRefresh.finishRefresh(1000)
}
binding.mRefresh.setEnableLoadMore(true)
binding.mRefresh.setOnLoadMoreListener {
page++
loadData()
binding.mRefresh.finishLoadMore(1000)
}
mGoodsAdapter.setOnItemClickListener { adapter, view, position ->
var bean = adapter.data[position] as GoodsRecordsBean.GoodsBean
onEventObject(baseContext, UmengEventId.GOODS_DETAIL,"id:${bean.id}")
bundle.clear()
bundle.putString(
"web_site_url",
"${BuildConfig.h5url}pages/index/index?pageId=commodityDetail&id=${bean.id}"
)
bundle.putBoolean("isShowTitle",false)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}
}
fun loadData(){
mViewModel.getGoodsList(goodsName,categoryId,0,page)
}
override fun initView() {
super.initView()
statusBar(binding.title.mView)
binding.title.mTvTitle.text ="商品分类"
binding.title.mIvBack.setOnClickListener {
finish()
}
categoryId = intent.getLongExtra("id",0)
parentId = categoryId
mCategoryList = intent.getParcelableArrayListExtra<ShopCategoryBean>("categoryList")!!
initAdapter()
mCategoryList.forEachIndexed { index, shopCategoryBean ->
if (shopCategoryBean.id == categoryId){
this.index = index
shopCategoryBean.isChecked = true
}
}
binding.categoryRecyclerView.adapter = mCategoryAdapter
if(mCategoryList.size != 8){
binding.categoryRecyclerView.layoutManager = LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false)
}else if(mCategoryList.size == 8){
binding.categoryRecyclerView.layoutManager = GridLayoutManager(this,4)
}
mCategoryAdapter.setNewInstance(mCategoryList)
binding.categoryRecyclerView.scrollToPosition(index)
mCategoryAdapter.setOnItemClickListener { adapter, view, position ->
var bean = adapter.data[position] as ShopCategoryBean
(adapter.data as ArrayList<ShopCategoryBean>).forEach {
it.isChecked = false
}
bean.isChecked = true
parentId = bean.id
onEventObject(baseContext, UmengEventId.GOODS_CATEGORY,"id:${bean.id}")
mViewModel.getGoodsCategory(bean.id)
mCategoryAdapter.notifyDataSetChanged()
}
mViewModel.getGoodsCategory(categoryId)
binding.etSearch.setOnEditorActionListener(object : TextView.OnEditorActionListener {
override fun onEditorAction(p0: TextView?, p1: Int, p2: KeyEvent?): Boolean {
if(p1 == EditorInfo.IME_ACTION_SEARCH){
goodsName = binding.etSearch.text.toString().trim()
/* if(TextUtils.isEmpty(goodsName)){
CommonToastUtils.showToast("请输入搜索内容")
return true
}*/
page = 1
mViewModel.getGoodsList(goodsName,categoryId,0,page)
//mViewModel.getGoodsList(goodsName,0L,0,page)
RxKeyboardTool.hideSoftInput(this@ShopCategoryActivity)
return true
}
return false
}
})
}
override fun liveObserver() {
mViewModel.categoryLiveDate.observe(this){
it.data.add(0,ShopCategoryBean(parentId,parentId,"全部",0,null,true))
it.data.forEachIndexed { index, shopCategoryBean ->
if (shopCategoryBean.isChecked){
categoryId = shopCategoryBean.id
mViewModel.getGoodsList(goodsName,shopCategoryBean.id,0,page)
}
}
mChildCategoryAdapter.setNewInstance(it.data)
}
mViewModel.goodsLiveData.observe(this){
if (page == 1) {
if (it.data.records.isNullOrEmpty()) {
mGoodsAdapter.setNewInstance(null)
mGoodsAdapter.setEmptyView(getNoneView())
binding.mRefresh?.setEnableLoadMore(false)
} else {
if (it.data.records.size < Const.PAGE_SIZE) {
binding.mRefresh?.setEnableLoadMore(false)
} else {
binding.mRefresh?.setEnableLoadMore(true)
++page
}
mGoodsAdapter.setNewInstance(it.data.records)
}
} else {
if (it.data.records.isNullOrEmpty()) {
binding.mRefresh?.setEnableLoadMore(false)
}else{
if (it.data.records.size < Const.PAGE_SIZE) {
binding.mRefresh?.setEnableLoadMore(false)
}else{
++page
}
mGoodsAdapter.addData(it.data.records)
}
}
}
}
fun getNoneView() =
LayoutInflater.from(this).inflate(R.layout.view_none_data, binding.recyclerView, false)
override fun setLayout() = binding.root
}

@ -33,7 +33,7 @@ class HealthMonitoringAdapter(
R.string.info_1_unit, R.string.info_3_unit, R.string.info_7_unit, R.string.info_1_unit, R.string.info_3_unit, R.string.info_7_unit,
R.string.info_4_unit, R.string.info_9_unit, R.string.info_6_unit, R.string.info_4_unit, R.string.info_9_unit, R.string.info_6_unit,
R.string.info_2_unit, R.string.info_8_unit, R.string.info_5_unit, R.string.info_2_unit, R.string.info_8_unit, R.string.info_5_unit,
R.string.info_10_unit, R.string.info_6_unit R.string.info_10_unit, R.string.info_2_unit
) )
override fun getCount(): Int { override fun getCount(): Int {

@ -19,11 +19,11 @@ class HomeTopLayoutAdapter(var mContext: Context): BaseAdapter<HomeLayoutBean.Ho
var screenWidth = context.resources.displayMetrics.widthPixels var screenWidth = context.resources.displayMetrics.widthPixels
val layoutParam = holder.getView<LinearLayout>(R.id.root).layoutParams val layoutParam = holder.getView<LinearLayout>(R.id.root).layoutParams
if (data.size < 4){ if (data.size <= 4){
layoutParam.width = screenWidth /4 layoutParam.width = screenWidth /4
}else{ }else{
layoutParam.width = screenWidth /data.size layoutParam.width = screenWidth /5
} }

@ -31,7 +31,7 @@ class WarningMessageAdapter():BaseAdapter<MessageBean.SysMsg>(R.layout.item_warn
} }
draw.mutate() draw.mutate()
draw.setBounds(0,0,draw.minimumWidth,draw.minimumHeight) draw.setBounds(0,0,draw.minimumWidth,draw.minimumHeight)
tv.setCompoundDrawables(draw,null,null,null) tv.setCompoundDrawables(null,null,draw,null)
} }
} }

@ -0,0 +1,46 @@
package com.zj365.dc.adapter.shop
import android.widget.LinearLayout
import android.widget.TextView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ruffian.library.widget.RImageView
import com.xty.base.adapter.BaseAdapter
import com.xty.common.setImage
import com.xty.network.model.ShopCategoryBean
import com.zj365.dc.R
import de.hdodenhof.circleimageview.CircleImageView
class ShopCategoryAdapter : BaseAdapter<ShopCategoryBean>(R.layout.item_shop_categroy) {
override fun convert(holder: BaseViewHolder, item: ShopCategoryBean) {
// if (data.size == 8){
var screenWidth = context.resources.displayMetrics.widthPixels
val layoutParam = holder.getView<LinearLayout>(R.id.root).layoutParams
layoutParam.width = screenWidth /4
holder.getView<LinearLayout>(R.id.root).layoutParams = layoutParam
// }
var img = holder.getView<RImageView>(R.id.img_category)
var categoryName = holder.getView<TextView>(R.id.tv_category)
if (item.isChecked){
img.borderColor = context.getColor(R.color.col_02c)
categoryName.setTextColor(context.getColor(R.color.col_02c))
}else{
img.borderColor = context.getColor(R.color.white)
categoryName.setTextColor(context.getColor(R.color.col_313))
}
img.setImage(context,item.pic)
/*if (item.pic == null){
}else{
item.pic?.let {
img.setImage(context,it)
}
}*/
holder.setText(R.id.tv_category,item.categoryName)
}
}

@ -0,0 +1,21 @@
package com.zj365.dc.adapter.shop
import android.graphics.Color
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xty.base.adapter.BaseAdapter
import com.xty.network.model.ShopCategoryBean
import com.zj365.dc.R
class ShopChildCategoryAdapter : BaseAdapter<ShopCategoryBean>(R.layout.item_category_child) {
override fun convert(holder: BaseViewHolder, item: ShopCategoryBean) {
holder.setText(R.id.tv_child_category,item.categoryName)
if (item.isChecked){
holder.setTextColor(R.id.tv_child_category,context.getColor(R.color.col_02c))
holder.setBackgroundColor(R.id.tv_child_category, Color.parseColor("#2102C191"))
}else{
holder.setTextColor(R.id.tv_child_category,context.getColor(R.color.col_313))
holder.setBackgroundColor(R.id.tv_child_category,context.getColor(R.color.white))
}
}
}

@ -0,0 +1,21 @@
package com.zj365.dc.adapter.shop
import android.widget.TextView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ruffian.library.widget.RImageView
import com.xty.base.adapter.BaseAdapter
import com.xty.common.setImage
import com.xty.common.util.SpannableUtils
import com.xty.network.model.GoodsRecordsBean
import com.zj365.dc.R
import org.w3c.dom.Text
class ShopGoodsAdapter : BaseAdapter<GoodsRecordsBean.GoodsBean>(R.layout.item_shop_list) {
override fun convert(holder: BaseViewHolder, item: GoodsRecordsBean.GoodsBean) {
holder.getView<RImageView>(R.id.img_goods).setImage(context,item.pic)
holder.setText(R.id.tv_goods_name,item.prodName)
holder.setText(R.id.tv_price,"¥ ${item.price}")
SpannableUtils.setMoney(holder.getView<TextView>(R.id.tv_line_price),item.oriPrice)
}
}

@ -0,0 +1,21 @@
package com.zj365.dc.adapter.shop
import android.widget.TextView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ruffian.library.widget.RImageView
import com.xty.base.adapter.BaseAdapter
import com.xty.common.setImage
import com.xty.common.util.SpannableUtils
import com.xty.network.model.GoodsRecordsBean
import com.zj365.dc.R
class ShopGoodsTwoAdapter : BaseAdapter<GoodsRecordsBean.GoodsBean>(R.layout.item_goods_list_two_style) {
override fun convert(holder: BaseViewHolder, item: GoodsRecordsBean.GoodsBean) {
holder.getView<RImageView>(R.id.img_goods).setImage(context,item.pic)
holder.setText(R.id.tv_goods_name,item.prodName)
holder.setText(R.id.tv_price,"¥ ${item.price}")
SpannableUtils.setMoney(holder.getView<TextView>(R.id.tv_line_price),item.oriPrice)
}
}

@ -4,21 +4,19 @@ import android.Manifest
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Intent import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.graphics.drawable.Drawable
import android.os.Build import android.os.Build
import android.provider.Settings import android.provider.Settings
import android.text.Spannable import android.text.Spannable
import android.text.SpannableString import android.text.SpannableString
import android.text.TextUtils import android.text.TextUtils
import android.text.method.KeyListener
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import cn.jpush.android.api.JPushInterface import cn.jpush.android.api.JPushInterface
import com.gyf.immersionbar.ImmersionBar import com.hjq.toast.ToastUtils
import com.tamsiree.rxkit.RxTimeTool import com.tamsiree.rxkit.RxTimeTool
import com.xty.base.fragment.BaseVmFrag import com.xty.base.fragment.BaseVmFrag
import com.xty.base.utils.UserInfoDefin import com.xty.base.utils.UserInfoDefin
@ -37,6 +35,7 @@ import com.xty.common.bracelet.checkBlueConnectPermission
import com.xty.common.bracelet.getBluePermission import com.xty.common.bracelet.getBluePermission
import com.xty.common.bracelet.isGpsOpen import com.xty.common.bracelet.isGpsOpen
import com.xty.common.event.AddSuccessEvent import com.xty.common.event.AddSuccessEvent
import com.xty.common.event.BackGroundEvent
import com.xty.common.event.BindDevEvent import com.xty.common.event.BindDevEvent
import com.xty.common.event.BlueToothConnectEvent import com.xty.common.event.BlueToothConnectEvent
import com.xty.common.event.ChangeFamilyEvent import com.xty.common.event.ChangeFamilyEvent
@ -45,31 +44,35 @@ import com.xty.common.event.Health24HourStatusEvent
import com.xty.common.event.LoginOrRegisterEvent import com.xty.common.event.LoginOrRegisterEvent
import com.xty.common.event.LoginOutEvent import com.xty.common.event.LoginOutEvent
import com.xty.common.event.MyInfoEvent import com.xty.common.event.MyInfoEvent
import com.xty.common.event.UnBinderEvent
import com.xty.common.event.WorkManagerEvent import com.xty.common.event.WorkManagerEvent
import com.xty.common.marqueen.SimpleMF import com.xty.common.marqueen.SimpleMF
import com.xty.common.onEventObject import com.xty.common.onEventObject
import com.xty.common.setImageUser import com.xty.common.setImageUser
import com.xty.common.util.CommonToastUtils import com.xty.common.util.CommonToastUtils
import com.xty.common.util.CommonUtils import com.xty.common.util.CommonUtils
import com.xty.common.util.JumpPermissionManagement
import com.xty.common.weight.CenterImageSpan import com.xty.common.weight.CenterImageSpan
import com.xty.common.work.MyWorkManger import com.xty.common.work.MyWorkManger
import com.xty.common.xqr_code.XQRCodeAct
import com.zj365.mime.weight.NoticeSettingDialog
import com.xty.network.MyRetrofit import com.xty.network.MyRetrofit
import com.xty.network.model.DeviceFunctionBean import com.xty.network.model.DeviceFunctionBean
import com.xty.network.model.FamilyBean
import com.xty.network.model.HealthMonitoringListBean import com.xty.network.model.HealthMonitoringListBean
import com.xty.network.model.MainBean
import com.xty.network.model.MessageBean import com.xty.network.model.MessageBean
import com.xty.network.model.ReportBean import com.xty.network.model.ReportBean
import com.zj365.dc.BuildConfig import com.zj365.dc.BuildConfig
import com.zj365.dc.R import com.zj365.dc.R
import com.zj365.dc.adapter.HealthMonitoringAdapter import com.zj365.dc.adapter.HealthMonitoringAdapter
import com.zj365.dc.databinding.FragDynamicManagementBinding import com.zj365.dc.databinding.FragDynamicManagementBinding
import com.zj365.dc.vm.DynamicManagementVm import com.zj365.dc.vm.DynamicManagementVm
import com.zj365.health.vm.ReportVm import com.zj365.health.vm.ReportVm
import com.zj365.health.weight.DialogTip import com.zj365.health.weight.DialogTip
import com.zj365.health.weight.DialogTipNew
import com.zj365.mime.weight.FactorySettingDialog
import com.zj365.mime.weight.NoticeSettingDialog
import io.reactivex.Observable
import io.reactivex.Observer
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.Disposable
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
@ -80,8 +83,7 @@ import org.json.JSONArray
import org.json.JSONObject import org.json.JSONObject
import pub.devrel.easypermissions.EasyPermissions import pub.devrel.easypermissions.EasyPermissions
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.regex.Matcher import java.util.concurrent.TimeUnit
import java.util.regex.Pattern
import kotlin.math.max import kotlin.math.max
import kotlin.math.min import kotlin.math.min
@ -138,6 +140,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
private val tenLive by lazy { MutableLiveData<String>() } private val tenLive by lazy { MutableLiveData<String>() }
private var isShrinkage = false//记录是否收缩 private var isShrinkage = false//记录是否收缩
private var functionList= ArrayList<DeviceFunctionBean>() private var functionList= ArrayList<DeviceFunctionBean>()
private var isJob = false
/** /**
* -1步数 0:心率 1血氧 2呼吸率 3体温 4睡眠 5血压 6血糖 7:心电|血脂 * -1步数 0:心率 1血氧 2呼吸率 3体温 4睡眠 5血压 6血糖 7:心电|血脂
@ -150,6 +153,8 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
"心率", "血氧", "呼吸率", "体温", "步数", "睡眠", "血压", "血糖", "心电", "尿酸", "血脂" "心率", "血氧", "呼吸率", "体温", "步数", "睡眠", "血压", "血糖", "心电", "尿酸", "血脂"
) )
private var getHealthInfoJob: Job? = null
@SuppressLint("ResourceType") @SuppressLint("ResourceType")
override fun initView() { override fun initView() {
super.initView() super.initView()
@ -172,8 +177,10 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
//点击事件 //点击事件
setOnClickListener() setOnClickListener()
if(!TextUtils.isEmpty(showIdInfo)){
request() request()
}
//刷新注册 //刷新注册
refresh() refresh()
@ -181,7 +188,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
binding.mGriddingList.mGridView.setOnItemClickListener { _, _, position, _ -> binding.mGriddingList.mGridView.setOnItemClickListener { _, _, position, _ ->
val index = mHealthAdapter.getItem(position).type val index = mHealthAdapter.getItem(position).type
val functionType = mHealthAdapter.getItem(position).functionType val functionType = mHealthAdapter.getItem(position).functionType
onEventObject(requireContext(), UmengEventId.HealthMonitor, mHealthAdapter.getItem(position).buttonName) // onEventObject(requireContext(), UmengEventId.HealthMonitor, mHealthAdapter.getItem(position).buttonName)
when (functionType) { when (functionType) {
// 0.心率、1.血氧、2.呼吸率、3.体温、4.步数、5.睡眠、6.血压、7.血糖、8.心电、9.尿酸、10.血脂。 // 0.心率、1.血氧、2.呼吸率、3.体温、4.步数、5.睡眠、6.血压、7.血糖、8.心电、9.尿酸、10.血脂。
//U320.心率、1.血氧、2.呼吸率、3.体温、 、4.睡眠、5.血压、6.血糖、7.尿酸、8.心电,9血脂 //U320.心率、1.血氧、2.呼吸率、3.体温、 、4.睡眠、5.血压、6.血糖、7.尿酸、8.心电,9血脂
@ -227,7 +234,8 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
"bloodFat" -> { // //心电隐藏的前提下血脂为9 否则为10 "bloodFat" -> { // //心电隐藏的前提下血脂为9 否则为10
CommonToastUtils.showToast("尊敬的用户您好,血脂功能暂未开放,敬请期待哦~") goPage(index - 1,functionType)
// CommonToastUtils.showToast("尊敬的用户您好,血脂功能暂未开放,敬请期待哦~")
} }
"ecg" ->{ //心电 暂时隐藏 "ecg" ->{ //心电 暂时隐藏
CommonToastUtils.showToast("尊敬的用户您好,心电功能暂未开放,敬请期待哦~") CommonToastUtils.showToast("尊敬的用户您好,心电功能暂未开放,敬请期待哦~")
@ -238,13 +246,13 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
// mViewModel.getWarningMsg() //mViewModel.getAllInfo()
} }
//点击事件 //点击事件
private fun setOnClickListener() { private fun setOnClickListener() {
binding.mMsgLayout.setOnClickListener(onClickListener) /* binding.mMsgLayout.setOnClickListener(onClickListener)
binding.mMsg.setOnClickListener(onClickListener) binding.mMsg.setOnClickListener(onClickListener)*/
binding.mHeader.mCard.setOnClickListener(onClickListener) binding.mHeader.mCard.setOnClickListener(onClickListener)
binding.mHeader.mBtnBind.setOnClickListener(onClickListener) binding.mHeader.mBtnBind.setOnClickListener(onClickListener)
binding.mGriddingList.mSub.setOnClickListener(onClickListener) binding.mGriddingList.mSub.setOnClickListener(onClickListener)
@ -258,25 +266,27 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
binding.mHealthReport.llHebdomadReport.setOnClickListener(onClickListener) binding.mHealthReport.llHebdomadReport.setOnClickListener(onClickListener)
binding.mHealthReport.llThirtyDaysReport.setOnClickListener(onClickListener) binding.mHealthReport.llThirtyDaysReport.setOnClickListener(onClickListener)
binding.mHeader.mHealthRecords.setOnClickListener(onClickListener) binding.mHeader.mHealthRecords.setOnClickListener(onClickListener)
binding.mHeader.tvWarningNum.setOnClickListener(onClickListener)
} }
//点击事件响应 //点击事件响应
private var onClickListener = View.OnClickListener { private var onClickListener = View.OnClickListener {
when (it.id) { when (it.id) {
//消息 //消息
R.id.mMsg, R.id.mMsgLayout -> { R.id.tv_warning_num/*, R.id.mMsgLayout*/ -> {
RouteManager.goAct(ARouterUrl.WARNING_MSG) RouteManager.goAct(ARouterUrl.WARNING_MSG)
} }
//健康档案 //健康档案
R.id.mHealthRecords -> { R.id.mHealthRecords -> {
// RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT) RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT)
CommonToastUtils.showToast("敬请期待") /*CommonToastUtils.showToast("敬请期待")
return@OnClickListener return@OnClickListener
*/
} }
//评估 //评估
R.id.mCard -> { R.id.mCard -> {
onEventObject(requireContext(), UmengEventId.Health24HourReport)
bundle.clear() bundle.clear()
bundle.putSerializable("index", ReportVm.ReportInfoType.Hour) bundle.putSerializable("index", ReportVm.ReportInfoType.Hour)
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
@ -291,6 +301,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
//健康监测 //健康监测
R.id.mSub -> { R.id.mSub -> {
onEventObject(requireContext(), UmengEventId.TODAYDATADETAIL)
goPage(0,"") goPage(0,"")
} }
//健康对比 //健康对比
@ -329,7 +340,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
//日报 //日报
R.id.mDailyReports -> { R.id.mDailyReports -> {
onEventObject(requireContext(), UmengEventId.HealthReport, "动态管理") onEventObject(requireContext(), UmengEventId.DAILYPAPER)
bundle.clear() bundle.clear()
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
bundle.putSerializable("index", ReportVm.ReportInfoType.Day) bundle.putSerializable("index", ReportVm.ReportInfoType.Day)
@ -342,7 +353,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
//周报 //周报
R.id.mWeeklyReports -> { R.id.mWeeklyReports -> {
onEventObject(requireContext(), UmengEventId.HealthReport, "动态管理") onEventObject(requireContext(), UmengEventId.WEEKLYPAPER)
bundle.clear() bundle.clear()
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
bundle.putSerializable("index", ReportVm.ReportInfoType.Week) bundle.putSerializable("index", ReportVm.ReportInfoType.Week)
@ -354,7 +365,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
//月报 //月报
R.id.mMonthlyReports -> { R.id.mMonthlyReports -> {
onEventObject(requireContext(), UmengEventId.HealthReport, "动态管理") onEventObject(requireContext(), UmengEventId.MONTHLY)
bundle.clear() bundle.clear()
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
bundle.putSerializable("index", ReportVm.ReportInfoType.Month) bundle.putSerializable("index", ReportVm.ReportInfoType.Month)
@ -366,7 +377,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
//年报 //年报
R.id.mAnnualReports -> { R.id.mAnnualReports -> {
onEventObject(requireContext(), UmengEventId.HealthReport, "动态管理") onEventObject(requireContext(), UmengEventId.ANNUALREPORT)
bundle.clear() bundle.clear()
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
bundle.putSerializable("index", ReportVm.ReportInfoType.Year) bundle.putSerializable("index", ReportVm.ReportInfoType.Year)
@ -378,6 +389,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
//24小时健康评估 //24小时健康评估
R.id.llSkyHourReport -> { R.id.llSkyHourReport -> {
onEventObject(requireContext(), UmengEventId.HOURSFOR24)
bundle.clear() bundle.clear()
bundle.putSerializable("index", ReportVm.ReportInfoType.Hour) bundle.putSerializable("index", ReportVm.ReportInfoType.Hour)
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
@ -389,6 +401,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
//近7天健康评估 //近7天健康评估
R.id.llHebdomadReport -> { R.id.llHebdomadReport -> {
onEventObject(requireContext(), UmengEventId.HEALTHFOR7DAY)
bundle.clear() bundle.clear()
bundle.putSerializable("index", ReportVm.ReportInfoType.Week) bundle.putSerializable("index", ReportVm.ReportInfoType.Week)
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
@ -401,6 +414,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
//近30天健康评估 //近30天健康评估
R.id.llThirtyDaysReport -> { R.id.llThirtyDaysReport -> {
onEventObject(requireContext(), UmengEventId.HEALTHFOR30DAY)
bundle.clear() bundle.clear()
bundle.putSerializable("index", ReportVm.ReportInfoType.Week) bundle.putSerializable("index", ReportVm.ReportInfoType.Week)
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
@ -464,23 +478,32 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
// 刷新注册 // 刷新注册
private fun refresh() { private fun refresh() {
refresh.setRefresh(binding.mRefresh) { refresh.setRefresh(binding.mRefresh) {
getXtInfo(showIdInfo) if(!TextUtils.isEmpty(showIdInfo)){
get24HourReportInfo(showIdInfo) isJob = false
request() request()
uploadWhatchData() }else{
ToastUtils.show(R.string.again_login)
}
// getXtInfo(showIdInfo)
// get24HourReportInfo(showIdInfo)
// request()
// uploadWhatchData()
} }
} }
private fun request() { private fun request() {
LogUtils.e("DynamicManagementFrag","请求数据拉")
mViewModel.getAllInfo(showIdInfo, false) mViewModel.getAllInfo(showIdInfo, false)
// mViewModel.getMySetting() // mViewModel.getMySetting()
mViewModel.getTips() mViewModel.getTips()
mViewModel.getRank(2) // mViewModel.getRank(2)
if(MMkvHelper.contains(Const.LATITUDE) && MMkvHelper.contains(Const.LONGITUDE)){ if(MMkvHelper.contains(Const.LATITUDE) && MMkvHelper.contains(Const.LONGITUDE)){
mViewModel.getWeather() mViewModel.getWeather()
}else{
if (showIdInfo == ""){
}else{ }else{
if(EasyPermissions.hasPermissions(requireContext(), Manifest.permission.ACCESS_COARSE_LOCATION, if(EasyPermissions.hasPermissions(requireContext(), Manifest.permission.ACCESS_COARSE_LOCATION,
@ -496,14 +519,29 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
}else{ }else{
if (EasyPermissions.somePermissionDenied(requireActivity(), Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION)){
/*DialogTip(
requireContext(),
"中健365需要定位权限,需要打开设置页面么?"
) {
JumpPermissionManagement.GoToSetting(requireActivity())
}.show()*/
}else{
FactorySettingDialog(
requireContext(),
"中健365需要定位权限以便您获取天气信息"
) {
EasyPermissions.requestPermissions(this,"获取天气信息需要申请定位权限", EasyPermissions.requestPermissions(this,"获取天气信息需要申请定位权限",
0x00022, 0x00022,
Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION); Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION);
}.show()
} }
} }
} }
@ -704,7 +742,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
override fun observer() { override fun observer() {
//预警消息 //预警消息
mViewModel.warningMsgLive.observe(this) { /* mViewModel.warningMsgLive.observe(this) {
updateBadgeNum(it.data.noReadNum) updateBadgeNum(it.data.noReadNum)
val systemMessage = it.data.systemMessage val systemMessage = it.data.systemMessage
if (systemMessage !=null && systemMessage.isNotEmpty()) { if (systemMessage !=null && systemMessage.isNotEmpty()) {
@ -713,7 +751,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} else { } else {
updateWarningInfo(null) updateWarningInfo(null)
} }
} }*/
mViewModel.weatherLiveDate.observe(this){ mViewModel.weatherLiveDate.observe(this){
if(it.data == null){ if(it.data == null){
@ -725,7 +763,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
mViewModel.functionLiveData.observe(this){ mViewModel.functionLiveData.observe(this){
LogUtils.e("DynamicManagementFrag","functionList:${it.data.size}") LogUtils.e(TAG,"functionList:${it.data.size}")
functionList.clear() functionList.clear()
functionList.addAll(it.data) functionList.addAll(it.data)
if (showIdInfo ==MMkvHelper.getLong(Const.USER_ID).toString()) { if (showIdInfo ==MMkvHelper.getLong(Const.USER_ID).toString()) {
@ -737,7 +775,8 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
//获取首页所有信息返回 //获取首页所有信息返回
mViewModel.allData.observe(this) { mViewModel.allData.observe(this) {
it.data.let { bean -> LogUtils.e(TAG,"请求到数据拉")
it.data?.let { bean ->
if (bean.user.name.isNullOrEmpty()||bean.user.age.isNullOrEmpty()) { if (bean.user.name.isNullOrEmpty()||bean.user.age.isNullOrEmpty()) {
dialogInfoUn.show() dialogInfoUn.show()
} }
@ -768,13 +807,20 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
setUserImage(bean.user.id.toString(), bean.user.image, bean.user.sex.toString()) setUserImage(bean.user.id.toString(), bean.user.image, bean.user.sex.toString())
binding.mHeader.tvUserName.text = bean.user.name binding.mHeader.tvUserName.text = bean.user.name
if(bean.bmiInfo == null){
binding.mHeader.mBMI.text = "BMI --"
binding.mHeader.mBMIStatus.text = "--"
}else{
bean.bmiInfo?.let { bean.bmiInfo?.let {
binding.mHeader.mBMI.text = "BMI ${it.bmi}" binding.mHeader.mBMI.text = "BMI ${it.bmi}"
binding.mHeader.mBMIStatus.text = "${it.levelName}" binding.mHeader.mBMIStatus.text = "${it.levelName}"
}?:{ if(it.levelName.equals("理想") || it.levelName.equals("标准")){
binding.mHeader.mBMI.text = "BMI --" binding.mHeader.mBMIStatus.setTextColor(Color.parseColor("#02C191"))
binding.mHeader.mBMIStatus.text = "--" }
} }
}
binding.mHeader.tvWarningNum.text ="预警次数:${if (bean.warningCount == 0) "--" else bean.warningCount}" binding.mHeader.tvWarningNum.text ="预警次数:${if (bean.warningCount == 0) "--" else bean.warningCount}"
@ -790,7 +836,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} else {*/ } else {*/
if (showIdInfo == MMkvHelper.getLong(Const.USER_ID).toString()) { //自己 if (showIdInfo == MMkvHelper.getLong(Const.USER_ID).toString()) { //自己
val localBlueMac = MMkvHelper.getString(Const.Blue_Tooth) val localBlueMac = MMkvHelper.getString(Const.Blue_Tooth)
if (YCBBlueConnectHelper.getBleNowStatus() == YCBBlueConnectHelper.BLEConnectState.DisConnect) {//如果本地有蓝牙信息且属于未连接状态,则直接连接 /*if (YCBBlueConnectHelper.getBleNowStatus() == YCBBlueConnectHelper.BLEConnectState.DisConnect) {//如果本地有蓝牙信息且属于未连接状态,则直接连接
LogUtils.d("startConnect::${localBlueMac}") LogUtils.d("startConnect::${localBlueMac}")
if (localBlueMac.isNullOrEmpty()) { if (localBlueMac.isNullOrEmpty()) {
mainUIUpdate(YCBBlueConnectHelper.BLEConnectState.DisConnect)//刷新蓝牙连接状态 mainUIUpdate(YCBBlueConnectHelper.BLEConnectState.DisConnect)//刷新蓝牙连接状态
@ -800,14 +846,19 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
} else if (YCBBlueConnectHelper.getBleNowStatus() == YCBBlueConnectHelper.BLEConnectState.Connected) { } else if (YCBBlueConnectHelper.getBleNowStatus() == YCBBlueConnectHelper.BLEConnectState.Connected) {
getConnectStatus() getConnectStatus()
}*/
if(Const.watchType != -1 && !isDemonstrate){
startUpdateHealthInfoLive()
} }
} else { } else {
} }
// } // }
if(!isJob || it.data.user?.id.toString() != MMkvHelper.getLong(Const.USER_ID).toString()){
get24HourReportInfo(showIdInfo)// 这里调用一次接口防止首次进入App不会刷新评估状态 get24HourReportInfo(showIdInfo)// 这里调用一次接口防止首次进入App不会刷新评估状态
}
//设置健康监测按钮列表数据 //设置健康监测按钮列表数据
healthMonitoringList.clear() healthMonitoringList.clear()
healthMonitoringListExceed.clear() healthMonitoringListExceed.clear()
@ -826,7 +877,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
MMkvHelper.put(Const.DEVICE_TYPE, deviceType) MMkvHelper.put(Const.DEVICE_TYPE, deviceType)
} }
requestByDeviceModel() // requestByDeviceModel()
if (healthMonitoringListData.size > 9) { if (healthMonitoringListData.size > 9) {
for ((index, healthMonitoringListBean) in healthMonitoringListData.withIndex()) { for ((index, healthMonitoringListBean) in healthMonitoringListData.withIndex()) {
if (index < 9) { if (index < 9) {
@ -886,12 +937,12 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
binding.mHeader.mBtnBind.visibility = View.GONE binding.mHeader.mBtnBind.visibility = View.GONE
binding.mHeader.mLayoutResult.visibility = View.VISIBLE binding.mHeader.mLayoutResult.visibility = View.VISIBLE
} else { //没有绑定手表 } else { //没有绑定手表
if (/*mFamilyAdapter.position == 0 &&*/ it.data.user?.id.toString() == MMkvHelper.getLong(Const.USER_ID).toString()) { //是自己,显示绑定手表 if (it.data.user?.id.toString() == MMkvHelper.getLong(Const.USER_ID).toString()) { //是自己,显示绑定手表
binding.mHeader.mBtnBind.visibility = View.VISIBLE binding.mHeader.mBtnBind.visibility = View.VISIBLE
binding.mHeader.mLayoutResult.visibility = View.GONE binding.mHeader.mLayoutResult.visibility = View.GONE
} else { //不是自己隐藏数据 } else { //不是自己隐藏数据
binding.mHeader.mBtnBind.visibility = View.GONE binding.mHeader.mBtnBind.visibility = View.GONE
binding.mHeader.mLayoutResult.visibility = View.GONE binding.mHeader.mLayoutResult.visibility = View.VISIBLE
} }
} }
updateHealthDesc(healthResult) updateHealthDesc(healthResult)
@ -919,7 +970,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
// mViewModel.getWelcomeInfo(settingBean.user.id) // mViewModel.getWelcomeInfo(settingBean.user.id)
// mViewModel.getWarningMsg()//获取预警消息 // mViewModel.getWarningMsg()//获取预警消息
requestByDeviceModel() // requestByDeviceModel()
// 激活过才能开启定是我任务 // 激活过才能开启定是我任务
//Log.e("worker", "定时任务开启") //Log.e("worker", "定时任务开启")
@ -1209,6 +1260,63 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
} }
private var mDisposable: Disposable? = null
fun startUpdateHealthInfoLive(){
LogUtils.e("DynamicManagementFrag","刷新数据 disposable:${mDisposable}")
if(mDisposable == null){
Observable.interval(1000 * 60,60*1000,TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread()).subscribe(object : Observer<Long>{
override fun onSubscribe(d: Disposable) {
mDisposable = d
}
override fun onError(e: Throwable) {
cancelTimer()
}
override fun onComplete() {
cancelTimer()
}
override fun onNext(t: Long) {
LogUtils.e("DynamicManagementFrag","刷新数据${t}s")
isJob = true
mViewModel.getAllInfo(showIdInfo, false,true)
}
})
}
/* if (getHealthInfoJob == null){
getHealthInfoJob = mainScope.launch (Dispatchers.IO){
}
}*/
}
fun cancelTimer(){
LogUtils.e(TAG,"取消定时cancelTimer")
// getHealthInfoJob?.cancel()
mDisposable?.let {
if(!it.isDisposed){
LogUtils.e(TAG,"取消定时")
it.dispose()
}
}
mDisposable = null
// getHealthInfoJob = null
}
override fun onDestroyView() {
cancelTimer()
super.onDestroyView()
}
private fun mainUIUpdate(connectState: YCBBlueConnectHelper.BLEConnectState) { private fun mainUIUpdate(connectState: YCBBlueConnectHelper.BLEConnectState) {
mainScope.launch(Dispatchers.Main) { mainScope.launch(Dispatchers.Main) {
when (connectState) { when (connectState) {
@ -1371,7 +1479,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
private fun updateBadgeNum(num: Int) { private fun updateBadgeNum(num: Int) {
if (num > 0) { /*if (num > 0) {
val badgeText = if (num > 99) "99+" else "$num" val badgeText = if (num > 99) "99+" else "$num"
binding.mBadge.text = badgeText binding.mBadge.text = badgeText
binding.mBadge.post { binding.mBadge.post {
@ -1390,7 +1498,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
binding.mBadgeCard.visibility = View.VISIBLE binding.mBadgeCard.visibility = View.VISIBLE
} else { } else {
binding.mBadgeCard.visibility = View.GONE binding.mBadgeCard.visibility = View.GONE
} }*/
} }
private fun updateWarningInfo(sysMsg: MessageBean.SysMsg?) { private fun updateWarningInfo(sysMsg: MessageBean.SysMsg?) {
@ -1481,6 +1589,13 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
} }
} }
@Subscribe(threadMode = ThreadMode.MAIN)
fun unBinderSuccess(event:UnBinderEvent){
isJob = false
cancelTimer()
refresh()
}
//workmanager 后台上传任务 //workmanager 后台上传任务
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun workManagerSuccess(event: WorkManagerEvent) { fun workManagerSuccess(event: WorkManagerEvent) {
@ -1491,7 +1606,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun updateHealthInfo(event:ChangeFamilyEvent){ fun updateHealthInfo(event:ChangeFamilyEvent){
isJob= false
mViewModel.getAllInfo(event.showUserId, false) mViewModel.getAllInfo(event.showUserId, false)
getXtInfo(event.showUserId) getXtInfo(event.showUserId)
get24HourReportInfo(event.showUserId) get24HourReportInfo(event.showUserId)
@ -1500,11 +1615,14 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
tenJob?.cancel() tenJob?.cancel()
cancelTimer()
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun loginOutChange(event: LoginOutEvent){ fun loginOutChange(event: LoginOutEvent){
isJob = false
cancelTimer()
} }
@ -1515,6 +1633,7 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun onLoginOrRegisterSuccess(event: LoginOrRegisterEvent){ fun onLoginOrRegisterSuccess(event: LoginOrRegisterEvent){
LogUtils.e(TAG,"登录啦啦啦")
showIdInfo =if (MMkvHelper.getLong(Const.USER_ID).toString() == "0") { showIdInfo =if (MMkvHelper.getLong(Const.USER_ID).toString() == "0") {
"" ""
} else { } else {
@ -1531,19 +1650,35 @@ class DynamicManagementFrag : BaseVmFrag<DynamicManagementVm>() , EasyPermission
// } // }
} }
getXtInfo(showIdInfo) // getXtInfo(showIdInfo)
get24HourReportInfo(showIdInfo) isJob = false
// get24HourReportInfo(showIdInfo)
request() request()
uploadWhatchData() // uploadWhatchData()
} }
@Subscribe(threadMode = ThreadMode.MAIN)
fun backGroundEvent(event:BackGroundEvent){
if (event.isBackGround){
if(!TextUtils.isEmpty(showIdInfo)){
isJob = false
cancelTimer()
}
}else{
if(!TextUtils.isEmpty(showIdInfo)){
request()
}
}
}
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun bindDevSuccess(event: BindDevEvent){ fun bindDevSuccess(event: BindDevEvent){
getXtInfo(showIdInfo) // getXtInfo(showIdInfo)
get24HourReportInfo(showIdInfo) isJob = false
// get24HourReportInfo(showIdInfo)
request() request()
uploadWhatchData() // uploadWhatchData()
} }
override fun onPermissionsGranted(requestCode: Int, perms: MutableList<String>) { override fun onPermissionsGranted(requestCode: Int, perms: MutableList<String>) {

@ -7,7 +7,6 @@ import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.lifesense.android.ble.core.application.ApplicationContext
import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack
import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram
import com.tencent.mm.opensdk.openapi.WXAPIFactory import com.tencent.mm.opensdk.openapi.WXAPIFactory
@ -117,7 +116,7 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
onEventObject( onEventObject(
requireContext(), requireContext(),
UmengEventId.Banner, UmengEventId.Banner,
"type:${bannerBean.bannerType}; 标题:${bannerBean.title}" "url:${bannerBean.linkAddress}"
) )
when (bannerBean.bannerType) { when (bannerBean.bannerType) {
1 -> {//图片 1 -> {//图片
@ -125,10 +124,16 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
} }
5 -> { //内部跳转 5 -> { //内部跳转
// bundle.clear()
// bundle.putString("title", bannerBean.title)
// bundle.putString("url", bannerBean.linkAddress)
// RouteManager.goAct(ARouterUrl.WEB_ACT, bundle)
bundle.clear() bundle.clear()
bundle.putString("title", bannerBean.title) bundle.putString(
bundle.putString("url", bannerBean.linkAddress) "web_site_url",
RouteManager.goAct(ARouterUrl.WEB_ACT, bundle) "${bannerBean.linkAddress}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
} }
15 ->{ //视频跳转 15 ->{ //视频跳转
@ -136,10 +141,16 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
} }
10 -> {//web 跳转 10 -> {//web 跳转
// bundle.clear()
// bundle.putString("title", bannerBean.title)
// bundle.putString("url", bannerBean.linkAddress)
// RouteManager.goAct(ARouterUrl.WEB_ACT, bundle)
bundle.clear() bundle.clear()
bundle.putString("title", bannerBean.title) bundle.putString(
bundle.putString("url", bannerBean.linkAddress) "web_site_url",
RouteManager.goAct(ARouterUrl.WEB_ACT, bundle) "${bannerBean.linkAddress}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
} }
20 ->{ 20 ->{
val appId = "wx032bacb749c0dcb0" // 填移动应用(App)的 AppId非小程序的 AppID val appId = "wx032bacb749c0dcb0" // 填移动应用(App)的 AppId非小程序的 AppID
@ -173,7 +184,7 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
onEventObject( onEventObject(
requireContext(), requireContext(),
UmengEventId.Banner, UmengEventId.Banner,
"type:${bannerBean.bannerType}; 标题:${bannerBean.title}" "url:${bannerBean.linkAddress}"
) )
when (bannerBean.bannerType) { when (bannerBean.bannerType) {
1 -> {//图片 1 -> {//图片
@ -181,17 +192,29 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
} }
5 -> { //内部跳转 5 -> { //内部跳转
// bundle.clear()
// bundle.putString("title", bannerBean.title)
// bundle.putString("url", bannerBean.linkAddress)
// RouteManager.goAct(ARouterUrl.WEB_ACT, bundle)
bundle.clear() bundle.clear()
bundle.putString("title", bannerBean.title) bundle.putString(
bundle.putString("url", bannerBean.linkAddress) "web_site_url",
RouteManager.goAct(ARouterUrl.WEB_ACT, bundle) "${bannerBean.linkAddress}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
} }
10 -> {//web 跳转 10 -> {//web 跳转
// bundle.clear()
// bundle.putString("title", bannerBean.title)
// bundle.putString("url", bannerBean.linkAddress)
// RouteManager.goAct(ARouterUrl.WEB_ACT, bundle)
bundle.clear() bundle.clear()
bundle.putString("title", bannerBean.title) bundle.putString(
bundle.putString("url", bannerBean.linkAddress) "web_site_url",
RouteManager.goAct(ARouterUrl.WEB_ACT, bundle) "${bannerBean.linkAddress}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
} }
15 ->{ //视频跳转 15 ->{ //视频跳转
@ -235,7 +258,6 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
bundle.clear() bundle.clear()
var bean = adapter.getItem(position) as ScienceBean var bean = adapter.getItem(position) as ScienceBean
bundle.putSerializable("bean", bean) bundle.putSerializable("bean", bean)
onEventObject(requireContext(), UmengEventId.HealthScience, "${bean.name}")
RouteManager.goAct(ARouterUrl.SCIENCE_DETAIL, bundle) RouteManager.goAct(ARouterUrl.SCIENCE_DETAIL, bundle)
} }
@ -246,16 +268,30 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
var contentData = adapter.getItem(position) as HomeLayoutBean.HomeChildBean var contentData = adapter.getItem(position) as HomeLayoutBean.HomeChildBean
onEventObject(
requireContext(),
UmengEventId.FUNCTION,
"id:${contentData.id}"
)
when(contentData.jumpType){ when(contentData.jumpType){
1 ->{ 1 ->{
when(contentData.jumpUrl){ when(contentData.jumpUrl){
"health_data" ->{ "health_data" ->{
// RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT) if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
CommonToastUtils.showToast("敬请期待") RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT)
}
// CommonToastUtils.showToast("敬请期待")
} }
"health_dic" ->{ "health_dic" ->{
CommonToastUtils.showToast("敬请期待") if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
RouteManager.goAct(ARouterUrl.HEALTH_CODE_MAIN_ACT)
}
// CommonToastUtils.showToast("敬请期待")
} }
else ->{ else ->{
@ -274,12 +310,18 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
mViewModel.getVideoDoctorType() mViewModel.getVideoDoctorType()
} }
}else{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else { }else {
contentData.jumpUrl?.let { contentData.jumpUrl?.let {
bundle.clear() bundle.clear()
bundle.putString("title", contentData.name) bundle.putString(
bundle.putString("url", contentData.jumpUrl) "web_site_url",
RouteManager.goAct(ARouterUrl.WEB_ACT, bundle) "${it}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}
} }
} }
@ -325,6 +367,11 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
layoutContentAdapter.setOnItemClickListener { adapter, view, position -> layoutContentAdapter.setOnItemClickListener { adapter, view, position ->
var contentData = adapter.getItem(position) as HomeLayoutBean.HomeChildBean var contentData = adapter.getItem(position) as HomeLayoutBean.HomeChildBean
onEventObject(
requireContext(),
UmengEventId.FUNCTION,
"id:${contentData.id}"
)
when(contentData.jumpType){ when(contentData.jumpType){
1 ->{ 1 ->{
contentData.jumpUrl?.let { contentData.jumpUrl?.let {
@ -333,7 +380,6 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else { }else {
onEventObject(requireContext(), UmengEventId.HealthRisk)
bundle.clear() bundle.clear()
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
RouteManager.goAct(ARouterUrl.TONGUE_MAIN_ACTIVITY, bundle) RouteManager.goAct(ARouterUrl.TONGUE_MAIN_ACTIVITY, bundle)
@ -358,8 +404,29 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
} }
"PSYCHOLOGY" ->{ "PSYCHOLOGY" ->{
// RouteManager.goAct(ARouterUrl.PSYCHOLOGICAL_TEST_LIST_ACT) if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
CommonToastUtils.showToast("敬请期待") RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
RouteManager.goAct(ARouterUrl.PSYCHOLOGICAL_TEST_LIST_ACT)
}
// CommonToastUtils.showToast("敬请期待")
}
"AI_SUGAR_MEDICINE" ->{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
bundle.clear()
bundle.putInt("type", 1)
RouteManager.goAct(
ARouterUrl.AI_SKIN_MEASUREMENT_ACTIVITY,
bundle
)
}
}
"AI_SKIN" ->{
} }
else ->{ else ->{
@ -371,11 +438,18 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
} }
2->{ 2->{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
contentData.jumpUrl?.let { contentData.jumpUrl?.let {
bundle.clear() bundle.clear()
bundle.putString("title", contentData.name) bundle.putString(
bundle.putString("url", contentData.jumpUrl) "web_site_url",
RouteManager.goAct(ARouterUrl.WEB_ACT, bundle) "${it}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}
} }
} }
@ -537,9 +611,9 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
// 刷新注册 // 刷新注册
private fun refresh() { private fun refresh() {
refresh.setRefresh(binding.mRefresh) { /* refresh.setRefresh(binding.mRefresh) {
request() request()
} }*/
} }
private fun request() { private fun request() {
@ -647,9 +721,13 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
binding.mCom.mRecycle.adapter = mFamilyAdapter binding.mCom.mRecycle.adapter = mFamilyAdapter
mFamilyAdapter.setOnItemClickListener { adapter, view, position -> mFamilyAdapter.setOnItemClickListener { adapter, view, position ->
if (position == mFamilyAdapter.data.size - 1) { //第一期暂不做 if (position == mFamilyAdapter.data.size - 1) { //第一期暂不做
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
RouteManager.goAct(ARouterUrl.FAMILY_HEALTH_ACT) RouteManager.goAct(ARouterUrl.FAMILY_HEALTH_ACT)
} }
}
} }
mFamilyAdapter.position = 0 mFamilyAdapter.position = 0
@ -677,7 +755,7 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
} else { } else {
MMkvHelper.getLong(Const.USER_ID).toString() MMkvHelper.getLong(Const.USER_ID).toString()
} }
request() // request()
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)

@ -2,11 +2,13 @@ package com.zj365.dc.fragment
import android.content.Intent import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.text.TextUtils
import android.view.View import android.view.View
import androidx.localbroadcastmanager.content.LocalBroadcastManager import androidx.localbroadcastmanager.content.LocalBroadcastManager
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.xty.base.fragment.BaseFragList import com.xty.base.fragment.BaseFragList
import com.xty.common.Const import com.xty.common.Const
import com.xty.common.MMkvHelper
import com.xty.common.R import com.xty.common.R
import com.xty.common.arouter.ARouterUrl import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager import com.xty.common.arouter.RouteManager
@ -57,51 +59,22 @@ class MessageFragment : BaseFragList<MessageVm>() {
} }
initAdapter() initAdapter()
setRecycleRefresh(binding.mRecycle,binding.mRefresh) setRecycleRefresh(binding.mRecycle,binding.mRefresh)
// initTest()
} }
override fun refresh() {
val userId = if (MMkvHelper.getLong(Const.USER_ID).toString() == "0") {
""
} else {
MMkvHelper.getLong(Const.USER_ID).toString()
/*fun initTest(){
var titles = ArrayList<String>()
titles.add("胆经")
titles.add("肝经")
titles.add("肺经")
titles.add("大肠经")
titles.add("胃经")
titles.add("脾经")
titles.add("心经")
titles.add("小肠经")
titles.add("膀胱经")
titles.add("肾经")
titles.add("心包经")
titles.add("三焦经")
var img = ArrayList<Int>()
img.add(R.mipmap.ic_heart_1)
img.add(R.mipmap.ic_liver_1)
img.add(R.mipmap.ic_spleen_1)
img.add(R.mipmap.ic_lung_1)
img.add(R.mipmap.ic_kidney_1)
img.add(R.mipmap.ic_large_intestine_1)
img.add(R.mipmap.ic_small_intestine_1)
img.add(R.mipmap.ic_stomach_1)
img.add(R.mipmap.ic_lymph_1)
img.add(R.mipmap.ic_gallbladder_1)
img.add(R.mipmap.ic_bladder_1)
img.add(R.mipmap.ic_pericardium_1)
binding.clBody.healthBody.setMenuItemIconsAndTexts(img,titles)
// binding..healthBody.setMenuItemIconsAndTexts(img, titles)
}*/
override fun refresh() { }
if(!TextUtils.isEmpty(userId)){
mViewModel.getSystemMsg() mViewModel.getSystemMsg()
} }
}
override fun setViewModel()= MessageVm() override fun setViewModel()= MessageVm()
override fun observer() { override fun observer() {
@ -129,6 +102,13 @@ class MessageFragment : BaseFragList<MessageVm>() {
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun loginOutChange(event: LoginOutEvent){ fun loginOutChange(event: LoginOutEvent){
// refresh() // refresh()
adapter.setNewInstance(null)
val intent = Intent()
intent.action = Const.CONVERSATION_UNREAD_COUNT_ACTION
intent.putExtra(Const.UNREAD_COUNT_EXTRA, 0)
LocalBroadcastManager.getInstance(requireContext())
.sendBroadcast(intent)
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)

@ -4,6 +4,8 @@ import android.Manifest
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.Build
import android.text.TextUtils
import android.util.Log
import android.view.View import android.view.View
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import cn.jpush.android.api.JPushInterface import cn.jpush.android.api.JPushInterface
@ -19,11 +21,14 @@ import com.xty.common.event.LoginOutEvent
import com.xty.common.event.MyInfoEvent import com.xty.common.event.MyInfoEvent
import com.xty.common.util.CommonToastUtils import com.xty.common.util.CommonToastUtils
import com.xty.common.util.CommonUtils import com.xty.common.util.CommonUtils
import com.xty.common.util.JumpPermissionManagement
import com.xty.common.util.PermissionUtils import com.xty.common.util.PermissionUtils
import com.xty.common.xqr_code.XQRCodeAct import com.xty.common.xqr_code.XQRCodeAct
import com.xty.network.model.InviteCustodyBean import com.xty.network.model.InviteCustodyBean
import com.xty.network.model.SettingBean import com.xty.network.model.SettingBean
import com.xty.network.model.UserOtherInfo
import com.xty.network.utils.AppUtils
import com.zj365.dc.BuildConfig import com.zj365.dc.BuildConfig
import com.zj365.dc.activity.MainActivity import com.zj365.dc.activity.MainActivity
import com.zj365.dc.databinding.FragMineBinding import com.zj365.dc.databinding.FragMineBinding
@ -32,6 +37,7 @@ import com.zj365.health.weight.DialogTip
import com.zj365.health.weight.DialogTipNew import com.zj365.health.weight.DialogTipNew
import com.zj365.mime.act.DevInfoAct import com.zj365.mime.act.DevInfoAct
import com.zj365.mime.vm.SettingVm import com.zj365.mime.vm.SettingVm
import com.zj365.mime.weight.FactorySettingDialog
import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode import org.greenrobot.eventbus.ThreadMode
@ -55,6 +61,10 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
} }
var isDemonstrate: Boolean = false var isDemonstrate: Boolean = false
var otherInfo: UserOtherInfo? = null
var isLogin= false
override fun setLayout(): View = binding.root override fun setLayout(): View = binding.root
private val defaultIcon by lazy { private val defaultIcon by lazy {
@ -98,13 +108,6 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
//刷新注册 //刷新注册
refresh() refresh()
binding.mNoNetwork.mRefreshBtn.isSelected = true
binding.mNoNetwork.mRefreshBtn.setOnClickListener {
mViewModel.getMySetting()
mViewModel.getAllInfo(showIdInfo,false)
mViewModel.searchInviteInfo()
}
binding.clInfo.setOnClickListener { binding.clInfo.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
@ -127,7 +130,13 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else { }else {
CommonToastUtils.showToast("敬请期待") bundle.clear()
bundle.putString(
"web_site_url",
"${BuildConfig.h5url}pages/index/index?pageId=coupon"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
// CommonToastUtils.showToast("敬请期待")
} }
} }
@ -135,7 +144,13 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else { }else {
CommonToastUtils.showToast("敬请期待") bundle.clear()
bundle.putString(
"web_site_url",
"${BuildConfig.h5url}pages/index/index?pageId=wallet"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
// CommonToastUtils.showToast("敬请期待")
} }
} }
@ -151,9 +166,7 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
return@setOnClickListener return@setOnClickListener
} }
Const.userDeviceLiveData.value?.apply {
mViewModel.allData.value?.apply {
data.apply {
if (adorn.wearCount > 29 && adorn.activeWear > 14) { if (adorn.wearCount > 29 && adorn.activeWear > 14) {
onEventObject(requireContext(), UmengEventId.Health30Day) onEventObject(requireContext(), UmengEventId.Health30Day)
bundle.clear() bundle.clear()
@ -169,7 +182,7 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
CommonToastUtils.showToast("尊敬的用户您好该功能需要佩戴30天且活跃佩戴15天查看请坚持佩戴且每日同步数据") CommonToastUtils.showToast("尊敬的用户您好该功能需要佩戴30天且活跃佩戴15天查看请坚持佩戴且每日同步数据")
} }
} }
}
} }
} }
@ -177,6 +190,7 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else { }else {
onEventObject(requireContext(), UmengEventId.HealthRisk)
bundle.clear() bundle.clear()
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
RouteManager.goAct(ARouterUrl.SUBMIT_REPORTMain, bundle) RouteManager.goAct(ARouterUrl.SUBMIT_REPORTMain, bundle)
@ -186,16 +200,35 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
binding.mllMember.setOnClickListener { binding.mllMember.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
otherInfo?.let {
if(!TextUtils.isEmpty(it.vip_server)){
bundle.clear()
bundle.putString(
"web_site_url",
"${it.vip_server}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}else{ }else{
CommonToastUtils.showToast("敬请期待") CommonToastUtils.showToast("敬请期待")
} }
}
}
} }
binding.mAppreciation.setOnClickListener { binding.mAppreciation.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else { }else {
CommonToastUtils.showToast("敬请期待") bundle.clear()
bundle.putString(
"web_site_url",
"${BuildConfig.h5url}pages/index/index?pageId=appreciation"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
// CommonToastUtils.showToast("敬请期待")
} }
} }
@ -203,7 +236,9 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else { }else {
CommonToastUtils.showToast("敬请期待") RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT)
// CommonToastUtils.showToast("敬请期待")
} }
} }
@ -243,7 +278,7 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
bundle.clear() bundle.clear()
bundle.putString("id", showIdInfo) bundle.putString("id", showIdInfo)
bundle.putSerializable("index", ReportVm.ReportInfoType.Day) bundle.putSerializable("index", ReportVm.ReportInfoType.Day)
bundle.putBoolean("isDemonstrate", isDemonstrate) bundle.putBoolean("isDemonstrate", (requireActivity() as MainActivity).isDemonstrate)
bundle.putInt("pageType", 0) bundle.putInt("pageType", 0)
bundle.putString("titleName", "日报") bundle.putString("titleName", "日报")
Const.functionListDate.value?.let { Const.functionListDate.value?.let {
@ -257,16 +292,48 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
binding.llStartBs.setOnClickListener { binding.llStartBs.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
otherInfo?.let {
if (!TextUtils.isEmpty(it.start_business)){
onEventObject(requireContext(), UmengEventId.StartBus)
bundle.clear()
bundle.putString(
"web_site_url",
"${it.start_business}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}else{ }else{
CommonToastUtils.showToast("敬请期待") CommonToastUtils.showToast("敬请期待")
}
}?:{
CommonToastUtils.showToast("敬请期待")
}
} }
} }
binding.llDailyPoster.setOnClickListener { binding.llDailyPoster.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
otherInfo?.let {
if (!TextUtils.isEmpty(it.placard)){
bundle.clear()
bundle.putString(
"web_site_url",
"${it.placard}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}else{ }else{
CommonToastUtils.showToast("敬请期待") CommonToastUtils.showToast("敬请期待")
}
}?:{
CommonToastUtils.showToast("敬请期待")
}
} }
} }
@ -309,23 +376,87 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else { }else {
CommonToastUtils.showToast("敬请期待") onEventObject(requireContext(), UmengEventId.EnterpriseData)
RouteManager.goAct(ARouterUrl.ENTERPRISE_INFO)
// CommonToastUtils.showToast("敬请期待")
} }
} }
binding.llShippingAddress.setOnClickListener { binding.llShippingAddress.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
bundle.clear()
bundle.putString(
"web_site_url",
"${BuildConfig.h5url}pages/index/index?pageId=address"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
// CommonToastUtils.showToast("敬请期待")
}
}
binding.llMagicTest.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
otherInfo?.let {
if (!TextUtils.isEmpty(it.magic_mirror)){
bundle.clear()
bundle.putString(
"web_site_url",
"${it.magic_mirror}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}else{ }else{
CommonToastUtils.showToast("敬请期待") CommonToastUtils.showToast("敬请期待")
}
}
}
}
binding.llInternetThing.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
otherInfo?.let {
if (!TextUtils.isEmpty(it.miot)){
bundle.clear()
bundle.putString(
"web_site_url",
"${it.miot}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}else{
CommonToastUtils.showToast("敬请期待")
}
}
} }
} }
binding.llOperationGuide.setOnClickListener { binding.llOperationGuide.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
otherInfo?.let {
if (!TextUtils.isEmpty(it.operation_guide)){
onEventObject(requireContext(), UmengEventId.OperGuide)
bundle.clear()
bundle.putString("title", "操作手册")
bundle.putBoolean("isAgree", false)
bundle.putString("url", "${it.operation_guide}")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
}else{ }else{
CommonToastUtils.showToast("敬请期待") CommonToastUtils.showToast("敬请期待")
}
}?:{
CommonToastUtils.showToast("敬请期待")
}
} }
} }
@ -333,7 +464,17 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else { }else {
CommonToastUtils.showToast("敬请期待") RouteManager.goAct(ARouterUrl.SHOP_ORDER_LIST_ACT)
//CommonToastUtils.showToast("敬请期待")
}
}
binding.mllServerOrder.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
RouteManager.goAct(ARouterUrl.ORDER_LIST)
//CommonToastUtils.showToast("敬请期待")
} }
} }
@ -373,7 +514,7 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){ if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT) RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else { }else {
mViewModel.getVersionNew(BuildConfig.VERSION_CODE) mViewModel.getVersionNew(AppUtils.getVersionCode(requireActivity()))
} }
} }
@ -383,41 +524,114 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
Manifest.permission.CALL_PHONE)){ Manifest.permission.CALL_PHONE)){
startActivity(Intent(Intent.ACTION_CALL, Uri.parse("tel:4000063365"))) startActivity(Intent(Intent.ACTION_CALL, Uri.parse("tel:4000063365")))
}else{ }else{
if (EasyPermissions.somePermissionDenied(this,
Manifest.permission.CALL_PHONE)){
DialogTip(
requireContext(),
"中健365需要拨打电话权限,需要打开设置页面么?"
) {
JumpPermissionManagement.GoToSetting(requireActivity())
}.show()
}else{
FactorySettingDialog(
requireContext(),
"中健365需要拨打电话权限以便您联系客服功能"
) {
EasyPermissions.requestPermissions(this,"", EasyPermissions.requestPermissions(this,"",
0x00011, 0x00011,
Manifest.permission.CALL_PHONE) Manifest.permission.CALL_PHONE)
}.show()
}
} }
} }
} }
private fun refresh() { private fun refresh() {
refresh.setRefresh(binding.mRefresh) { refresh.setRefresh(binding.mRefresh) {
if (!TextUtils.isEmpty(showIdInfo)) {
mViewModel.getMySetting() mViewModel.getMySetting()
mViewModel.getUserOtherInfo()
mViewModel.getAllInfo(showIdInfo,false) // mViewModel.getAllInfo(showIdInfo, false)
mViewModel.searchInviteInfo() mViewModel.searchInviteInfo()
} }
} }
}
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
/* if (!checkNetworkAvailable(requireContext())) { if (!TextUtils.isEmpty(showIdInfo) && !isLogin){
binding.mNoNetwork.root.visibility = View.VISIBLE Const.mainLiveData.value?: mViewModel.getMySetting()
} else {
if (binding.mNoNetwork.root.visibility == View.VISIBLE) {*/
mViewModel.getMySetting()
// }
mViewModel.getAllInfo(showIdInfo,false) Const.userDeviceLiveData.value?:mViewModel.getUserDeviceInfo(showIdInfo)
// mViewModel.getScore(1)
mViewModel.searchInviteInfo() mViewModel.searchInviteInfo()
// } mViewModel.getUserOtherInfo()
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
}
}
}
if(isLogin){
isLogin = false
}
} }
override fun observer() { override fun observer() {
/* mViewModel.familyLive.observe(this) { mViewModel.useOtherInfoLiveData.observe(this){
binding.mFamily.text = it.data.size.toString() otherInfo = it.data
}*/ binding.tvMemberValidity.text ="有效期至:${it.data.vip_end_time}"
binding.mCoupon.text = "${it.data.coupons_count}"
binding.mTvWallet.text = "${it.data.money}"
binding.tvOrder.text = "${it.data.order_count}"
if(it.data.serviceOrderCount > 0){
binding.mllServerOrder.visibility = View.VISIBLE
binding.mServerOrder.text = "${it.data.serviceOrderCount}"
}else{
binding.mllServerOrder.visibility = View.GONE
}
if(TextUtils.isEmpty(it.data.magic_mirror)){
binding.llMagicTest.visibility = View.GONE
}else{
binding.llMagicTest.visibility = View.VISIBLE
}
if(TextUtils.isEmpty(it.data.miot)){
binding.llInternetThing.visibility = View.GONE
}else{
binding.llInternetThing.visibility = View.VISIBLE
}
if(TextUtils.isEmpty(it.data.start_business)){
binding.llStartBs.visibility = View.GONE
}else{
binding.llStartBs.visibility = View.VISIBLE
}
if(TextUtils.isEmpty(it.data.placard)){
binding.llDailyPoster.visibility = View.GONE
}else{
binding.llDailyPoster.visibility = View.VISIBLE
}
}
mViewModel.scoreLive.observe(this) { mViewModel.scoreLive.observe(this) {
binding.mIntegral.text = (if (it.data.num.isNullOrEmpty()) "0" else it.data.num!!) binding.mIntegral.text = (if (it.data.num.isNullOrEmpty()) "0" else it.data.num!!)
} }
@ -442,30 +656,9 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
} }
mViewModel.deviceInfo.observe(this){
Const.mainLiveData.observe(this) { Const.userDeviceLiveData.value = it.data
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
}
}
//个人设置信息获取 //个人设置信息获取
mViewModel.settingLive.observe(this) { mViewModel.settingLive.observe(this) {
if (null == it.data) return@observe if (null == it.data) return@observe
@ -479,6 +672,22 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
) )
} }
Const.mainLiveData.value = settingBean 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 // binding.mNoNetwork.root.visibility = View.GONE
} }
} }
@ -498,9 +707,11 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
} else { } else {
MMkvHelper.getLong(Const.USER_ID).toString() MMkvHelper.getLong(Const.USER_ID).toString()
} }
// mViewModel.getMySetting() isLogin = true
// mViewModel.getScore(1) mViewModel.getMySetting()
mViewModel.getUserDeviceInfo(showIdInfo)
mViewModel.searchInviteInfo() mViewModel.searchInviteInfo()
mViewModel.getUserOtherInfo()
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
@ -511,23 +722,20 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun addSuccess(event: AddSuccessEvent){ fun addSuccess(event: AddSuccessEvent){
// mViewModel.getMySetting() // mViewModel.getMySetting()
mViewModel.getAllInfo(showIdInfo,false) mViewModel.getUserDeviceInfo(showIdInfo)
// mViewModel.getScore(1)
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun bindDevSuccess(event:BindDevEvent){ fun bindDevSuccess(event:BindDevEvent){
// mViewModel.getMySetting() mViewModel.getUserDeviceInfo(showIdInfo)
mViewModel.getAllInfo(showIdInfo,false) mViewModel.getMySetting()
// mViewModel.getScore(1)
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
fun refreshUI(event: MyInfoEvent){ fun refreshUI(event: MyInfoEvent){
// mViewModel.getMySetting() mViewModel.getMySetting()
mViewModel.getAllInfo(showIdInfo,false) mViewModel.getUserDeviceInfo(showIdInfo)
// mViewModel.getScore(1) // mViewModel.searchInviteInfo()
mViewModel.searchInviteInfo() mViewModel.getUserOtherInfo()
} }
@ -559,10 +767,16 @@ class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
fun refreshLogoutUI(){ fun refreshLogoutUI(){
user = null user = null
binding.mIntegral.text = "0" showIdInfo = ""
binding.mIntegral.text = "--"
binding.mName.text = "" binding.mName.text = ""
binding.mPhone.text = "" binding.mPhone.text = ""
binding.mImage.setImageResource(defaultIcon[0]) binding.mImage.setImageResource(defaultIcon[0])
binding.tvMemberValidity.text ="有效期至:--"
binding.mCoupon.text = "--"
binding.mTvWallet.text = "--"
binding.tvOrder.text = "--"
binding.mllServerOrder.visibility = View.GONE
} }
override fun onPermissionsGranted(requestCode: Int, perms: MutableList<String>) { override fun onPermissionsGranted(requestCode: Int, perms: MutableList<String>) {

@ -0,0 +1,137 @@
package com.zj365.dc.fragment
import android.graphics.Rect
import android.os.Parcelable
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
import com.xty.base.vm.BaseVm
import com.xty.common.UmengEventId
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
import com.xty.common.onEventObject
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
import com.zj365.dc.adapter.shop.ShopCategoryAdapter
import com.zj365.dc.adapter.shop.ShopGoodsAdapter
import com.zj365.dc.databinding.FragShopBinding
import com.zj365.dc.vm.ShopMallVm
import java.util.ArrayList
class ShopFragment: BaseFragList<ShopMallVm>() {
val binding by lazy { FragShopBinding.inflate(layoutInflater) }
val mCategoryAdapter by lazy { ShopCategoryAdapter() }
val mGoodsAdapter by lazy { ShopGoodsAdapter() }
var goodsName:String? = null
override fun initAdapter() {
binding.recyclerView.adapter = mGoodsAdapter
binding.recyclerView.layoutManager = ExpandStaggeredManager(2,
StaggeredGridLayoutManager.VERTICAL)
binding.categoryRecyclerView.adapter = mCategoryAdapter
mCategoryAdapter.setOnItemClickListener { adapter, view, position ->
var bean = adapter.data[position] as ShopCategoryBean
onEventObject(requireContext(), UmengEventId.GOODS_CATEGORY,"id:${bean.id}")
bundle.clear()
bundle.putLong("id",bean.id)
bundle.putParcelableArrayList("categoryList",adapter.data as ArrayList<ShopCategoryBean>)
RouteManager.goAct(ARouterUrl.SHOP_CATEGORY,bundle)
}
setRecycleRefresh(binding.recyclerView,binding.mRefresh,true)
mGoodsAdapter.setOnItemClickListener { adapter, view, position ->
var bean = adapter.data[position] as GoodsRecordsBean.GoodsBean
onEventObject(requireContext(), UmengEventId.GOODS_DETAIL,"id:${bean.id}")
bundle.clear()
bundle.putString(
"web_site_url",
"${BuildConfig.h5url}pages/index/index?pageId=commodityDetail&id=${bean.id}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}
}
override fun refresh() {
mViewModel.getGoodsList(null,0L,0,page)
}
override fun initView() {
super.initView()
mViewModel.getGoodsCategory(0L)
// mViewModel.getGoodsList(null,0L,0,page)
binding.etSearch.setOnEditorActionListener(object : TextView.OnEditorActionListener {
override fun onEditorAction(p0: TextView?, p1: Int, p2: KeyEvent?): Boolean {
if(p1 == EditorInfo.IME_ACTION_SEARCH){
goodsName = binding.etSearch.text.toString().trim()
/*if(TextUtils.isEmpty(goodsName)){
CommonToastUtils.showToast("请输入搜索内容")
return true
}*/
page = 1
mViewModel.getGoodsList(goodsName,0L,0,page)
RxKeyboardTool.hideSoftInput(requireActivity())
return true
}
return false
}
})
binding.recyclerView.addItemDecoration(object : RecyclerView.ItemDecoration() {
override fun getItemOffsets(outRect: Rect, itemPosition: Int, parent: RecyclerView) {
super.getItemOffsets(outRect, itemPosition, parent)
outRect.bottom = 12
outRect.left = 7
outRect.right = 7
}
})
}
override fun setViewModel()= ShopMallVm()
override fun observer() {
mViewModel.categoryLiveDate.observe(this){
if(it.data.size != 8){
binding.categoryRecyclerView.layoutManager = LinearLayoutManager(requireContext(),LinearLayoutManager.HORIZONTAL,false)
}else if(it.data.size == 8){
binding.categoryRecyclerView.layoutManager = GridLayoutManager(requireContext(),4)
}
mCategoryAdapter.setNewInstance(it.data)
}
mViewModel.goodsLiveData.observe(this){
if(page == 1){
mGoodsAdapter.setNewInstance(it.data.records)
}else{
mGoodsAdapter.addData(it.data.records)
}
}
}
override fun setLayout() = binding.root
}

@ -1,13 +1,11 @@
package com.zj365.dc.model package com.zj365.dc.model
import com.lifesense.android.ble.core.application.BleDeviceManager
import com.lifesense.android.ble.core.application.model.enums.ConnectionState
import com.lifesense.android.ble.core.valueobject.DeviceInfo
import com.zj365.health.act.binddevice.BlueUtil import com.zj365.health.act.binddevice.BlueUtil
class DeviceStateWrapper { class DeviceStateWrapper {
protected var device: DeviceInfo? = null /* protected var device: DeviceInfo? = null
constructor() {} constructor() {}
constructor(device: DeviceInfo?, state: ConnectionState?){ constructor(device: DeviceInfo?, state: ConnectionState?){
@ -48,5 +46,5 @@ class DeviceStateWrapper {
state = BlueUtil.getBlueManage().getDeviceConnectState(device!!.mac) state = BlueUtil.getBlueManage().getDeviceConnectState(device!!.mac)
} }
return isConnected() return isConnected()
} }*/
} }

@ -11,6 +11,7 @@ import com.xty.base.utils.OrganStatusCalcUtil
import com.xty.base.vm.BaseVm import com.xty.base.vm.BaseVm
import com.xty.common.Const import com.xty.common.Const
import com.xty.common.Dateutils import com.xty.common.Dateutils
import com.xty.common.LogUtils
import com.xty.common.MMkvHelper import com.xty.common.MMkvHelper
import com.xty.common.TimeUtils import com.xty.common.TimeUtils
import com.xty.common.util.CommonUtils import com.xty.common.util.CommonUtils
@ -63,9 +64,16 @@ class DynamicManagementVm : BaseVm() {
/** /**
* 获取所有信息 * 获取所有信息
*/ */
fun getAllInfo(id: String, isShowDialog: Boolean) { fun getAllInfo(id: String, isShowDialog: Boolean,isTimer:Boolean = false) {
startHttp(isShowDialog) { startHttp(isShowDialog) {
withContext(Dispatchers.IO){ withContext(Dispatchers.IO){
if(isTimer){
val json = JSONObject()
json.put("id", id)
val body = apiInterface().getMainInfo(retrofits.getRequestBody(json.toString()))
body.getCodeStatus(allData, nowData)
}else{
val list = async { getDeviceFunctionLists(id) }.await() val list = async { getDeviceFunctionLists(id) }.await()
if (list){ if (list){
@ -79,6 +87,8 @@ class DynamicManagementVm : BaseVm() {
} }
} }
}
} }
fun uploadAllInfo(array: JSONArray) { fun uploadAllInfo(array: JSONArray) {
@ -144,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)
}
}
/** /**
* 首页小贴士 * 首页小贴士
@ -321,7 +319,7 @@ class DynamicManagementVm : BaseVm() {
statusXY, statusXY,
mTimeXY, mTimeXY,
contentXY, contentXY,
R.mipmap.bg_oo, R.mipmap.bg_xl,
R.mipmap.ic_oo, R.mipmap.ic_oo,
1, 1,
it.type, it.type,
@ -345,7 +343,7 @@ class DynamicManagementVm : BaseVm() {
statusHXL, statusHXL,
mTimeHXL, mTimeHXL,
contentHXL, contentHXL,
R.mipmap.bg_breath, R.mipmap.bg_xl,
R.mipmap.ic_h_breath, R.mipmap.ic_h_breath,
2, 2,
it.type, it.type,
@ -369,7 +367,7 @@ class DynamicManagementVm : BaseVm() {
statusTW, statusTW,
mTimeTW, mTimeTW,
contentTW, contentTW,
R.mipmap.bg_temp, R.mipmap.bg_xl,
R.mipmap.ic_temp, R.mipmap.ic_temp,
3, 3,
it.type, it.type,
@ -395,7 +393,7 @@ class DynamicManagementVm : BaseVm() {
0, 0,
mTimeBS, mTimeBS,
contentBS, contentBS,
R.mipmap.bg_step, R.mipmap.bg_xl,
R.mipmap.ic_steps, R.mipmap.ic_steps,
4, 4,
it.type, it.type,
@ -430,7 +428,7 @@ class DynamicManagementVm : BaseVm() {
statusSM, statusSM,
mTimeSM, mTimeSM,
contentSM, contentSM,
R.mipmap.bg_h_sleep, R.mipmap.bg_xl,
R.mipmap.ic_h_sleep, R.mipmap.ic_h_sleep,
5, 5,
it.type, it.type,
@ -457,7 +455,7 @@ class DynamicManagementVm : BaseVm() {
statusXYa, statusXYa,
mTimeXYa, mTimeXYa,
contentXYa, contentXYa,
R.mipmap.bg_xya, R.mipmap.bg_xl,
R.mipmap.ic_xya, R.mipmap.ic_xya,
6, 6,
it.type, it.type,
@ -537,14 +535,14 @@ class DynamicManagementVm : BaseVm() {
statusXT, statusXT,
mTimeXT, mTimeXT,
contentXT, contentXT,
R.mipmap.bg_bloodsugar, R.mipmap.bg_xl,
R.mipmap.ic_bloodsugar, R.mipmap.ic_bloodsugar,
7, 7,
it.type, it.type,
calorie = bloodSugarData.count calorie = bloodSugarData.count
) )
) )
}else if(DeviceFunctionUtils.hasFunction(it,"ecg")){ //心电 }/*else if(DeviceFunctionUtils.hasFunction(it,"ecg")){ //心电
val statusXD = 0 val statusXD = 0
val contentXD = val contentXD =
if (TextUtils.isEmpty(heartData.hrData) || heartData.hrData == "0") { if (TextUtils.isEmpty(heartData.hrData) || heartData.hrData == "0") {
@ -565,7 +563,7 @@ class DynamicManagementVm : BaseVm() {
it.type, it.type,
) )
) )
}else if(DeviceFunctionUtils.hasFunction(it,"uric")){ //尿酸 }*/else if(DeviceFunctionUtils.hasFunction(it,"uric")){ //尿酸
var statusNS = 0 var statusNS = 0
var contentNS = "" var contentNS = ""
var mTimeNS = "" var mTimeNS = ""
@ -587,13 +585,13 @@ class DynamicManagementVm : BaseVm() {
statusNS = 1 statusNS = 1
contentNS = "建模中" contentNS = "建模中"
mTimeNS = if (uricAcidData.time.isNullOrEmpty()) { mTimeNS = if (uricAcidData.time.isNullOrEmpty()) {
"${milliseconds2String(uricAcidData.time)}:00" "${milliseconds2String(uricAcidData.time)}"
} else if (uricAcidData.time.contains("-")) { } else if (uricAcidData.time.contains("-")) {
uricAcidData.time uricAcidData.time
} else { } else {
"${ "${
milliseconds2String(uricAcidData.time) milliseconds2String(uricAcidData.time)
}:00" }"
} }
} }
@ -617,7 +615,7 @@ class DynamicManagementVm : BaseVm() {
statusNS, statusNS,
mTimeNS, mTimeNS,
contentNS, contentNS,
R.mipmap.bg_niaosuan, R.mipmap.bg_xl,
R.mipmap.ic_niaosuan, R.mipmap.ic_niaosuan,
9, 9,
it.type, it.type,
@ -626,17 +624,70 @@ class DynamicManagementVm : BaseVm() {
) )
) )
}else if(DeviceFunctionUtils.hasFunction(it,"bloodFat")){ //血脂 }else if(DeviceFunctionUtils.hasFunction(it,"bloodFat")){ //血脂
//血脂
var statusXZ = 0
var contentXZ = ""
var mTimeXZ = ""
when (bloodFatData.status) {
//0 未开通 1建模中 2建模完成
0 -> {
if (TextUtils.isEmpty(bloodFatData.expireTime)) {
contentXZ = "未开通"
mTimeXZ = "免费体验100天"
statusXZ = 3
} else {
contentXZ = "续费"
mTimeXZ = RxTimeTool.getCurrentDateTime("yyyy-MM-dd HH:mm")
statusXZ = 0
}
}
1 -> {
statusXZ = 1
contentXZ = "建模中"
mTimeXZ = if (bloodFatData.time.isNullOrEmpty()) {
"${RxTimeTool.getCurrentDateTime("yyyy-MM-dd HH")}:00"
} else if (bloodFatData.time.contains("-")) {
bloodFatData.time
} else {
// "${
// RxTimeTool.simpleDateFormat(
// "yyyy-MM-dd HH",
// RxTimeTool.string2Date(
// "yyyy-MM-dd HH:mm:ss",
// bloodFatData.time
// )
// )
// }:00"
milliseconds2String(bloodFatData.time)
}
}
2 -> {
statusXZ =
if (bloodFatData.value == "0" || TextUtils.isEmpty(bloodFatData.value)) {
0
} else if (bloodFatData.message.contains("正常")) {
1
} else {
2
}
contentXZ =
if (!TextUtils.isEmpty(bloodFatData.value)) bloodFatData.value else "--"
mTimeXZ = milliseconds2String(bloodFatData.time)
}
}
healthMonitoringList.add( healthMonitoringList.add(
HealthMonitoringListBean( HealthMonitoringListBean(
"血脂", "血脂",
0, statusXZ,
"", mTimeXZ,
"敬请期待", contentXZ,
R.mipmap.bg_fat, R.mipmap.bg_xl,
R.mipmap.ic_fat, R.mipmap.ic_fat,
10, 10,
it.type, it.type,
calorie = bean.healthCount.toString() calorie = bloodFatData.count
) )
) )
} }

@ -81,7 +81,7 @@ class HomeVm: BaseVm() {
} }
fun getHomeLayout(){ fun getHomeLayout(){
startHttp { startHttp (false){
var body= apiInterface().getHomeLayout() var body= apiInterface().getHomeLayout()
body.getCodeStatus(layoutLive,nowData) body.getCodeStatus(layoutLive,nowData)
} }

@ -1,123 +0,0 @@
package com.zj365.dc.vm
import androidx.lifecycle.MutableLiveData
import com.tamsiree.rxkit.RxTool
import com.xty.base.vm.BaseVm
import com.xty.common.Const
import com.xty.common.MMkvHelper
import com.xty.common.util.CommonToastUtils
import com.xty.network.model.ImageUploadBean
import com.xty.network.model.MainBean
import com.xty.network.model.NotAccepted
import com.xty.network.model.RespBody
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.withContext
import okhttp3.Headers
import okhttp3.MultipartBody
import org.json.JSONObject
import java.io.File
class InfoSimpleVm : BaseVm() {
val setBasic by lazy { MutableLiveData<RespBody<NotAccepted>>() }
val mLogin by lazy { MutableLiveData<RespBody<MainBean.User>>() }
val getImUserSig by lazy { MutableLiveData<RespBody<String>>() }
fun login(account: String, pwd: String) {
startHttp {
val json = JSONObject()
json.put("phone", account)
json.put("userPwd", RxTool.Md5(pwd))
//json.put("userPwd", pwd)
val login = apiInterface().login(retrofits.getRequestBody(json.toString()))
if (login.body()?.code == 500) {
login.body()?.msg?.let { CommonToastUtils.showToast(it) }
return@startHttp
}
saveToken(login.raw().headers)
val bodys = login.body() as RespBody
MMkvHelper.put(Const.USER_ID, bodys.data.id)
bodys.getCodeStatus(mLogin, nowData, loading)
}
}
private fun saveToken(headers: Headers) {
val headerIterator = headers.iterator()
while (headerIterator.hasNext()) {
val next = headerIterator.next()
if (Const.Auth_Token == next.first) MMkvHelper.put(Const.Auth_Token, next.second)
if (Const.Auth_Id == next.first) MMkvHelper.put(Const.Auth_Id, next.second)
}
}
fun getImUserSig(identifier: String) {
startHttp {
val imUserSig = apiInterface().getImUserSig(identifier)
imUserSig.body()?.getCodeStatus(getImUserSig, nowData, paramsData = identifier)
}
}
fun submit(path: String, name: String?, sex: String, birthDaytype: String, birthDay: String) {
startHttp {
withContext(Dispatchers.IO) {
var fileId = ""
if (path.isNullOrEmpty()) {
} else {
val image = async { uploadImage(path) }
val await = image.await()
fileId = await.fileId
}
val upload = async { uploadInfo(name, sex, fileId, birthDaytype, birthDay) }
val await = upload.await() //个人信息上传
if (await.code != 0) {
CommonToastUtils.showToast(await.msg)
}
}
}
}
private suspend fun uploadInfo(
name: String?,
sex: String,
fileId: String = "",
birthdayType: String,
birthDay: String
): RespBody<NotAccepted> {
val json = JSONObject()
json.put("name", name)
json.put("sex", sex)
if (sex == "1") {
json.put("height", "170")
json.put("weight", "65")
} else {
json.put("height", "160")
json.put("weight", "49")
}
json.put("birthday", birthDay)
json.put("birthdayType", birthdayType)
if (!fileId.isNullOrEmpty()) {
json.put("avatarUrl", fileId)
}
val rb = retrofits.getRequestBody(json.toString())
val body = apiInterface().setUpdateUser(rb)
body.getCodeStatus(setBasic, nowData)
return body
}
private suspend fun uploadImage(path: String): ImageUploadBean {
val f = File(path)
val fileRb = MultipartBody.Part.createFormData(
"file",
f.name,
retrofits.getMultiPartFileRb(f)
)
val body = apiInterface().uploadImage(fileRb)
return body.data
}
}

@ -6,6 +6,7 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.xty.base.vm.BaseVm import com.xty.base.vm.BaseVm
import com.xty.common.Const import com.xty.common.Const
import com.xty.common.LogUtils
import com.xty.common.MMkvHelper import com.xty.common.MMkvHelper
import com.xty.common.util.CommonUtils import com.xty.common.util.CommonUtils
import com.xty.network.model.BannerBean import com.xty.network.model.BannerBean
@ -16,6 +17,7 @@ import com.xty.network.model.SettingBean
import com.xty.network.model.UnReadMessageBean import com.xty.network.model.UnReadMessageBean
import com.xty.network.model.Update import com.xty.network.model.Update
import com.xty.network.model.UserEquipmentInformationizationBean import com.xty.network.model.UserEquipmentInformationizationBean
import com.xty.network.utils.AppUtils
import com.zj365.dc.BuildConfig import com.zj365.dc.BuildConfig
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async import kotlinx.coroutines.async
@ -67,9 +69,9 @@ class MainVm : BaseVm() {
response.getCodeStatus(saveSuccess, nowData) response.getCodeStatus(saveSuccess, nowData)
} }
} }
fun getVersionNew() { fun getVersionNew(versionCode:Int) {
startHttp { startHttp {
var response = apiInterface().getVersionNew(BuildConfig.VERSION_CODE) var response = apiInterface().getVersionNew(versionCode)
response.getCodeStatus(updateLive, nowData) response.getCodeStatus(updateLive, nowData)
} }
} }
@ -154,14 +156,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){ fun confirmInvite(id:String, status:String){
startHttp(false) { startHttp(false) {
var json = JSONObject() var json = JSONObject()
@ -192,7 +186,9 @@ class MainVm : BaseVm() {
* 个人设置接口 * 个人设置接口
*/ */
fun getMySetting() { fun getMySetting() {
startHttp { startHttp(false) {
LogUtils.e("eeeeee","主界面请求个人中心数据啦")
val body = apiInterface().getMySetting() val body = apiInterface().getMySetting()
body.getCodeStatus(settingLive, nowData) body.getCodeStatus(settingLive, nowData)
} }

@ -11,7 +11,7 @@ class MessageVm(): BaseVm() {
val msgAllRead by lazy { MutableLiveData<RespBody<Any>>() } val msgAllRead by lazy { MutableLiveData<RespBody<Any>>() }
fun getSystemMsg(){ fun getSystemMsg(){
startHttp { startHttp(false) {
var response = apiInterface().getSystemMsg() var response = apiInterface().getSystemMsg()
response.getCodeStatus(msgData, nowData) response.getCodeStatus(msgData, nowData)
} }

@ -0,0 +1,92 @@
package com.zj365.dc.vm
import androidx.lifecycle.MutableLiveData
import com.alibaba.fastjson.JSONObject
import com.xty.base.vm.BaseVm
import com.xty.network.model.ChooseAddressBean
import com.xty.network.model.ComputeAmountBean
import com.xty.network.model.GoodsRecordsBean
import com.xty.network.model.RespBody
import com.xty.network.model.ShopCategoryBean
import com.xty.network.model.ShopGoodsOrderBean
class ShopMallVm : BaseVm() {
val categoryLiveDate by lazy { MutableLiveData<RespBody<MutableList<ShopCategoryBean>>>() }
val goodsLiveData by lazy { MutableLiveData<RespBody<GoodsRecordsBean>>() }
val createOrderLiveData by lazy { MutableLiveData<RespBody<ShopGoodsOrderBean>>() }
val defaultAddressLiveData by lazy { MutableLiveData<RespBody<ChooseAddressBean>>() }
val hasCouponLiveData by lazy { MutableLiveData<RespBody<Int>> ()}
val computeAmountLiveData by lazy { MutableLiveData<RespBody<ComputeAmountBean>>() }
fun getGoodsCategory(parentId:Long){
startHttp {
var code = apiInterface().getGoodsCategory(parentId)
code.getCodeStatus(categoryLiveDate, nowData)
}
}
fun getGoodsList(prodName:String?,categoryId:Long,isRec:Int,pageSize:Int){
startHttp {
var json = JSONObject()
prodName?.let {
json.put("prodName",it)
}
json.put("categoryId",categoryId)
json.put("isRec",isRec)
json.put("pageSize",10)
json.put("pageNum",pageSize)
var code = apiInterface().getGoodsList(retrofits.getRequestBody(json.toString()))
code.getCodeStatus(goodsLiveData, nowData)
}
}
fun createOrder(skuId:String,num:Int,addrId:Long?,couponsId:Long?){
startHttp {
var json = JSONObject()
json.put("skuId",skuId)
json.put("num",num)
addrId?.let {
json.put("addrId",it)
}
couponsId?.let {
json.put("couponsId",it)
}
var code = apiInterface().createOrder(retrofits.getRequestBody(json.toString()))
code.getCodeStatus(createOrderLiveData, nowData)
}
}
fun getDefaultAddress(){
startHttp(false) {
var code = apiInterface().getDefaultAddress()
code.getCodeStatus(defaultAddressLiveData, nowData)
}
}
fun hasCoupon(){
startHttp(false) {
var code = apiInterface().hasCoupons()
code.getCodeStatus(hasCouponLiveData, nowData)
}
}
fun computeAmount(skuId:Long,num:Int,couponsId:Long?){
startHttp {
var json = JSONObject()
json.put("skuId",skuId)
json.put("num",num)
json.put("couponsId",couponsId)
var code = apiInterface().computeAmount(retrofits.getRequestBody(json.toString()))
code.getCodeStatus(computeAmountLiveData,nowData)
}
}
}

@ -41,6 +41,7 @@ class PrevDialog(context: Context, private var agree: () -> Unit, private var gi
val bundle = Bundle() val bundle = Bundle()
bundle.clear() bundle.clear()
bundle.putString("title", "用户协议") bundle.putString("title", "用户协议")
bundle.putBoolean("isAgree", false)
bundle.putString("url","https://dc.zhongjian365.com/agreement.html") bundle.putString("url","https://dc.zhongjian365.com/agreement.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle) RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
} }
@ -56,6 +57,8 @@ class PrevDialog(context: Context, private var agree: () -> Unit, private var gi
override fun onClick(widget: View) { override fun onClick(widget: View) {
val bundle = Bundle() val bundle = Bundle()
bundle.putString("title", "隐私政策") bundle.putString("title", "隐私政策")
bundle.putBoolean("isAgree", false)
bundle.putString("url", "https://dc.zhongjian365.com/privacy.html") bundle.putString("url", "https://dc.zhongjian365.com/privacy.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle) RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
} }
@ -71,8 +74,10 @@ class PrevDialog(context: Context, private var agree: () -> Unit, private var gi
span.setSpan(object : ClickableSpan() { span.setSpan(object : ClickableSpan() {
override fun onClick(widget: View) { override fun onClick(widget: View) {
val bundle = Bundle() val bundle = Bundle()
bundle.putString("title", "中健三六五健康 APP 权限列表") /* bundle.putString("title", "中健三六五健康 APP 权限列表")
bundle.putString("url", "https://dc.zhongjian365.com/permission.html") bundle.putString("url", "https://dc.zhongjian365.com/permission.html")*/
bundle.putString("title", "用户协议")
bundle.putString("url","https://dc.zhongjian365.com/agreement.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle) RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
} }
@ -88,23 +93,8 @@ class PrevDialog(context: Context, private var agree: () -> Unit, private var gi
override fun onClick(widget: View) { override fun onClick(widget: View) {
val bundle = Bundle() val bundle = Bundle()
bundle.clear() bundle.clear()
bundle.putString("title", "用户协议")
bundle.putString("url","https://dc.zhongjian365.com/agreement.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
}
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color = txtCol
ds.isUnderlineText = false
}
}, 79, 85, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
/*span.setSpan(object : ClickableSpan() {
override fun onClick(widget: View) {
val bundle = Bundle()
bundle.putString("title", "隐私政策") bundle.putString("title", "隐私政策")
bundle.putString("url", "https://auprty.com/app/static/app/privacy.html") bundle.putString("url", "https://dc.zhongjian365.com/privacy.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle) RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
} }
@ -112,26 +102,9 @@ class PrevDialog(context: Context, private var agree: () -> Unit, private var gi
super.updateDrawState(ds) super.updateDrawState(ds)
ds.color = txtCol ds.color = txtCol
ds.isUnderlineText = false ds.isUnderlineText = false
ds.clearShadowLayer()
}
}, 92, 98, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
span.setSpan(object : ClickableSpan() {
override fun onClick(widget: View) {
val bundle = Bundle()
bundle.putString("title", "中健三六五健康 APP 权限列表")
bundle.putString("url", "https://auprty.com/app/static/app/permission.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
} }
override fun updateDrawState(ds: TextPaint) { }, 79, 85, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
super.updateDrawState(ds)
ds.color = txtCol
ds.isUnderlineText = false
ds.clearShadowLayer()
}
}, 99, 114, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)*/
binding.mContent.text = span binding.mContent.text = span
binding.mContent.highlightColor = Color.TRANSPARENT binding.mContent.highlightColor = Color.TRANSPARENT

@ -0,0 +1,252 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/col_6f7">
<include layout="@layout/title_white_bar"
android:id="@+id/title"/>
<RelativeLayout
android:id="@+id/rx_address"
android:layout_below="@+id/title"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_62"
android:background="@drawable/shape_round_white"
android:layout_marginLeft="@dimen/dp_14"
android:layout_marginRight="@dimen/dp_14"
android:layout_marginTop="@dimen/dp_14"
>
<TextView
android:id="@+id/tv_address_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收货地址"
android:textColor="@color/col_313"
android:textStyle="bold"
android:textSize="@dimen/sp_15"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_16"
/>
<TextView
android:id="@+id/tv_choose_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="请选择收货地址"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_16"
android:drawableRight="@mipmap/icon_arrow_right"
android:drawablePadding="@dimen/dp_5"
android:gravity="right"
android:maxLines="1"
android:ellipsize="end"
android:textColorHint="@color/col_6B6"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15"
android:layout_toRightOf="@+id/tv_address_desc"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rx_goods"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_135"
android:layout_below="@+id/rx_address"
android:layout_marginLeft="@dimen/dp_14"
android:layout_marginRight="@dimen/dp_14"
android:layout_marginTop="@dimen/dp_14"
android:background="@drawable/shape_round_white"
>
<com.ruffian.library.widget.RImageView
android:id="@+id/img_goods"
android:layout_width="@dimen/dp_96"
android:layout_height="@dimen/dp_96"
app:is_circle="false"
app:corner_radius="5dp"
android:scaleType="fitXY"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_16"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_96"
android:layout_toRightOf="@+id/img_goods"
android:layout_marginLeft="@dimen/dp_14"
android:layout_marginRight="@dimen/dp_12"
android:layout_centerVertical="true">
<TextView
android:id="@+id/tv_goods_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_15"
android:textColor="@color/col_313"
tools:text="健康智能手表血糖血脂尿酸风险评估长时间续健康智能手表血糖血脂尿酸风险评估长时间续航航"
android:maxLines="2"
android:ellipsize="end"/>
<TextView
android:id="@+id/tv_spec"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_15"
android:textColor="@color/col_c7c"
android:layout_below="@+id/tv_goods_name"
android:layout_above="@+id/tv_price"
android:gravity="center"
tools:text="白色 "
/>
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_13"
android:layout_alignParentBottom="true"
tools:text="商品原价¥2860.00"
/>
<TextView
android:id="@+id/tv_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:textColor="@color/col_c7c"
android:textSize="@dimen/sp_13"
tools:text="数量1"
android:gravity="right"
android:layout_toRightOf="@+id/tv_price"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_below="@+id/rx_goods"
android:layout_marginLeft="@dimen/dp_14"
android:layout_marginRight="@dimen/dp_14"
android:layout_marginTop="@dimen/dp_14"
android:paddingTop="@dimen/dp_22"
android:paddingLeft="@dimen/dp_15"
android:paddingRight="@dimen/dp_16"
android:background="@drawable/shape_round_white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/shape_head_tip_new"
android:drawablePadding="@dimen/dp_10"
android:text="价格明细"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_17"
android:textStyle="bold"
/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_26">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="平台优惠"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15"
android:textStyle="bold"/>
<TextView
android:id="@+id/tv_platform_discounts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:textSize="@dimen/sp_15"
android:textColor="@color/col_313"
tools:text="¥100"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_26"
android:layout_marginBottom="@dimen/dp_25">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="优惠券"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15"
android:textStyle="bold"/>
<TextView
android:id="@+id/tv_discounts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:textSize="@dimen/sp_15"
android:textColor="@color/col_313"
android:drawableRight="@mipmap/icon_arrow_right"
android:drawablePadding="@dimen/dp_5"
android:text="暂无优惠券"/>
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_60"
android:background="@color/white"
android:layout_alignParentBottom="true">
<TextView
android:id="@+id/tv_price_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="订单总额:"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_16"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_C7C"/>
<TextView
android:id="@+id/tv_total_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/sp_18"
android:textColor="@color/col_2621"
android:textStyle="bold"
android:layout_toRightOf="@+id/tv_price_desc"
android:layout_centerVertical="true"
tools:text="¥2760.00"
/>
<TextView
android:id="@+id/tv_pay"
android:layout_width="@dimen/dp_110"
android:layout_height="@dimen/dp_38"
android:background="@drawable/shape_r25_02c"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_16"
android:text="立即支付"
android:textColor="@color/white"
android:textSize="@dimen/sp_17"
android:textStyle="bold"
android:gravity="center"/>
</RelativeLayout>
</RelativeLayout>

@ -1,291 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
android:id="@+id/title"
layout="@layout/title_white_bar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:background="@color/white"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/col_f1f" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/dp_6"
android:paddingRight="@dimen/dp_10"
android:paddingBottom="@dimen/dp_6">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:drawablePadding="@dimen/dp_10"
android:ellipsize="end"
android:paddingLeft="@dimen/dp_12"
android:paddingTop="@dimen/dp_12"
android:paddingBottom="@dimen/dp_12"
android:singleLine="true"
android:text="@string/head_portrait"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_14" />
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/mImage"
android:layout_width="@dimen/dp_46"
android:layout_height="@dimen/dp_46"
android:layout_marginRight="@dimen/dp_12"
android:layout_toLeftOf="@+id/right_im"
android:src="@mipmap/ic_default_man" />
<ImageView
android:id="@+id/right_im"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_3"
android:src="@mipmap/arrow_right"/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/col_f1f" />
<RelativeLayout
android:id="@+id/mRelName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="@dimen/dp_10">
<TextView
android:id="@+id/m1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:drawablePadding="@dimen/dp_10"
android:ellipsize="end"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_15"
android:singleLine="true"
android:text="@string/name"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_14" />
<EditText
android:id="@+id/mName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/m1"
android:background="@null"
android:gravity="center|right"
android:paddingTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_15"
android:singleLine="true"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_16"
tools:text="旅行者2号" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/col_f1f" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingRight="@dimen/dp_10">
<com.xty.common.weight.RequiredTextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_weight="2"
android:drawablePadding="@dimen/dp_10"
android:ellipsize="end"
android:paddingLeft="@dimen/dp_10"
android:paddingTop="@dimen/dp_14"
android:paddingBottom="@dimen/dp_14"
android:singleLine="true"
android:text="@string/sex"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_14" />
<CheckBox
android:id="@+id/check_sex"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:background="@drawable/selector_check_sex_new"
android:button="@null"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/col_f1f" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="@dimen/dp_12"
android:orientation="horizontal">
<com.xty.common.weight.RequiredTextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:background="@null"
android:paddingLeft="@dimen/dp_10"
android:text="@string/birthday_type"
android:textColor="@color/col_455"
android:paddingTop="@dimen/dp_14"
android:paddingBottom="@dimen/dp_14"
android:singleLine="true"
android:textSize="@dimen/dp_14" />
<CheckBox
android:id="@+id/check_birthday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:background="@drawable/selector_check_birthday"
android:button="@null"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/col_f1f" />
<LinearLayout
android:id="@+id/ll_birthday"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.xty.common.weight.RequiredTextView
android:id="@+id/mBirthday_date"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:paddingLeft="@dimen/dp_10"
android:text="@string/birthday"
android:paddingTop="@dimen/dp_14"
android:textColor="@color/col_455"
android:paddingBottom="@dimen/dp_14"
android:singleLine="true"
android:textSize="@dimen/dp_14" />
<TextView
android:id="@+id/mBirthday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:drawablePadding="@dimen/dp_8"
android:layout_marginRight="@dimen/dp_12"
android:textSize="@dimen/dp_16"
android:hint=" 请选择生日 "
tools:text="2023-02-03"
android:textColorHint="@color/col_7b8"
android:textColor="@color/col_313"
android:drawableRight="@mipmap/arrow_right"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/col_f1f" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_12"
android:layout_marginEnd="@dimen/dp_12"
android:textColor="@color/col_c7c"
android:textSize="@dimen/sp_13"
android:layout_marginBottom="@dimen/dp_50"
android:layout_marginTop="@dimen/dp_10"
android:text="请完善以上基本信息,以便于更好的为您提供健管的服务"/>
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_marginBottom="@dimen/dp_30"
android:gravity="bottom"
android:layout_weight="1"
android:layout_gravity="bottom"
android:layout_height="wrap_content">
<TextView
android:id="@+id/bindingTv"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:paddingTop="@dimen/dp_8"
android:gravity="center"
android:layout_marginLeft="@dimen/dp_20"
android:paddingBottom="@dimen/dp_8"
android:paddingRight="@dimen/dp_20"
android:paddingLeft="@dimen/dp_20"
android:background="@drawable/shape_btn_select_bg_white"
android:textColor="@color/col_02c"
android:textSize="@dimen/dp_16"
android:text="去绑定手表"/>
<TextView
android:id="@+id/mSubmit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="@dimen/dp_8"
android:paddingBottom="@dimen/dp_8"
android:layout_marginLeft="@dimen/dp_20"
android:autoSizeMaxTextSize="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
android:background="@drawable/shape_btn_select_bg"
android:gravity="center"
android:padding="@dimen/dp_10"
android:text="完成"
android:textColor="@color/white"
android:textSize="@dimen/dp_16" />
</LinearLayout>
</LinearLayout>

@ -149,20 +149,32 @@
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="@dimen/dp_57" android:layout_marginTop="@dimen/dp_57"
android:textSize="@dimen/sp_18" /> android:textSize="@dimen/sp_18" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/seleck"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:background="@drawable/selctor_check_sel"
android:padding="@dimen/dp_10" />
<TextView <TextView
android:id="@+id/mPrivate" android:id="@+id/mPrivate"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentStart="true" android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_17" android:layout_marginLeft="@dimen/dp_8"
android:drawableLeft="@drawable/selctor_check_sel"
android:drawablePadding="@dimen/dp_6"
android:gravity="center" android:gravity="center"
android:textSize="@dimen/sp_13"
android:text="隐私条款" android:text="隐私条款"
android:textColor="@color/col_7c7" android:textColor="@color/col_c7c" />
android:textSize="@dimen/sp_12"
tools:ignore="UseCompatTextViewDrawableXml" /> </LinearLayout>
<TextView <TextView

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<include layout="@layout/title_white_bar"
android:id ="@+id/title"/>
<com.ruffian.library.widget.RRelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_36"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginRight="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_12"
app:corner_radius="@dimen/dp_18"
android:focusable="true"
android:focusableInTouchMode="true"
android:background="@color/white"
app:background_normal="@color/col_2F2">
<ImageView
android:id="@+id/img_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_search"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_21"/>
<EditText
android:id="@+id/et_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入商品名称"
android:layout_toRightOf="@+id/img_search"
android:layout_centerVertical="true"
android:textColor="@color/col_313"
android:background="@null"
android:textColorHint="@color/col_7c7"
android:imeOptions="actionSearch"
android:singleLine="true"
android:inputType="text"
android:textSize="@dimen/sp_13"
android:layout_marginLeft="@dimen/dp_7"/>
</com.ruffian.library.widget.RRelativeLayout>
<androidx.recyclerview.widget.RecyclerView
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_19"
android:id="@+id/category_recyclerView"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingTop="@dimen/dp_12"
android:background="@color/col_6f7">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/child_recyclerView"
android:layout_width="@dimen/dp_88"
android:layout_height="match_parent"
android:background="@color/white"/>
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/mRefresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:layout_marginLeft="@dimen/dp_9"
android:layout_marginRight="@dimen/dp_13"
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.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/recyclerView"/>
<com.scwang.smart.refresh.footer.ClassicsFooter
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
</LinearLayout>

@ -3,4 +3,4 @@
android:id="@+id/image" android:id="@+id/image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="fitXY"/> android:scaleType="centerCrop"/>

@ -19,159 +19,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:id="@+id/home_content_rv"/> android:id="@+id/home_content_rv"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_ai_tongue_diagnosis"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:background="@mipmap/bg_home_item"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_34"
android:background="@mipmap/icon_ai_tongue_diagnosis"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AI舌诊"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_10"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_ai_skin_measurement"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:background="@mipmap/bg_home_item"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_34"
android:background="@mipmap/icon__ai_skin_measurement"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AI测肤"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_10"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_ai_confectioner"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:background="@mipmap/bg_home_item"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_34"
android:background="@mipmap/icon_ai_confectioner"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AI糖医"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_10"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_mental_test"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:background="@mipmap/bg_home_item"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_34"
android:background="@mipmap/icon_mental_test"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="心理测试"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_10"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_cancer_screening"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:background="@mipmap/bg_home_item"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_34"
android:background="@mipmap/icon_cancer_screening"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="防癌筛查"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_10"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_diet_management"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:background="@mipmap/bg_home_item"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_34"
android:background="@mipmap/icon_diet_management"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="膳食管理"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_10"/>
</LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>

@ -1,836 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/dp_14"
android:paddingRight="@dimen/dp_14">
<!-- 健康管理 -->
<LinearLayout
android:id="@+id/llmanage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_white_8radius"
android:orientation="vertical"
android:paddingTop="@dimen/dp_23"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/mTvManage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/shape_head_tip_new"
android:drawablePadding="@dimen/dp_10"
android:paddingLeft="@dimen/dp_16"
android:paddingRight="@dimen/dp_16"
android:text="@string/health_manage"
android:textColor="#313131"
android:textSize="@dimen/sp_17"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_10"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_15"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/llmanage">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_health_manage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_5"
android:layout_marginEnd="@dimen/dp_5"/>
<com.zj365.dc.weight.HIndicator
android:id="@+id/hi_indicator"
android:layout_width="@dimen/dp_26"
android:layout_height="@dimen/dp_4"
android:layout_marginTop="@dimen/dp_10"
android:visibility="gone"
app:hi_bgColor="@color/col_298D0"
app:hi_indicatorColor="@color/col_8D0" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/llguide"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_white_8radius"
android:orientation="vertical"
android:paddingTop="@dimen/dp_23"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<!-- 健康指导 -->
<TextView
android:id="@+id/mTvGuid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/shape_head_tip_new"
android:drawablePadding="@dimen/dp_10"
android:paddingLeft="@dimen/dp_16"
android:paddingRight="@dimen/dp_16"
android:text="@string/health_guid"
android:textColor="#313131"
android:textSize="@dimen/sp_17"
android:textStyle="bold" />
<androidx.cardview.widget.CardView
android:id="@+id/mGuidCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_5"
app:cardCornerRadius="@dimen/dp_5"
app:cardElevation="@dimen/dp_0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mTvGuid">
<LinearLayout
android:id="@+id/mRecycle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/dp_10"
app:layout_constraintTop_toBottomOf="@+id/mTvGuid">
<androidx.cardview.widget.CardView
android:id="@+id/mGuide_4"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="@dimen/dp_0">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@mipmap/ic_shangchuan" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:gravity="center"
android:paddingTop="@dimen/dp_10"
android:text="数据管理"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_14"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/mGuide2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_weight="1"
app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="@dimen/dp_0">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@mipmap/ic_my_guanjia" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:gravity="center"
android:paddingTop="@dimen/dp_10"
android:text="我的管家"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_14"
android:textStyle="bold" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/mGuide_1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginRight="@dimen/dp_10"
android:layout_weight="1"
app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="@dimen/dp_0">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@mipmap/ic_my_fangan" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:gravity="center"
android:paddingTop="@dimen/dp_10"
android:text="我的方案"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_14"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/mReport"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="@dimen/dp_0">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@mipmap/ic_my_report" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_10"
android:gravity="center"
android:paddingTop="@dimen/dp_10"
android:text="我的报告"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_14"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:id="@+id/llWarning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12"
android:background="@drawable/shape_white_8radius"
android:orientation="vertical"
android:paddingTop="@dimen/dp_23"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/llguide">
<!-- 健康预警 -->
<!-- 健康指导 -->
<TextView
android:id="@+id/mTvEarly"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/shape_head_tip_new"
android:drawablePadding="@dimen/dp_10"
android:paddingLeft="@dimen/dp_16"
android:paddingRight="@dimen/dp_16"
android:text="@string/health_early"
android:textColor="#313131"
android:textSize="@dimen/sp_17"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.cardview.widget.CardView
android:id="@+id/mEarlyCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginBottom="@dimen/dp_5"
app:cardCornerRadius="@dimen/dp_5"
app:cardElevation="@dimen/dp_0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mTvEarly">
<LinearLayout
android:id="@+id/mLinEary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_14"
android:gravity="center_vertical"
android:orientation="vertical"
android:paddingBottom="@dimen/dp_15">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/ivWarn3"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="6dp"
android:scaleType="centerCrop"
android:src="@mipmap/ic_fangai"
android:visibility="visible"
app:layout_constraintDimensionRatio="152:65"
app:layout_constraintEnd_toStartOf="@id/ivWarn2"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/ivWarn2"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="6dp"
android:layout_marginEnd="16dp"
android:scaleType="centerCrop"
android:src="@mipmap/ic_fengxainyujing"
app:layout_constraintDimensionRatio="152:65"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@id/ivWarn3"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp">
<ImageView
android:id="@+id/ivWarn1"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="6dp"
android:scaleType="centerCrop"
android:src="@mipmap/ic_30yujing"
app:layout_constraintDimensionRatio="152:65"
app:layout_constraintEnd_toStartOf="@id/ivTongueDiagnosis"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/ivTongueDiagnosis"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="6dp"
android:layout_marginEnd="16dp"
android:scaleType="centerCrop"
android:src="@mipmap/img_tongue_diagnosis"
app:layout_constraintDimensionRatio="152:65"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@id/ivWarn1"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:id="@+id/llIot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12"
android:paddingBottom="@dimen/dp_10"
android:background="@drawable/shape_white_8radius"
android:orientation="vertical"
android:paddingTop="@dimen/dp_23"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/llmanage">
<TextView
android:id="@+id/mTvThingNet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/shape_head_tip_new"
android:drawablePadding="@dimen/dp_10"
android:paddingLeft="@dimen/dp_16"
android:paddingRight="@dimen/dp_16"
android:text="@string/health_thing_net"
android:textColor="#313131"
android:textSize="@dimen/sp_17"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="UseCompatTextViewDrawableXml" />
<androidx.cardview.widget.CardView
android:id="@+id/mThingNetCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_8"
app:cardCornerRadius="@dimen/dp_5"
app:cardElevation="@dimen/dp_0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mTvThingNet">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/mLinThingNet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:paddingTop="@dimen/dp_21"
android:paddingBottom="@dimen/dp_22">
<LinearLayout
android:id="@+id/llWatch"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_34"
android:layout_marginRight="@dimen/dp_6"
android:src="@mipmap/ic_watch_small" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_2"
android:text="手表"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
android:textStyle="bold" />
<TextView
android:id="@+id/tvWatchBind"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="未绑定手表"
android:textColor="@color/col_7c7"
android:textSize="@dimen/sp_11" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="@dimen/dp_1"
android:layout_height="@dimen/dp_36"
android:layout_gravity="center"
android:visibility="gone"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginStart="@dimen/dp_10"
android:background="@color/gray_eb"/>
<LinearLayout
android:id="@+id/llXueya"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_34"
android:layout_marginRight="@dimen/dp_6"
android:src="@mipmap/ic_xueya" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_2"
android:text="血压计"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
android:textStyle="bold" />
<TextView
android:id="@+id/tvXueyaNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已绑定0台"
android:textColor="@color/col_7c7"
android:textSize="@dimen/sp_11" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/llXuetang"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_34"
android:layout_marginRight="@dimen/dp_6"
android:src="@mipmap/ic_xuetang" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_2"
android:text="血糖仪"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
android:textStyle="bold" />
<TextView
android:id="@+id/tvXuetangNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已绑定0台"
android:textColor="@color/col_c7c"
android:textSize="@dimen/sp_11" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="@dimen/dp_1"
android:layout_height="@dimen/dp_36"
android:layout_gravity="center"
android:visibility="gone"
android:layout_marginEnd="@dimen/dp_10"
android:layout_marginStart="@dimen/dp_10"
android:background="@color/gray_eb"/>
<LinearLayout
android:id="@+id/llBodyFat"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/dp_34"
android:layout_height="@dimen/dp_34"
android:layout_marginRight="@dimen/dp_6"
android:src="@mipmap/ic_body_fat" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_2"
android:text="体脂秤"
android:textColor="@color/black"
android:textSize="@dimen/sp_14"
android:textStyle="bold" />
<TextView
android:id="@+id/tvBodyFatNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已绑定0台"
android:textColor="@color/col_c7c"
android:textSize="@dimen/sp_11" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:id="@+id/lleach"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12"
android:background="@drawable/shape_white_8radius"
android:orientation="vertical"
android:paddingTop="@dimen/dp_23"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/llIot">
<TextView
android:id="@+id/mInter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/shape_head_tip_new"
android:drawablePadding="@dimen/dp_10"
android:paddingLeft="@dimen/dp_16"
android:paddingRight="@dimen/dp_16"
android:text="@string/health_inter"
android:textColor="#313131"
android:textSize="@dimen/sp_17"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.cardview.widget.CardView
android:id="@+id/mRecyclemCardview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_5"
app:cardCornerRadius="@dimen/dp_5"
app:cardElevation="@dimen/dp_0"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mInter">
<LinearLayout
android:id="@+id/mRecyclemInter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_10"
android:orientation="vertical"
android:padding="@dimen/dp_10"
android:paddingTop="@dimen/dp_20">
<RelativeLayout
android:id="@+id/mRelInterBD"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/ic_bd"
android:layout_width="@dimen/dp_45"
android:layout_height="@dimen/dp_45"
android:layout_centerVertical="true"
android:src="@mipmap/icon_bd_new" />
<TextView
android:id="@+id/tv_bd_tittle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15"
android:layout_toRightOf="@+id/ic_bd"
android:text="@string/intera_2"
android:textColor="@color/col_3a4"
android:textSize="@dimen/dp_14"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_bd_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_bd_tittle"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_5"
android:layout_toRightOf="@+id/ic_bd"
android:textColor="@color/col_B8B"
android:textSize="@dimen/dp_10" />
<TextView
android:id="@+id/btn_bd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@drawable/shape_bind_bg_new_3"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_15"
android:paddingBottom="@dimen/dp_5"
android:text="查看"
android:textColor="@color/col_8D0"
android:textSize="@dimen/sp_12" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/mRelInterDk"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12">
<ImageView
android:id="@+id/ic_dk"
android:layout_width="@dimen/dp_45"
android:layout_height="@dimen/dp_45"
android:layout_centerVertical="true"
android:src="@mipmap/icon_dk_new" />
<TextView
android:id="@+id/tv_dk_tittle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15"
android:layout_toRightOf="@+id/ic_dk"
android:text="@string/intera_1"
android:textColor="@color/col_3a4"
android:textSize="@dimen/dp_14"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_dk_tittle"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_5"
android:layout_toRightOf="@+id/ic_dk"
android:text="养成生活好习惯"
android:textColor="@color/col_B8B"
android:textSize="@dimen/dp_10" />
<TextView
android:id="@+id/btn_dk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@drawable/shape_bind_bg_new_3"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_15"
android:paddingBottom="@dimen/dp_5"
android:text="打卡"
android:textColor="@color/col_8D0"
android:textSize="@dimen/dp_12" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/mRelInterFamily"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_12">
<ImageView
android:id="@+id/ic_family"
android:layout_width="@dimen/dp_45"
android:layout_height="@dimen/dp_45"
android:layout_centerVertical="true"
android:src="@mipmap/icon_family_new" />
<TextView
android:id="@+id/tv_family_tittle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_15"
android:layout_toRightOf="@+id/ic_family"
android:text="@string/intera_3"
android:textColor="@color/col_3a4"
android:textSize="@dimen/dp_14"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_family_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_family_tittle"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_5"
android:layout_toRightOf="@+id/ic_family"
android:textColor="@color/col_B8B"
android:textSize="@dimen/dp_10" />
<TextView
android:id="@+id/btn_family"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@drawable/shape_bind_bg_new_3"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_5"
android:paddingRight="@dimen/dp_15"
android:paddingBottom="@dimen/dp_5"
android:text="关注"
android:textColor="@color/col_8D0"
android:textSize="@dimen/dp_12" />
</RelativeLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -16,7 +16,7 @@
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="gone" /> android:visibility="gone" />
<FrameLayout <!--<FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:visibility="gone" android:visibility="gone"
android:layout_height="@dimen/dp_86"> android:layout_height="@dimen/dp_86">
@ -30,7 +30,7 @@
android:visibility="gone" android:visibility="gone"
android:orientation="horizontal"> android:orientation="horizontal">
<!-- 我的家人列表 --> &lt;!&ndash; 我的家人列表 &ndash;&gt;
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/mRecycle" android:id="@+id/mRecycle"
android:layout_width="0dp" android:layout_width="0dp"
@ -83,7 +83,7 @@
</LinearLayout> </LinearLayout>
</FrameLayout> </FrameLayout>-->
<!-- 下拉刷新控件 --> <!-- 下拉刷新控件 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout <com.scwang.smart.refresh.layout.SmartRefreshLayout

@ -75,7 +75,7 @@
android:paddingRight="@dimen/dp_8" android:paddingRight="@dimen/dp_8"
android:paddingBottom="@dimen/dp_2" android:paddingBottom="@dimen/dp_2"
tools:text="正常" tools:text="正常"
android:textColor="@color/col_D9BD" android:textColor="@color/col_91d"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintLeft_toRightOf="@+id/mBMI" app:layout_constraintLeft_toRightOf="@+id/mBMI"
@ -134,7 +134,7 @@
android:textColor="@color/col_313" android:textColor="@color/col_313"
android:layout_marginLeft="@dimen/dp_5" android:layout_marginLeft="@dimen/dp_5"
android:textStyle="bold" android:textStyle="bold"
android:text="农历 十月十九"/> tools:text="农历 十月十九"/>
<TextView <TextView
android:id="@+id/tv_weather" android:id="@+id/tv_weather"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -143,7 +143,7 @@
android:textColor="@color/col_313" android:textColor="@color/col_313"
android:layout_marginLeft="@dimen/dp_5" android:layout_marginLeft="@dimen/dp_5"
android:textStyle="bold" android:textStyle="bold"
android:text="晴 13℃"/> tools:text="晴 13℃"/>
</LinearLayout> </LinearLayout>
@ -260,17 +260,6 @@
app:layout_constraintTop_toTopOf="@+id/tvProfession" app:layout_constraintTop_toTopOf="@+id/tvProfession"
tools:ignore="HardcodedText,UseCompatTextViewDrawableXml" /> tools:ignore="HardcodedText,UseCompatTextViewDrawableXml" />
<!-- 吉祥物 -->
<ImageView
android:layout_width="@dimen/dp_90"
android:layout_height="@dimen/dp_106"
android:layout_marginEnd="@dimen/dp_1"
android:layout_marginBottom="@dimen/dp_3"
android:src="@mipmap/ic_mascot"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<!-- 评估状态 --> <!-- 评估状态 -->
<ImageView <ImageView
android:id="@+id/mHealthStatus" android:id="@+id/mHealthStatus"

@ -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 <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -71,7 +56,7 @@
<com.youth.banner.Banner <com.youth.banner.Banner
android:id="@+id/mBanner" android:id="@+id/mBanner"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_90" android:layout_height="@dimen/dp_100"
android:background="@drawable/shape_banner_bg" android:background="@drawable/shape_banner_bg"
app:banner_indicator_normal_color="@color/col_298D0" app:banner_indicator_normal_color="@color/col_298D0"
app:banner_indicator_selected_color="@color/col_8D0" app:banner_indicator_selected_color="@color/col_8D0"
@ -104,7 +89,7 @@
<com.youth.banner.Banner <com.youth.banner.Banner
android:id="@+id/mBannerTwo" android:id="@+id/mBannerTwo"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_90" android:layout_height="@dimen/dp_100"
android:background="@drawable/shape_banner_bg" android:background="@drawable/shape_banner_bg"
app:banner_indicator_normal_color="@color/col_298D0" app:banner_indicator_normal_color="@color/col_298D0"
app:banner_indicator_selected_color="@color/col_8D0" app:banner_indicator_selected_color="@color/col_8D0"
@ -168,5 +153,4 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout> </LinearLayout>

@ -92,81 +92,7 @@
android:id="@+id/rv_layout"/> android:id="@+id/rv_layout"/>
<LinearLayout
android:id="@+id/ll_video_interview"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_45"
android:layout_height="@dimen/dp_45"
android:background="@mipmap/icon__video_interview"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="视频问诊"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:textStyle="bold"
android:layout_marginTop="11dp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_health_records"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_45"
android:layout_height="@dimen/dp_45"
android:background="@mipmap/icon__health_records"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="健康档案"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:textStyle="bold"
android:layout_marginTop="11dp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_health_code"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
<ImageView
android:layout_width="@dimen/dp_45"
android:layout_height="@dimen/dp_45"
android:background="@mipmap/icon__health_code"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="健康医典"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:textStyle="bold"
android:layout_marginTop="11dp"/>
</LinearLayout>
</LinearLayout> </LinearLayout>

@ -1,327 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#F2F6F7"
android:orientation="vertical">
<LinearLayout
android:id="@+id/statusBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_health_bg_new"
android:orientation="horizontal"
android:visibility="gone" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_86">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/dp_12"
android:scaleType="fitXY"
android:src="@mipmap/ic_head_bg" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 我的家人列表 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/mRecycle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_17"
android:layout_marginBottom="@dimen/dp_3"
android:layout_weight="1" />
<RelativeLayout
android:id="@+id/mMsgLayout"
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:layout_marginRight="@dimen/dp_14"
android:layout_marginBottom="@dimen/dp_6"
android:visibility="gone">
<ImageView
android:id="@+id/mMsg"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@mipmap/ic_health_msg" />
<androidx.cardview.widget.CardView
android:id="@+id/mBadgeCard"
android:layout_width="@dimen/dp_13"
android:layout_height="@dimen/dp_13"
android:layout_alignParentEnd="true"
android:visibility="gone"
app:cardBackgroundColor="@color/col_f23"
app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="0dp">
<TextView
android:id="@+id/mBadge"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:textColor="@color/white"
android:textSize="@dimen/sp_10"
tools:text="12" />
</androidx.cardview.widget.CardView>
</RelativeLayout>
</LinearLayout>
</FrameLayout>
<!-- 下拉刷新控件 -->
<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/black"
app:srlAccentColor="@color/black"
app:srlPrimaryColor="@color/white" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/dp_72"
android:layout_marginStart="@dimen/dp_39"
android:scaleType="fitXY"
android:src="@mipmap/ic_status_bg" />
<include
android:id="@+id/mCom"
layout="@layout/frag_dynamic_management_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</FrameLayout>
<LinearLayout
android:id="@+id/ll_my_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_14"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_14"
android:orientation="horizontal"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mCom">
<androidx.cardview.widget.CardView
android:id="@+id/my_manager"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:cardCornerRadius="@dimen/dp_5"
app:cardElevation="@dimen/dp_0">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_13"
android:drawableStart="@mipmap/ic_my_manager"
android:drawablePadding="@dimen/dp_9"
android:gravity="center"
android:text="我的管家"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/my_health_da"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_14"
android:layout_weight="1"
app:cardCornerRadius="@dimen/dp_5"
app:cardElevation="@dimen/dp_0">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dp_13"
android:drawableStart="@mipmap/ic_my_da"
android:drawablePadding="@dimen/dp_9"
android:gravity="center"
android:text="健康档案"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15" />
</androidx.cardview.widget.CardView>
</LinearLayout>
<androidx.cardview.widget.CardView
android:id="@+id/mBannerCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_14"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_14"
app:cardCornerRadius="@dimen/dp_5"
app:cardElevation="@dimen/dp_0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ll_my_info">
<com.youth.banner.Banner
android:id="@+id/mBanner"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_90"
android:background="@drawable/shape_banner_bg"
app:banner_indicator_normal_color="@color/col_298D0"
app:banner_indicator_selected_color="@color/col_8D0"
app:banner_infinite_loop="true"
app:banner_loop_time="4000" />
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/cv_tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_14"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_14"
android:layout_marginBottom="@dimen/dp_12"
app:cardCornerRadius="@dimen/dp_5"
app:cardElevation="@dimen/dp_0"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mBannerCard">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_15">
<TextView
android:id="@+id/tv_risk_commit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="@dimen/dp_5"
android:gravity="center"
android:text="@string/early_2"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_12"
app:drawableTopCompat="@mipmap/ic_risk_evaluate" />
<TextView
android:id="@+id/tv_tongue_diagnosis"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="@dimen/dp_5"
android:gravity="center"
android:text="@string/tongue_diagnoise"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_12"
app:drawableTopCompat="@mipmap/ic_tongue_diagnosis" />
<TextView
android:id="@+id/tv_check_cancer"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableTop="@mipmap/ic_cancer_prevention"
android:drawablePadding="@dimen/dp_5"
android:gravity="center"
android:text="@string/cancer_prevention"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_12" />
<TextView
android:id="@+id/tv_health_risk"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawableTop="@mipmap/ic_health_risk"
android:drawablePadding="@dimen/dp_5"
android:gravity="center"
android:text="@string/health_risk"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_12" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<!-- 健康监测 -->
<include
android:id="@+id/mOrgan_view"
layout="@layout/child_organ_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginRight="@dimen/dp_10"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mBannerCard" />
<include
android:id="@+id/mChild_home_view"
layout="@layout/child_home_healt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/cv_tools" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:gravity="center_horizontal"
android:padding="@dimen/dp_15"
android:text="- 用科技守护健康 -"
android:textColor="@color/col_8D0"
android:textSize="@dimen/dp_15"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@+id/mChild_home_view" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>

@ -135,8 +135,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/dp_25" android:paddingTop="@dimen/dp_25"
android:orientation="horizontal" android:orientation="horizontal"
android:background="@color/white"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl_info"> app:layout_constraintTop_toBottomOf="@+id/cl_info">
@ -249,13 +247,42 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10" android:layout_marginTop="@dimen/dp_10"
android:text="我的订单" android:text="商城订单"
android:textColor="@color/col_7c7" android:textColor="@color/col_7c7"
android:textSize="@dimen/sp_12" android:textSize="@dimen/sp_12"
tools:ignore="HardcodedText,UseCompatTextViewDrawableXml" /> tools:ignore="HardcodedText,UseCompatTextViewDrawableXml" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/mllServerOrder"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
<TextView
android:id="@+id/mServerOrder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="0"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_20"
android:textStyle="bold"
tools:text="6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:text="服务订单"
android:textColor="@color/col_7c7"
android:textSize="@dimen/sp_12" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
@ -626,7 +653,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="权益工具" android:text="健康物联"
android:layout_marginLeft="@dimen/dp_10" android:layout_marginLeft="@dimen/dp_10"
android:textStyle="bold" android:textStyle="bold"
android:textColor="@color/col_313" android:textColor="@color/col_313"
@ -639,55 +666,57 @@
android:weightSum="4" android:weightSum="4"
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <LinearLayout
android:id="@+id/ll_start_bs" android:id="@+id/ll_daily_poster"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:visibility="gone"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@mipmap/icon_mine_start_bs" android:background="@mipmap/icon_daily_poster"
android:scaleType="centerCrop"/> android:scaleType="centerCrop"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="2999创业" android:text="今日海报"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12"
android:textColor="@color/col_7c7"/> android:textColor="@color/col_7c7"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_daily_poster" android:id="@+id/ll_wearable_device"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:visibility="gone"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@mipmap/icon_daily_poster" android:background="@mipmap/icon_wearable_device"
android:scaleType="centerCrop"/> android:scaleType="centerCrop"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="今日海报" android:text="穿戴手表"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12"
android:textColor="@color/col_7c7"/> android:textColor="@color/col_7c7"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_wearable_device" android:id="@+id/ll_magic_test"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
@ -697,36 +726,36 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@mipmap/icon_wearable_device" android:background="@mipmap/icon_magic_test"
android:scaleType="centerCrop"/> android:scaleType="centerCrop"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="穿戴设备" android:text="魔镜体测"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12"
android:textColor="@color/col_7c7"/> android:textColor="@color/col_7c7"/>
</LinearLayout> </LinearLayout>
<LinearLayout
<LinearLayout
android:id="@+id/ll_internet_thing"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:visibility="invisible"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@mipmap/icon_family_health" android:background="@mipmap/icon_health_internet_thing"
android:scaleType="centerCrop"/> android:scaleType="centerCrop"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="家人健康" android:text="健康物联"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12"
@ -734,6 +763,7 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
@ -772,6 +802,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_24" android:layout_marginTop="@dimen/dp_24"
android:weightSum="4"
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <LinearLayout
@ -820,8 +851,9 @@
android:layout_marginTop="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12"
android:textColor="@color/col_7c7"/> android:textColor="@color/col_7c7"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_about_us" android:id="@+id/ll_shipping_address"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
@ -831,18 +863,19 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@mipmap/icon_about_us" android:background="@mipmap/icon_shipping_address"
android:scaleType="centerCrop"/> android:scaleType="centerCrop"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="关于我们" android:text="收货地址"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12"
android:textColor="@color/col_7c7"/> android:textColor="@color/col_7c7"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_up_graded" android:id="@+id/ll_up_graded"
android:layout_width="0dp" android:layout_width="0dp"
@ -874,10 +907,13 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_24" android:layout_marginTop="@dimen/dp_24"
android:layout_marginBottom="@dimen/dp_22" android:layout_marginBottom="@dimen/dp_22"
android:weightSum="4"
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <LinearLayout
android:id="@+id/ll_shipping_address" android:id="@+id/ll_start_bs"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
@ -887,12 +923,12 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@mipmap/icon_shipping_address" android:background="@mipmap/icon_mine_start_bs"
android:scaleType="centerCrop"/> android:scaleType="centerCrop"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="收货地址" android:text="2999创业"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12"
@ -923,7 +959,7 @@
android:textColor="@color/col_7c7"/> android:textColor="@color/col_7c7"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_setting" android:id="@+id/ll_about_us"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
@ -933,12 +969,12 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@mipmap/icon_setting" android:background="@mipmap/icon_about_us"
android:scaleType="centerCrop"/> android:scaleType="centerCrop"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="设置" android:text="关于我们"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12"
@ -946,22 +982,22 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_setting"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:visibility="invisible"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@mipmap/icon_up_graded" android:background="@mipmap/icon_setting"
android:scaleType="centerCrop"/> android:scaleType="centerCrop"/>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="版本升级" android:text="设置"
android:textSize="@dimen/sp_14" android:textSize="@dimen/sp_14"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12"

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="MissingDefaultResource"
android:background="@color/white">
<com.ruffian.library.widget.RRelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_36"
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"
android:background="@color/white"
app:background_normal="@color/col_2F2">
<ImageView
android:id="@+id/img_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_search"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/dp_21"/>
<EditText
android:id="@+id/et_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入商品名称"
android:layout_toRightOf="@+id/img_search"
android:layout_centerVertical="true"
android:textColor="@color/col_313"
android:background="@null"
android:textColorHint="@color/col_7c7"
android:imeOptions="actionSearch"
android:singleLine="true"
android:inputType="text"
android:textSize="@dimen/sp_13"
android:layout_marginLeft="@dimen/dp_7"/>
</com.ruffian.library.widget.RRelativeLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
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" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<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: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>
</LinearLayout>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<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="wrap_content"
android:layout_height="@dimen/dp_39"
android:minWidth="@dimen/dp_88"
android:textSize="@dimen/sp_14"
android:textColor="@color/col_313"
android:maxLines="1"
android:ellipsize="end"
android:maxEms="5"
tools:text="女士女士女士女士女士女士"
android:gravity="center"
android:background="@color/white"
/>

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
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
android:id="@+id/img_goods"
android:layout_width="@dimen/dp_89"
android:layout_height="@dimen/dp_89"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginLeft="@dimen/dp_15"
android:scaleType="fitXY"
app:is_circle="false"
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="@+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_marginRight="@dimen/dp_12"
android:layout_marginLeft="@dimen/dp_7"
tools:text="中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航..."
android:maxLines="2"
android:ellipsize="end"/>
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toRightOf="@+id/img_goods"
app:layout_constraintBottom_toTopOf="@+id/tv_line_price"
android:textColor="@color/col_2621"
android:textSize="@dimen/sp_15"
android:layout_marginLeft="@dimen/dp_10"
tools:text="¥1999.00"/>
<TextView
android:id="@+id/tv_line_price"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintLeft_toRightOf="@+id/img_goods"
android:textColor="@color/col_c7c"
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>

@ -74,7 +74,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:textColor="@color/col_7c7" android:textColor="@color/col_7c7"
android:textSize="@dimen/sp_13" android:textSize="@dimen/sp_13"
android:maxLines="1" android:singleLine="true"
android:ellipsize="end" android:ellipsize="end"
tools:text="17已经预约成功17已经预约成功17已经预约成功17已经预约成功17已经预约成功17已经预约成功"/> tools:text="17已经预约成功17已经预约成功17已经预约成功17已经预约成功17已经预约成功17已经预约成功"/>

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_gravity="center"
android:id="@+id/root"
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.ruffian.library.widget.RImageView
android:id="@+id/img_category"
android:layout_width="@dimen/dp_47"
android:layout_height="@dimen/dp_47"
app:is_circle="true"
app:border_color="@color/white"
android:scaleType="centerCrop"
app:border_width="@dimen/dp_1"
/>
<TextView
android:id="@+id/tv_category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
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="低卡零食低卡零食"/>
</LinearLayout>

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_round_white"
android:paddingBottom="@dimen/dp_11"
tools:ignore="MissingDefaultResource">
<com.ruffian.library.widget.RImageView
android:id="@+id/img_goods"
android:layout_width="0dp"
android:layout_height="@dimen/dp_165"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:is_circle="false"
android:scaleType="fitXY"
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"/>
<TextView
android:id="@+id/tv_goods_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
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_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
tools:text="中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航..."
android:maxLines="2"
android:ellipsize="end"/>
<TextView
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_toLeftOf="parent"
android:textColor="@color/col_2621"
android:textSize="@dimen/sp_15"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
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:textColor="@color/col_c7c"
android:layout_marginTop="@dimen/dp_10"
android:textSize="@dimen/sp_15"
android:layout_marginLeft="@dimen/dp_7"
tools:text="¥1999.00"/>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,24 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mContentView" android:id="@+id/mContentView"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
app:cardBackgroundColor="@color/white" android:background="@color/white"
app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="@dimen/dp_0"
tools:ignore="MissingDefaultResource"> tools:ignore="MissingDefaultResource">
<LinearLayout <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_10"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_40" android:layout_height="@dimen/dp_40"
android:gravity="center_vertical" android:gravity="center_vertical"
@ -26,12 +16,13 @@
<TextView <TextView
android:id="@+id/mTitle" android:id="@+id/mTitle"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="@dimen/dp_10" android:drawablePadding="@dimen/dp_10"
android:textColor="@color/col_455" tools:text="eeeeeee"
android:textSize="@dimen/dp_16" /> android:layout_centerVertical="true"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15" />
<TextView <TextView
android:id="@+id/mTvTime" android:id="@+id/mTvTime"
@ -40,16 +31,11 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:paddingRight="@dimen/dp_10" android:paddingRight="@dimen/dp_10"
android:textColor="@color/col_919" android:textColor="@color/col_7c7"
android:textSize="@dimen/dp_14" /> tools:text="eeeeee"
android:textSize="@dimen/sp_13" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentTop="true"
android:background="@color/col_f1f" />
</RelativeLayout>
<TextView <TextView
android:id="@+id/mContent" android:id="@+id/mContent"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -58,10 +44,8 @@
android:ellipsize="end" android:ellipsize="end"
android:paddingLeft="@dimen/dp_10" android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10" android:paddingRight="@dimen/dp_10"
android:maxLines="2" android:maxLines="1"
android:textColor="@color/col_B8B" android:textColor="@color/col_7c7"
android:textSize="@dimen/dp_14" /> android:textSize="@dimen/sp_13" />
</LinearLayout> </LinearLayout>
</androidx.cardview.widget.CardView>

@ -7,11 +7,11 @@
android:icon="@drawable/sel_home" android:icon="@drawable/sel_home"
android:title="@string/home" android:title="@string/home"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
<!-- <item <item
android:id="@+id/nav_server" android:id="@+id/nav_server"
android:icon="@drawable/sel_server" android:icon="@drawable/sel_server"
android:title="@string/shopping" android:title="@string/shopping"
app:showAsAction="ifRoom" />--> app:showAsAction="ifRoom" />
<item <item
android:id="@+id/nav_dynamic_management" android:id="@+id/nav_dynamic_management"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save