From 6676d8b234bae214c663a73a68c2be6722be9803 Mon Sep 17 00:00:00 2001
From: liugl <liugl@sinata.cn>
Date: 星期一, 19 七月 2021 15:44:47 +0800
Subject: [PATCH] 1。4:处理预约单导致串单的问题 隐藏预约单
---
app/src/main/java/com/okgoincar/netUtls/NetKit.kt | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/app/src/main/java/com/okgoincar/netUtls/NetKit.kt b/app/src/main/java/com/okgoincar/netUtls/NetKit.kt
index e640994..9c556c9 100644
--- a/app/src/main/java/com/okgoincar/netUtls/NetKit.kt
+++ b/app/src/main/java/com/okgoincar/netUtls/NetKit.kt
@@ -1,6 +1,7 @@
package com.okgoincar.netUtls
import android.content.Context
+import android.content.Intent
import android.os.CountDownTimer
import android.os.Handler
import android.os.Looper
@@ -50,6 +51,12 @@
clickAction(responseString)
}
+ override fun onError(code: Int, msg: String?, resposeString: String?) {
+ super.onError(code, msg, resposeString)
+ if (showDialog)
+ dismissDialog()
+ }
+
})
}
@@ -68,6 +75,11 @@
override fun success(responseString: String?) {
dismissDialog()
clickAction(responseString)
+ }
+
+ override fun onError(code: Int, msg: String?, resposeString: String?) {
+ super.onError(code, msg, resposeString)
+ dismissDialog()
}
})
}
@@ -130,6 +142,14 @@
})
}
+fun sendAudio(context: Context,s: String?) {
+ val intent = Intent()
+ intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
+ intent.action = "com.wisdom.gps.action.tts"
+ intent.putExtra("msg", s)
+ context.sendBroadcast(intent)
+}
+
fun MySlabBaseActivity.callNet(
api: String,
@@ -151,6 +171,7 @@
override fun onError(code: Int, msg: String?, resposeString: String?) {
super.onError(code, msg, resposeString)
+ dismissDialog()
clickActionError(msg)
}
})
@@ -177,6 +198,12 @@
clickAction(responseString)
}
+ override fun onError(code: Int, msg: String?, resposeString: String?) {
+ super.onError(code, msg, resposeString)
+ if (showDialog)
+ dismissDialog()
+ }
+
})
}
@@ -200,6 +227,7 @@
}
override fun onError(code: Int, msg: String?, resposeString: String?) {
+ dismissDialog()
clickActionError(resposeString)
}
})
@@ -227,7 +255,7 @@
override fun onError(code: Int, msg: String?, resposeString: String?) {
super.onError(code, msg, resposeString)
-
+ dismissDialog()
clickActionError(msg)
}
})
@@ -249,6 +277,10 @@
override fun success(responseString: String?) {
clickAction(responseString)
}
+
+ override fun onError(code: Int, msg: String?, resposeString: String?) {
+ super.onError(code, msg, resposeString)
+ }
})
}
--
Gitblit v1.7.1