ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
~~~ class ApiResponseCodeMp { const SUCCESS = [ 'code' => 200, 'msg' => '成功' ]; // 错误码规范,前3位代表错误位置,后3位为错误码 ###region 认证相关 const AUTH_FAIL = [ 'code' => 100001, 'msg' => '登录失败' ]; const AUTH_USER_NOT_FOUND = [ 'code' => 100002, 'msg' => '用户不存在' ]; const AUTH_USER_PASSWORD_ERROR = [ 'code' => 100003, 'msg' => '密码错误' ]; const AUTH_NOT_FOUND = [ 'code' => 100004, 'msg' => '请先登录' ]; const AUTH_USER_FREEZE = [ 'code' => 100005, 'msg' => '用户已被冻结' ]; ###endregion ###region 用户相关 const USER_PHONE_EXIST = [ 'code' => 101001, 'msg' => '手机号已存在' ]; const USER_REGISTER_ERROR = [ 'code' => 101002, 'msg' => '注册失败' ]; const USER_PHONE_NOT_EXIST = [ 'code' => 101003, 'msg' => '手机号不存在' ]; const USER_ADDRESS_NOT_FOUND = [ 'code' => 101004, 'msg' => '用户地址不存在' ]; const USER_WHOLESALE_SCORE_NOT_ENOUGH = [ 'code' => 101005, 'msg' => '批发配额积分不足' ]; const USER_SPECIAL_SCORE_NOT_ENOUGH = [ 'code' => 101006, 'msg' => '养老积分不足' ]; // 非新人购买幸运抢批中的新人专场 const USER_NOT_WHOLESALE_NEW_USER = [ 'code' => 101007, 'msg' => '你已购买过抢批商品' ]; ###endregion ###region 商品相关 const GOODS_NOT_FOUND = [ 'code' => 111001, 'msg' => '商品不存在' ]; const GOODS_EMPTY_SKU = [ 'code' => 111002, 'msg' => '商品规格信息不存在' ]; const GOODS_NOT_PUBLISHED = [ 'code' => 111003, 'msg' => '商品已下架' ]; const GOODS_STOCK_NUMBER_NOT_ENOUGH = [ 'code' => 111004, 'msg' => '商品库存不足' ]; const GOODS_UNKNOWN_ACTIVITY_TYPE = [ 'code' => 111005, 'msg' => '未知的商品活动类型' ]; ###endregion ###region 订单相关 const ORDER_LIMIT_EXCEED = [ 'code' => 121001, 'msg' => '商品超过限购' ]; const CREATE_ORDER_FAILED = [ 'code' => 121002, 'msg' => '创建订单失败' ]; const CREATE_ORDER_GOODS_FAILED = [ 'code' => 121003, 'msg' => '创建订单商品失败' ]; ###endregion ###region 轮播图 const SLIDE_SLUG_NOT_FOUND = [ 'code' => 997001, 'msg' => '未找到轮播图标识' ]; ####endregion ###region 短信相关 const SMS_CODE_VALIDATE_ERROR = [ 'code' => 998001, 'msg' => '短信验证码不正确' ]; const SMS_SEND_FAIL = [ 'code' => 998001, 'msg' => '发送短信失败' ]; ###endregion ###region 其他 const PARAM_ERROR = [ 'code' => 999001, 'msg' => '参数错误' ]; const METHOD_NOT_ALLOWED = [ 'code' => 999002, 'msg' => '请求方式不正确' ]; const UNKNOWN_ERROR = [ 'code' => 999999, 'msg' => '服务器错误' ]; ###endregion } ~~~