pull/1238/head^2
gedoor 3 years ago
parent 3fac74fa61
commit d27a64d128
  1. 11
      app/src/main/java/io/legado/app/data/entities/BookSource.kt
  2. 12
      app/src/main/java/io/legado/app/data/entities/rule/LogInRule.kt

@ -46,6 +46,17 @@ data class BookSource(
var ruleContent: ContentRule? = null // 正文页规则
) : Parcelable, JsExtensions {
@delegate:Transient
@delegate:Ignore
@IgnoredOnParcel
val logInRule by lazy {
if (loginUrl.isJsonObject()) {
return@lazy GSON.fromJsonObject<LogInRule>(loginUrl)
} else {
return@lazy LogInRule(url = loginUrl)
}
}
@delegate:Transient
@delegate:Ignore
@IgnoredOnParcel

@ -1,7 +1,11 @@
package io.legado.app.data.entities.rule
import android.os.Parcelable
import kotlinx.parcelize.Parcelize
@Parcelize
data class LogInRule(
val ui: HashMap<String, String>,
val logInUrl: String,
val checkJs: String
)
val ui: HashMap<String, String>? = null,
val url: String? = null,
val checkJs: String? = null
) : Parcelable
Loading…
Cancel
Save