11package cn .binarywang .wx .miniapp .bean .code ;
22
3- import lombok .Builder ;
4- import lombok .Data ;
5-
63import java .io .Serializable ;
74import java .util .List ;
85import java .util .Map ;
96
7+ import lombok .Builder ;
8+ import lombok .Data ;
9+
1010/**
1111 * 上传代码需要用到的第三方自定义的配置
12+ * 详细文档,参考:https://developers.weixin.qq.com/miniprogram/dev/framework/config.html
1213 *
1314 * @author <a href="https://github.com/charmingoh">Charming</a>
1415 * @since 2018-04-26 19:44
1819public class WxMaCodeExtConfig implements Serializable {
1920 private static final long serialVersionUID = -7666911367458178753L ;
2021 /**
21- * 配置 ext.json 是否生效
22+ * 配置 ext.json 是否生效.
2223 * 必填:是
2324 */
2425 private boolean extEnable ;
2526 /**
26- * 配置 extAppid
27+ * 配置 extAppid.
2728 * 必填:是
2829 */
2930 private String extAppid ;
3031 /**
31- * 开发自定义的数据字段
32+ * 开发自定义的数据字段.
3233 * 必填:否
3334 */
3435 private Object ext ;
3536 /**
36- * 单独设置每个页面的 json
37+ * 单独设置每个页面的 json.
3738 * 必填:否
3839 * key: page 名称,如 pages/logs/logs
3940 * value: page 配置
4041 */
4142 private Map <String , PageConfig > extPages ;
4243 /**
43- * 是否直接提交到待审核列表
44+ * 是否直接提交到待审核列表.
4445 * 必填:否
4546 */
4647 private Boolean directCommit ;
4748 /**
48- * 设置页面路径(同 app.json 相同的字段,填写会覆盖 app.json)
49+ * 设置页面路径(同 app.json 相同的字段,填写会覆盖 app.json).
4950 * 必填:否
5051 */
5152 private List <String > pages ;
@@ -64,6 +65,11 @@ public class WxMaCodeExtConfig implements Serializable {
6465 * 必填:否
6566 */
6667 private Boolean debug ;
68+ /**
69+ * 底部 tab 栏的表现.
70+ * 必填:否
71+ */
72+ private TabBar tabBar ;
6773
6874 /**
6975 * page.json 配置,页面配置
@@ -73,125 +79,125 @@ public class WxMaCodeExtConfig implements Serializable {
7379 @ Builder
7480 public static class PageConfig {
7581 /**
76- * 导航栏背景颜色,如"#000000" HexColor
82+ * 导航栏背景颜色,如"#000000" HexColor.
7783 * 默认:#000000
7884 */
7985 private String navigationBarBackgroundColor ;
8086 /**
81- * 导航栏标题颜色,仅支持 black/white
87+ * 导航栏标题颜色,仅支持 black/white.
8288 * 默认:white
8389 */
8490 private String navigationBarTextStyle ;
8591 /**
86- * 导航栏标题文字内容
92+ * 导航栏标题文字内容.
8793 */
8894 private String navigationBarTitleText ;
8995 /**
90- * 窗口的背景色 HexColor
96+ * 窗口的背景色 HexColor.
9197 * 默认:#ffffff
9298 */
9399 private String backgroundColor ;
94100 /**
95- * 下拉背景字体、loading 图的样式,仅支持 dark/light
101+ * 下拉背景字体、loading 图的样式,仅支持 dark/light.
96102 * 默认:dark
97103 */
98104 private String backgroundTextStyle ;
99105 /**
100- * 是否开启下拉刷新,详见页面相关事件处理函数
106+ * 是否开启下拉刷新,详见页面相关事件处理函数.
101107 * 默认:false
102108 */
103109 private String enablePullDownRefresh ;
104110 /**
105- * 设置为 true 则页面整体不能上下滚动;只在 page.json 中有效,无法在 app.json 中设置该项
111+ * 设置为 true 则页面整体不能上下滚动;只在 page.json 中有效,无法在 app.json 中设置该项.
106112 * 默认:false
107113 */
108114 private Boolean disableScroll ;
109115 /**
110- * 页面上拉触底事件触发时距页面底部距离,单位为px
116+ * 页面上拉触底事件触发时距页面底部距离,单位为px.
111117 * 默认:50
112118 */
113119 private Integer onReachBottomDistance ;
114120 }
115121
116122 /**
117- * tabBar 配置
123+ * tabBar 配置.
118124 */
119125 @ Data
120126 @ Builder
121127 public static class TabBar {
122128 /**
123- * HexColor, tab 上的文字默认颜色
129+ * HexColor, tab 上的文字默认颜色.
124130 */
125131 private String color ;
126132 /**
127- * HexColor, tab 上的文字选中时的颜色
133+ * HexColor, tab 上的文字选中时的颜色.
128134 */
129135 private String selectedColor ;
130136 /**
131- * HexColor, tab 的背景色
137+ * HexColor, tab 的背景色.
132138 */
133139 private String backgroundColor ;
134140 /**
135- * tabbar 上边框的颜色,仅支持 black/white
141+ * tabbar 上边框的颜色,仅支持 black/white.
136142 */
137143 private String borderStyle ;
138144 /**
139- * tab 的列表,最少2个、最多5个 tab
145+ * tab 的列表,最少2个、最多5个 tab.
140146 */
141147 private List <Item > list ;
142148 /**
143- * 可选值 bottom、top
149+ * 可选值 bottom、top.
144150 */
145151 private String position ;
146152
147153 /**
148- * list item
154+ * list item.
149155 */
150156 @ Data
151157 @ Builder
152158 public static class Item {
153159 /**
154- * 是 页面路径,必须在 pages 中先定义
160+ * 页面路径,必须在 pages 中先定义.
155161 */
156162 private String pagePath ;
157163 /**
158- * tab 上按钮文字
164+ * tab 上按钮文字.
159165 */
160166 private String text ;
161167 /**
162- * 图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,当 postion 为 top 时,此参数无效,不支持网络图片
168+ * 图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,当 postion 为 top 时,此参数无效,不支持网络图片.
163169 */
164170 private String iconPath ;
165171 /**
166- * 选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px ,当 postion 为 top 时,此参数无效
172+ * 选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px ,当 postion 为 top 时,此参数无效.
167173 */
168174 private String selectedIconPath ;
169175 }
170176 }
171177
172178 /**
173- * 各种网络请求的超时时间
179+ * 各种网络请求的超时时间.
174180 */
175181 @ Data
176182 @ Builder
177183 public static class NetworkTimeout {
178184 /**
179- * wx.request的超时时间,单位毫秒,默认为:60000
185+ * wx.request的超时时间,单位毫秒,默认为:60000.
180186 * 必填:否
181187 */
182188 private Integer request ;
183189 /**
184- * wx.connectSocket的超时时间,单位毫秒,默认为:60000
190+ * wx.connectSocket的超时时间,单位毫秒,默认为:60000.
185191 * 必填:否
186192 */
187193 private Integer connectSocket ;
188194 /**
189- * wx.uploadFile的超时时间,单位毫秒,默认为:60000
195+ * wx.uploadFile的超时时间,单位毫秒,默认为:60000.
190196 * 必填:否
191197 */
192198 private Integer uploadFile ;
193199 /**
194- * wx.downloadFile的超时时间,单位毫秒,默认为:60000
200+ * wx.downloadFile的超时时间,单位毫秒,默认为:60000.
195201 * 必填:否
196202 */
197203 private Integer downloadFile ;
0 commit comments