#769 WxMaCodeExtConfig增加缺少的tabBar属性

This commit is contained in:
Binary Wang 2018-09-24 16:24:01 +08:00
parent fbca4cdc59
commit 07e25bad7c

View File

@ -1,14 +1,15 @@
package cn.binarywang.wx.miniapp.bean.code; package cn.binarywang.wx.miniapp.bean.code;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import lombok.Builder;
import lombok.Data;
/** /**
* 上传代码需要用到的第三方自定义的配置 * 上传代码需要用到的第三方自定义的配置
* 详细文档参考https://developers.weixin.qq.com/miniprogram/dev/framework/config.html
* *
* @author <a href="https://github.com/charmingoh">Charming</a> * @author <a href="https://github.com/charmingoh">Charming</a>
* @since 2018-04-26 19:44 * @since 2018-04-26 19:44
@ -18,34 +19,34 @@ import java.util.Map;
public class WxMaCodeExtConfig implements Serializable { public class WxMaCodeExtConfig implements Serializable {
private static final long serialVersionUID = -7666911367458178753L; private static final long serialVersionUID = -7666911367458178753L;
/** /**
* 配置 ext.json 是否生效 * 配置 ext.json 是否生效.
* 必填 * 必填
*/ */
private boolean extEnable; private boolean extEnable;
/** /**
* 配置 extAppid * 配置 extAppid.
* 必填 * 必填
*/ */
private String extAppid; private String extAppid;
/** /**
* 开发自定义的数据字段 * 开发自定义的数据字段.
* 必填 * 必填
*/ */
private Object ext; private Object ext;
/** /**
* 单独设置每个页面的 json * 单独设置每个页面的 json.
* 必填 * 必填
* key: page 名称 pages/logs/logs * key: page 名称 pages/logs/logs
* value: page 配置 * value: page 配置
*/ */
private Map<String, PageConfig> extPages; private Map<String, PageConfig> extPages;
/** /**
* 是否直接提交到待审核列表 * 是否直接提交到待审核列表.
* 必填 * 必填
*/ */
private Boolean directCommit; private Boolean directCommit;
/** /**
* 设置页面路径 app.json 相同的字段填写会覆盖 app.json * 设置页面路径 app.json 相同的字段填写会覆盖 app.json.
* 必填 * 必填
*/ */
private List<String> pages; private List<String> pages;
@ -64,6 +65,11 @@ public class WxMaCodeExtConfig implements Serializable {
* 必填 * 必填
*/ */
private Boolean debug; private Boolean debug;
/**
* 底部 tab 栏的表现.
* 必填
*/
private TabBar tabBar;
/** /**
* page.json 配置页面配置 * page.json 配置页面配置
@ -73,125 +79,125 @@ public class WxMaCodeExtConfig implements Serializable {
@Builder @Builder
public static class PageConfig { public static class PageConfig {
/** /**
* 导航栏背景颜色"#000000" HexColor * 导航栏背景颜色"#000000" HexColor.
* 默认#000000 * 默认#000000
*/ */
private String navigationBarBackgroundColor; private String navigationBarBackgroundColor;
/** /**
* 导航栏标题颜色仅支持 black/white * 导航栏标题颜色仅支持 black/white.
* 默认white * 默认white
*/ */
private String navigationBarTextStyle; private String navigationBarTextStyle;
/** /**
* 导航栏标题文字内容 * 导航栏标题文字内容.
*/ */
private String navigationBarTitleText; private String navigationBarTitleText;
/** /**
* 窗口的背景色 HexColor * 窗口的背景色 HexColor.
* 默认#ffffff * 默认#ffffff
*/ */
private String backgroundColor; private String backgroundColor;
/** /**
* 下拉背景字体loading 图的样式仅支持 dark/light * 下拉背景字体loading 图的样式仅支持 dark/light.
* 默认dark * 默认dark
*/ */
private String backgroundTextStyle; private String backgroundTextStyle;
/** /**
* 是否开启下拉刷新详见页面相关事件处理函数 * 是否开启下拉刷新详见页面相关事件处理函数.
* 默认false * 默认false
*/ */
private String enablePullDownRefresh; private String enablePullDownRefresh;
/** /**
* 设置为 true 则页面整体不能上下滚动只在 page.json 中有效无法在 app.json 中设置该项 * 设置为 true 则页面整体不能上下滚动只在 page.json 中有效无法在 app.json 中设置该项.
* 默认false * 默认false
*/ */
private Boolean disableScroll; private Boolean disableScroll;
/** /**
* 页面上拉触底事件触发时距页面底部距离单位为px * 页面上拉触底事件触发时距页面底部距离单位为px.
* 默认50 * 默认50
*/ */
private Integer onReachBottomDistance; private Integer onReachBottomDistance;
} }
/** /**
* tabBar 配置 * tabBar 配置.
*/ */
@Data @Data
@Builder @Builder
public static class TabBar { public static class TabBar {
/** /**
* HexColor, tab 上的文字默认颜色 * HexColor, tab 上的文字默认颜色.
*/ */
private String color; private String color;
/** /**
* HexColor, tab 上的文字选中时的颜色 * HexColor, tab 上的文字选中时的颜色.
*/ */
private String selectedColor; private String selectedColor;
/** /**
* HexColor, tab 的背景色 * HexColor, tab 的背景色.
*/ */
private String backgroundColor; private String backgroundColor;
/** /**
* tabbar 上边框的颜色仅支持 black/white * tabbar 上边框的颜色仅支持 black/white.
*/ */
private String borderStyle; private String borderStyle;
/** /**
* tab 的列表最少2个最多5个 tab * tab 的列表最少2个最多5个 tab.
*/ */
private List<Item> list; private List<Item> list;
/** /**
* 可选值 bottomtop * 可选值 bottomtop.
*/ */
private String position; private String position;
/** /**
* list item * list item.
*/ */
@Data @Data
@Builder @Builder
public static class Item { public static class Item {
/** /**
* 页面路径必须在 pages 中先定义 * 页面路径必须在 pages 中先定义.
*/ */
private String pagePath; private String pagePath;
/** /**
* tab 上按钮文字 * tab 上按钮文字.
*/ */
private String text; private String text;
/** /**
* 图片路径icon 大小限制为40kb建议尺寸为 81px * 81px postion top 此参数无效不支持网络图片 * 图片路径icon 大小限制为40kb建议尺寸为 81px * 81px postion top 此参数无效不支持网络图片.
*/ */
private String iconPath; private String iconPath;
/** /**
* 选中时的图片路径icon 大小限制为40kb建议尺寸为 81px * 81px postion top 此参数无效 * 选中时的图片路径icon 大小限制为40kb建议尺寸为 81px * 81px postion top 此参数无效.
*/ */
private String selectedIconPath; private String selectedIconPath;
} }
} }
/** /**
* 各种网络请求的超时时间 * 各种网络请求的超时时间.
*/ */
@Data @Data
@Builder @Builder
public static class NetworkTimeout { public static class NetworkTimeout {
/** /**
* wx.request的超时时间单位毫秒默认为60000 * wx.request的超时时间单位毫秒默认为60000.
* 必填 * 必填
*/ */
private Integer request; private Integer request;
/** /**
* wx.connectSocket的超时时间单位毫秒默认为60000 * wx.connectSocket的超时时间单位毫秒默认为60000.
* 必填 * 必填
*/ */
private Integer connectSocket; private Integer connectSocket;
/** /**
* wx.uploadFile的超时时间单位毫秒默认为60000 * wx.uploadFile的超时时间单位毫秒默认为60000.
* 必填 * 必填
*/ */
private Integer uploadFile; private Integer uploadFile;
/** /**
* wx.downloadFile的超时时间单位毫秒默认为60000 * wx.downloadFile的超时时间单位毫秒默认为60000.
* 必填 * 必填
*/ */
private Integer downloadFile; private Integer downloadFile;