diff --git a/src/main/kotlin/com/pomelotea/hoperun/sign/DakaApplication.kt b/src/main/kotlin/com/pomelotea/hoperun/sign/DakaApplication.kt index e87527d..c5e5b87 100644 --- a/src/main/kotlin/com/pomelotea/hoperun/sign/DakaApplication.kt +++ b/src/main/kotlin/com/pomelotea/hoperun/sign/DakaApplication.kt @@ -15,29 +15,28 @@ import java.util.* * 启动入口 **/ @SpringBootApplication -open class DakaApplication { -} +open class DakaApplication val T.logger: Logger get() = LoggerFactory.getLogger(this::class.java) val holidays: List = listOf( // 元旦 - "2024-01-01", + "2025-01-01", // 春节 - "2024-02-10", "2024-02-11", "2024-02-12", "2024-02-13", "2024-02-14", "2024-02-15", "2024-02-16", "2024-02-17", + "2025-01-28", "2025-01-29", "2025-01-30", "2025-01-31", "2025-02-01", "2025-02-02", "2025-02-03", "2025-02-04", // 清明 - "2024-04-04", "2024-04-05", "2024-04-06", + "2025-04-04", "2025-04-05", "2025-04-06", // 劳动节 - "2024-05-01", "2024-05-02", "2024-05-03", "2024-05-04", "2024-05-05", + "2025-05-01", "2025-05-02", "2025-05-05", "2025-05-04", "2025-05-05", // 端午节 - "2024-06-08", "2024-06-09", "2024-06-10", + "2025-05-31", "2025-06-01", "2025-06-02", // 中秋 - "2024-09-15", "2024-09-16", "2024-09-17", // 国庆 - "2024-10-01", "2024-10-02", "2024-10-03", "2024-10-04", "2024-10-05", "2024-10-06", "2024-10-07") + "2025-10-01", "2025-10-02", "2025-10-03", "2025-10-04", "2025-10-05", "2025-10-06", "2025-10-07", "2025-10-08") -val workdays: List = listOf("2024-04-07", "2024-04-28", "2024-05-11", "2024-09-14", "2024-09-29", "2024-10-12") +// 周末要上班的日期 +val workdays: List = listOf("2025-01-26", "2025-02-08", "2025-04-27", "2025-10-11", "2025-09-28", "2025-10-12") private val logger = LoggerFactory.getLogger("APPLICATION-STARTER") fun main(args: Array) { diff --git a/src/main/kotlin/com/pomelotea/hoperun/sign/common/Common.kt b/src/main/kotlin/com/pomelotea/hoperun/sign/common/Common.kt index e17d289..42296ed 100644 --- a/src/main/kotlin/com/pomelotea/hoperun/sign/common/Common.kt +++ b/src/main/kotlin/com/pomelotea/hoperun/sign/common/Common.kt @@ -32,7 +32,7 @@ import java.util.* const val DAKA_URL = "http://pom.hoperun.com:8187/attm/attence/recordAttendance" const val MONTH_ATT_URL = "http://pom.hoperun.com:8187/attm/calendar/monthAtt" -val DEFAULT_ZONE = ZoneOffset.of("+8") +val DEFAULT_ZONE: ZoneOffset = ZoneOffset.of("+8") val client = OkHttpClient() .newBuilder() diff --git a/src/main/kotlin/com/pomelotea/hoperun/sign/config/WebConfig.kt b/src/main/kotlin/com/pomelotea/hoperun/sign/config/WebConfig.kt new file mode 100644 index 0000000..397eeb2 --- /dev/null +++ b/src/main/kotlin/com/pomelotea/hoperun/sign/config/WebConfig.kt @@ -0,0 +1,22 @@ +package com.pomelotea.hoperun.sign.config + +import org.springframework.context.annotation.Configuration +import org.springframework.web.servlet.config.annotation.CorsRegistry +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer + +/** + * + * @author jimlee + * @create 2024/11/1 13:15 + */ +@Configuration +open class CorsConfig : WebMvcConfigurer { + override fun addCorsMappings(registry: CorsRegistry) { + registry.addMapping("/**") + .allowedMethods("*") + .allowedHeaders("*") + .allowedOriginPatterns("*") + .allowCredentials(true) + .maxAge(3600) + } +} \ No newline at end of file diff --git a/src/main/resources/static/error.html b/src/main/resources/static/error.html new file mode 100644 index 0000000..c146e2f --- /dev/null +++ b/src/main/resources/static/error.html @@ -0,0 +1,56 @@ + + + + 404 Not Found + + + + + + +
+
+
+

+ 非常抱歉,您访 +
+ 问的页面不存在 +

+ 返回首页 +
+
+
+ + \ No newline at end of file diff --git a/src/main/resources/static/favicon.ico b/src/main/resources/static/favicon.ico new file mode 100644 index 0000000..4f2b071 Binary files /dev/null and b/src/main/resources/static/favicon.ico differ diff --git a/src/main/resources/static/img/ico_checkon.svg b/src/main/resources/static/img/ico_checkon.svg index 7bcf6a7..7c1f7e0 100644 --- a/src/main/resources/static/img/ico_checkon.svg +++ b/src/main/resources/static/img/ico_checkon.svg @@ -1,4 +1,4 @@ -x + diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index 0a4afd6..ccf1d63 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -1 +1 @@ -打卡
打卡记录
\ No newline at end of file +打卡
打卡记录
\ No newline at end of file diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css index 16b7a54..18678a5 100644 --- a/src/main/resources/static/style.css +++ b/src/main/resources/static/style.css @@ -208,6 +208,7 @@ body { scroll-behavior: smooth; padding: 30px 40px; overflow: auto; + scrollbar-width: none; } .search-menu { @@ -368,11 +369,11 @@ body { opacity: 1; visibility: visible; z-index: 101; - left: 33%; + left: 50%; top: 40%; - margin-left: -100px; - margin-top: -100px; position: absolute; + margin: auto 0; + transform: translate(-50%, -50%); } .userinfo_dialog > div > .alert-inline { @@ -595,7 +596,7 @@ body > div > div.userinfo_dialog > div > div > div input { .job-cards { padding-top: 20px; - padding-right: 80px; + /*padding-right: 80px;*/ display: grid; grid-template-columns: repeat(3, 1fr); grid-column-gap: 25px; @@ -603,14 +604,36 @@ body > div > div.userinfo_dialog > div > div > div input { -webkit-animation: slideY .6s both; animation: slideY .6s both; } -@media screen and (max-width: 1212px) { + +@media screen and (max-width: 480px) { .job-cards { grid-template-columns: repeat(1, 1fr); } + + #autodaka { + display: none; + } + + #user-head { + display: none; + } + + .userinfo_dialog { + width: 88% !important; + } + + .wrapper { + padding: 0 20px; + } } -@media screen and (max-width: 930px) { + +@media screen and (max-width: 1080px) { .job-cards { - grid-template-columns: repeat(1, 1fr); + grid-template-columns: repeat(2, 1fr); + } + + .userinfo_dialog { + width: 60%; } } @@ -703,6 +726,7 @@ body > div > div.userinfo_dialog > div > div > div input { justify-content: space-between; width: 100%; margin-top: 4px; + flex-flow: column; } #logout-div .random-buttons { border-radius: 8px; @@ -1286,4 +1310,8 @@ h1 + .headingOuter { } .toggle--switch .toggle--checkbox:checked + .toggle--btn .toggle--feature:after { right: -60%; +} + +.coco-msg-stage { + top: 80px !important; } \ No newline at end of file diff --git a/src/test/kotlin/Test.kt b/src/test/kotlin/Test.kt new file mode 100644 index 0000000..26d0f32 --- /dev/null +++ b/src/test/kotlin/Test.kt @@ -0,0 +1,38 @@ +import java.util.* + + +fun main() { + + var ti = TreeNode(2) + var v = ti.`val` + + ti.right = TreeNode(4) + ti.left = TreeNode(3) + + ti.left!!.left = TreeNode(1) + + println(inorderTraversal(ti)) +} + +fun inorderTraversal(root: TreeNode?): List { + var copyroot = root + val list: MutableList = ArrayList() + val stack = Stack() + while (copyroot != null || !stack.isEmpty()) { + while (copyroot != null) { + stack.push(copyroot) + copyroot = copyroot.left + } + copyroot = stack.pop() + list.add(copyroot.`val`) + copyroot = copyroot.right + } + return list +} + + + +class TreeNode(var `val`: Int) { + var left: TreeNode? = null + var right: TreeNode? = null +} \ No newline at end of file