Commit fc95eec4 by konghaorui

修复资源冲突问题 - 开发模式

parent 58361b9f
......@@ -157,7 +157,6 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
kapt rootProject.ext.dependencies["dagger2-compiler"]
implementation project(':m-consultant')
// api 'com.ydl:m-user-module-ydl:0.0.6'
// api 'com.ydl:ydl-webview:0.0.3@aar'
......@@ -166,9 +165,12 @@ dependencies {
// api('com.ydl:ydl-platform:0.0.5@aar') {
// transitive = true
// }
api project(':m-consultant')
api project(':m-user')
implementation project(':ydl-platform')
implementation project(':ydl-webview')
implementation rootProject.ext.dependencies["retrofit-url-manager"]
kapt 'com.alibaba:arouter-compiler:1.2.2'
}
......
......@@ -170,7 +170,7 @@ ext {
"imagepicker" : 'com.ydl:imagepicker:1.0.6',
"protector" : 'com.ydl:protector:1.0.1-SNAPSHOT@aar',
"ydl-hnet" : 'com.ydl:h-net:0.0.8',
"ydl-utils" : 'com.ydl:ydl-utils:0.0.1',
"ydl-utils" : 'com.ydl:ydl-utils:0.0.2',
"ydl-net" : 'com.ydl:ydl-net:0.0.1',
]
......
......@@ -58,13 +58,14 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
kapt 'com.alibaba:arouter-compiler:1.2.2'
api'com.ydl:router:1.0.0-SNAPSHOT@aar'
// implementation modularPublication('com.ydl:m-user-api')
// api project(":ydl-webview")
// api project(":ydl-platform")
compileOnly 'com.ydl:m-user-api:0.0.4'
api 'com.ydl:ydl-webview:0.0.7@aar'
api('com.ydl:ydl-platform:0.0.8@aar') {
transitive = true
}
implementation modularPublication('com.ydl:m-user-api')
api project(":ydl-webview")
api project(":ydl-platform")
// compileOnly 'com.ydl:m-user-api:0.0.4'
// api 'com.ydl:ydl-webview:0.0.12@aar'
// api('com.ydl:ydl-platform:0.0.9@aar') {
// transitive = true
// }
}
......@@ -8,7 +8,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-consultant-module-xlzx"
// 上报的业务模块 aar 包的版本号
version = "0.0.3"
version = "0.0.9"
}
ydl{
......@@ -16,7 +16,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-consultant-module-ydl"
// 上报的业务模块 aar 包的版本号
version = "0.0.3"
version = "0.0.9"
}
}
......
......@@ -27,7 +27,6 @@ import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import com.ydl.ydl_image.manager.YDLImageCacheManager
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.base.config.HttpConfig
......@@ -50,6 +49,7 @@ import com.yidianling.consultant.listener.OnCategoriesSelectedListener
import com.yidianling.consultant.listener.OnFilterConfirmListener
import com.yidianling.consultant.listener.OnSortItemSelectedListener
import com.yidianling.consultant.model.bean.*
import com.yidianling.consultant.modular.utils.TempH5RouteUtils
import com.yidianling.consultant.router.ConsultantIn
import com.yidianling.consultant.ui.view.AreaPopupWindow
import com.yidianling.consultant.ui.view.CategoryPopupWindow
......@@ -380,12 +380,12 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
}
banner_search.setOnBannerListener {
if (null == data || data.isEmpty()) {
YDLRouterManager.router(
TempH5RouteUtils.tempH5Route(
IYDLRouterConstant.ROUTER_H5_H5,
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, "https://h2.yidianling.com/ct/list"), "")
} else {
if (it < data.size) {
YDLRouterManager.router(data[it].linkUrl)
TempH5RouteUtils.tempH5Route(data[it].linkUrl)
}
}
}
......@@ -1430,7 +1430,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
FILTER_STATUS_OPEN -> {
tv.typeface = Typeface.DEFAULT_BOLD
tv.setTextColor(ContextCompat.getColor(this, R.color.platform_colorTextDefault))
tv.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_arrow_drop_down, 0)
tv.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.consultant_ic_arrow_drop_down, 0)
}
}
}
......
......@@ -14,7 +14,6 @@ import android.widget.TextView
import com.alibaba.android.arouter.facade.annotation.Route
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.base.BaseMvpActivity
import com.ydl.ydlcommon.bean.StatusBarOptions
......@@ -30,6 +29,7 @@ import com.yidianling.consultant.bean.HotSearchFocusItemBean
import com.yidianling.consultant.bean.HotSearchKeyWordDataBean
import com.yidianling.consultant.bean.HotSearchPopularDoctorBean
import com.yidianling.consultant.contract.IHotSearchContract
import com.yidianling.consultant.modular.utils.TempH5RouteUtils
import com.yidianling.consultant.presenter.HotSearchPresenterImpl
import kotlinx.android.synthetic.main.activity_hot_search.*
import kotlinx.android.synthetic.main.item_expert_hot_search.view.*
......@@ -208,11 +208,11 @@ class HotSearchActivity : BaseMvpActivity<IHotSearchContract.View,IHotSearchCont
}
banner.setOnBannerListener {
if (null == focusList || focusList.isEmpty()) {
YDLRouterManager.router(
TempH5RouteUtils.tempH5Route(
IYDLRouterConstant.ROUTER_H5_H5,
YDLRouterParams().putExtra(IYDLRouterConstant.EXTRA_URL, "https://h2.yidianling.com/ct/list"), "")
} else {
YDLRouterManager.router(focusList[it].linkUrl)
TempH5RouteUtils.tempH5Route(focusList[it].linkUrl)
}
}
banner.setImageLoader(GlideImageLoader(R.drawable.expert_banner_default)).setImages(bannerList).start()
......
......@@ -12,7 +12,6 @@ import android.widget.ImageView
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.ydl.ydlcommon.router.YdlCommonRouterManager
......@@ -26,6 +25,7 @@ import com.yidianling.consultant.IExpertSearchView
import com.yidianling.consultant.R
import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.model.bean.DoctorServiceItem
import com.yidianling.consultant.modular.utils.TempH5RouteUtils
import com.yidianling.consultant.router.ConsultantIn
import kotlinx.android.synthetic.main.expert_search_feedbackrate.view.*
import kotlinx.android.synthetic.main.expert_search_item_view.view.*
......@@ -317,8 +317,7 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch
linkUrl = URLUtils.appendParmas(linkUrl,"cateId",cateId)
}
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_DOCTOR_CLICK,itemBean.doctorId?:"")
LogUtil.i("linkUrl:"+linkUrl)
YDLRouterManager.router(linkUrl)
TempH5RouteUtils.tempH5Route(linkUrl)
// var params = URLDecoder.decode( Uri.parse(linkUrl)!!.getQueryParameter("params"),"UTF-8")
// ARouter.getInstance().build("/h5/h5").withSerializable("routerParam",params).navigation()
......@@ -330,7 +329,7 @@ class ExpertSearchAdapter(private val context: Context, private val expertSearch
if (adapterPosition != RecyclerView.NO_POSITION) {
//判断是否已登录
if(!YdlCommonRouterManager.getYdlCommonRoute().isLogin()){
YDLRouterManager.router(IYDLRouterConstant.ROUTER_MINE_LOGIN)
TempH5RouteUtils.tempH5Route(IYDLRouterConstant.ROUTER_MINE_LOGIN)
return@setOnClickListener
}
val doctor = listData[adapterPosition]
......
package com.yidianling.consultant.modular.utils
import android.net.Uri
import android.text.TextUtils
import com.alibaba.android.arouter.launcher.ARouter
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydl_router.util.YDLRouterUtils
import com.yidianling.common.tools.LogUtil
import java.io.UnsupportedEncodingException
import java.net.URLDecoder
/**
* Created by haorui on 2019-10-13.
* Des:
*/
object TempH5RouteUtils {
fun tempH5Route(linkUrl: String?) {
if (TextUtils.isEmpty(linkUrl)) {
return
}
val linkUri = Uri.parse(linkUrl)
if (linkUri != null) {
val host = linkUri.host
if (!TextUtils.isEmpty(host) && host == "h5") {
//如果是h5,跳转至NewH5Activity
try {
var params = URLDecoder.decode(linkUri.getQueryParameter("params"),"UTF-8")
ARouter.getInstance().build("/new_h5/h5").withSerializable("routerParam", params).navigation()
return
}catch (e : NullPointerException){
LogUtil.e("params参数为空")
}catch (e : UnsupportedEncodingException){
LogUtil.e("解码错误")
}catch (e : UnsupportedOperationException){
LogUtil.e("这不是一个uri格式的地址")
}
return
}
}
YDLRouterManager.router(linkUrl)
}
fun tempH5Route(linkUrl: String?, params: YDLRouterParams?, callBack: String?) {
if (TextUtils.isEmpty(linkUrl)) {
return
}
val newUrl = linkUrl + YDLRouterUtils.ergodic(params) + "&callback=" + callBack
val linkUri = Uri.parse(newUrl)
if (linkUri != null) {
val host = linkUri.host
if (!TextUtils.isEmpty(host) && host == "h5") {
//如果是h5,跳转至NewH5Activity
try {
var params = URLDecoder.decode(linkUri.getQueryParameter("params"),"UTF-8")
ARouter.getInstance().build("/new_h5/h5").withSerializable("routerParam", params).navigation()
return
}catch (e : NullPointerException){
LogUtil.e("params参数为空")
}catch (e : UnsupportedEncodingException){
LogUtil.e("解码错误")
}catch (e : UnsupportedOperationException){
LogUtil.e("这不是一个uri格式的地址")
}
return
}
}
YDLRouterManager.router(linkUrl, params)
}
}
......@@ -70,10 +70,12 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-script-runtime:1.3.41"
compileOnly 'com.ydl:m-user-api:0.0.4'
api'com.ydl:router:1.0.0-SNAPSHOT@aar'
api 'com.ydl:ydl-webview:0.0.7@aar'
api('com.ydl:ydl-platform:0.0.8@aar') {
transitive = true
}
// api project(':ydl-webview')
// api project(':ydl-platform')
// api 'com.ydl:ydl-webview:0.0.12@aar'
// api('com.ydl:ydl-platform:0.0.9@aar') {
// transitive = true
// }
api project(':ydl-webview')
api project(':ydl-platform')
}
......@@ -8,7 +8,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-user-module-xlzx"
// 上报的业务模块 aar 包的版本号
version = "0.0.12"
version = "0.0.17"
}
ydl{
......@@ -16,7 +16,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-user-module-ydl"
// 上报的业务模块 aar 包的版本号
version = "0.0.12"
version = "0.0.17"
}
}
......
......@@ -16,7 +16,7 @@
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="50dp"
app:pa_left_start_icon="@drawable/nav_close_green"
app:pa_left_start_icon="@drawable/user_nav_close_green"
app:pa_title_text="登录验证"/>
<TextView
......
......@@ -11,7 +11,7 @@
android:layout_width="match_parent"
android:layout_height="50dp"
app:pa_title_text="开启指纹解锁"
app:pa_left_start_icon="@drawable/nav_close_green">
app:pa_left_start_icon="@drawable/user_nav_close_green">
</com.ydl.ydlcommon.view.TitleBar>
<TextView
......
......@@ -10,7 +10,7 @@
android:id="@+id/tb_title"
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
app:pa_left_start_icon="@drawable/toolbar_back"
app:pa_left_start_icon="@drawable/user_toolbar_back"
app:pa_title_text="手机号" />
<TextView
......
......@@ -12,7 +12,7 @@
android:layout_width="match_parent"
android:layout_height="50dp"
app:pa_title_text="设置手势解锁"
app:pa_left_start_icon="@drawable/nav_close_green"
app:pa_left_start_icon="@drawable/user_nav_close_green"
app:pa_right_text="重设">
</com.ydl.ydlcommon.view.TitleBar>
......
......@@ -9,7 +9,7 @@
<com.ydl.ydlcommon.view.TitleBar
android:layout_width="match_parent"
android:layout_height="@dimen/title_bar_height"
app:pa_left_start_icon="@drawable/toolbar_back"
app:pa_left_start_icon="@drawable/user_toolbar_back"
app:pa_title_text="填写手机号"/>
<TextView
......
......@@ -9,7 +9,7 @@
<com.ydl.ydlcommon.view.TitleBar
android:layout_width="match_parent"
android:layout_height="50dp"
app:pa_left_start_icon="@drawable/toolbar_back"
app:pa_left_start_icon="@drawable/user_toolbar_back"
app:pa_title_text="隐私安全">
</com.ydl.ydlcommon.view.TitleBar>
......
IS_PUBLISH=true
VERSION_NAME=0.0.7
\ No newline at end of file
VERSION_NAME=0.0.9
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.1
\ No newline at end of file
VERSION_NAME=0.0.2
\ No newline at end of file
......@@ -65,7 +65,7 @@ public class ToastUtil {
oneTime = twoTime;
}
private static void toastShort(Context context, String message) {
public static void toastShort(Context context, String message) {
if (context != null && !TextUtils.isEmpty(message)) {
showShortToast(context, message);
// Toast toast = Toast.makeText(context, message, Toast.LENGTH_SHORT);
......
......@@ -46,16 +46,18 @@ android {
}
dependencies {
// implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly files('libs/tbs_sdk_thirdapp_163319.jar')
implementation fileTree(dir: 'libs', include: ['*.jar'])
// compileOnly files('libs/tbs_sdk_thirdapp_163319.jar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt 'com.alibaba:arouter-compiler:1.2.2'
api 'com.ydl:m-user-api:0.0.4'
api('com.ydl:ydl-platform:0.0.8@aar') {
transitive = true
}
api'com.ydl:router:1.0.0-SNAPSHOT@aar'
// api project(':ydl-platform')
// api('com.ydl:ydl-platform:0.0.9@aar') {
// transitive = true
// }
api project(':ydl-platform')
}
IS_PUBLISH=true
VERSION_NAME=0.0.7
\ No newline at end of file
VERSION_NAME=0.0.12
\ No newline at end of file
......@@ -67,7 +67,7 @@ import static android.view.View.VISIBLE;
* <p>
* 跳转此h5页面,请使用唯一参数 H5ParamsBaseActivity
*/
@Route(path = "/h5/h5")
@Route(path = "/new_h5/h5")
public class NewH5Activity extends BaseActivity implements PtrHandler {
public static final String PARAMS = "h5Params";
......@@ -143,6 +143,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
if (null == context) {
return;
}
Intent intent = new Intent(context, NewH5Activity.class);
if (!(context instanceof Activity)) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
......@@ -180,6 +181,9 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
if (null == context) {
return;
}
WebModularServiceUtils.Companion.getUserService().isLogin();
Intent intent = new Intent(context, NewH5Activity.class);
intent.putExtra(PARAMS, h5Params1);
context.startActivityForResult(intent, requestCode);
......@@ -1170,9 +1174,9 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
}
if (h5Params.isShowMenu()) {
if (YdlCommonRouterManager.INSTANCE.getYdlCommonRoute().isHasUnread()) {
tb_title.setImage_right(getResources().getDrawable(R.drawable.platform_more12r));
tb_title.setImage_right(getResources().getDrawable(YDLConstants.FROM_YDL.equals(appFrom)?R.drawable.platform_more12r :R.drawable.platform_more12r_yellow));
} else {
tb_title.setImage_right(getResources().getDrawable(R.drawable.platform_more12x));
tb_title.setImage_right(getResources().getDrawable(YDLConstants.FROM_YDL.equals(appFrom)?R.drawable.platform_more12x :R.drawable.platform_more12x_yellow));
}
}
if (backgroundView.getVisibility() == View.VISIBLE) {
......
......@@ -12,6 +12,7 @@ import com.yidianling.user.api.service.IUserService
* Des:
*/
class WebModularServiceUtils {
companion object {
fun getUserRouter(): IUserRouter {
return RouterManager.getUserRouter()!!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment