瀏覽代碼

#769 WxMaCodeExtConfig增加缺少的tabBar属性

master
Binary Wang 6 年之前
父節點
當前提交
07e25bad7c
共有 1 個檔案被更改,包括 40 行新增34 行删除
  1. +40
    -34
      weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/code/WxMaCodeExtConfig.java

+ 40
- 34
weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/code/WxMaCodeExtConfig.java 查看文件

@@ -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;
/** /**
* 可选值 bottom、top
* 可选值 bottom、top.
*/ */
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;


Loading…
取消
儲存