1
1
package cn .binarywang .wx .miniapp .bean .code ;
2
2
3
- import lombok .Builder ;
4
- import lombok .Data ;
5
-
6
3
import java .io .Serializable ;
7
4
import java .util .List ;
8
5
import java .util .Map ;
9
6
7
+ import lombok .Builder ;
8
+ import lombok .Data ;
9
+
10
10
/**
11
11
* 上传代码需要用到的第三方自定义的配置
12
+ * 详细文档,参考:https://developers.weixin.qq.com/miniprogram/dev/framework/config.html
12
13
*
13
14
* @author <a href="https://github.com/charmingoh">Charming</a>
14
15
* @since 2018-04-26 19:44
18
19
public class WxMaCodeExtConfig implements Serializable {
19
20
private static final long serialVersionUID = -7666911367458178753L ;
20
21
/**
21
- * 配置 ext.json 是否生效
22
+ * 配置 ext.json 是否生效.
22
23
* 必填:是
23
24
*/
24
25
private boolean extEnable ;
25
26
/**
26
- * 配置 extAppid
27
+ * 配置 extAppid.
27
28
* 必填:是
28
29
*/
29
30
private String extAppid ;
30
31
/**
31
- * 开发自定义的数据字段
32
+ * 开发自定义的数据字段.
32
33
* 必填:否
33
34
*/
34
35
private Object ext ;
35
36
/**
36
- * 单独设置每个页面的 json
37
+ * 单独设置每个页面的 json.
37
38
* 必填:否
38
39
* key: page 名称,如 pages/logs/logs
39
40
* value: page 配置
40
41
*/
41
42
private Map <String , PageConfig > extPages ;
42
43
/**
43
- * 是否直接提交到待审核列表
44
+ * 是否直接提交到待审核列表.
44
45
* 必填:否
45
46
*/
46
47
private Boolean directCommit ;
47
48
/**
48
- * 设置页面路径(同 app.json 相同的字段,填写会覆盖 app.json)
49
+ * 设置页面路径(同 app.json 相同的字段,填写会覆盖 app.json).
49
50
* 必填:否
50
51
*/
51
52
private List <String > pages ;
@@ -64,6 +65,11 @@ public class WxMaCodeExtConfig implements Serializable {
64
65
* 必填:否
65
66
*/
66
67
private Boolean debug ;
68
+ /**
69
+ * 底部 tab 栏的表现.
70
+ * 必填:否
71
+ */
72
+ private TabBar tabBar ;
67
73
68
74
/**
69
75
* page.json 配置,页面配置
@@ -73,125 +79,125 @@ public class WxMaCodeExtConfig implements Serializable {
73
79
@ Builder
74
80
public static class PageConfig {
75
81
/**
76
- * 导航栏背景颜色,如"#000000" HexColor
82
+ * 导航栏背景颜色,如"#000000" HexColor.
77
83
* 默认:#000000
78
84
*/
79
85
private String navigationBarBackgroundColor ;
80
86
/**
81
- * 导航栏标题颜色,仅支持 black/white
87
+ * 导航栏标题颜色,仅支持 black/white.
82
88
* 默认:white
83
89
*/
84
90
private String navigationBarTextStyle ;
85
91
/**
86
- * 导航栏标题文字内容
92
+ * 导航栏标题文字内容.
87
93
*/
88
94
private String navigationBarTitleText ;
89
95
/**
90
- * 窗口的背景色 HexColor
96
+ * 窗口的背景色 HexColor.
91
97
* 默认:#ffffff
92
98
*/
93
99
private String backgroundColor ;
94
100
/**
95
- * 下拉背景字体、loading 图的样式,仅支持 dark/light
101
+ * 下拉背景字体、loading 图的样式,仅支持 dark/light.
96
102
* 默认:dark
97
103
*/
98
104
private String backgroundTextStyle ;
99
105
/**
100
- * 是否开启下拉刷新,详见页面相关事件处理函数
106
+ * 是否开启下拉刷新,详见页面相关事件处理函数.
101
107
* 默认:false
102
108
*/
103
109
private String enablePullDownRefresh ;
104
110
/**
105
- * 设置为 true 则页面整体不能上下滚动;只在 page.json 中有效,无法在 app.json 中设置该项
111
+ * 设置为 true 则页面整体不能上下滚动;只在 page.json 中有效,无法在 app.json 中设置该项.
106
112
* 默认:false
107
113
*/
108
114
private Boolean disableScroll ;
109
115
/**
110
- * 页面上拉触底事件触发时距页面底部距离,单位为px
116
+ * 页面上拉触底事件触发时距页面底部距离,单位为px.
111
117
* 默认:50
112
118
*/
113
119
private Integer onReachBottomDistance ;
114
120
}
115
121
116
122
/**
117
- * tabBar 配置
123
+ * tabBar 配置.
118
124
*/
119
125
@ Data
120
126
@ Builder
121
127
public static class TabBar {
122
128
/**
123
- * HexColor, tab 上的文字默认颜色
129
+ * HexColor, tab 上的文字默认颜色.
124
130
*/
125
131
private String color ;
126
132
/**
127
- * HexColor, tab 上的文字选中时的颜色
133
+ * HexColor, tab 上的文字选中时的颜色.
128
134
*/
129
135
private String selectedColor ;
130
136
/**
131
- * HexColor, tab 的背景色
137
+ * HexColor, tab 的背景色.
132
138
*/
133
139
private String backgroundColor ;
134
140
/**
135
- * tabbar 上边框的颜色,仅支持 black/white
141
+ * tabbar 上边框的颜色,仅支持 black/white.
136
142
*/
137
143
private String borderStyle ;
138
144
/**
139
- * tab 的列表,最少2个、最多5个 tab
145
+ * tab 的列表,最少2个、最多5个 tab.
140
146
*/
141
147
private List <Item > list ;
142
148
/**
143
- * 可选值 bottom、top
149
+ * 可选值 bottom、top.
144
150
*/
145
151
private String position ;
146
152
147
153
/**
148
- * list item
154
+ * list item.
149
155
*/
150
156
@ Data
151
157
@ Builder
152
158
public static class Item {
153
159
/**
154
- * 是 页面路径,必须在 pages 中先定义
160
+ * 页面路径,必须在 pages 中先定义.
155
161
*/
156
162
private String pagePath ;
157
163
/**
158
- * tab 上按钮文字
164
+ * tab 上按钮文字.
159
165
*/
160
166
private String text ;
161
167
/**
162
- * 图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,当 postion 为 top 时,此参数无效,不支持网络图片
168
+ * 图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,当 postion 为 top 时,此参数无效,不支持网络图片.
163
169
*/
164
170
private String iconPath ;
165
171
/**
166
- * 选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px ,当 postion 为 top 时,此参数无效
172
+ * 选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px ,当 postion 为 top 时,此参数无效.
167
173
*/
168
174
private String selectedIconPath ;
169
175
}
170
176
}
171
177
172
178
/**
173
- * 各种网络请求的超时时间
179
+ * 各种网络请求的超时时间.
174
180
*/
175
181
@ Data
176
182
@ Builder
177
183
public static class NetworkTimeout {
178
184
/**
179
- * wx.request的超时时间,单位毫秒,默认为:60000
185
+ * wx.request的超时时间,单位毫秒,默认为:60000.
180
186
* 必填:否
181
187
*/
182
188
private Integer request ;
183
189
/**
184
- * wx.connectSocket的超时时间,单位毫秒,默认为:60000
190
+ * wx.connectSocket的超时时间,单位毫秒,默认为:60000.
185
191
* 必填:否
186
192
*/
187
193
private Integer connectSocket ;
188
194
/**
189
- * wx.uploadFile的超时时间,单位毫秒,默认为:60000
195
+ * wx.uploadFile的超时时间,单位毫秒,默认为:60000.
190
196
* 必填:否
191
197
*/
192
198
private Integer uploadFile ;
193
199
/**
194
- * wx.downloadFile的超时时间,单位毫秒,默认为:60000
200
+ * wx.downloadFile的超时时间,单位毫秒,默认为:60000.
195
201
* 必填:否
196
202
*/
197
203
private Integer downloadFile ;
0 commit comments