Merge pull request #2156 from odomu/master

修复购买操作脚本执行问题
pull/2160/head
kunfei 2 years ago committed by GitHub
commit ae9b1c92e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      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<WebViewActivity> {
putExtra("title", getString(R.string.chapter_pay))
putExtra("url", it)
IntentData.put(it, ReadBook.bookSource?.getHeaderMap(true))
if (it.isNotBlank()) {
startActivity<WebViewActivity> {
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(),
}
}
}
}
}

Loading…
Cancel
Save