Parcourir la source

飞书看课链接字体调大

xgb il y a 2 jours
Parent
commit
75e2195d85

+ 6 - 2
fs-service/src/main/java/com/fs/feishu/service/FeishuDocApiService.java

@@ -79,6 +79,7 @@ public class FeishuDocApiService {
 
     /**
      * 在文档中插入 text + link 块(用于“观看课程”超链接)
+     * 使用一级标题 + 居中,便于客户点击
      */
     public void createTextLinkBlock(Client client, String documentId, String url) throws Exception {
         CreateDocumentBlockChildrenReq req = CreateDocumentBlockChildrenReq.newBuilder()
@@ -90,8 +91,11 @@ public class FeishuDocApiService {
                                 .index(0)
                                 .children(new Block[]{
                                         Block.newBuilder()
-                                                .blockType(6)
-                                                .heading4(Text.newBuilder()
+                                                .blockType(3)
+                                                .heading1(Text.newBuilder()
+                                                        .style(TextStyle.newBuilder()
+                                                                .align(2)
+                                                                .build())
                                                         .elements(new TextElement[]{
                                                                 TextElement.newBuilder()
                                                                         .textRun(TextRun.newBuilder()