openxiangda 1.0.157 → 1.0.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -99,6 +99,38 @@ Custom cards use the variables defined in the DingTalk developer console:
|
|
|
99
99
|
}
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
+
For DingTalk card components that expect structured JSON, map the card variable
|
|
103
|
+
directly to one exact payload placeholder. Arrays and objects are preserved and
|
|
104
|
+
serialized as JSON instead of being formatted as display text:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"card": {
|
|
109
|
+
"mode": "custom",
|
|
110
|
+
"cardTemplateId": "${DINGTALK_CARD_TEMPLATE_ID}",
|
|
111
|
+
"paramMap": {
|
|
112
|
+
"title": "{{title}}",
|
|
113
|
+
"contentList": "{{contentList}}"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"payload": {
|
|
122
|
+
"title": "预约通知",
|
|
123
|
+
"contentList": [
|
|
124
|
+
{ "text": "**预约单号:** Y202607130001" },
|
|
125
|
+
{ "text": "**仪器名称:** 场发射扫描电镜" }
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Keep the placeholder as the complete value (`"{{contentList}}"`). Mixing it
|
|
132
|
+
with surrounding text intentionally converts the value to display text.
|
|
133
|
+
|
|
102
134
|
Standard card payload variables include `title`, `lastMessage`, `content`, `contentList`, `jumpUrl`, `createTime`, `status`, `operator`, `currentUser`, `formData.current`, `workflowData`, `variables`, and `app`. General notifications do not show approval buttons by default.
|
|
103
135
|
|
|
104
136
|
## Runtime Calls
|