@@ -168,9 +168,13 @@ private void handle(JsonObject templateObject) {
168
168
webview .addProperty ("url" , this .url );
169
169
webview .addProperty ("jump_url" , this .jumpUrl );
170
170
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
+ }
172
174
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
+ }
174
178
templateObject .add ("webview" , webview );
175
179
break ;
176
180
}
@@ -236,9 +240,13 @@ private void handleBatch(JsonObject templateObject) {
236
240
webview .addProperty ("url" , this .url );
237
241
webview .addProperty ("jump_url" , this .jumpUrl );
238
242
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
+ }
240
246
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
+ }
242
250
JsonObject dataObject = new JsonObject ();
243
251
dataObject .addProperty ("type" , WxCpConsts .WorkBenchType .WEBVIEW );
244
252
dataObject .add ("webview" , webview );
0 commit comments