Commit 9587e914 authored by wanglei's avatar wanglei

...

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