规范化小程序模块的部分代码

This commit is contained in:
Binary Wang
2017-10-16 14:32:36 +08:00
parent c65cd34bc9
commit 447c73e43a
17 changed files with 77 additions and 37 deletions

View File

@@ -8,11 +8,19 @@ package cn.binarywang.wx.miniapp.constant;
* @author <a href="https://github.com/binarywang">Binary Wang</a>
*/
public class WxMaConstants {
/**
* 微信接口返回的参数errcode
*/
public static final String ERRCODE = "errcode";
/**
* 素材类型
*/
public static class MediaType {
public static final String IMAGE = "image";//图片
/**
* 图片
*/
public static final String IMAGE = "image";
}
/**
@@ -27,7 +35,30 @@ public class WxMaConstants {
* 客服消息的消息类型
*/
public static class KefuMsgType {
public static final String TEXT = "text";//文本消息
public static final String IMAGE = "image";//图片消息
/**
* 文本消息
*/
public static final String TEXT = "text";
/**
* 图片消息
*/
public static final String IMAGE = "image";
}
public static final class ErrorCode {
/**
* 40001 获取access_token时AppSecret错误或者access_token无效
*/
public static final int ERR_40001 = 40001;
/**
* 42001 access_token超时
*/
public static final int ERR_42001 = 42001;
/**
* 40014 不合法的access_token请开发者认真比对access_token的有效性如是否过期
*/
public static final int ERR_40014 = 40014;
}
}