Commit 9587e914 authored by wanglei's avatar wanglei

...

parent 7abc49eb
...@@ -53,6 +53,7 @@ dependencies { ...@@ -53,6 +53,7 @@ dependencies {
implementation("io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.4") implementation("io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.1.4")
implementation("io.github.youth5201314:banner:2.2.3") implementation("io.github.youth5201314:banner:2.2.3")
implementation("de.hdodenhof:circleimageview:3.1.0") implementation("de.hdodenhof:circleimageview:3.1.0")
implementation("io.supercharge:shimmerlayout:2.1.0")
//google地图 //google地图
implementation(libs.play.services.maps) implementation(libs.play.services.maps)
......
...@@ -69,14 +69,16 @@ object LocationLoginUtils { ...@@ -69,14 +69,16 @@ object LocationLoginUtils {
val paramJson = AESHelper.encrypt(body) val paramJson = AESHelper.encrypt(body)
LogEx.logDebug(TAG, "url=$url") LogEx.logDebug(TAG, "url=$url")
val result = doPost(url, HashMap(), paramJson) runCatching {
LogEx.logDebug(TAG, "result=$result") val result = doPost(url, HashMap(), paramJson)
val responseData = extractData(result) LogEx.logDebug(TAG, "result=$result")
LogEx.logDebug(TAG, "responseData=$responseData") val responseData = extractData(result)
if (responseData != null) { LogEx.logDebug(TAG, "responseData=$responseData")
val decryptedData = AESHelper.decrypt(responseData) if (responseData != null) {
LogEx.logDebug(TAG, "decryptedData=$decryptedData") val decryptedData = AESHelper.decrypt(responseData)
parseLoginData(decryptedData) LogEx.logDebug(TAG, "decryptedData=$decryptedData")
parseLoginData(decryptedData)
}
} }
}.start() }.start()
......
...@@ -58,10 +58,11 @@ object LocationPositionUtils { ...@@ -58,10 +58,11 @@ object LocationPositionUtils {
.toString() .toString()
val paramJson = AESHelper.encrypt(body) val paramJson = AESHelper.encrypt(body)
LogEx.logDebug(TAG, "uploadUrl=${uploadUrl}") runCatching {
LogEx.logDebug(TAG, "uploadUrl=${uploadUrl}")
val result = ReportUtils.doPost(uploadUrl, HashMap(), paramJson) val result = ReportUtils.doPost(uploadUrl, HashMap(), paramJson)
LogEx.logDebug(TAG, "result=$result") LogEx.logDebug(TAG, "result=$result")
}
}.start() }.start()
} }
} }
\ No newline at end of file
...@@ -16,7 +16,7 @@ import org.json.JSONObject ...@@ -16,7 +16,7 @@ import org.json.JSONObject
*/ */
object LocationShareListUtils { object LocationShareListUtils {
private val TAG = "LocationListUtils" private val TAG = "LocationShareListUtils"
/** /**
* 分享关系列表 * 分享关系列表
...@@ -54,11 +54,16 @@ object LocationShareListUtils { ...@@ -54,11 +54,16 @@ object LocationShareListUtils {
.toString() .toString()
val paramJson = AESHelper.encrypt(body) val paramJson = AESHelper.encrypt(body)
val result = ReportUtils.doPost(url, HashMap(), paramJson) runCatching {
val responseData = LocationLoginUtils.extractData(result) val result = ReportUtils.doPost(url, HashMap(), paramJson)
if (responseData != null) { LogEx.logDebug(TAG, "result=$result")
val decryptedData = AESHelper.decrypt(responseData) val responseData = LocationLoginUtils.extractData(result)
parseShareListData(decryptedData, viewerListCallBack, viewingListCallBack) LogEx.logDebug(TAG, "responseData=$responseData")
if (responseData != null) {
val decryptedData = AESHelper.decrypt(responseData)
LogEx.logDebug(TAG, "decryptedData=$decryptedData")
parseShareListData(decryptedData, viewerListCallBack, viewingListCallBack)
}
} }
}.start() }.start()
} }
......
...@@ -61,13 +61,15 @@ object LocationShareUtils { ...@@ -61,13 +61,15 @@ object LocationShareUtils {
.toString() .toString()
val paramJson = AESHelper.encrypt(body) val paramJson = AESHelper.encrypt(body)
val result = ReportUtils.doPost(url, HashMap(), paramJson) runCatching {
val responseData = extractData(result) val result = ReportUtils.doPost(url, HashMap(), paramJson)
if (responseData != null) { val responseData = extractData(result)
val state = AESHelper.decrypt(responseData).toInt() if (responseData != null) {
callBack.invoke(state) val state = AESHelper.decrypt(responseData).toInt()
} else { callBack.invoke(state)
callBack.invoke(0) } else {
callBack.invoke(0)
}
} }
}.start() }.start()
} }
......
...@@ -29,6 +29,8 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() { ...@@ -29,6 +29,8 @@ class LocationShareActivity : BaseActivity<ActivityLocationShareBinding>() {
BarUtils.setStatusBarColor(this, Color.WHITE) BarUtils.setStatusBarColor(this, Color.WHITE)
binding.root.updatePadding(top = BarUtils.getStatusBarHeight()) binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
binding.shimmerLayout.startShimmerAnimation()
initShareData() initShareData()
} }
......
...@@ -44,13 +44,21 @@ ...@@ -44,13 +44,21 @@
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@id/fl_fanhui"> app:layout_constraintTop_toBottomOf="@id/fl_fanhui">
<ImageView <io.supercharge.shimmerlayout.ShimmerLayout
android:layout_width="match_parent" android:id="@+id/shimmerLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="16dp" android:layout_marginHorizontal="16dp"
android:src="@mipmap/lan_weizhi" app:shimmer_animation_duration="2000">
tools:ignore="ContentDescription" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/lan_weizhi"
tools:ignore="ContentDescription" />
</io.supercharge.shimmerlayout.ShimmerLayout>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
......
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