diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index db4df3f86..271d3d9ac 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -972,14 +972,18 @@ class ReadBookActivity : BaseReadBookActivity(), throw NoStackTraceException("no pay action") } JsUtils.evalJs(payAction) { + it["java"] = source + it["source"] = source it["book"] = book it["chapter"] = chapter } }.onSuccess { - startActivity { - putExtra("title", getString(R.string.chapter_pay)) - putExtra("url", it) - IntentData.put(it, ReadBook.bookSource?.getHeaderMap(true)) + if (it.isNotBlank()) { + startActivity { + putExtra("title", getString(R.string.chapter_pay)) + putExtra("url", it) + IntentData.put(it, ReadBook.bookSource?.getHeaderMap(true)) + } } }.onError { toastOnUi(it.localizedMessage) @@ -1261,4 +1265,4 @@ class ReadBookActivity : BaseReadBookActivity(), } } } -} \ No newline at end of file +}