Skip to content

Commit 3a0e7d6

Browse files
committed
修复了由于超级课表api设计不合理而导致的JSON无法序列化的问题。
1 parent ee655cc commit 3a0e7d6

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group = "13554"
9-
version = "0.1"
9+
version = "0.1.1"
1010

1111
repositories {
1212
mavenLocal()

src/main/kotlin/stageguard/sctimetable/PluginMain.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import stageguard.sctimetable.service.*
2424
object PluginMain : KotlinPlugin(
2525
JvmPluginDescription(
2626
id = "stageguard.sctimetable",
27-
version = "0.1.0",
27+
version = "0.1.1",
2828
name = "SuperCourseTimetable"
2929
)
3030
) {

src/test/kotlin/SCApiTest.kt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,37 @@
1+
/*
2+
* Copyright 2020 KonnyakuCamp.
3+
*
4+
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
5+
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
6+
*
7+
* https://github.com/KonnyakuCamp/SuperCourseTimetableBot/blob/main/LICENSE
8+
*/
19
package stageguard.sctimetable
210

311
import kotlinx.coroutines.runBlocking
412
import org.junit.jupiter.api.Test
513
import stageguard.sctimetable.api.LoginCookieData
614
import stageguard.sctimetable.api.LoginInfoData
715
import stageguard.sctimetable.api.SuperCourseApiService
16+
import stageguard.sctimetable.utils.AESUtils
17+
import stageguard.sctimetable.utils.Either
818

919
class SCApiTest {
1020
@Test
1121
fun test() = runBlocking {
12-
val loginInfo = LoginInfoData("123123123", "123123123")
22+
/*val loginInfo = LoginInfoData("15065196743", "xzg20020410.")
1323
var cookieInfo = LoginCookieData()
1424
val loginReceipt = SuperCourseApiService.loginViaPassword(loginInfo) {
1525
cookieInfo = it
1626
}
17-
println("${loginReceipt.data.student.schoolName} -> ${loginReceipt.data.student.studentNum}")
27+
println("${loginReceipt.data!!.student.schoolName} -> ${loginReceipt.data!!.student.studentNum}")
1828
println("jSessionId = ${cookieInfo.jSessionId}, serverId = ${cookieInfo.serverId}")
1929
var courseReceipt = SuperCourseApiService.getCourses(cookieInfo)
20-
println(courseReceipt.data.lessonList.joinToString("\n") { it.name })
30+
println(courseReceipt.data.lessonList.joinToString("\n") { it.name })*/
31+
}
32+
@Test
33+
fun loginWrong() = runBlocking {
34+
val x = SuperCourseApiService.loginViaPassword("15966355163", "033312ysz")
35+
println(x)
2136
}
2237
}

0 commit comments

Comments
 (0)