feat(home): 新增健康体检H5跳转功能并升级版本至1.0.12
- HomeFragment 中 Tab2 和 Banner1 点击事件由跳转 EmptyActivity 改为 打开健康体检 H5 页面,增加登录状态前置校验 - UrlConfig 新增健康体检 H5 地址常量 PRODUCT_HOME_HEALTH_CHECK_H5 及 getHealthCheckH5Url() 方法 - 切换应用运行环境为 PRODUCT,middle 路径由 xj_health/ 改为 hb/ - 版本号升级:1.0.11 (1011) → 1.0.12 (1012)
This commit is contained in:
@@ -14,13 +14,13 @@ import com.sw.healthyclients.utils.DateUtil
|
|||||||
import com.tencent.qcloud.tuikit.tuichat.bean.WorkBean
|
import com.tencent.qcloud.tuikit.tuichat.bean.WorkBean
|
||||||
import com.xjjk.healthyclients.R
|
import com.xjjk.healthyclients.R
|
||||||
import com.xjjk.healthyclients.adapter.common.MultiItemTypeAdapter
|
import com.xjjk.healthyclients.adapter.common.MultiItemTypeAdapter
|
||||||
|
import com.xjjk.healthyclients.bankRequest.BankPointRequest
|
||||||
import com.xjjk.healthyclients.base.BaseVMBFragment
|
import com.xjjk.healthyclients.base.BaseVMBFragment
|
||||||
import com.xjjk.healthyclients.bean.guidance.GuidanceListBean
|
import com.xjjk.healthyclients.bean.guidance.GuidanceListBean
|
||||||
import com.xjjk.healthyclients.bean.home.WatchInfoBean
|
import com.xjjk.healthyclients.bean.home.WatchInfoBean
|
||||||
import com.xjjk.healthyclients.data.api.HomeApi
|
import com.xjjk.healthyclients.data.api.HomeApi
|
||||||
import com.xjjk.healthyclients.databinding.FragmentHomeBinding
|
import com.xjjk.healthyclients.databinding.FragmentHomeBinding
|
||||||
import com.xjjk.healthyclients.event.HomeTabChangeEvent
|
import com.xjjk.healthyclients.event.HomeTabChangeEvent
|
||||||
import com.xjjk.healthyclients.bankRequest.BankPointRequest
|
|
||||||
import com.xjjk.healthyclients.retrofit.UrlConfig
|
import com.xjjk.healthyclients.retrofit.UrlConfig
|
||||||
import com.xjjk.healthyclients.retrofit.getBankRetrofit
|
import com.xjjk.healthyclients.retrofit.getBankRetrofit
|
||||||
import com.xjjk.healthyclients.superfuntion.initColors
|
import com.xjjk.healthyclients.superfuntion.initColors
|
||||||
@@ -208,9 +208,22 @@ class HomeFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
R.id.home_head_tab2 -> {
|
R.id.home_head_tab2 -> {
|
||||||
val bundle = Bundle()
|
if (DataStoreManager.isLogin()) {
|
||||||
bundle.putString("title", "健康体检")
|
val value = mViewModel.enCryptInfoUrl.value
|
||||||
toActivity(EmptyActivity::class.java, bundle)
|
if (TextUtils.isEmpty(value)) {
|
||||||
|
mViewModel.getSysEnCryptInfo(UrlConfig.getHomeBankH5Url())
|
||||||
|
showToast("网络错误")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
requireContext().startWebActivity(
|
||||||
|
UrlConfig.getHealthCheckH5Url() + "?param=" + value,
|
||||||
|
isFull = true,
|
||||||
|
myTitle = "健康体检",
|
||||||
|
hideStatus = true
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
startLoginActivity(requireContext())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
R.id.home_head_tab4 -> {
|
R.id.home_head_tab4 -> {
|
||||||
@@ -296,10 +309,22 @@ class HomeFragment :
|
|||||||
}.sortedBy { homeBannerBean -> homeBannerBean.sort }
|
}.sortedBy { homeBannerBean -> homeBannerBean.sort }
|
||||||
|
|
||||||
showBanner(mBinding.banner1, bannerList1) {
|
showBanner(mBinding.banner1, bannerList1) {
|
||||||
val bundle = Bundle()
|
if (DataStoreManager.isLogin()) {
|
||||||
bundle.putString("title", "体检套餐")
|
val value = mViewModel.enCryptInfoUrl.value
|
||||||
toActivity(EmptyActivity::class.java, bundle)
|
if (TextUtils.isEmpty(value)) {
|
||||||
|
mViewModel.getSysEnCryptInfo(UrlConfig.getHomeBankH5Url())
|
||||||
|
showToast("网络错误")
|
||||||
|
}else {
|
||||||
|
requireContext().startWebActivity(
|
||||||
|
UrlConfig.getHealthCheckH5Url() + "?param=" + value,
|
||||||
|
isFull = true,
|
||||||
|
myTitle = "健康体检",
|
||||||
|
hideStatus = true
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
startLoginActivity(requireContext())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
showBanner(mBinding.banner2, bannerList2) {
|
showBanner(mBinding.banner2, bannerList2) {
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,11 @@ object UrlConfig {
|
|||||||
// 安眼修改密码
|
// 安眼修改密码
|
||||||
const val ANYAN_CHANGE_PASSWORD_H5 = "https://sso.iosp.ydpt.tech/SSOManageClient/userController/changePassword"
|
const val ANYAN_CHANGE_PASSWORD_H5 = "https://sso.iosp.ydpt.tech/SSOManageClient/userController/changePassword"
|
||||||
|
|
||||||
|
//健康银行
|
||||||
private const val TEST_HOME_BANK_H5 = "https://gstest.superwx.cn/healthbank/index.html"
|
private const val TEST_HOME_BANK_H5 = "https://gstest.superwx.cn/healthbank/index.html"
|
||||||
private const val PRODUCT_HOME_BANK_H5 = "https://console-jkglpt.iosp.ydpt.tech/hb/healthweb/index.html"
|
private const val PRODUCT_HOME_BANK_H5 = "https://console-jkglpt.iosp.ydpt.tech/hb/healthweb/index.html"
|
||||||
|
//健康体检
|
||||||
|
private const val PRODUCT_HOME_HEALTH_CHECK_H5 = "https://console-jkglpt.iosp.ydpt.tech/hb/healthcheckweb/index.html"
|
||||||
|
|
||||||
//手机银行
|
//手机银行
|
||||||
const val SECRET_KEY = "XJp3EHpcnwReXc1A"
|
const val SECRET_KEY = "XJp3EHpcnwReXc1A"
|
||||||
@@ -37,10 +40,10 @@ object UrlConfig {
|
|||||||
private const val PRODUCT_HOME_BANK_IP = "https://api-jkglpt.iosp.ydpt.tech/"
|
private const val PRODUCT_HOME_BANK_IP = "https://api-jkglpt.iosp.ydpt.tech/"
|
||||||
|
|
||||||
|
|
||||||
val baseUrlType: BaseUrlType = BaseUrlType.TEST
|
val baseUrlType: BaseUrlType = BaseUrlType.PRODUCT
|
||||||
|
|
||||||
const val middle = "xj_health/" //test
|
// const val middle = "xj_health/" //test
|
||||||
// const val middle = "hb/" //product
|
const val middle = "hb/" //product
|
||||||
|
|
||||||
var isOpenIm: Boolean = true
|
var isOpenIm: Boolean = true
|
||||||
|
|
||||||
@@ -104,6 +107,17 @@ object UrlConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getHealthCheckH5Url(baseUrlType: BaseUrlType = BaseUrlType.PRODUCT): String {
|
||||||
|
return when (baseUrlType) {
|
||||||
|
BaseUrlType.DEBUG, BaseUrlType.TEST-> {
|
||||||
|
PRODUCT_HOME_HEALTH_CHECK_H5
|
||||||
|
}
|
||||||
|
BaseUrlType.PRODUCT -> {
|
||||||
|
PRODUCT_HOME_HEALTH_CHECK_H5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 方便后续加一些其他逻辑
|
* 方便后续加一些其他逻辑
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@ ext {
|
|||||||
minSdkVersion = 26
|
minSdkVersion = 26
|
||||||
targetSdkVersion = 32
|
targetSdkVersion = 32
|
||||||
compileSdkVersion = 33
|
compileSdkVersion = 33
|
||||||
versionCode = 1011
|
versionCode = 1012
|
||||||
versionName = "1.0.11"
|
versionName = "1.0.12"
|
||||||
//Dependencies
|
//Dependencies
|
||||||
junitVersion = "4.12"
|
junitVersion = "4.12"
|
||||||
lifecycleVersion = "2.6.0-alpha01"
|
lifecycleVersion = "2.6.0-alpha01"
|
||||||
|
|||||||
Reference in New Issue
Block a user