Compare commits

...

81 Commits

Author SHA1 Message Date
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-二期开发-权限优化 1 year ago
wlh a95219ef17 中健365-线上注册隐私问题及颜色优化 1 year ago
wlh 877247f577 中建365-二期开发-优化 1 year ago
wlh be8c4a5e7e 中建365-二期开发-优化 1 year ago
wlh c8bc5dd436 中建365-二期开发-优化 1 year ago
wlh d3c1305b62 中建365-二期开发-优化 1 year ago
wlh e5adb8e3ae 中建365-二期开发-优化 1 year ago
wlh 643141ae08 中建365-二期开发-优化 1 year ago
wlh c1af609169 中建365-二期开发-优化 1 year ago
wlh 7902e124a6 中建365-二期开发-优化 1 year ago
wlh abd6048cae 中建365-二期开发-优化 1 year ago
wlh 29d5da918a 中建365-二期开发-优化 1 year ago
wlh 6204cdd05e 中建365-二期开发-bug修复 1 year ago
wlh 74a931980f 中建365-二期开发-bug修复 1 year ago
wlh 84da7605ae 中建365-二期开发-bug修复 1 year ago
wlh ad130c609f 中建365-二期开发-优化相关页面 1 year ago
wlh 380b9694cc 中建365-二期开发-优化相关页面 1 year ago
wlh 886d9fcf30 中建365-二期开发-优化相关页面 1 year ago
wlh 8cf6d94e41 中健365-注册隐私问题 1 year ago
wlh 9fa56534b6 中建365-二期开发-优化相关页面 1 year ago
wlh 423c32ae16 中建365-二期开发-优化相关页面 1 year ago
wlh d187dadab9 中建365-二期开发-优化相关页面 1 year ago
wlh bd3718c210 中健365-线上优化 1 year ago
wlh 92f3f6f0f0 Merge branch 'develop' into dev_second 1 year ago
wlh dbd348d099 中建365-二期开发-商城开发/电子围栏 1 year ago
wlh 826839b5ac 中健365-线上优化 1 year ago
wlh 52075ffabc 中建365-二期开发-商城开发/电子围栏 1 year ago
wlh eda1955a7e 中建365-二期开发-商城开发/AI糖医/血脂 1 year ago
wlh 1faf1b65e5 中建365-二期开发-商城开发 1 year ago
wlh 35996556a9 中建365-二期开发-商城开发 1 year ago
wlh c31e4d3f7b 中建365-二期开发-合并代码 1 year ago
wlh ca2dfddaa7 中建365-二期开发-健康医典/电子围栏 1 year ago
wlh 484b73d1b6 中健365-更改版本号 1 year ago
wlh b2773be6fc 中健365-x2手表上线优化 1 year ago
wlh 9f26d141f1 中健365-x2手表上线优化 1 year ago
wlh 777b17a075 中健365-x2手表上线优化 1 year ago
wlh d1929d348c 中健365-x2手表上线优化 1 year ago
wlh 9cbe7c9e0c 中健365-x2手表上线处理 1 year ago
wlh dd733d9367 中建365-二期开发-企业资料/健康档案 1 year ago
wlh 8921ed3cfa Merge remote-tracking branch 'origin/develop' into dev_second 1 year ago
wlh ce4d2d84b2 中建365-二期开发 1 year ago
wlh ae107da8c9 中健365-二期更换权限框架 1 year ago
wlh b208cbf3fa 中健365-二期 1 year ago
wlh 6ecfd7a475 中建365-二期开发 1 year ago
wlh b3a6aebe50 中建365-二期开发 1 year ago
wlh 010088fb65 中建365-家人实时测量开发 1 year ago
wlh 27a3e0f31f 中建365-家人实时测量开发 1 year ago
wlh 72f96fff0e 中建365-X2手表接入/二期有关UI开发 1 year ago
wlh 0a3674eea8 中建365-X2手表接入/二期有关UI开发 1 year ago
wlh 6c665893d1 中建365-二期优化-去掉腾讯IM相关的,没有该需求 1 year ago
wlh 1374c0ced3 中建365-二期优化-去掉腾讯IM相关的,没有该需求 1 year ago
wlh 1529d70ae3 Merge remote-tracking branch 'origin/main' into dev_second
# Conflicts:
#	app/src/main/java/com/zj365/dc/adapter/HomeTopLayoutAdapter.kt
#	app/src/main/java/com/zj365/dc/fragment/DynamicManagementFrag.kt
#	app/src/main/java/com/zj365/dc/fragment/HealthHomeFrag.kt
#	app/src/main/java/com/zj365/dc/fragment/MineFrag.kt
#	config.gradle
1 year ago
wlh 69a139a865 中建365-二期优化 1 year ago

@ -0,0 +1 @@
zhongjian

@ -10,13 +10,6 @@
<option name="gradleJvm" value="11" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$/../TUIKit/TIMCommon/timcommon" />
<option value="$PROJECT_DIR$/../TUIKit/TUIChat/tuichat" />
<option value="$PROJECT_DIR$/../TUIKit/TUIContact/tuicontact" />
<option value="$PROJECT_DIR$/../TUIKit/TUIConversation/tuiconversation" />
<option value="$PROJECT_DIR$/../TUIKit/TUICore/tuicore" />
<option value="$PROJECT_DIR$/../TUIKit/TUIGroup/tuigroup" />
<option value="$PROJECT_DIR$/../TUIKit/TUIOfflinePush/tuiofflinepush" />
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/AYCrashGuard" />
<option value="$PROJECT_DIR$/Health" />

