Skip to content

Commit 6fc1720

Browse files
authored
🎨 #3697 【企业微信】修复自定义工作台enable_webview_click等参数设置无效的问题
1 parent ad19f65 commit 6fc1720

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpAgentWorkBench.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,13 @@ private void handle(JsonObject templateObject) {
168168
webview.addProperty("url", this.url);
169169
webview.addProperty("jump_url", this.jumpUrl);
170170
webview.addProperty("pagepath", this.pagePath);
171-
webview.addProperty("enable_webview_click", this.enableWebviewClick);
171+
if (this.enableWebviewClick != null) {
172+
webview.addProperty("enable_webview_click", this.enableWebviewClick);
173+
}
172174
webview.addProperty("height", this.height);
173-
webview.addProperty("hide_title", this.hideTitle);
175+
if (this.hideTitle != null) {
176+
webview.addProperty("hide_title", this.hideTitle);
177+
}
174178
templateObject.add("webview", webview);
175179
break;
176180
}
@@ -236,9 +240,13 @@ private void handleBatch(JsonObject templateObject) {
236240
webview.addProperty("url", this.url);
237241
webview.addProperty("jump_url", this.jumpUrl);
238242
webview.addProperty("pagepath", this.pagePath);
239-
webview.addProperty("enable_webview_click", this.enableWebviewClick);
243+
if (this.enableWebviewClick != null) {
244+
webview.addProperty("enable_webview_click", this.enableWebviewClick);
245+
}
240246
webview.addProperty("height", this.height);
241-
webview.addProperty("hide_title", this.hideTitle);
247+
if (this.hideTitle != null) {
248+
webview.addProperty("hide_title", this.hideTitle);
249+
}
242250
JsonObject dataObject = new JsonObject();
243251
dataObject.addProperty("type", WxCpConsts.WorkBenchType.WEBVIEW);
244252
dataObject.add("webview", webview);

0 commit comments

Comments
 (0)