1
1
package cn .binarywang .wx .miniapp .bean .code ;
2
2
3
- import java .io .Serializable ;
4
- import java .util .List ;
5
- import java .util .Map ;
6
-
7
3
import lombok .AllArgsConstructor ;
8
4
import lombok .Builder ;
9
5
import lombok .Data ;
10
6
import lombok .NoArgsConstructor ;
11
7
8
+ import java .io .Serializable ;
9
+ import java .util .List ;
10
+ import java .util .Map ;
11
+
12
12
/**
13
13
* 上传代码需要用到的第三方自定义的配置
14
- * 详细文档,参考:https://developers.weixin.qq.com/miniprogram/dev/framework/config.html
14
+ * 详细文档,参考:<a href=" https://developers.weixin.qq.com/miniprogram/dev/framework/config.html">文档</a>
15
15
*
16
16
* @author <a href="https://github.com/charmingoh">Charming</a>
17
17
* @since 2018-04-26 19:44
@@ -75,13 +75,33 @@ public class WxMaCodeExtConfig implements Serializable {
75
75
*/
76
76
private TabBar tabBar ;
77
77
78
+ /**
79
+ * 关于新增 requiredPrivateInfos 说明
80
+ * 关于地理位置接口新增与相关流程调整可以查看社区公告:
81
+ * <a href="https://developers.weixin.qq.com/community/develop/doc/000a02f2c5026891650e7f40351c01">...</a>
82
+ * 7.14后,在代码中使用的地理位置相关接口(共计 8 个,见表1),第三方开发者均需要在 ext_json 参数中 requiredPrivateInfos 配置项中声明
83
+ * 在ext_json参数中配置requiredPrivateInfos,其规则为「整体替换」。即如果在 app.json 里也配置了,那么最终会是ext_json的配置会覆盖 app.json
84
+ * 配置的requiredPrivateInfos。其余规则可查看下方的「ext_json补充说明」
85
+ * 在ext_json参数中配置 requiredPrivateInfos 示例如下
86
+ * {
87
+ * "template_id": "95",
88
+ * "ext_json": "{\"requiredPrivateInfos\":[\"onLocationChange\",\"startLocationUpdate\"]}",
89
+ * "user_version": "V1.0",
90
+ * "user_desc": "test"
91
+ * }
92
+ * requiredPrivateInfos主要会检查格式是否正确,填入的 api 名称是否正确,填入的 api 名称是否有权限,填入的 api 名称是否互斥。对应的错误码可查看文档末尾的错误码文档。
93
+ * requiredPrivateInfos在2022.7.14后才会生效,文档提前更新是为了方便开发者可以提前了解接口的参数变更规则,提前进行调整。
94
+ */
95
+ private String [] requiredPrivateInfos ;
96
+
78
97
/**
79
98
* page.json 配置,页面配置
80
- * 文档: https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html
99
+ * <a href=" https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html">文档</a>
81
100
*/
82
101
@ Data
83
102
@ Builder
84
- public static class PageConfig {
103
+ public static class PageConfig implements Serializable {
104
+ private static final long serialVersionUID = -8615574764987479723L ;
85
105
/**
86
106
* 导航栏背景颜色,如"#000000" HexColor.
87
107
* 默认:#000000
@@ -128,7 +148,9 @@ public static class PageConfig {
128
148
*/
129
149
@ Data
130
150
@ Builder
131
- public static class TabBar {
151
+ public static class TabBar implements Serializable {
152
+ private static final long serialVersionUID = -3037016532526129399L ;
153
+
132
154
/**
133
155
* HexColor, tab 上的文字默认颜色.
134
156
*/
@@ -159,7 +181,8 @@ public static class TabBar {
159
181
*/
160
182
@ Data
161
183
@ Builder
162
- public static class Item {
184
+ public static class Item implements Serializable {
185
+ private static final long serialVersionUID = -5824322265161612460L ;
163
186
/**
164
187
* 页面路径,必须在 pages 中先定义.
165
188
*/
@@ -184,7 +207,9 @@ public static class Item {
184
207
*/
185
208
@ Data
186
209
@ Builder
187
- public static class NetworkTimeout {
210
+ public static class NetworkTimeout implements Serializable {
211
+ private static final long serialVersionUID = -9180176522015880991L ;
212
+
188
213
/**
189
214
* wx.request的超时时间,单位毫秒,默认为:60000.
190
215
* 必填:否
0 commit comments