浏览代码

飞书看课链接字体调大

xgb 2 天之前
父节点
当前提交
75e2195d85
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      fs-service/src/main/java/com/fs/feishu/service/FeishuDocApiService.java

+ 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()