@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.huawei.agconnect'
apply plugin: 'kotlin-parcelize'
def rely = rootProject.ext.relyOn
@ -27,6 +28,12 @@ android {
}
}
ndk{
moduleName "libnew_native_libe"
ldLibs "log"
abiFilters "armeabi-v7a","arm64-v8a"
}
manifestPlaceholders = [
JPUSH_PKGNAME : applicationId,
JPUSH_APPKEY : "4469bc1d5cfba9e5aea1cac4",
@ -56,7 +63,7 @@ android {
buildConfigField("String" ,"appid" ,"\"${rootProject.ext.wx.appid}\"")
buildConfigField("String" ,"appSecret" ,"\"${rootProject.ext.wx.appSecret}\"")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs{
@ -104,7 +111,7 @@ android {
repositories {
flatDir {
dirs 'libs'
dirs 'libs','../common/libs'
}
project.afterEvaluate {
@ -120,8 +127,8 @@ dependencies {
implementation (name: 'ycbtsdk-release', 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-core-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 project(':Health')
implementation project(':server')
implementation project(':mine')

Binary file not shown.

@ -3,6 +3,9 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.zj365.dc">
<!--joperate_permission_start-->
<permission android:name="com.zj365.dc.permission.JOPERATE_MESSAGE" android:protectionLevel="signature"/>
<uses-permission android:name="com.zj365.dc.permission.JOPERATE_MESSAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Required 一些系统要求的权限,如访问网络等-->
@ -97,6 +100,16 @@
android:usesCleartextTraffic="true"
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
android:name=".activity.WelcomeAct"
android:exported="true"
@ -125,10 +138,7 @@
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity
android:name=".activity.InfoSimpleAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity android:name=".activity.HealthScienceAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
@ -142,6 +152,13 @@
<activity android:name=".activity.RecognizeResultAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity android:name=".activity.DeviceActiveAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity android:name="com.zj365.dc.activity.WarningMsgAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity android:name=".activity.OneKeyBinderDeviceAct"
android:launchMode="singleTop"
@ -152,6 +169,14 @@
android:launchMode="singleTop"
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
android:name="com.zj365.health.act.BindFamilyAct"
@ -179,6 +204,10 @@
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity android:name="com.zj365.dc.activity.WatchFamilyHealthAct"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity
android:name="com.zj365.mime.act.MyInfoAct"
android:launchMode="singleTop"
@ -283,6 +312,17 @@
android:launchMode="singleTop"
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
android:name="com.zj365.mime.act.BaseInfoChangeAct"
android:launchMode="singleTop"
@ -323,6 +363,10 @@
android:launchMode="singleTop"
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"
android:launchMode="singleTop"
android:screenOrientation="portrait"/>
@ -374,7 +418,7 @@
android:exported="true">
<intent-filter>
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
<category android:name="com.xty.healthuser" />
<category android:name="com.zj365.dc" />
</intent-filter>
</receiver>
@ -383,14 +427,14 @@
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:taskAffinity="com.xty.healthuser"
android:taskAffinity="com.zj365.dc"
android:theme="@style/Theme.AppCompat.NoActionBar.Transparent"></activity>
<activity
android:name="com.zj365.dc.wxapi.WXPayEntryActivity"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:taskAffinity="com.xty.healthuser"
android:taskAffinity="com.zj365.dc"
android:theme="@style/Theme.AppCompat.NoActionBar.Transparent" />
<!--适配华为huawei刘海屏-->
@ -405,9 +449,9 @@
android:name="com.hihonor.push.app_id"
android:value="${HONOR_APPID}" />
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="5a316db0d8149008c774308b33d47174"/>
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="5a316db0d8149008c774308b33d47174"/>
</application>

@ -1,5 +1,6 @@
package com.zj365.dc.activity
import android.Manifest
import android.content.Intent
import android.view.LayoutInflater
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.RouteManager
import com.xty.common.picture.PictureUtils
import com.xty.common.util.JumpPermissionManagement
import com.zj365.dc.databinding.ActCalorieAnalyzeBinding
import com.zj365.dc.vm.DietManagementVm
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)
class CalorieAnalyzeAct : BaseVmAct<BaseVm>() {
class CalorieAnalyzeAct : BaseVmAct<BaseVm>() , EasyPermissions.PermissionCallbacks {
val binding by lazy { ActCalorieAnalyzeBinding.inflate(layoutInflater) }
@ -76,12 +81,73 @@ class CalorieAnalyzeAct : BaseVmAct<BaseVm>() {
}
tvTakePhoto.setOnClickListener {
PictureUtils.openTheCamera(this, PictureMimeType.ofImage())
if(EasyPermissions.hasPermissions(this,
Manifest.permission.CAMERA,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE)){
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()
}
tvChoosePhotoAlbum.setOnClickListener {
PictureUtils.openCamera(this, PictureMimeType.ofImage(),9)
if(EasyPermissions.hasPermissions(this,
Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.READ_EXTERNAL_STORAGE)){
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()
}
@ -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>) {
}
}

@ -0,0 +1,561 @@
package com.zj365.dc.activity
import android.Manifest
import android.annotation.SuppressLint
import android.content.Intent
import android.graphics.Color
import android.os.Build
import android.os.Bundle
import android.provider.Settings
import android.text.SpannableString
import android.text.Spanned
import android.text.TextPaint
import android.text.style.ClickableSpan
import android.view.View
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.alibaba.android.arouter.facade.annotation.Route
import com.google.gson.Gson
import com.tamsiree.rxkit.RxActivityTool
import com.tamsiree.rxkit.RxKeyboardTool
import com.xty.base.act.BaseVmAct
import com.xty.common.*
import com.xty.common.aMapUtils.AmapInit
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
import com.xty.common.bracelet.*
import com.xty.common.event.BindDevEvent
import com.xty.common.event.BlueToothConnectEvent
import com.xty.common.event.BluetoothEvent
import com.xty.common.event.MyInfoEvent
import com.xty.common.util.CommonToastUtils
import com.xty.common.util.CommonUtils
import com.xty.common.util.JumpPermissionManagement
import com.xty.common.xqr_code.XQRCodeAct
import com.xuexiang.xqrcode.XQRCode
import com.zj365.dc.databinding.ActDeviceActiveBinding
import com.zj365.dc.model.ScanInfoBean
import com.zj365.dc.vm.BasicInfoVm
import com.zj365.health.weight.DialogTip
import com.zj365.health.weight.SignDialog
import com.zj365.mime.weight.FactorySettingDialog
import com.zj365.mime.weight.NoticeSettingDialog
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
import pub.devrel.easypermissions.EasyPermissions
/**
*
* 设备激活
*/
@SuppressLint("ObsoleteSdkInt")
@Route(path = ARouterUrl.DEVICE_ACTIVE)
class DeviceActiveAct : BaseVmAct<BasicInfoVm>() , EasyPermissions.PermissionCallbacks ,EasyPermissions.RationaleCallbacks{
val binding by lazy { ActDeviceActiveBinding.inflate(layoutInflater) }
override fun setLayout() = binding.root
// var user: SettingBean.User? = null
var signPath = ""//签名地址
var isAgree = false
val SERVER_AGREEMENT = 1000 //服务协议
var isLogin: Boolean = false
//签名
val dialog by lazy {
SignDialog(this) {
signPath = it
binding.mImageSign.setImage(this, it)
}
}
private val factorySettingDialog by lazy {
FactorySettingDialog(
this,
"蓝牙手表需要访问位置、蓝牙权限。"
) {
getBluePermission(baseContext) {
if (it) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
&& !isGpsOpen(baseContext)
) {
requestGPSPermission()
}
} else {
finish()
}
}
}
}
private var headerPath = ""
private var name = ""
private var sexType = ""
private var idCard = ""
private var height = ""
private var wieght = ""
private var address = ""
private var otherName = ""
private var otherPhone = ""
private var rela = ""
private var provincey = ""
private var city = ""
private var district = ""
private var lat = ""
private var lng = ""
private var medicName = ""
private var medicIds = ""
private var diseaseList = ""
private var birthDay = ""
private var birthdayType = -1
private var type = 0//0:蓝牙设备 默认 1:4G设备
private var watchName = ""
override fun initData() {
super.initData()
isDarkBar = true
isLogin = intent.getBooleanExtra("isLogin", false)
intent.extras?.let {
headerPath = getIntentStringData(it, "headerPath")
name = getIntentStringData(it, "name")
sexType = getIntentStringData(it, "sexType")
idCard = getIntentStringData(it, "idCard")
height = getIntentStringData(it, "height")
wieght = getIntentStringData(it, "wieght")
address = getIntentStringData(it, "address")
otherName = getIntentStringData(it, "otherName")
otherPhone = getIntentStringData(it, "otherPhone")
rela = getIntentStringData(it, "rela")
provincey = getIntentStringData(it, "provincey")
city = getIntentStringData(it, "city")
district = getIntentStringData(it, "district")
lat = getIntentStringData(it, "lat")
lng = getIntentStringData(it, "lng")
medicName = getIntentStringData(it, "medicName")
medicIds = getIntentStringData(it, "medicIds")
diseaseList = getIntentStringData(it, "diseaseList")
birthDay = getIntentStringData(it, "birthDay")
birthdayType = it.getInt("birthdayType", -1)
type = it.getInt("type", 0)
}
}
private fun getIntentStringData(it: Bundle, key: String): String {
return if (it.getString(key).isNullOrEmpty()) "" else it.getString(key).toString()
}
override fun initView() {
super.initView()
statusBar(binding.title.mView)
binding.title.mTvTitle.text = getString(R.string.active_action)
binding.title.mIvBack.setOnClickListener {
if (isLogin) { //如果是走注册流程过来的,退出该界面,则进入主界面
RouteManager.goAct(ARouterUrl.MAIN_ACT)
RxActivityTool.finishAllActivity()
} else {
/* EventBus.getDefault().post(BindDevEvent())
CommonToastUtils.showToast("绑定成功")*/
finish()
}
}
binding.mSign.setOnClickListener {//签名信息填写
dialog.show()
}
binding.mSubmit.setOnClickListener {
submitData()
}
if (type == 0) {//是蓝牙设备
factorySettingDialog.isShow()
binding.mBlueTooth.setOnClickListener {//蓝牙设备搜索绑定
RxKeyboardTool.hideSoftInput(this)
bundle.clear()
bundle.putString("devMac", if (it.tag == null) "" else it.tag.toString())
bundle.putString("devName", (it as TextView).text.toString())
RouteManager.goAct(ARouterUrl.DEVICE_CONNECT, bundle)
}
binding.mDeviceLayout.visibility = View.VISIBLE
if (YCBBlueConnectHelper.getBlueStatus(false)) {//如果当前已经连接手表
binding.mBlueTooth.text = Const.connectBlueDevice.deviceName
binding.mBlueTooth.tag = Const.connectBlueDevice.deviceMac
}
} else {//4G设备
binding.mDeviceLayout.visibility = View.GONE
binding.title.mIvReight.apply {
visibility = View.VISIBLE
setImageResource(com.zj365.health.R.mipmap.ic_scan)
setOnClickListener {
startScan()
}
}
}
setPrive()
}
private val reqGpsPermissionDialog by lazy {
NoticeSettingDialog(this, "请打开GPS权限", {
finish()
}) {
// 转到手机设置界面用户设置GPS
var intent = Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS)
startActivityForResult(intent, 1001); // 设置完成后返回到原来的界面
}
}
private fun requestGPSPermission() {
reqGpsPermissionDialog.show()
}
// /**
// * 检测拍摄权限
// */
// private fun checkCameraPermissions() {
// val permission = arrayOf(Manifest.permission.CAMERA)
// Acp.getInstance(this).request(
// AcpOptions.Builder()
// .setPermissions(
// *permission
// ).build(),
// object : AcpListener {
// override fun onGranted() {
//
// }
//
// override fun onDenied(permissions: List<String>) {
// finish()
// }
// })
// }
/**
* 扫码
*/
private fun startScan() {
if(EasyPermissions.hasPermissions(this,
Manifest.permission.CAMERA)){
XQRCodeAct.start(
this@DeviceActiveAct,
XQRCodeAct.QRCODE_AGREEMENT,
com.zj365.health.R.style.XQRCodeTheme_Custom
)
}else{
if (EasyPermissions.somePermissionDenied(this,
Manifest.permission.CAMERA)){
DialogTip(
this,
"中健365需要相机权限,需要打开设置页面么?"
) {
JumpPermissionManagement.GoToSetting(this@DeviceActiveAct)
}.show()
}else{
DialogTip(
this,
"中健365需要相机权限以便您使用扫一扫功能"
) {
EasyPermissions.requestPermissions(this,"",
0x00011,
Manifest.permission.CAMERA)
}.show()
}
}
}
/**
* 隐私协议
*/
private fun setPrive() {
binding.mPrivate.setOnClickListener {
if (!isAgree) {
forwardPrivate()
return@setOnClickListener
}
it.isSelected = !it.isSelected
}
binding.mPrivate.movementMethod = MyLinkedMovementMethod().getInstance()
var span = SpannableString(getString(R.string.agree_private_active))
span.setSpan(object : ClickableSpan() {
override fun onClick(widget: View) {
forwardPrivate()
}
override fun updateDrawState(ds: TextPaint) {
super.updateDrawState(ds)
ds.color =
ContextCompat.getColor(this@DeviceActiveAct, R.color.col_02c)
ds.isUnderlineText = false
}
}, 2, 8, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
binding.mPrivate.text = span
binding.mPrivate.highlightColor = Color.TRANSPARENT
}
/**
* 跳转至隐私协议页面
*/
private fun forwardPrivate() {
bundle.clear()
bundle.putString("title", "服务协议")
bundle.putInt("type", Const.AGREEMENT_6)
RouteManager.goActRequest(
ARouterUrl.RICH_TEXT,
this@DeviceActiveAct,
SERVER_AGREEMENT,
bundle
)
}
private fun submitData() {
RxKeyboardTool.hideSoftInput(this)
if (!isAgree) {
CommonToastUtils.showToast(R.string.please_agree_server)
return
}
if (type == 0 && binding.mBlueTooth.text.isNullOrEmpty()) {
CommonToastUtils.showToast(R.string.please_input_device_code)
return
}
if (signPath.isNullOrEmpty()) {
CommonToastUtils.showToast("请完善签名")
return
}
if (binding.mDevNum.text.isNullOrEmpty()) {
CommonToastUtils.showToast(R.string.please_input_device_code)
return
}
if (binding.mActiveCode.text.isNullOrEmpty()) {
CommonToastUtils.showToast(R.string.please_input_active_code)
return
}
var devMc = if (type == 0) {
if (binding.mBlueTooth.tag == null) "" else binding.mBlueTooth.tag as String
} else {//4G直接传设备号
binding.mDevNum.text.toString()
}
var devName = if (type == 0) {
binding.mBlueTooth.text.toString()
} else {
if (watchName.isNullOrEmpty()) {
if (devMc.startsWith("818") && devMc.length > 6) {
"A3-${devMc.substring(devMc.length - 7)}"
} else {
"4G-$devMc"
}
} else {
watchName
}
}
if (otherPhone.isNullOrEmpty() || height.isNullOrEmpty() || wieght.isNullOrEmpty() || otherName.isNullOrEmpty()) {
mViewModel.activeDevice(
signPath,
binding.mDevNum.text.toString(),
binding.mActiveCode.text.toString(),
devMc,
devName
)
} else {
mViewModel.submit(
headerPath,
name,
sexType,
idCard,
height,
wieght,
address,
otherName,
otherPhone,
rela,
provincey,
city,
district,
lat,
lng,
medicName,
medicIds,
signPath,
binding.mDevNum.text.toString(),
binding.mActiveCode.text.toString(),
devMc,
devName,
diseaseList,
birthDay,
birthdayType
)
}
}
/**
* 设置扫码信息
*/
private fun setScanInfo(scanInfo: ScanInfoBean) {
binding.mDevNum.setText(scanInfo.deviceCode)
binding.mActiveCode.setText(scanInfo.activationCode)
watchName = scanInfo.watchName
}
override fun onRestart() {
super.onRestart()
if (type == 0) {//是蓝牙设备
factorySettingDialog.isShow()
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (resultCode === RESULT_OK) {
when (requestCode) {
SERVER_AGREEMENT -> {
isAgree = true
binding.mPrivate.isSelected = isAgree
}
XQRCodeAct.QRCODE_AGREEMENT -> {
when (data!!.getIntExtra(XQRCode.RESULT_TYPE, 0)) {
XQRCode.RESULT_SUCCESS -> {
try {
val result = data.extras!!.getString(XQRCode.RESULT_DATA)
LogUtils.d("扫描结果:$result")
if (!result.isNullOrEmpty()) {
val gson = Gson()
setScanInfo(gson.fromJson(result, ScanInfoBean::class.java))
} else {
CommonToastUtils.showToast("扫码失败,请重试...")
}
} catch (e: Exception) {
LogUtils.e("二维码扫描:$e")
CommonToastUtils.showToast("请确认二维码是否正确!")
}
}
XQRCode.RESULT_FAILED -> {
LogUtils.d("扫描失败")
}
}
}
}
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun bloothConnect(event: BluetoothEvent) {
binding.mBlueTooth.text = event.devName
binding.mBlueTooth.tag = event.devMac
}
private var isActiveSuccess = false
// private val dialogWear by lazy {
// WearDialog(this) {
// RouteManager.goAct(ARouterUrl.MAIN_ACT)
// finish()
// }
// }
override fun liveObserver() {
mViewModel.activeLive.observe(this) {
activeSuccess()
}
mViewModel.setBasic.observe(this) {
activeSuccess()
}
// mViewModel.prevLive.observe(this) {
// dialogWear.showContent(it.data.content)
// }
}
private fun activeSuccess() {
isActiveSuccess = true
CommonToastUtils.showSucceedToast("设备激活成功")
LogUtils.d("设备激活成功")
MMkvHelper.put(Const.Watch_Device_Type, type)
if (type == 0) {
YCBManager.deleteHistory(YCBOrder.DELETE_LocalALL)
EventBus.getDefault().post(BlueToothConnectEvent())
}
EventBus.getDefault().post(MyInfoEvent())
EventBus.getDefault().post(BindDevEvent())
// CommonToastUtils.showToast("绑定成功")
finish()
/* if (CommonUtils.getMyUserInfo() == null) {
bundle.clear()
bundle.putInt("isBind", 0)
RouteManager.goAct(ARouterUrl.BASE_INFO_CHANGE, bundle)
finish()
}
CommonUtils.getMyUserInfo()?.let { bean ->
if (bean.urgentPhone.isNullOrEmpty()) {//如果紧急联系人电话并且签名为空则认为没有完善信息
bundle.clear()
bundle.putInt("isBind", 0)
RouteManager.goAct(ARouterUrl.BASE_INFO_CHANGE, bundle)
finish()
} else {
RouteManager.goAct(ARouterUrl.MAIN_ACT)
finish()
}
}*/
// mViewModel.getPrev(7)
}
override fun onDestroy() {
AmapInit.stopLocation()
if (!isActiveSuccess && type == 0) {
YCBBlueConnectHelper.disconnect()
}
super.onDestroy()
}
override fun onBackPressed() {
if (isLogin) { //如果是走注册流程过来的,退出该界面,则进入主界面
RouteManager.goAct(ARouterUrl.MAIN_ACT)
RxActivityTool.finishAllActivity()
} else {
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) {
}
}

@ -68,10 +68,19 @@ class DeviceChoiceAct : BaseVmAct<DeviceChoiceVm>() {
val device = adapter.data[position] as DeviceBean
val type = device.watchType
if (type != 0) {
bundle.clear()
bundle.putInt("type", type)
bundle.putBoolean("isLogin", isLogin)
RouteManager.goAct(ARouterUrl.DEVICE_ACTIVE, bundle)
if(device.bindType == 1){
bundle.clear()
bundle.putInt("type", type)
bundle.putBoolean("isLogin", isLogin)
RouteManager.goAct(ARouterUrl.ONE_KEY_DEVICE_ACTIVE, bundle)
}else{
bundle.clear()
bundle.putInt("type", type)
bundle.putBoolean("isLogin", isLogin)
RouteManager.goAct(ARouterUrl.DEVICE_ACTIVE, bundle)
}
} else {
if (!checkBlueConnectPermission(this)) {
FactorySettingDialog(this, "蓝牙手表需要访问位置、蓝牙权限。") {

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

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

@ -1,202 +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.tencent.qcloud.tuicore.TUILogin
import com.tencent.qcloud.tuicore.interfaces.TUICallback
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,
1400807230,
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()
}
}
}
}
}

@ -48,12 +48,12 @@ class LoginAct : BaseVmAct<LoginVm>() {
val dialogBind by lazy {
DialogTipNew(this,"温馨提示", "恭喜您成为中健三六五大家庭的医院,为了提供更好的信息服务,请完善您的基本信息。", "前往","取消",false,{
RouteManager.goAct(ARouterUrl.BASE_INFO_CHANGE)
EventBus.getDefault().post(LoginOrRegisterEvent())
DialogTipNew(this,"温馨提示", "恭喜您成为中健三六五大家庭的一员,为了提供更好的信息服务,请完善您的基本信息。", "前往","取消",false,{
RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT)
finish()
}){
EventBus.getDefault().post(LoginOrRegisterEvent())
finish()
}
}
@ -148,7 +148,7 @@ class LoginAct : BaseVmAct<LoginVm>() {
* 隐私条款
*/
fun setPrv() {
var txtCol = ContextCompat.getColor(this, R.color.col_313)
var txtCol = ContextCompat.getColor(this, R.color.col_02c)
binding.seleck.setOnClickListener {
it.isSelected = !it.isSelected
}
@ -168,6 +168,7 @@ class LoginAct : BaseVmAct<LoginVm>() {
bundle.clear()
bundle.putString("title", "用户协议")
bundle.putBoolean("isAgree", false)
bundle.putString("url", "https://dc.zhongjian365.com/agreement.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
}
@ -182,6 +183,7 @@ class LoginAct : BaseVmAct<LoginVm>() {
override fun onClick(widget: View) {
bundle.clear()
bundle.putString("title", "隐私政策")
bundle.putBoolean("isAgree", false)
bundle.putString("url", "https://dc.zhongjian365.com/privacy.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
}
@ -283,48 +285,16 @@ class LoginAct : BaseVmAct<LoginVm>() {
override fun liveObserver() {
mViewModel.mLogin.observe(this) {
loadingView.dismiss()
EventBus.getDefault().post(LoginOrRegisterEvent())
if (it.data.isPerfect == 0){
dialogBind.setContentNew("恭喜您成为中健三六五大家庭的医院,为了提供更好的信息服务,请完善您的基本信息。")
dialogBind.setContentNew("恭喜您成为中健三六五大家庭的一员,为了提供更好的信息服务,请完善您的基本信息。")
dialogBind.show()
}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()
}
override fun onError(errorCode: Int, errorMessage: String?) {
Log.e("simon","onError")
}
})
}*/
mViewModel.codeLive.observe(this) {
timeStart()

@ -7,6 +7,7 @@ import android.content.Intent
import android.content.IntentFilter
import android.net.Uri
import android.os.Build
import android.text.TextUtils
import android.util.Log
import android.view.LayoutInflater
import android.view.View
@ -24,12 +25,10 @@ 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.BottomNavigationMenuView
import com.lifesense.android.ble.core.serializer.AbstractMeasureData
import com.lifesense.android.ble.device.fatscale.model.WeightMeasureData
/*import com.lifesense.android.ble.core.serializer.AbstractMeasureData
import com.lifesense.android.ble.device.fatscale.model.WeightMeasureData*/
import com.tamsiree.rxkit.RxActivityTool
import com.tamsiree.rxkit.RxSPTool
import com.tencent.qcloud.tuicore.TUIConstants
import com.tencent.qcloud.tuikit.tuichat.util.PermissionHelper
import com.xty.base.act.BaseVmAct
import com.xty.base.dialog.AppUpdateDialog
import com.xty.base.dialog.DialogActivities
@ -41,13 +40,17 @@ import com.xty.common.aMapUtils.AmapInit
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
import com.xty.common.bracelet.checkBlueConnectPermission
import com.xty.common.event.AddSuccessEvent
import com.xty.common.event.BindDevEvent
import com.xty.common.event.LoginOrRegisterEvent
import com.xty.common.event.MeasureWeightEvent
import com.xty.common.event.MqttReceive
import com.xty.common.event.MyInfoEvent
import com.xty.common.util.CommonToastUtils
import com.xty.common.util.CommonUtils
import com.xty.common.util.ViewScreenshotUtils
import com.xty.network.model.InviteCustodyBean
import com.xty.network.utils.AppUtils
import com.zj365.dc.BuildConfig
import com.zj365.dc.R
import com.zj365.dc.databinding.ActivityMainBinding
@ -55,6 +58,7 @@ import com.zj365.dc.fragment.DynamicManagementFrag
import com.zj365.dc.fragment.HealthHomeFrag
import com.zj365.dc.fragment.MessageFragment
import com.zj365.dc.fragment.MineFrag
import com.zj365.dc.fragment.ShopFragment
import com.zj365.dc.vm.MainVm
import com.zj365.health.act.binddevice.BaseDeviceBindListAct
import com.zj365.health.act.binddevice.BlueUtil
@ -63,14 +67,14 @@ import com.zj365.mime.act.DevInfoAct
import io.reactivex.functions.Consumer
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import me.leolin.shortcutbadger.ShortcutBadger
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
import pub.devrel.easypermissions.EasyPermissions
import java.util.Date
@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) }
override fun setLayout(): View = binding.root
@ -112,11 +116,12 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
private fun initUnreadCountReceiver() {
unreadCountReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val unreadCount = intent.getLongExtra(TUIConstants.UNREAD_COUNT_EXTRA, 0)
val unreadCount = intent.getLongExtra(Const.UNREAD_COUNT_EXTRA, 0)
// if (unreadCount > 0) {
// isShowReadAllButton = true
imunreadCount = unreadCount.toInt()
setBadge(sysunreadCount + unreadCount.toInt())
// } else {
// isShowReadAllButton = false
// setBadge(unreadCount)
@ -124,7 +129,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
}
}
val unreadCountFilter = IntentFilter()
unreadCountFilter.addAction(TUIConstants.CONVERSATION_UNREAD_COUNT_ACTION)
unreadCountFilter.addAction(Const.CONVERSATION_UNREAD_COUNT_ACTION)
LocalBroadcastManager.getInstance(this)
.registerReceiver(unreadCountReceiver as BroadcastReceiver, unreadCountFilter)
}
@ -133,6 +138,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
listOf(
HealthHomeFrag(),
// Fragment(),
ShopFragment(),
DynamicManagementFrag(),
MessageFragment(),
MineFrag()
@ -146,7 +152,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
initVp2()
initBottomNav()
addNv()
mViewModel.getVersionNew()
mViewModel.getVersionNew(AppUtils.getVersionCode(this))
initUnreadCountReceiver()
JPushInterface.setBadgeNumber(this, 0)
@ -155,10 +161,28 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
""
} else {
MMkvHelper.getLong(Const.USER_ID).toString()
}
mViewModel.getUserEquipmentInformationizationRequest(userId)
if(!TextUtils.isEmpty(userId)){
mViewModel.getIsDemonstate()
mViewModel.getMySetting()
// if (BuildConfig.isRelease) {//设置极光推送别名
JPushInterface.setAlias(
this,
MMkvHelper.getLong(Const.USER_ID).toInt(),
"user_release_${MMkvHelper.getLong(Const.USER_ID)}"
)
// }
mViewModel.getUserEquipmentInformationizationRequest(userId)
}
mViewModel.getBanners(userId,3)
mViewModel.getIsDemonstate()
/* if(EasyPermissions.hasPermissions(this, Manifest.permission.ACCESS_COARSE_LOCATION,
@ -209,28 +233,28 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
return@setOnNavigationItemSelectedListener true
}
/* R.id.nav_server -> {
R.id.nav_server -> {
binding.mVp2.setCurrentItem(1, false)
return@setOnNavigationItemSelectedListener true
}*/
}
R.id.nav_dynamic_management -> {
if (MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else{
binding.mVp2.setCurrentItem(1, false)
binding.mVp2.setCurrentItem(2, false)
return@setOnNavigationItemSelectedListener true
}
}
R.id.nav_message -> {
binding.mVp2.setCurrentItem(2, false)
binding.mVp2.setCurrentItem(3, false)
return@setOnNavigationItemSelectedListener true
}
R.id.nav_mine -> {
binding.mVp2.setCurrentItem(3, false)
binding.mVp2.setCurrentItem(4, false)
return@setOnNavigationItemSelectedListener true
}
@ -279,6 +303,24 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
override fun liveObserver() {
mViewModel.saveSuccess.observe(this) {
}
//个人设置信息获取
mViewModel.settingLive.observe(this) {
if (null == it.data) return@observe
it.data.let { settingBean ->
if (BuildConfig.isRelease) {//设置极光推送别名
JPushInterface.setAlias(
this,
settingBean.user.id.toInt(),
"user_release_${settingBean.user.id}"
)
}
Const.mainLiveData.value = settingBean
// binding.mNoNetwork.root.visibility = View.GONE
}
}
/* mViewModel.boundDevices.observe(this) {
if (it.code != 0) return@observe
val data = it.data
@ -363,6 +405,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
if (it.code != 0) {
CommonToastUtils.showLoserToast("获取设备信息失败")
}
Const.userDeviceLiveData.value =it.data
when (it.data.bindStatus) {
0 -> {
binding.mVp2.currentItem = 0
@ -385,7 +428,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
private fun addNv() {
val menuView = binding.mBottom.getChildAt(0) as BottomNavigationMenuView
//这里就是获取所添加的每一个Tab(或者叫menu)
val tab = menuView.getChildAt(2) as BottomNavigationItemView
val tab = menuView.getChildAt(3) as BottomNavigationItemView
//加载我们的角标View新创建的一个布局
badegView = LayoutInflater.from(this).inflate(R.layout.item_msg_count, tab, true)
@ -400,6 +443,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
badegView?.let {
var tv = it.findViewById<TextView>(R.id.mBadge)
var carrdView = it.findViewById<CardView>(R.id.mCard)
ShortcutBadger.applyCount(applicationContext, num)
if (num > 0) {
tv.visibility = View.VISIBLE
tv.text = if (num > 99) "99+" else "$num"
@ -426,7 +470,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
fun reveiveMsg(event: MqttReceive) {
}
override fun accept(abstractMeasureData: AbstractMeasureData) {
/* override fun accept(abstractMeasureData: AbstractMeasureData) {
if (abstractMeasureData is WeightMeasureData) {
if (!abstractMeasureData.isProcessingData) {
Log.i("LS-Bluetooth", "收到测量过程数据:${JSON.toJSONString(abstractMeasureData)}")
@ -441,7 +485,7 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
return
}
}
}
}*/
@ -451,4 +495,22 @@ class MainActivity : BaseVmAct<MainVm>(), Consumer<AbstractMeasureData> {
// BlueUtil.getBlueManage().releaseResource()
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun bindDevSuccess(event: BindDevEvent){
// mViewModel.getMySetting()
mViewModel.getIsDemonstate()
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun refreshUI(event: MyInfoEvent){
// mViewModel.getMySetting()
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun onLoginOrRegisterSuccess(event: LoginOrRegisterEvent){
// mViewModel.getMySetting()
mViewModel.getIsDemonstate()
}
}

@ -6,11 +6,16 @@ import com.alibaba.android.arouter.facade.annotation.Route
import com.xty.base.act.BaseVmAct
import com.xty.base.vm.BaseVm
import com.xty.common.Dateutils
import com.xty.common.UmengEventId
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.network.model.MessageBean
import com.xty.network.model.MessageTypeDataBean
import com.zj365.dc.databinding.ActMessageDetailNewBinding
import me.leolin.shortcutbadger.ShortcutBadger
import org.greenrobot.eventbus.EventBus
@Route(path = ARouterUrl.MESSAGE_DETAIL_NEW)
class MessageDetailNewAct: BaseVmAct<BaseVm>() {
@ -18,6 +23,8 @@ class MessageDetailNewAct: BaseVmAct<BaseVm>() {
var msgBean : MessageTypeDataBean.MessageTypeBean? = null
var warningBean:MessageBean.SysMsg ? = null
override fun liveObserver() {
}
@ -28,6 +35,7 @@ class MessageDetailNewAct: BaseVmAct<BaseVm>() {
super.initView()
statusBar(binding.title.mView)
binding.title.mTvTitle.text= "消息详情"
EventBus.getDefault().post(MessageReadEvent())
binding.title.mIvBack.setOnClickListener {
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
)
}
}

@ -1,25 +1,29 @@
package com.zj365.dc.activity
import android.Manifest
import android.content.Intent
import android.view.View
import com.alibaba.android.arouter.facade.annotation.Route
import com.google.gson.Gson
import com.tamsiree.rxkit.RxActivityTool
import com.tencent.qcloud.tuikit.tuichat.util.PermissionHelper
import com.xty.base.act.BaseVmAct
import com.xty.common.LogUtils
import com.xty.common.arouter.ARouterUrl
import com.xty.common.event.BindDevEvent
import com.xty.common.util.CommonToastUtils
import com.xty.common.util.JumpPermissionManagement
import com.xty.common.xqr_code.XQRCodeAct
import com.xuexiang.xqrcode.XQRCode
import com.zj365.dc.databinding.ActBinderDeviceOneKeyBinding
import com.zj365.dc.model.ScanInfoBean
import com.zj365.dc.vm.OneKeyBinderDeviceVm
import com.zj365.health.R
import com.zj365.health.weight.DialogTip
import org.greenrobot.eventbus.EventBus
import pub.devrel.easypermissions.EasyPermissions
@Route(path = ARouterUrl.DEVICE_ACTIVE)
class OneKeyBinderDeviceAct : BaseVmAct<OneKeyBinderDeviceVm>() {
@Route(path = ARouterUrl.ONE_KEY_DEVICE_ACTIVE)
class OneKeyBinderDeviceAct : BaseVmAct<OneKeyBinderDeviceVm>() , EasyPermissions.PermissionCallbacks ,EasyPermissions.RationaleCallbacks{
val binding by lazy { ActBinderDeviceOneKeyBinding.inflate(layoutInflater) }
override fun liveObserver() {
@ -42,8 +46,10 @@ class OneKeyBinderDeviceAct : BaseVmAct<OneKeyBinderDeviceVm>() {
startScan()
}
binding.tvBackHome.setOnClickListener {
// finish()
RxActivityTool.finishActivity(OneKeyBinderDeviceAct::class.java)
RxActivityTool.finishActivity(DeviceChoiceAct::class.java)
finish()
}
}
@ -52,21 +58,35 @@ class OneKeyBinderDeviceAct : BaseVmAct<OneKeyBinderDeviceVm>() {
}
private fun startScan() {
PermissionHelper.requestPermission(PermissionHelper.PERMISSION_CAMERA, object :
PermissionHelper.PermissionCallback {
override fun onGranted() {
// XQRCode.startScan(this@DeviceActiveAct, QRCODE_AGREEMENT)
XQRCodeAct.start(
this@OneKeyBinderDeviceAct,
XQRCodeAct.QRCODE_AGREEMENT,
com.zj365.health.R.style.XQRCodeTheme_Custom
)
}
if(EasyPermissions.hasPermissions(this,
Manifest.permission.CAMERA)){
XQRCodeAct.start(
this@OneKeyBinderDeviceAct,
XQRCodeAct.QRCODE_AGREEMENT,
R.style.XQRCodeTheme_Custom
)
}else{
if (EasyPermissions.somePermissionDenied(this,
Manifest.permission.CAMERA)){
DialogTip(
this,
"中健365需要相机权限,需要打开设置页面么?"
) {
JumpPermissionManagement.GoToSetting(this@OneKeyBinderDeviceAct)
}.show()
override fun onDenied() {
}else{
DialogTip(
this,
"中健365需要相机权限以便您使用扫一扫功能"
) {
EasyPermissions.requestPermissions(this,"中健365需要相机权限以便您使用扫一扫功能",
0x00011,
Manifest.permission.CAMERA)
}.show()
}
})
}
}
override fun setLayout() = binding.root
@ -104,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")
}
}

@ -51,6 +51,7 @@ class RecognizeResultAct : BaseVmAct<DietManagementVm>() {
it.data[0].isCheck = true
adapter.setNewInstance(it.data)
refreshCalorieUI(it.data[0])
foodRecoginzeInfo = it.data[0]
}
}
@ -78,7 +79,7 @@ class RecognizeResultAct : BaseVmAct<DietManagementVm>() {
binding.tvDetail.setOnClickListener {
foodRecoginzeInfo?.let {
bundle.clear()
bundle.putString("web_site_url","${BuildConfig.h5url}pages/index/index?pageId=mealsDetail&id=${it.id}")
bundle.putString("web_site_url","${BuildConfig.h5url}pages/index/index?pageId=mealsDetail&id=${it.recipe_id}")
RouteManager.goAct(ARouterUrl.H5_ACT,bundle)
}

@ -14,7 +14,6 @@ import com.alibaba.android.arouter.facade.annotation.Route
import com.google.gson.Gson
import com.tamsiree.rxkit.RxActivityTool
import com.tamsiree.rxkit.RxKeyboardTool
import com.tencent.qcloud.tuikit.tuichat.util.PermissionHelper
import com.xty.base.act.BaseVmAct
import com.xty.common.Const
import com.xty.common.LogUtils
@ -99,7 +98,7 @@ class RegisterAct : BaseVmAct<RegisterVm>() {
binding.mRegister.setOnClickListener {
RxKeyboardTool.hideSoftInput(this)
if (!binding.mPrivate.isSelected) {
if (!binding.seleck.isSelected) {
CommonToastUtils.showToast(R.string.please_agree_all)
return@setOnClickListener
}
@ -113,7 +112,7 @@ class RegisterAct : BaseVmAct<RegisterVm>() {
pwd
)
}
binding.mPrivate.setOnClickListener {
binding.seleck.setOnClickListener {
it.isSelected = !it.isSelected
}
setPrv()
@ -123,20 +122,16 @@ class RegisterAct : BaseVmAct<RegisterVm>() {
* 隐私条款
*/
private fun setPrv() {
var txtCol = ContextCompat.getColor(this, R.color.col_313)
var txtCol = ContextCompat.getColor(this, R.color.col_02c)
binding.mPrivate.movementMethod = MyLinkedMovementMethod().getInstance()
var span = SpannableString(getString(R.string.private_info))
span.setSpan(object : ClickableSpan() {
override fun onClick(widget: View) {
bundle.clear()
bundle.putString("title", "用户协议")
bundle.putInt("type", Const.AGREEMENT_1)
RouteManager.goActRequest(
ARouterUrl.RICH_TEXT,
this@RegisterAct,
USER_AGREEMENT,
bundle
)
bundle.putBoolean("isAgree", false)
bundle.putString("url", "https://dc.zhongjian365.com/agreement.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
}
override fun updateDrawState(ds: TextPaint) {
@ -150,13 +145,9 @@ class RegisterAct : BaseVmAct<RegisterVm>() {
override fun onClick(widget: View) {
bundle.clear()
bundle.putString("title", "隐私政策")
bundle.putString("url", "https://auprty.com/app/static/app/privacy.html")
RouteManager.goActRequest(
ARouterUrl.AGREEMNT_READ_WEB_ACT,
this@RegisterAct,
PRIVACY,
bundle
)
bundle.putBoolean("isAgree", false)
bundle.putString("url", "https://dc.zhongjian365.com/privacy.html")
RouteManager.goAct(ARouterUrl.AGREEMNT_READ_WEB_ACT, bundle)
}
override fun updateDrawState(ds: TextPaint) {
@ -203,7 +194,7 @@ class RegisterAct : BaseVmAct<RegisterVm>() {
mViewModel.mLogin.observe(this){
4
RouteManager.goAct(ARouterUrl.BASE_INFO_CHANGE)
RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT)
EventBus.getDefault().post(LoginOrRegisterEvent())
this@RegisterAct.finish()

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

@ -0,0 +1,43 @@
package com.zj365.dc.activity
import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.facade.annotation.Route
import com.xty.base.act.BaseVmAct
import com.xty.base.vm.BaseVm
import com.xty.common.arouter.ARouterUrl
import com.zj365.dc.databinding.ActWatchFamilyHealthBinding
import com.zj365.dc.fragment.DynamicManagementFrag
@Route(path = ARouterUrl.WATCH_FAMILY_HEALTH)
class WatchFamilyHealthAct : BaseVmAct<BaseVm>() {
val binding by lazy { ActWatchFamilyHealthBinding.inflate(layoutInflater) }
var showIdInfo = ""
override fun liveObserver() {
}
override fun initView() {
super.initView()
statusBar(binding.title.mView)
binding.title.mTvTitle.text ="健康监测"
binding.title.mIvBack.setOnClickListener {
finish()
}
showIdInfo = intent.extras!!.getString("id","")
supportFragmentManager.beginTransaction().replace(binding.container.id, setArgumentFrag(DynamicManagementFrag(),showIdInfo)).commit()
}
private fun setArgumentFrag(frag: Fragment, id: String = ""): Fragment {
val bundle = Bundle()
bundle.putString("id", id)
frag.arguments = bundle
return frag
}
override fun setLayout() = binding.root
}

@ -28,6 +28,7 @@ import com.xty.common.bracelet.YCBBlueConnectHelper
import com.xty.common.bracelet.checkBlueConnectPermission
import com.xty.common.getImageUrl
import com.xty.common.util.CommonUtils
import com.xty.network.utils.AppUtils
import com.zj365.dc.BuildConfig
import com.zj365.dc.databinding.ActWelcomeBinding
@ -83,6 +84,7 @@ class WelcomeAct : BaseVmAct<WelcomeVm>() {
.keyboardEnable(true)
.fullScreen(true)
.init()
getTaskAct()
binding.mCard.setOnClickListener {
job?.let {
@ -155,7 +157,7 @@ class WelcomeAct : BaseVmAct<WelcomeVm>() {
}
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?>() {
override fun onResourceReady(
resource: Bitmap,
@ -165,11 +167,11 @@ class WelcomeAct : BaseVmAct<WelcomeVm>() {
binding.mBg.setImageBitmap(resource)
}
}
})
})*/
}
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?>() {
override fun onResourceReady(
resource: Bitmap,
@ -196,7 +198,7 @@ class WelcomeAct : BaseVmAct<WelcomeVm>() {
}
}
}
})
})*/
}
private fun startTimer() {
@ -231,7 +233,7 @@ class WelcomeAct : BaseVmAct<WelcomeVm>() {
Log.i("terry", "useId:$userId")
JPushInterface.setAlias(this,userId.toInt(),"user_release_${userId}")
}
JPushHelper(this).stopOrResumeJPush(MMkvHelper.getBoolean(Const.NOTICE_FLAG))
// JPushHelper(this).stopOrResumeJPush(MMkvHelper.getBoolean(Const.NOTICE_FLAG))
}

@ -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
}

@ -82,6 +82,12 @@ class BannerCustomAdapter(var context: Context)
mVHMap.append(position, imageHolder)
context?.let { imageHolder.imageView.setBigImage(it, data?.imgUrl) }
}
else ->{
val imageHolder: ImageHolder = holder as ImageHolder
mVHMap.append(position, imageHolder)
context?.let { imageHolder.imageView.setBigImage(it, data?.imgUrl) }
}
}
}
}

@ -33,7 +33,7 @@ class HealthMonitoringAdapter(
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_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 {

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

@ -2,7 +2,6 @@ package com.zj365.dc.adapter
import android.widget.ImageView
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.tencent.qcloud.tuikit.timcommon.component.impl.GlideEngine
import com.xty.base.adapter.BaseAdapter
import com.xty.common.setImage
import com.xty.network.model.FoodRecoginzeInfo

@ -31,7 +31,7 @@ class WarningMessageAdapter():BaseAdapter<MessageBean.SysMsg>(R.layout.item_warn
}
draw.mutate()
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)
}
}

@ -6,7 +6,7 @@ import android.view.View
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.lifesense.android.ble.core.application.ApplicationContext
import com.alibaba.android.arouter.facade.annotation.Route
import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack
import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram
import com.tencent.mm.opensdk.openapi.WXAPIFactory
@ -85,6 +85,11 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
private val dialogBind by lazy {
DialogTip(requireContext(), "需绑定中健三六五健康手表,才能查看", "去绑定") {
RouteManager.goAct(ARouterUrl.DEVICE_CHOICE)
}
}
override fun setLayout(): View = binding.root
override fun initView() {
super.initView()
@ -111,7 +116,7 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
onEventObject(
requireContext(),
UmengEventId.Banner,
"type:${bannerBean.bannerType}; 标题:${bannerBean.title}"
"url:${bannerBean.linkAddress}"
)
when (bannerBean.bannerType) {
1 -> {//图片
@ -143,7 +148,7 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
val req = WXLaunchMiniProgram.Req()
req.userName = bannerBean.wxId// 填小程序原始id
// req.path = it ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
req.path = bannerBean.linkAddress ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
if(bannerBean.wxType == 3){
req.miniprogramType =
@ -167,7 +172,7 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
onEventObject(
requireContext(),
UmengEventId.Banner,
"type:${bannerBean.bannerType}; 标题:${bannerBean.title}"
"url:${bannerBean.linkAddress}"
)
when (bannerBean.bannerType) {
1 -> {//图片
@ -200,7 +205,7 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
val req = WXLaunchMiniProgram.Req()
req.userName = bannerBean.wxId // 填小程序原始id
//req.path = it ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
req.path = bannerBean.linkAddress ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
if(bannerBean.wxType == 3){
req.miniprogramType =
@ -229,7 +234,6 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
bundle.clear()
var bean = adapter.getItem(position) as ScienceBean
bundle.putSerializable("bean", bean)
onEventObject(requireContext(), UmengEventId.HealthScience, "${bean.name}")
RouteManager.goAct(ARouterUrl.SCIENCE_DETAIL, bundle)
}
@ -240,10 +244,37 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
var contentData = adapter.getItem(position) as HomeLayoutBean.HomeChildBean
onEventObject(
requireContext(),
UmengEventId.FUNCTION,
"id:${contentData.id}"
)
when(contentData.jumpType){
1 ->{
CommonToastUtils.showToast("敬请期待")
when(contentData.jumpUrl){
"health_data" ->{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT)
}
// CommonToastUtils.showToast("敬请期待")
}
"health_dic" ->{
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
RouteManager.goAct(ARouterUrl.HEALTH_CODE_MAIN_ACT)
}
// CommonToastUtils.showToast("敬请期待")
}
else ->{
CommonToastUtils.showToast("敬请期待")
}
}
}
@ -256,11 +287,17 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
}
}else{
contentData.jumpUrl?.let {
bundle.clear()
bundle.putString("title", contentData.name)
bundle.putString("url", contentData.jumpUrl)
RouteManager.goAct(ARouterUrl.WEB_ACT, bundle)
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
contentData.jumpUrl?.let {
bundle.clear()
bundle.putString(
"web_site_url",
"${it}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}
}
}
@ -276,7 +313,7 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
val req = WXLaunchMiniProgram.Req()
req.userName = contentData.wxId // 填小程序原始id
// req.path = it ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
req.path = contentData.jumpUrl ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
if(contentData.wxType == 3){
req.miniprogramType =
@ -306,6 +343,11 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
layoutContentAdapter.setOnItemClickListener { adapter, view, position ->
var contentData = adapter.getItem(position) as HomeLayoutBean.HomeChildBean
onEventObject(
requireContext(),
UmengEventId.FUNCTION,
"id:${contentData.id}"
)
when(contentData.jumpType){
1 ->{
contentData.jumpUrl?.let {
@ -314,7 +356,6 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
onEventObject(requireContext(), UmengEventId.HealthRisk)
bundle.clear()
bundle.putString("id", showIdInfo)
RouteManager.goAct(ARouterUrl.TONGUE_MAIN_ACTIVITY, bundle)
@ -339,7 +380,29 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
}
"PSYCHOLOGY" ->{
CommonToastUtils.showToast("敬请期待")
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
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 ->{
@ -351,11 +414,18 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
}
2->{
contentData.jumpUrl?.let {
bundle.clear()
bundle.putString("title", contentData.name)
bundle.putString("url", contentData.jumpUrl)
RouteManager.goAct(ARouterUrl.WEB_ACT, bundle)
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
contentData.jumpUrl?.let {
bundle.clear()
bundle.putString(
"web_site_url",
"${it}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}
}
}
@ -369,7 +439,7 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
val req = WXLaunchMiniProgram.Req()
req.userName = contentData.wxId // 填小程序原始id
//req.path = it ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
req.path = contentData.jumpUrl ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
if(contentData.wxType == 3){
req.miniprogramType =
WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE // 可选打开 开发版,体验版和正式版
@ -515,41 +585,11 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
}
private var onClickListener = View.OnClickListener {
when (it.id) {
R.id.ll_health_records -> { //健康档案
bundle.putString("id", showIdInfo)
RouteManager.goAct(ARouterUrl.HEALTH_RECORD, bundle)
}
//防癌
R.id.ll_cancer_screening -> {
// onEventObject(requireContext(), UmengEventId.HealthRisk)
bundle.clear()
bundle.putString("id", showIdInfo)
RouteManager.goAct(ARouterUrl.PRVENT_CANCER, bundle)
// showToast("功能暂未开通,敬请期待")
}
//舌诊
R.id.ll_ai_tongue_diagnosis -> {
onEventObject(requireContext(), UmengEventId.HealthRisk)
bundle.clear()
bundle.putString("id", showIdInfo)
RouteManager.goAct(ARouterUrl.TONGUE_MAIN_ACTIVITY, bundle)
// showToast("功能暂未开通,敬请期待")
}
}
}
// 刷新注册
private fun refresh() {
refresh.setRefresh(binding.mRefresh) {
/* refresh.setRefresh(binding.mRefresh) {
request()
}
}*/
}
private fun request() {
@ -595,7 +635,6 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
}else{
binding.mBannerCardTwo.visibility = View.VISIBLE
mMiddleBannerAdapter.setDatas(it[2])
// mMiddleBannerAdapter.notifyDataSetChanged()
}
@ -605,33 +644,6 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
mViewModel.scinceLive.observe(this) {
adapterSince.setNewInstance(it.data)
}
//我家人信息
mViewModel.familyLive.observe(this) {
mFamilyAdapter.data.clear()
it.data.add(0, FamilyBean().apply {
this.fCall = ""
})
var selectPosition = 0
if (showIdInfo.isNotEmpty()) {
it.data.forEachIndexed { index, familyBean ->
if (showIdInfo == familyBean.userJointId.toString()) {
selectPosition = index
return@forEachIndexed
}
}
//如果家人解绑了 则直接查自己的
if (selectPosition == 0) {
showIdInfo = ""
}
}
it.data.add(FamilyBean().apply {
this.fCall = "家人"
})
mFamilyAdapter.position = selectPosition
mFamilyAdapter.setNewInstance(it.data)
}
mViewModel.layoutLive.observe(this){
layoutTopAdapter.setNewInstance(it.data.top)
if(it.data.middle.size <= 6){
@ -646,7 +658,25 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
mViewModel.videoDoctorLive.observe(this){
if (it.data.type == 2){
CallKit.startCallKitLogic(requireActivity(),it.data.data)
CallKit.startCallKitLogic(requireActivity(),it.data.url)
}else{
val appId = "wx032bacb749c0dcb0" // 填移动应用(App)的 AppId非小程序的 AppID
val api = WXAPIFactory.createWXAPI(requireContext(), appId)
val req = WXLaunchMiniProgram.Req()
req.userName = it.data.wxid // 填小程序原始id
req.path = it.data.url ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
if(it.data.wxtype== 1){
req.miniprogramType =
WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE // 可选打开 开发版,体验版和正式版
}else{
req.miniprogramType =
WXLaunchMiniProgram.Req.MINIPROGRAM_TYPE_PREVIEW // 可选打开 开发版,体验版和正式版
}
api.sendReq(req)
}
}
}
@ -667,22 +697,12 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
binding.mCom.mRecycle.adapter = mFamilyAdapter
mFamilyAdapter.setOnItemClickListener { adapter, view, position ->
if (position == mFamilyAdapter.data.size - 1) { //第一期暂不做
/* onEventObject(requireContext(), UmengEventId.Family)
RouteManager.goAct(ARouterUrl.BIND_FAMILY)*/
RouteManager.goAct(ARouterUrl.FAMILY_HEALTH_ACT)
} else {
var bean = adapter.getItem(position) as FamilyBean
showIdInfo = if (bean.id == 0) {
showFamily = null
""
} else {
showFamily = bean
bean.userJointId.toString()
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
RouteManager.goAct(ARouterUrl.FAMILY_HEALTH_ACT)
}
mFamilyAdapter.position = position
mFamilyAdapter.notifyDataSetChanged()
EventBus.getDefault().post(ChangeFamilyEvent(showIdInfo))
}
}
@ -704,15 +724,6 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
reqGpsPermissionDialog.show()
}
//家人信息改变 刷新
@Subscribe(threadMode = ThreadMode.MAIN)
fun familyChange(event: FamilyEvent) {
// mViewModel.getMyFamilyList()
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun loginOrRegisterChange(event: LoginOrRegisterEvent){
showIdInfo =if (MMkvHelper.getLong(Const.USER_ID).toString() == "0") {
@ -720,7 +731,7 @@ HealthHomeFrag : BaseVmFrag<HomeVm>() {
} else {
MMkvHelper.getLong(Const.USER_ID).toString()
}
request()
// request()
}
@Subscribe(threadMode = ThreadMode.MAIN)

@ -2,11 +2,13 @@ package com.zj365.dc.fragment
import android.content.Intent
import android.graphics.Color
import android.text.TextUtils
import android.view.View
import androidx.localbroadcastmanager.content.LocalBroadcastManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.tencent.qcloud.tuicore.TUIConstants
import com.xty.base.fragment.BaseFragList
import com.xty.common.Const
import com.xty.common.MMkvHelper
import com.xty.common.R
import com.xty.common.arouter.ARouterUrl
import com.xty.common.arouter.RouteManager
@ -57,49 +59,20 @@ class MessageFragment : BaseFragList<MessageVm>() {
}
initAdapter()
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)
}*/
}
if(!TextUtils.isEmpty(userId)){
mViewModel.getSystemMsg()
}
override fun refresh() {
mViewModel.getSystemMsg()
}
override fun setViewModel()= MessageVm()
@ -108,8 +81,8 @@ class MessageFragment : BaseFragList<MessageVm>() {
mViewModel.msgData.observe(this){
adapter.setNewInstance(it.data.list)
val intent = Intent()
intent.action = TUIConstants.CONVERSATION_UNREAD_COUNT_ACTION
intent.putExtra(TUIConstants.UNREAD_COUNT_EXTRA, it.data.unReadCount)
intent.action = Const.CONVERSATION_UNREAD_COUNT_ACTION
intent.putExtra(Const.UNREAD_COUNT_EXTRA, it.data.unReadCount)
LocalBroadcastManager.getInstance(requireContext())
.sendBroadcast(intent)
}
@ -129,6 +102,13 @@ class MessageFragment : BaseFragList<MessageVm>() {
@Subscribe(threadMode = ThreadMode.MAIN)
fun loginOutChange(event: LoginOutEvent){
// 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)

@ -4,8 +4,11 @@ import android.Manifest
import android.content.Intent
import android.net.Uri
import android.os.Build
import android.text.TextUtils
import android.util.Log
import android.view.View
import androidx.annotation.RequiresApi
import cn.jpush.android.api.JPushInterface
import com.xty.base.dialog.AppUpdateDialog
import com.xty.base.fragment.BaseVmFrag
import com.xty.common.*
@ -18,9 +21,14 @@ import com.xty.common.event.LoginOutEvent
import com.xty.common.event.MyInfoEvent
import com.xty.common.util.CommonToastUtils
import com.xty.common.util.CommonUtils
import com.xty.common.util.JumpPermissionManagement
import com.xty.common.util.PermissionUtils
import com.xty.common.xqr_code.XQRCodeAct
import com.xty.network.model.InviteCustodyBean
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.activity.MainActivity
import com.zj365.dc.databinding.FragMineBinding
@ -29,6 +37,7 @@ import com.zj365.health.weight.DialogTip
import com.zj365.health.weight.DialogTipNew
import com.zj365.mime.act.DevInfoAct
import com.zj365.mime.vm.SettingVm
import com.zj365.mime.weight.FactorySettingDialog
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
@ -39,7 +48,7 @@ import pub.devrel.easypermissions.EasyPermissions
*/
class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
class MineFrag : BaseVmFrag<SettingVm>() , EasyPermissions.PermissionCallbacks{
private val binding by lazy { FragMineBinding.inflate(layoutInflater) }
@ -52,6 +61,10 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
}
var isDemonstrate: Boolean = false
var otherInfo: UserOtherInfo? = null
var isLogin= false
override fun setLayout(): View = binding.root
private val defaultIcon by lazy {
@ -65,7 +78,6 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
var inviteCustodyBean: InviteCustodyBean? = null
val dialogInvite by lazy {
DialogTipNew(requireContext(), "监护邀请","", "确认","取消",false,{
inviteCustodyBean?.let {
@ -96,13 +108,6 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
//刷新注册
refresh()
binding.mNoNetwork.mRefreshBtn.isSelected = true
binding.mNoNetwork.mRefreshBtn.setOnClickListener {
mViewModel.getMySetting()
mViewModel.getAllInfo(showIdInfo,false)
mViewModel.searchInviteInfo()
}
binding.clInfo.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
@ -125,7 +130,13 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}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("敬请期待")
}
}
@ -133,7 +144,13 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}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("敬请期待")
}
}
@ -149,25 +166,23 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
return@setOnClickListener
}
mViewModel.allData.value?.apply {
data.apply {
if (adorn.wearCount > 29 && adorn.activeWear > 14) {
onEventObject(requireContext(), UmengEventId.Health30Day)
bundle.clear()
bundle.putString("id", showIdInfo)
bundle.putInt("page", 1)
RouteManager.goAct(ARouterUrl.WARRING, bundle)
} else {
onEventObject(
requireContext(),
UmengEventId.Health30Day,
"佩戴未满30天或活跃天数未满15天。"
)
CommonToastUtils.showToast("尊敬的用户您好该功能需要佩戴30天且活跃佩戴15天查看请坚持佩戴且每日同步数据")
}
Const.userDeviceLiveData.value?.apply {
if (adorn.wearCount > 29 && adorn.activeWear > 14) {
onEventObject(requireContext(), UmengEventId.Health30Day)
bundle.clear()
bundle.putString("id", showIdInfo)
bundle.putInt("page", 1)
RouteManager.goAct(ARouterUrl.WARRING, bundle)
} else {
onEventObject(
requireContext(),
UmengEventId.Health30Day,
"佩戴未满30天或活跃天数未满15天。"
)
CommonToastUtils.showToast("尊敬的用户您好该功能需要佩戴30天且活跃佩戴15天查看请坚持佩戴且每日同步数据")
}
}
}
}
@ -175,24 +190,31 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
onEventObject(requireContext(), UmengEventId.HealthRisk)
bundle.clear()
bundle.putString("id", showIdInfo)
RouteManager.goAct(ARouterUrl.SUBMIT_REPORTMain, bundle)
}
}
/*binding.llOrder.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
CommonToastUtils.showToast("敬请期待")
}
}*/
binding.mllMember.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
CommonToastUtils.showToast("敬请期待")
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{
CommonToastUtils.showToast("敬请期待")
}
}
}
}
@ -200,7 +222,13 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}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("敬请期待")
}
}
@ -208,7 +236,9 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
CommonToastUtils.showToast("敬请期待")
RouteManager.goAct(ARouterUrl.FAMILY_RECORD_ACT)
// CommonToastUtils.showToast("敬请期待")
}
}
@ -222,6 +252,12 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
bundle.putInt("page", 0)
bundle.putBoolean("isDemonstrate", (requireActivity() as MainActivity).isDemonstrate)
Const.functionListDate.value?.let {
if(it.size > 0){
bundle.putParcelableArrayList("functionList",it)
}
}
val id = if (MMkvHelper.getLong(Const.USER_ID).toString() == "0") {
""
} else {
@ -242,19 +278,38 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
bundle.clear()
bundle.putString("id", showIdInfo)
bundle.putSerializable("index", ReportVm.ReportInfoType.Day)
bundle.putBoolean("isDemonstrate", isDemonstrate)
bundle.putBoolean("isDemonstrate", (requireActivity() as MainActivity).isDemonstrate)
bundle.putInt("pageType", 0)
bundle.putString("titleName", "日报")
// RouteManager.goAct(ARouterUrl.HEALTH_REPORT, bundle)//老版(日周月年)报
Const.functionListDate.value?.let {
if(it.size > 0){
bundle.putParcelableArrayList("functionList",it)
}
}
RouteManager.goAct(ARouterUrl.HEALTH_SKY_HOUR_REPORT, bundle)
// CommonToastUtils.showToast("敬请期待")
}
}
binding.llStartBs.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
CommonToastUtils.showToast("敬请期待")
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{
CommonToastUtils.showToast("敬请期待")
}
}?:{
CommonToastUtils.showToast("敬请期待")
}
}
}
@ -262,7 +317,23 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
CommonToastUtils.showToast("敬请期待")
otherInfo?.let {
if (!TextUtils.isEmpty(it.placard)){
bundle.clear()
bundle.putString(
"web_site_url",
"${it.placard}"
)
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
}else{
CommonToastUtils.showToast("敬请期待")
}
}?:{
CommonToastUtils.showToast("敬请期待")
}
}
}
@ -277,6 +348,12 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
}else {
bundle.clear()
bundle.putString("id", user?.id)
Const.functionListDate.value?.let {
if(it.size > 0){
bundle.putParcelableArrayList("functionList",it)
}
}
RouteManager.goAct(ARouterUrl.COMPARE_PAGE_DATA_ACT, bundle)
}
}
@ -299,7 +376,9 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
CommonToastUtils.showToast("敬请期待")
onEventObject(requireContext(), UmengEventId.EnterpriseData)
RouteManager.goAct(ARouterUrl.ENTERPRISE_INFO)
// CommonToastUtils.showToast("敬请期待")
}
}
@ -307,7 +386,53 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
CommonToastUtils.showToast("敬请期待")
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{
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("敬请期待")
}
}
}
}
@ -315,7 +440,23 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
CommonToastUtils.showToast("敬请期待")
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{
CommonToastUtils.showToast("敬请期待")
}
}?:{
CommonToastUtils.showToast("敬请期待")
}
}
}
@ -323,11 +464,17 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
CommonToastUtils.showToast("敬请期待")
RouteManager.goAct(ARouterUrl.SHOP_ORDER_LIST_ACT)
//CommonToastUtils.showToast("敬请期待")
}
}
/* bundle.clear()
bundle.putString("id", user?.id)
RouteManager.goAct(ARouterUrl.ORDER_LIST, bundle)*/
binding.mllServerOrder.setOnClickListener {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
RouteManager.goAct(ARouterUrl.ORDER_LIST)
//CommonToastUtils.showToast("敬请期待")
}
}
@ -367,18 +514,34 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
if(MMkvHelper.getLong(Const.USER_ID).toString() == "0"){
RouteManager.goAct(ARouterUrl.LOGIN_ACT)
}else {
mViewModel.getVersionNew(BuildConfig.VERSION_CODE)
mViewModel.getVersionNew(AppUtils.getVersionCode(requireActivity()))
}
}
binding.llCustomerService.setOnClickListener {
if(EasyPermissions.hasPermissions(requireContext(), Manifest.permission.CALL_PHONE)){
startActivity(Intent(Intent.ACTION_CALL, Uri.parse("tel:4000063365")))
if(EasyPermissions.hasPermissions(requireContext(),
Manifest.permission.CALL_PHONE)){
startActivity(Intent(Intent.ACTION_CALL, Uri.parse("tel:4000063365")))
}else{
EasyPermissions.requestPermissions(this,"申请打电话权限",
DevInfoAct.perssionCode,
Manifest.permission.CALL_PHONE);
if (EasyPermissions.somePermissionDenied(this,
Manifest.permission.CALL_PHONE)){
DialogTip(
requireContext(),
"中健365需要拨打电话权限,需要打开设置页面么?"
) {
JumpPermissionManagement.GoToSetting(requireActivity())
}.show()
}else{
FactorySettingDialog(
requireContext(),
"中健365需要拨打电话权限以便您联系客服功能"
) {
EasyPermissions.requestPermissions(this,"",
0x00011,
Manifest.permission.CALL_PHONE)
}.show()
}
}
}
@ -386,34 +549,89 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
private fun refresh() {
refresh.setRefresh(binding.mRefresh) {
mViewModel.getMySetting()
// }
mViewModel.getAllInfo(showIdInfo,false)
// mViewModel.getScore(1)
mViewModel.searchInviteInfo()
if (!TextUtils.isEmpty(showIdInfo)) {
mViewModel.getMySetting()
mViewModel.getUserOtherInfo()
// mViewModel.getAllInfo(showIdInfo, false)
mViewModel.searchInviteInfo()
}
}
}
override fun onResume() {
super.onResume()
/* if (!checkNetworkAvailable(requireContext())) {
binding.mNoNetwork.root.visibility = View.VISIBLE
} else {
if (binding.mNoNetwork.root.visibility == View.VISIBLE) {*/
mViewModel.getMySetting()
// }
if (!TextUtils.isEmpty(showIdInfo) && !isLogin){
Const.mainLiveData.value?: mViewModel.getMySetting()
Const.userDeviceLiveData.value?:mViewModel.getUserDeviceInfo(showIdInfo)
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
}
mViewModel.getAllInfo(showIdInfo,false)
// mViewModel.getScore(1)
mViewModel.searchInviteInfo()
// }
}
override fun observer() {
/* mViewModel.familyLive.observe(this) {
binding.mFamily.text = it.data.size.toString()
}*/
mViewModel.useOtherInfoLiveData.observe(this){
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) {
binding.mIntegral.text = (if (it.data.num.isNullOrEmpty()) "0" else it.data.num!!)
}
@ -438,35 +656,38 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
}
Const.mainLiveData.observe(this) {
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.deviceInfo.observe(this){
Const.userDeviceLiveData.value = it.data
}
//个人设置信息获取
mViewModel.settingLive.observe(this) {
if (null == it.data) return@observe
it.data.let { settingBean ->
if (BuildConfig.isRelease) {//设置极光推送别名
JPushInterface.setAlias(
requireContext(),
settingBean.user.id.toInt(),
"user_release_${settingBean.user.id}"
)
}
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
}
}
@ -486,9 +707,11 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
} else {
MMkvHelper.getLong(Const.USER_ID).toString()
}
isLogin = true
mViewModel.getMySetting()
// mViewModel.getScore(1)
mViewModel.getUserDeviceInfo(showIdInfo)
mViewModel.searchInviteInfo()
mViewModel.getUserOtherInfo()
}
@Subscribe(threadMode = ThreadMode.MAIN)
@ -498,24 +721,21 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
@Subscribe(threadMode = ThreadMode.MAIN)
fun addSuccess(event: AddSuccessEvent){
mViewModel.getMySetting()
mViewModel.getAllInfo(showIdInfo,false)
// mViewModel.getScore(1)
// mViewModel.getMySetting()
mViewModel.getUserDeviceInfo(showIdInfo)
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun bindDevSuccess(event:BindDevEvent){
mViewModel.getUserDeviceInfo(showIdInfo)
mViewModel.getMySetting()
mViewModel.getAllInfo(showIdInfo,false)
// mViewModel.getScore(1)
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun refreshUI(event: MyInfoEvent){
mViewModel.getMySetting()
mViewModel.getAllInfo(showIdInfo,false)
// mViewModel.getScore(1)
mViewModel.searchInviteInfo()
mViewModel.getUserDeviceInfo(showIdInfo)
// mViewModel.searchInviteInfo()
mViewModel.getUserOtherInfo()
}
@ -547,10 +767,16 @@ class MineFrag : BaseVmFrag<SettingVm>(),EasyPermissions.PermissionCallbacks {
fun refreshLogoutUI(){
user = null
binding.mIntegral.text = "0"
showIdInfo = ""
binding.mIntegral.text = "--"
binding.mName.text = ""
binding.mPhone.text = ""
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>) {

@ -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
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
class DeviceStateWrapper {
protected var device: DeviceInfo? = null
/* protected var device: DeviceInfo? = null
constructor() {}
constructor(device: DeviceInfo?, state: ConnectionState?){
@ -48,5 +46,5 @@ class DeviceStateWrapper {
state = BlueUtil.getBlueManage().getDeviceConnectState(device!!.mac)
}
return isConnected()
}
}*/
}

@ -0,0 +1,295 @@
package com.zj365.dc.vm
import androidx.lifecycle.MutableLiveData
import com.xty.base.vm.BaseVm
import com.xty.common.TimeUtils
import com.xty.common.util.CommonToastUtils
import com.xty.network.model.ImageUploadBean
import com.xty.network.model.NotAccepted
import com.xty.network.model.PrevBean
import com.xty.network.model.RespBody
import com.zj365.dc.R
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.withContext
import okhttp3.MultipartBody
import org.json.JSONArray
import org.json.JSONObject
import java.io.File
class BasicInfoVm : BaseVm() {
val setBasic by lazy {MutableLiveData<NotAccepted>()}
val prevLive by lazy{MutableLiveData<RespBody<PrevBean>>()}
val activeLive by lazy {MutableLiveData<NotAccepted>()}
fun submit(path: String,name:String,sex:String, icCard:String,height:String,weight:String,area:String,urgent:String,urgentPhone:String,urgentRelation:String
,province:String,city:String,district:String,lat:String,lng:String,medicNames:String,medicIds:String,signPath:String,devNum:String,code:String,devMc:String,devName:String,diseaseList:String,birthDay:String,birthdayType:Int) {
// if(icCard.length!=18){
// ToastUtils.show("请输入正确的身份证号")
// return
// }
if(height.isNullOrEmpty()){
CommonToastUtils.showToast("请输入身高")
return
}
if (height.toFloat() < 50 || height.toFloat() > 260){
CommonToastUtils.showToast("请输入正确身高")
return
}
if(weight.isNullOrEmpty()){
CommonToastUtils.showToast("请输入体重")
return
}
if(weight.toFloat() < 3 || weight.toFloat() > 300){
CommonToastUtils.showToast("请输入正确体重")
return
}
if (TimeUtils.getAgeByBirth(birthDay) < 14){
CommonToastUtils.showToast("需要年满14岁才可使用")
return
}
if(area.isNullOrEmpty()){
CommonToastUtils.showToast("请输入家庭住址")
return
}
if(medicIds.isNullOrEmpty()){
CommonToastUtils.showToast("请选择病史")
return
}
if(urgent.isNullOrEmpty()){
CommonToastUtils.showToast("请输入紧急联系人姓名")
return
}
if(urgentPhone.isNullOrEmpty()){
CommonToastUtils.showToast("请输入紧急联系人联系方式")
return
}
if(urgentRelation.isNullOrEmpty()){
CommonToastUtils.showToast("请输入关系")
return
}
if(devMc.isNullOrEmpty()){
CommonToastUtils.showToast(R.string.please_connect_device)
return
}
if(devNum.isNullOrEmpty()){
CommonToastUtils.showToast(R.string.please_input_device_code)
return
}
if(code.isNullOrEmpty()){
CommonToastUtils.showToast(R.string.please_input_active_code)
return
}
if(signPath.isNullOrEmpty()){
CommonToastUtils.showToast("请完善签名")
return
}
startHttp {
withContext(Dispatchers.IO) {
var fileId:String?=null
if(!path.isNullOrEmpty()){
var image = async { uploadImage(path) }
val await = image.await()
fileId = await.fileId
}
var upload = async {uploadInfo(name,sex, icCard,height,weight,area,urgent,urgentPhone,urgentRelation,fileId,province,city,
district,lat,lng,medicNames,medicIds,diseaseList,birthDay,birthdayType) }
val infoUpload = upload.await() //个人信息上传
if(infoUpload.code==0){
var activeDev =async { active(signPath,devNum,code,devMc,devName) }
var signUpload=activeDev.await()
if(signUpload.code==0){
setBasic.postValue(infoUpload.data)
}else{
CommonToastUtils.showToast(signUpload.msg)
}
}else{
CommonToastUtils.showToast(infoUpload.msg)
}
}
}
}
fun submitNew(path: String,name:String,sex:String, icCard:String,height:String,weight:String,area:String,urgent:String,urgentPhone:String,urgentRelation:String
,province:String,city:String,district:String,lat:String,lng:String,medicNames:String,medicIds:String ,diseaseList:String,birthDay:String,birthdayType:Int) {
// if(icCard.length!=18){
// ToastUtils.show("请输入正确的身份证号")
// return
// }
if(height.isNullOrEmpty()){
CommonToastUtils.showToast("请输入身高")
return
}
if (height.toFloat() < 50 || height.toFloat() > 260){
CommonToastUtils.showToast("请输入正确身高")
return
}
if(weight.isNullOrEmpty()){
CommonToastUtils.showToast("请输入体重")
return
}
if(weight.toFloat() < 3 || weight.toFloat() > 300){
CommonToastUtils.showToast("请输入正确体重")
return
}
if (TimeUtils.getAgeByBirth(birthDay) < 14){
CommonToastUtils.showToast("需要年满14岁才可使用")
return
}
if(area.isNullOrEmpty()){
CommonToastUtils.showToast("请输入家庭住址")
return
}
if(medicIds.isNullOrEmpty()){
CommonToastUtils.showToast("请选择病史")
return
}
if(urgent.isNullOrEmpty()){
CommonToastUtils.showToast("请输入紧急联系人姓名")
return
}
if(urgentPhone.isNullOrEmpty()){
CommonToastUtils.showToast("请输入紧急联系人联系方式")
return
}
if(urgentRelation.isNullOrEmpty()){
CommonToastUtils.showToast("请输入关系")
return
}
startHttp {
withContext(Dispatchers.IO) {
var fileId:String?=null
if(!path.isNullOrEmpty()){
var image = async { uploadImage(path) }
val await = image.await()
fileId = await.fileId
}
var upload = async {uploadInfo(name,sex, icCard,height,weight,area,urgent,urgentPhone,urgentRelation,fileId,province,city,
district,lat,lng,medicNames,medicIds,diseaseList,birthDay,birthdayType) }
val infoUpload = upload.await() //个人信息上传
if(infoUpload.code==0){
CommonToastUtils.showSucceedToast("提交成功")
setBasic.postValue(infoUpload.data)
}else{
CommonToastUtils.showToast(infoUpload.msg)
}
}
}
}
fun activeDevice(path:String,devNum:String,code:String,devMc:String,devName:String){
startHttp {
withContext(Dispatchers.IO){
var file= File(path)
var fileBody=MultipartBody.Part.createFormData("file",file.name,retrofits.getMultiPartFileRb(file))
var response= apiInterface().activite(fileBody,retrofits.getRequestBody(devNum.replace(" ", "")),retrofits.getRequestBody(code.replace(" ", "")),retrofits.getRequestBody(devMc),retrofits.getRequestBody(devName))
if (response.code == 0){
activeLive.postValue(response.data)
}else{
CommonToastUtils.showToast(response.msg)
}
}
}
}
/**
* 激活设备 签名文件上传
*/
private suspend fun active(path:String,devNum:String,code:String,devMc:String,devName:String):RespBody<NotAccepted>{
var file= File(path)
var fileBody=MultipartBody.Part.createFormData("file",file.name,retrofits.getMultiPartFileRb(file))
var response= apiInterface().activite(fileBody,retrofits.getRequestBody(devNum.replace(" ", "")),retrofits.getRequestBody(code.replace(" ", "")),retrofits.getRequestBody(devMc),retrofits.getRequestBody(devName))
return response
}
private suspend fun uploadInfo(name:String,sex:String, icCard:String,height:String,weight:String,area:String,
urgent:String,urgentPhone:String,urgentRelation:String,
fileId:String?,province:String,city:String,district:String,lat:String,lng:String,medicNames:String,medicIds:String,diseaseList:String,birthDay:String,birthdayType:Int): RespBody<NotAccepted> {
var json=JSONObject()
json.put("name",name)
json.put("sex",sex)
json.put("idCard",icCard)
json.put("height",height)
json.put("weight",weight)
json.put("area",area)
json.put("medicalHistory",medicNames)
json.put("historyId",medicIds)
json.put("latitude",lat)
json.put("longitude",lng)
json.put("province",province)
json.put("city",city)
json.put("district",district)
json.put("birthday",birthDay)
json.put("birthdayType",birthdayType)
if(diseaseList.isEmpty()){
json.put("diseaseList","")
}else{
var array=JSONArray(diseaseList) //去掉转移的斜杠
json.put("diseaseList",array)
}
json.put("urgent",urgent)
json.put("urgentPhone",urgentPhone)
json.put("urgentRelation",urgentRelation)
if(!fileId.isNullOrEmpty()){
json.put("avatarUrl",fileId)
}
var rb=retrofits.getRequestBody(json.toString())
var body=apiInterface().setUpdateUser(rb)
return body
}
private suspend fun uploadImage(path: String): ImageUploadBean {
var f = File(path)
var fileRb =
MultipartBody.Part.createFormData("file", f.name, retrofits.getMultiPartFileRb(f))
var body = apiInterface().uploadImage(fileRb)
return body.data
}
//1:用户协议 2:管家协议 3:隐私协议 7:佩戴须知
// fun getPrev(type:Int){
// startHttp {
// var response=apiInterface().getPrev(type)
// response.getCodeStatus(prevLive,nowData)
// }
// }
}

File diff suppressed because it is too large Load Diff

@ -81,7 +81,7 @@ class HomeVm: BaseVm() {
}
fun getHomeLayout(){
startHttp {
startHttp (false){
var body= apiInterface().getHomeLayout()
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,15 +6,18 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.xty.base.vm.BaseVm
import com.xty.common.Const
import com.xty.common.LogUtils
import com.xty.common.MMkvHelper
import com.xty.common.util.CommonUtils
import com.xty.network.model.BannerBean
import com.xty.network.model.BindDeviceListBean
import com.xty.network.model.InviteCustodyBean
import com.xty.network.model.RespBody
import com.xty.network.model.SettingBean
import com.xty.network.model.UnReadMessageBean
import com.xty.network.model.Update
import com.xty.network.model.UserEquipmentInformationizationBean
import com.xty.network.utils.AppUtils
import com.zj365.dc.BuildConfig
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
@ -41,6 +44,9 @@ class MainVm : BaseVm() {
val confirmInviteLiveData by lazy { MutableLiveData<RespBody<Any>>() }
val settingLive by lazy { MutableLiveData<RespBody<SettingBean>>() }
/**
* 设备类型1血压计2血糖仪.3体脂秤
*/
@ -63,9 +69,9 @@ class MainVm : BaseVm() {
response.getCodeStatus(saveSuccess, nowData)
}
}
fun getVersionNew() {
fun getVersionNew(versionCode:Int) {
startHttp {
var response = apiInterface().getVersionNew(BuildConfig.VERSION_CODE)
var response = apiInterface().getVersionNew(versionCode)
response.getCodeStatus(updateLive, nowData)
}
}
@ -150,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){
startHttp(false) {
var json = JSONObject()
@ -183,4 +181,16 @@ class MainVm : BaseVm() {
}
}
}
/**
* 个人设置接口
*/
fun getMySetting() {
startHttp(false) {
LogUtils.e("eeeeee","主界面请求个人中心数据啦")
val body = apiInterface().getMySetting()
body.getCodeStatus(settingLive, nowData)
}
}
}

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

@ -32,7 +32,7 @@ class PrevDialog(context: Context, private var agree: () -> Unit, private var gi
percentHeight = 3 / 5f
setDialogPadding(80, 0, 80, 80)
val txtCol = ContextCompat.getColor(context, R.color.col_009)
val txtCol = ContextCompat.getColor(context, R.color.col_02c)
binding.mContent.movementMethod = MyLinkedMovementMethod().getInstance()
val string = context.getString(R.string.prev_content)
val span = SpannableString(string)
@ -71,8 +71,10 @@ class PrevDialog(context: Context, private var agree: () -> Unit, private var gi
span.setSpan(object : ClickableSpan() {
override fun onClick(widget: View) {
val bundle = Bundle()
bundle.putString("title", "中健三六五健康 APP 权限列表")
bundle.putString("url", "https://dc.zhongjian365.com/permission.html")
/* bundle.putString("title", "中健三六五健康 APP 权限列表")
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)
}
@ -88,23 +90,8 @@ class PrevDialog(context: Context, private var agree: () -> Unit, private var gi
override fun onClick(widget: View) {
val bundle = Bundle()
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("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)
}
@ -112,26 +99,9 @@ class PrevDialog(context: Context, private var agree: () -> Unit, private var gi
super.updateDrawState(ds)
ds.color = txtCol
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) {
super.updateDrawState(ds)
ds.color = txtCol
ds.isUnderlineText = false
ds.clearShadowLayer()
}
}, 99, 114, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)*/
}, 79, 85, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
binding.mContent.text = span
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>

@ -0,0 +1,253 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/title"
layout="@layout/title_white_bar" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/mSubmit"
android:layout_below="@+id/title"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@drawable/shape_round_white">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
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:id="@+id/mDeviceLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="@dimen/dp_10">
<com.xty.common.weight.RequiredTextView
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:text="@string/device"
android:textColor="@color/col_455"
android:textSize="@dimen/sp_14" />
<TextView
android:id="@+id/mBlueTooth"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:drawableRight="@mipmap/ic_next"
android:drawablePadding="@dimen/dp_10"
android:gravity="center|right"
android:hint="@string/please_connect_device"
android:paddingTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_15"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_16" />
<View
android:id="@+id/line1"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/col_f1f" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="@dimen/dp_10">
<com.xty.common.weight.RequiredTextView
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/device_code"
android:textColor="@color/col_455"
android:textSize="@dimen/sp_14" />
<EditText
android:id="@+id/mDevNum"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@null"
android:gravity="center|right"
android:hint="@string/please_input_device_code"
android:maxLength="20"
android:paddingTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_15"
android:singleLine="true"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_16" />
</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:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="@dimen/dp_10">
<com.xty.common.weight.RequiredTextView
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/active_code"
android:textColor="@color/col_455"
android:textSize="@dimen/sp_14" />
<EditText
android:id="@+id/mActiveCode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@null"
android:gravity="center|right"
android:hint="@string/please_input_active_code"
android:paddingTop="@dimen/dp_15"
android:paddingBottom="@dimen/dp_15"
android:singleLine="true"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_16" />
</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" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_10"
android:text="@string/sign"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_18" />
<androidx.cardview.widget.CardView
android:id="@+id/mSign"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_120"
android:layout_margin="@dimen/dp_10"
app:cardBackgroundColor="@color/col_f4f"
app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="0dp">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/confirm_sign"
android:textColor="@color/col_B8B"
android:textSize="@dimen/dp_14" />
<ImageView
android:id="@+id/mImageSign"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.cardview.widget.CardView>
<!-- <TextView-->
<!-- android:id="@+id/mSign"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_gravity="right"-->
<!-- android:layout_margin="@dimen/dp_15"-->
<!-- android:background="@drawable/shape_btn_select_bg"-->
<!-- 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/white"-->
<!-- android:textSize="@dimen/dp_16" />-->
<TextView
android:id="@+id/mPrivate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_30"
android:layout_marginBottom="@dimen/dp_10"
android:drawableLeft="@drawable/selctor_check_sel"
android:drawablePadding="@dimen/dp_10"
android:gravity="center|left"
android:text="@string/agree_private_active"
android:textColor="@color/col_8a00"
android:textColorHighlight="@android:color/transparent"
android:textSize="@dimen/dp_20" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<TextView
android:id="@+id/mSubmit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginRight="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_20"
android:autoSizeMaxTextSize="@dimen/dp_20"
android:background="@drawable/shape_btn_select_bg"
android:gravity="center"
android:padding="@dimen/dp_10"
android:text="@string/confirm"
android:textColor="@color/white"
android:textSize="@dimen/dp_16" />
</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:layout_marginTop="@dimen/dp_57"
android:textSize="@dimen/sp_18" />
<TextView
android:id="@+id/mPrivate"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_marginTop="@dimen/dp_17"
android:drawableLeft="@drawable/selctor_check_sel"
android:drawablePadding="@dimen/dp_6"
android:gravity="center"
android:text="隐私条款"
android:textColor="@color/col_7c7"
android:textSize="@dimen/sp_12"
tools:ignore="UseCompatTextViewDrawableXml" />
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
android:id="@+id/mPrivate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_8"
android:gravity="center"
android:textSize="@dimen/sp_13"
android:text="隐私条款"
android:textColor="@color/col_c7c" />
</LinearLayout>
<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>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/title_white_bar"
android:id="@+id/title"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="-12dp"
android:layout_below="@+id/title"
android:id="@+id/container"/>
</RelativeLayout>

@ -19,159 +19,6 @@
android:layout_height="wrap_content"
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>

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

@ -75,7 +75,7 @@
android:paddingRight="@dimen/dp_8"
android:paddingBottom="@dimen/dp_2"
tools:text="正常"
android:textColor="@color/col_D9BD"
android:textColor="@color/col_91d"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
app:layout_constraintLeft_toRightOf="@+id/mBMI"
@ -97,6 +97,7 @@
android:textColor="@color/white"
android:textSize="@dimen/dp_10"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/mHeaderImage"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/mHeaderImage" />
@ -133,7 +134,7 @@
android:textColor="@color/col_313"
android:layout_marginLeft="@dimen/dp_5"
android:textStyle="bold"
android:text="农历 十月十九"/>
tools:text="农历 十月十九"/>
<TextView
android:id="@+id/tv_weather"
android:layout_width="wrap_content"
@ -142,7 +143,7 @@
android:textColor="@color/col_313"
android:layout_marginLeft="@dimen/dp_5"
android:textStyle="bold"
android:text="晴 13℃"/>
tools:text="晴 13℃"/>
</LinearLayout>
@ -259,17 +260,6 @@
app:layout_constraintTop_toTopOf="@+id/tvProfession"
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
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
android:layout_width="match_parent"
@ -168,5 +153,4 @@
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>

@ -92,81 +92,7 @@
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>

@ -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>

@ -131,12 +131,12 @@
<LinearLayout
android:id="@+id/ll_mine"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingTop="@dimen/dp_25"
android:orientation="horizontal"
android:weightSum="4"
android:background="@color/white"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cl_info">
<LinearLayout
@ -145,6 +145,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
<TextView
@ -246,13 +247,42 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:text="我的订单"
android:text="商城订单"
android:textColor="@color/col_7c7"
android:textSize="@dimen/sp_12"
tools:ignore="HardcodedText,UseCompatTextViewDrawableXml" />
</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>
</androidx.constraintlayout.widget.ConstraintLayout>
@ -623,7 +653,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="权益工具"
android:text="健康物联"
android:layout_marginLeft="@dimen/dp_10"
android:textStyle="bold"
android:textColor="@color/col_313"
@ -633,34 +663,36 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="4"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_start_bs"
android:id="@+id/ll_daily_poster"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:visibility="gone"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/icon_mine_start_bs"
android:background="@mipmap/icon_daily_poster"
android:scaleType="centerCrop"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2999创业"
android:text="今日海报"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12"
android:textColor="@color/col_7c7"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_daily_poster"
android:id="@+id/ll_wearable_device"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
@ -670,19 +702,21 @@
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/icon_daily_poster"
android:background="@mipmap/icon_wearable_device"
android:scaleType="centerCrop"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="今日海报"
android:text="穿戴手表"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12"
android:textColor="@color/col_7c7"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_wearable_device"
android:id="@+id/ll_magic_test"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
@ -692,36 +726,36 @@
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/icon_wearable_device"
android:background="@mipmap/icon_magic_test"
android:scaleType="centerCrop"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="穿戴设备"
android:text="魔镜体测"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12"
android:textColor="@color/col_7c7"/>
</LinearLayout>
<LinearLayout
<LinearLayout
android:id="@+id/ll_internet_thing"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:visibility="invisible"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/icon_family_health"
android:background="@mipmap/icon_health_internet_thing"
android:scaleType="centerCrop"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="家人健康"
android:text="健康物联"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12"
@ -729,6 +763,7 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>
@ -767,6 +802,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_24"
android:weightSum="4"
android:orientation="horizontal">
<LinearLayout
@ -815,8 +851,9 @@
android:layout_marginTop="@dimen/dp_12"
android:textColor="@color/col_7c7"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_about_us"
android:id="@+id/ll_shipping_address"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
@ -826,18 +863,19 @@
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/icon_about_us"
android:background="@mipmap/icon_shipping_address"
android:scaleType="centerCrop"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="关于我们"
android:text="收货地址"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12"
android:textColor="@color/col_7c7"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_up_graded"
android:layout_width="0dp"
@ -869,10 +907,13 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_24"
android:layout_marginBottom="@dimen/dp_22"
android:weightSum="4"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_shipping_address"
android:id="@+id/ll_start_bs"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
@ -882,12 +923,12 @@
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/icon_shipping_address"
android:background="@mipmap/icon_mine_start_bs"
android:scaleType="centerCrop"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收货地址"
android:text="2999创业"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12"
@ -918,7 +959,7 @@
android:textColor="@color/col_7c7"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_setting"
android:id="@+id/ll_about_us"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
@ -928,12 +969,12 @@
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/icon_setting"
android:background="@mipmap/icon_about_us"
android:scaleType="centerCrop"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="设置"
android:text="关于我们"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
android:layout_marginTop="@dimen/dp_12"
@ -941,22 +982,22 @@
</LinearLayout>
<LinearLayout
android:id="@+id/ll_setting"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:visibility="invisible"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/icon_up_graded"
android:background="@mipmap/icon_setting"
android:scaleType="centerCrop"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="版本升级"
android:text="设置"
android:textSize="@dimen/sp_14"
android:textStyle="bold"
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"
android:textColor="@color/col_7c7"
android:textSize="@dimen/sp_13"
android:maxLines="1"
android:singleLine="true"
android:ellipsize="end"
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"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mContentView"
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:orientation="vertical"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="@dimen/dp_0"
android:background="@color/white"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_10"
android:orientation="vertical">
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:gravity="center_vertical"
@ -26,12 +16,13 @@
<TextView
android:id="@+id/mTitle"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="@dimen/dp_10"
android:textColor="@color/col_455"
android:textSize="@dimen/dp_16" />
tools:text="eeeeeee"
android:layout_centerVertical="true"
android:textColor="@color/col_313"
android:textSize="@dimen/sp_15" />
<TextView
android:id="@+id/mTvTime"
@ -40,16 +31,11 @@
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:paddingRight="@dimen/dp_10"
android:textColor="@color/col_919"
android:textSize="@dimen/dp_14" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentTop="true"
android:background="@color/col_f1f" />
android:textColor="@color/col_7c7"
tools:text="eeeeee"
android:textSize="@dimen/sp_13" />
</RelativeLayout>
<TextView
android:id="@+id/mContent"
android:layout_width="match_parent"
@ -58,10 +44,8 @@
android:ellipsize="end"
android:paddingLeft="@dimen/dp_10"
android:paddingRight="@dimen/dp_10"
android:maxLines="2"
android:textColor="@color/col_B8B"
android:textSize="@dimen/dp_14" />
</LinearLayout>
android:maxLines="1"
android:textColor="@color/col_7c7"
android:textSize="@dimen/sp_13" />
</androidx.cardview.widget.CardView>
</LinearLayout>

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

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

Loading…
Cancel
Save