File: /var/www/dk/wp-content/themes/food/Utils/ApiErrorDesc.php
<?php
//namespace Utils;
/**
* Created by PhpStorm.
* User: YQ02
* Date: 2019-11-27
* Time: 12:00
*/
class ApiErrorDesc
{
/**
* api 通用错误码
*/
const SUCCESS = [0, 'Success'];
const UNKNOWN_ERR = [1, '未知错误'];
const ERR_URL = [2, '访问的接口不存在'];
const ERR_PARAMS = [100, '参数错误'];
const ERR_TOKEN = [101, 'TOKEN错误'];
const ERR_ACTION = [102, 'ACTION错误'];
const ERR_CONTROLLER = [103, 'CONTROLLER错误'];
const ERR_NODATA = [104, 'NODATA'];
const ERR_DONE = [105, '處理錯誤'];
const ERR_DONE_SUCCESS = [106, '處理成功'];
const ERR_DONE_EXIST = [107, '结果已存在'];
const ERR_METHOD = [108, '类的方法错误'];
/**
* error_code 1001-1100 用户相关错误码
*/
const ERR_LOGIN_PASSWORD = [1001, '密碼錯誤'];
const ERR_LOGIN_USER = [1002, '用户不存在'];
const ERR_LOGIN_FALSE = [1003, '用戶登錄失敗'];
const ERR_LOGIN_USEREMPTY = [1004, '用户名為空'];
const ERR_USERNAME_DUPLICATION = [1005, '用戶名已存在'];
const ERR_USEREMAIL_DUPLICATION = [1006, '用戶邮箱已存在'];
const ERR_USER_REGISTERFALSE = [1007, '註冊失敗'];
const ERR_USERNAME_FORMAT = [1008, '用户名格式錯誤'];
const ERR_UPDATE_WPUSERAVATAR_FAILED = [1009, 'update wpuseravatar failed'];
const ERR_INCORRECT_OLD_PASSWORD = [1010, '请输入正确的旧密码'];
const ERR_INCORRECT_PASSWORD_LENGTH = [1011, '密码必须在6~20之间'];
const ERR_INCORRECT_NEW_PASSWORD = [1012, '密码字符不對請修改'];
const ERR_USERNAME_LENGTH = [1013, '用户名长度请大于3位'];
const ERR_PASSWORD_LENGTH = [1014, '密码长度请大于6位'];
const ERR_GOOGLEAUTHUID = [1015, '谷歌UID错误'];
const ERR_WX_USERINFO = [1016, '微信用户信息错误'];
const ERR_WX_USERHADBIND = [1017, '微信已绑定其他用户'];
const ERR_GOOGLE_USERINFO = [1018, '谷歌用户信息错误'];
const ERR_GOOGLE_USERHADBIND = [1019, '谷歌已绑定其他用户'];
const ERR_EMAIL_USERHADBIND = [1020, '邮箱已绑定其他用户'];
const ERR_APPLE_USERHADBIND = [1021, '苹果账户已绑定其他用户'];
const ERR_USEREMAIL_ERROR = [1022, '用戶邮箱格式錯誤'];
const ERR_NOT_ADMIN = [1023, '用戶并非管理员'];
/**
* error_code 1101-1200 APP下载
*/
const RECODE_FALSE = [1101, '记录APP版本失敗'];
const RECODE_SUCCESS = [1102, '已记录版本信息'];
const ERR_UPLOAD_FILE = [1103, '文件上传失败'];
/**
* error_code 1201-1300 积分相关
*/
const ERR_ALREADY_RECORD = [1201, '已登记积分'];
const ERR_ALREADY_POINTS_SIGNIN = [1202, '今日已签到'];
const ERR_USER_NOT_ENOUGHPOINTS = [1203, '用户积分不足'];
/**
* error_code 1301-1400 用户登录相关错误码
*/
const ERR_ONE_MINUTE = [1301, '时间间隔小于1分钟'];
const ERR_SMS = [1302, '短信超时/错误'];
const ERR_PHONE = [1303, '电话号码错误'];
const ERR_UPDATE_PASSWORD = [1304, '密码修改失败'];
/**
* error_code 1401-1500 stupoints
*/
const ERR_USEPOINTS0 = [1401, '使用积分不能为0'];
const ERR_INSUFFICIENT_POINTS = [1402, '积分不足'];
/**
* error_code 1501-1600 文件上传
*/
const ERR_FILE = [1501, '文件错误'];
const ERR_FILE_TYPE = [1502, '非法的文件格式/文件过大'];
const ERR_FILE_EMPTY_URL = [1503, '文件URL为空'];
/**
* error_code 1601-1700 文章
*/
const ERR_TITLE_EMPTY = [1601, '请输入文章标题'];
const ERR_CONTENT_EMPTY = [1602, '请输入文章正文'];
/**
* error_code 1701-1800 钱包
*/
const ERR_GOODS_BOUGTH = [1701, '商品已购买'];
const ERR_WALLET_NOT_ENOUGHMONEY = [1702, '余额不足'];
const ERR_WALLET_PAY = [1703, '付款金额有误'];
/**
* error_code 1801-1900 优惠券
*/
const ERR_COUPON_STOP = [1801, '优惠券已停用'];
const ERR_COUPON_NOT_START = [1802, '优惠券生效时间未到'];
const ERR_COUPON_USED = [1803, '该优惠券已使用'];
const ERR_COUPON_NONE = [1804, '没有该优惠券'];
const ERR_COUPON_OVERMONEY = [1805, '优惠券金额大于支付金额'];
const ERR_COUPON_OVER = [1806, '优惠券已用完'];
/**
* CheckpointFinish 1901-2000 关卡-进度
*/
const ERR_CHECKPOINTFINISH_ISEXIST = [1901, 'CheckpointFinish已存在'];
const ERR_CHECKPOINTFINISH_ZEROPOINTS = [1902, 'Checkpoint 不存在'];
/**
* agent 2001-2100 代理
*/
const ERR_AGENT_NOT_EXIST = [2001, '代理不存在'];
/**
* tts 语音 2101-2200
*/
const ERR_TTS_EMPTY_TASK_ID = [2101, 'task_id为空'];
const ERR_TTS_TEXT_NOT_SET = [2102, 'text not set'];
const ERR_TTS_EMPTY_STR = [2103, '字符串长度不足'];
const ERR_TTS_EMPTY_FILE_LINK = [2104, 'file_link为空'];
/**
* 比賽
*/
const VOTE_HAD = [2201, '比賽已投票'];
const VOTE_NO = [2202, '比賽未投票'];
}