Merge pull request #2156 from odomu/master

修复购买操作脚本执行问题
This commit is contained in:
kunfei
2022-08-12 19:47:36 +08:00
committed by GitHub
@@ -972,15 +972,19 @@ class ReadBookActivity : BaseReadBookActivity(),
throw NoStackTraceException("no pay action") throw NoStackTraceException("no pay action")
} }
JsUtils.evalJs(payAction) { JsUtils.evalJs(payAction) {
it["java"] = source
it["source"] = source
it["book"] = book it["book"] = book
it["chapter"] = chapter it["chapter"] = chapter
} }
}.onSuccess { }.onSuccess {
if (it.isNotBlank()) {
startActivity<WebViewActivity> { startActivity<WebViewActivity> {
putExtra("title", getString(R.string.chapter_pay)) putExtra("title", getString(R.string.chapter_pay))
putExtra("url", it) putExtra("url", it)
IntentData.put(it, ReadBook.bookSource?.getHeaderMap(true)) IntentData.put(it, ReadBook.bookSource?.getHeaderMap(true))
} }
}
}.onError { }.onError {
toastOnUi(it.localizedMessage) toastOnUi(it.localizedMessage)
} }