text: (window.webpackJsonp=window.webpackJsonp||[]).push([[38],{"241":function(e,t,o){"use strict";o.d(t,"a",function(){return d});var n,r,i=o(1),a=o(2),c=o(51),s=o(10),p=o.n(s),l=o(240),u=o.n(l),f=(o(242),function(){function defineProperties(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,o){return t&&defineProperties(e.prototype,t),o&&defineProperties(e,o),e}}());var d=(r=n=function(e){function loading(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,loading);var t=function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(loading.__proto__||Object.getPrototypeOf(loading)).call(this,e));return t.state={},t}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(loading,a["a"].Component),f(loading,[{"key":"render","value":function render(){var e=this.props,t=e.type,o=e.display,n=e.tipText,r=p()("loading",t,o);return i.k.createElement(c.a,{"className":r},i.k.createElement(c.a,{"className":"circle"}),i.k.createElement(c.a,{"className":"text"},n,"..."))}}]),loading}(),n.options={"addGlobalClass":!0},n.propTypes={"type":u.a.oneOf(["center","block","inline"]),"display":u.a.oneOf(["dark","light"]),"tipText":u.a.string},n.defaultProps={"type":"center","display":"dark","tipText":"加载中"},r)},"242":function(e,t,o){},"244":function(e,t,o){"use strict";o.d(t,"a",function(){return f});var n,r,i=o(1),a=o(2),c=o(259),s=o(51),p=o(240),l=o.n(p),u=(o(256),function(){function defineProperties(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,o){return t&&defineProperties(e.prototype,t),o&&defineProperties(e,o),e}}());var f=(r=n=function(e){function Price(){return function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Price),function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(Price.__proto__||Object.getPrototypeOf(Price)).apply(this,arguments))}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Price,a["a"].Component),u(Price,[{"key":"render","value":function render(){var e=this.props,t=e.price,o=e.marketPrice,n=e.center,r=e.isExchange,a=t>0?Math.floor(t):Math.ceil(t),p=parseFloat(t).toFixed(2).toString().replace(/-?[0-9]*(\.?[0-9]*)/g,"$1"),l=parseFloat(o).toFixed(2),u=this.props.type,f=void 0;r&&(u="points");var d="price"===u;return f="price"===u?i.k.createElement(c.a,null,"￥"):"points"===u?i.k.createElement(c.a,{"className":"iconfont icon-point"}):i.k.createElement(c.a,{"className":"iconfont icon-exp"}),i.k.createElement(s.a,{"className":"price "+(n?"price-center":"")},i.k.createElement(c.a,{"className":"price__main price--"+u},f,i.k.createElement(c.a,{"className":"price__int"},a),d&&i.k.createElement(c.a,{"className":"price__dec"},p)),l>0&&i.k.createElement(c.a,{"className":"price__market-price"},"￥",l))}}]),Price}(),n.options={"addGlobalClass":!0},n.defaultProps={"price":0,"marketPrice":NaN,"isExchange":!1,"type":"price"},r);f.propTypes={"price":l.a.oneOfType([l.a.number,l.a.string]).isRequired,"marketPrice":l.a.oneOfType([l.a.number,l.a.string]),"isExchange":l.a.bool,"type":l.a.oneOf(["price","points","exp"])}},"253":function(e,t,o){"use strict";o.d(t,"a",function(){return d});var n,r,i=o(1),a=o(2),c=o(124),s=o(51),p=o(258),l=o(240),u=o.n(l),f=(o(254),function(){function defineProperties(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,o){return t&&defineProperties(e.prototype,t),o&&defineProperties(e,o),e}}());var d=(r=n=function(e){function Tip(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Tip);var t=function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(Tip.__proto__||Object.getPrototypeOf(Tip)).call(this,e));return t.onClickButtonHandle=function(){var e=t.props,o=e.mainActionType,n=e.onClickMain;"back"===o?a.a.navigateBack():"home"===o?"WEAPP"===a.a.getEnv()?Object(c.d)({"url":"/pages/index/index"}):(a.a.redirectTo({"url":"/pages/index/index"}),window.location.reload()):"custom"===o&&n()},t.state={},t}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Tip,a["a"].Component),f(Tip,[{"key":"render","value":function render(){var e=this.props,t=e.type,o=e.icon,n=e.text,r=e.mainAction,a=e.height,c=e.mainActionType;return i.k.createElement(s.a,{"className":"tip "+t,"style":{"height":a}},i.k.createElement(s.a,{"className":"tip__content"},i.k.createElement(s.a,{"className":"iconfont icon-"+o}),i.k.createElement(s.a,{"className":"tip__text"},n),"none"!==c&&""!==r&&i.k.createElement(p.a,{"type":"primary","onClick":this.onClickButtonHandle},r)))}}]),Tip}(),n.options={"addGlobalClass":!0},n.defaultProps={"type":"auto","icon":"empty","text":"当前没有数据","height":"100%","mainAction":"返回上一级","mainActionType":"back"},r);d.propTypes={"type":u.a.oneOf(["full","auto"]),"icon":u.a.string,"text":u.a.string,"mainAction":u.a.string,"mainActionType":u.a.oneOf(["back","home","custom","none"]),"height":u.a.string,"onClickMain":u.a.func}},"254":function(e,t,o){},"256":function(e,t,o){},"307":function(e,t,o){"use strict";o.d(t,"a",function(){return h});var n,r,i=o(1),a=o(2),c=o(51),s=o(275),p=o(240),l=o(10),u=o.n(l),f=(o(308),o(244)),d=function(){function defineProperties(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,o){return t&&defineProperties(e.prototype,t),o&&defineProperties(e,o),e}}();var h=(r=n=function(e){function GoodsCard(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,GoodsCard);var t=function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(GoodsCard.__proto__||Object.getPrototypeOf(GoodsCard)).call(this,e));return t.gotoGoodsDetail=function(){var e=t.props,o=e.goods,n=e.isExchange?"&is_exchange=1":"";a.a.navigateTo({"url":"/pages/goods-detail/goods-detail?id="+o.id+n})},t.state={},t}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(GoodsCard,a["a"].Component),d(GoodsCard,[{"key":"render","value":function render(){var e=this.props,t=e.autoWidth,o=e.goods,n=e.isExchange,r=e.size;return i.k.createElement(c.a,{"className":u()("goods-card",r,{"auto-width":t}),"onClick":this.gotoGoodsDetail},i.k.createElement(c.a,{"className":"goods-card--image"},i.k.createElement(s.a,{"src":o.goods_img,"mode":"aspectFit"})),i.k.createElement(c.a,{"className":"goods-card--name"},o.goods_name),n?i.k.createElement(f.a,{"price":o.points,"center":!0,"isExchange":!0}):i.k.createElement(f.a,{"price":o.shop_price,"marketPrice":o.market_price,"center":!0}))}}]),GoodsCard}(),n.options={"addGlobalClass":!0},n.propTypes={"goods":p.object.isRequired,"autoWidth":p.bool,"isExchange":p.bool},n.defaultProps={"goods":{},"isExchange":!1,"size":"normal"},r)},"308":function(e,t,o){},"472":function(e,t,o){},"525":function(e,t,o){"use strict";o.r(t),o.d(t,"default",function(){return d});var n=o(1),r=o(2),i=o(51),a=o(260),c=(o(472),o(77)),s=o(241),p=o(253),l=o(307),u=function(){function defineProperties(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,o){return t&&defineProperties(e.prototype,t),o&&defineProperties(e,o),e}}(),f=function get(e,t,o){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var r=Object.getPrototypeOf(e);return null===r?void 0:get(r,t,o)}if("value"in n)return n.value;var i=n.get;return void 0!==i?i.call(o):void 0};var d=function(e){function PointsShop(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,PointsShop);var t=function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(PointsShop.__proto__||Object.getPrototypeOf(PointsShop)).call(this,e));return t.config={"navigationBarTitleText":"积分商城"},t.state={"goodsList":null},t}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{"constructor":{"value":e,"enumerable":!1,"writable":!0,"configurable":!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(PointsShop,r["a"].Component),u(PointsShop,[{"key":"componentWillMount","value":function componentWillMount(){var e=this;Object(c.b)({"name":"getPointsShopGoods","success":function success(t){e.setState({"goodsList":t})}})}},{"key":"onShareAppMessage","value":function onShareAppMessage(){}},{"key":"onPullDownRefresh","value":function onPullDownRefresh(){this.componentWillMount()}},{"key":"render","value":function render(){var e=this,t=this.state.goodsList,o=void 0,r=void 0;t&&t.length>0?(r=t.map(function(e){return n.k.createElement(l.a,{"key":e.id,"goods":e,"isExchange":!0})}),o=n.k.createElement(i.a,{"className":"points-shop__goods"},r)):o=t?n.k.createElement(p.a,{"text":"暂时没有可兑换的商品"}):n.k.createElement(s.a,null);var c=n.k.createElement(i.a,{"className":"points-shop"},o);return n.k.createElement(a.a,{"onRefresh":this.onPullDownRefresh&&this.onPullDownRefresh.bind(this),"ref":function ref(t){t&&(e.pullDownRefreshRef=t)}},c)}},{"key":"componentDidMount","value":function componentDidMount(){f(PointsShop.prototype.__proto__||Object.getPrototypeOf(PointsShop.prototype),"componentDidMount",this)&&f(PointsShop.prototype.__proto__||Object.getPrototypeOf(PointsShop.prototype),"componentDidMount",this).call(this)}},{"key":"componentDidShow","value":function componentDidShow(){f(PointsShop.prototype.__proto__||Object.getPrototypeOf(PointsShop.prototype),"componentDidShow",this)&&f(PointsShop.prototype.__proto__||Object.getPrototypeOf(PointsShop.prototype),"componentDidShow",this).call(this),this.pullDownRefreshRef&&this.pullDownRefreshRef.bindEvent()}},{"key":"componentDidHide","value":function componentDidHide(){f(PointsShop.prototype.__proto__||Object.getPrototypeOf(PointsShop.prototype),"componentDidHide",this)&&f(PointsShop.prototype.__proto__||Object.getPrototypeOf(PointsShop.prototype),"componentDidHide",this).call(this),this.pullDownRefreshRef&&this.pullDownRefreshRef.unbindEvent()}}]),PointsShop}()}}]);