captain-ui
Version:
有赞vue wap业务组件库
91 lines (70 loc) • 1.91 kB
JavaScript
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
import _wrapNativeSuper from "@babel/runtime/helpers/esm/wrapNativeSuper";
var ZanError =
/*#__PURE__*/
function (_Error) {
_inheritsLoose(ZanError, _Error);
function ZanError(message) {
var _this;
_this = _Error.call(this, message) || this;
_this.name = 'ZanError';
return _this;
}
return ZanError;
}(_wrapNativeSuper(Error));
var AjaxError =
/*#__PURE__*/
function (_ZanError) {
_inheritsLoose(AjaxError, _ZanError);
function AjaxError(resp) {
var _this2;
_this2 = _ZanError.call(this, resp.msg) || this;
_this2.name = 'AjaxError';
_this2.data = resp.data;
_this2.resp = resp;
return _this2;
}
return AjaxError;
}(ZanError);
var WxPayError =
/*#__PURE__*/
function (_ZanError2) {
_inheritsLoose(WxPayError, _ZanError2);
function WxPayError(resp, payData) {
var _this3;
_this3 = _ZanError2.call(this, resp.err_desc) || this;
_this3.name = 'WxPayError';
_this3.payData = payData;
_this3.resp = resp;
return _this3;
}
return WxPayError;
}(ZanError);
var WxPayBridgeError =
/*#__PURE__*/
function (_ZanError3) {
_inheritsLoose(WxPayBridgeError, _ZanError3);
function WxPayBridgeError(resp) {
var _this4;
_this4 = _ZanError3.call(this, resp.msg) || this;
_this4.name = 'WxPayBridgeError';
return _this4;
}
return WxPayBridgeError;
}(ZanError);
var WxAppPayError =
/*#__PURE__*/
function (_ZanError4) {
_inheritsLoose(WxAppPayError, _ZanError4);
function WxAppPayError(resp) {
var _this5;
_this5 = _ZanError4.call(this, resp.msg) || this;
_this5.name = 'WxAppPayError';
_this5.msg = resp.msg;
_this5.retry = !!resp.retry;
_this5.resp = resp;
return _this5;
}
return WxAppPayError;
}(ZanError);
export { ZanError, AjaxError, WxPayError, WxPayBridgeError, WxAppPayError };