diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/SchemeIntent.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/SchemeIntent.java
index 92831aa0fd..f7a08caf37 100644
--- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/SchemeIntent.java
+++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/SchemeIntent.java
@@ -4,6 +4,7 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
+import android.util.Log;
import com.mogo.map.MogoLatLng;
import com.mogo.service.IMogoServiceApis;
@@ -165,6 +166,8 @@ public class SchemeIntent implements IMogoStatusChangedListener {
if ( mApis == null ) {
return;
}
+ Log.d("TanluManager", "handleSearchRoadCondition intentStr =" + target.getQueryParameter( "intentStr" ) + ">> data = " + target.getQueryParameter( "data" )
+ + "-----city = " + target.getQueryParameter( "city" ) + "----keywords = " + target.getQueryParameter( "keywords" ));
mApis.getTanluUiApi().searchRoadCondition( target.getQueryParameter( "intentStr" ),
target.getQueryParameter( "data" ), target.getQueryParameter( "city" ),
target.getQueryParameter( "keywords" ) );
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/StrategyShareProvider.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/StrategyShareProvider.kt
index 69324701cc..1045e2414f 100644
--- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/StrategyShareProvider.kt
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/StrategyShareProvider.kt
@@ -25,9 +25,6 @@ class StrategyShareProvider : IProvider {
private lateinit var blockStrategy: BlockStrategy
override fun init(context: Context) {
- TanluServiceManager.init(context)
- TanluManager.getInstance(context).init()
-
Logger.d(S_TAG, "策略上报Provider初始化====")
val apis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(context) as IMogoServiceApis
blockStrategy = BlockStrategy(context, apis)
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluCardViewProvider.java b/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluCardViewProvider.java
new file mode 100644
index 0000000000..ea2a59c2af
--- /dev/null
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluCardViewProvider.java
@@ -0,0 +1,64 @@
+package com.mogo.module.share;
+
+import android.content.Context;
+import android.content.Intent;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.mogo.map.MogoLatLng;
+import com.mogo.module.share.bean.event.MarkerInfo;
+import com.mogo.module.share.constant.ShareConstants;
+import com.mogo.service.share.IMogoTanluUiProvider;
+import com.mogo.utils.logger.Logger;
+
+import org.greenrobot.eventbus.EventBus;
+
+import io.reactivex.Single;
+import io.reactivex.SingleOnSubscribe;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.disposables.Disposable;
+import io.reactivex.schedulers.Schedulers;
+
+/**
+ * @author congtaowang
+ * @since 2019-12-24
+ *
+ * 描述
+ */
+@Route( path = ShareConstants.TAG )
+public class TanluCardViewProvider implements IMogoTanluUiProvider {
+
+ private static final String TAG = "TanluCardViewProvider";
+ private Context mContext;
+
+ @Override
+ public void init( Context context ) {
+ mContext = context;
+ TanluServiceManager.init(context);
+ TanluManager.getInstance(context).init();
+ }
+
+ @Override
+ public void searchRoadCondition(String intentStr, String data, String city, String keywords) {
+ Disposable disposable = Single.create((SingleOnSubscribe) emitter -> {
+ Logger.d(TAG, "searchRoadCondition---> intentStr: " + intentStr + " data: " + data + " " +
+ "city: " + city + " keywords: " + keywords);
+ Intent intent = new Intent(intentStr);
+ intent.putExtra("data", data);
+ intent.putExtra("city", city);
+ intent.putExtra("keywords", keywords);
+ Thread.sleep(3000);
+ emitter.onSuccess(intent);
+ }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(intent -> {
+ Logger.d(TAG, "searchRoadCondition---go real share");
+ TanluManager.getInstance(mContext).realShare(intentStr, intent);
+ });
+ }
+
+ @Override
+ public void shareSuccess(String poiType, MogoLatLng location) {
+ MarkerInfo markerInfo = new MarkerInfo(poiType, "", location.lon, location.lat, true, "1");
+ EventBus.getDefault().post(markerInfo);
+ }
+
+
+}
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java b/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java
index 4add852f19..775862dce9 100644
--- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java
@@ -62,12 +62,6 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
-import io.reactivex.Single;
-import io.reactivex.SingleOnSubscribe;
-import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.disposables.Disposable;
-import io.reactivex.schedulers.Schedulers;
-
import static com.mogo.module.share.constant.ShareConstants.SPECIFIEDROAD_SEARCH;
import static com.mogo.module.share.constant.ShareConstants.TXZ_SPECIFIEDROAD_SEARCH;
import static com.mogo.module.share.constant.ShareConstants.TYPE_NAME_BLOCK;
@@ -82,6 +76,7 @@ import static com.mogo.module.share.constant.ShareConstants.VOICE_COMMAND_QUERY_
* @description 探路和新鲜事的view
* @since 2020/5/19
*/
+
public class TanluManager implements IMogoMarkerClickListener,
IMogoPoiSearchListener,
IMogoGeoSearchListener {
@@ -139,27 +134,33 @@ public class TanluManager implements IMogoMarkerClickListener,
initListener();
}
+// @Override
+// public void init(Context context) {
+//
+// }
- public void searchRoadCondition(String intentStr, String data, String city, String keywords) {
- Disposable disposable = Single.create((SingleOnSubscribe) emitter -> {
- Logger.d(TAG, "searchRoadCondition---> intentStr: " + intentStr + " data: " + data + " " +
- "city: " + city + " keywords: " + keywords);
- Intent intent = new Intent(intentStr);
- intent.putExtra("data", data);
- intent.putExtra("city", city);
- intent.putExtra("keywords", keywords);
- Thread.sleep(3000);
- emitter.onSuccess(intent);
- }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(intent -> {
- Logger.d(TAG, "searchRoadCondition---go real share");
- realShare(intentStr, intent);
- });
- }
-
- public void shareSuccess(String poiType, MogoLatLng location) {
- MarkerInfo markerInfo = new MarkerInfo(poiType, "", location.lon, location.lat, true, "1");
- EventBus.getDefault().post(markerInfo);
- }
+// @Override
+// public void searchRoadCondition(String intentStr, String data, String city, String keywords) {
+// Disposable disposable = Single.create((SingleOnSubscribe) emitter -> {
+// Logger.d(TAG, "searchRoadCondition---> intentStr: " + intentStr + " data: " + data + " " +
+// "city: " + city + " keywords: " + keywords);
+// Intent intent = new Intent(intentStr);
+// intent.putExtra("data", data);
+// intent.putExtra("city", city);
+// intent.putExtra("keywords", keywords);
+// Thread.sleep(3000);
+// emitter.onSuccess(intent);
+// }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(intent -> {
+// Logger.d(TAG, "searchRoadCondition---go real share");
+// realShare(intentStr, intent);
+// });
+// }
+//
+// @Override
+// public void shareSuccess(String poiType, MogoLatLng location) {
+// MarkerInfo markerInfo = new MarkerInfo(poiType, "", location.lon, location.lat, true, "1");
+// EventBus.getDefault().post(markerInfo);
+// }
private void initInterface() {
//地图marker,地图操作
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt
index 9fff555579..4bd01b72f7 100644
--- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt
@@ -47,7 +47,8 @@ object UploadHelper {
// 有网就正常上报
ServiceApisManager.serviceApis.statusManagerApi.setUploadingStatus("CARD_TYPE_ROAD_CONDITION", true)
// 上报即成功
- TanluManager.getInstance(context).shareSuccess(type.eventType, type.location)
+// TanluManager.getInstance(context).shareSuccess(type.eventType, type.location)
+ ServiceApisManager.serviceApis.tanluUiApi.shareSuccess(type.eventType, type.location)
val location = ServiceApisManager.serviceApis.mapServiceApi.getSingletonLocationClient(context).lastKnowLocation
val latLon = MogoLatLng(location.latitude, location.longitude)
type.location = latLon