build/static/js/145.530eed7f.chunk.js

1 line
7.4 KiB
JavaScript

(this.webpackJsonp=this.webpackJsonp||[]).push([[145],{Xd6l:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n("2/Rp")),a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n("L/Qf");var o=n("q1tI"),l=s(o),u=n("sYIF"),c=n("eO8H"),i=s(n("KJct"));function s(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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}n("6V0J");var d=function(e){function t(){var e,n,a;f(this,t);for(var o=arguments.length,s=Array(o),d=0;d<o;d++)s[d]=arguments[d];return n=a=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),a.renderList=function(e,t,n,a,o,s){if(e&&e.length>0)return e.map((function(e,f){return l.default.createElement("div",{className:"pull-left "+t,key:f},l.default.createElement("div",{className:"pbt25 grid-item mlr10 border-b-line"},l.default.createElement("div",null,l.default.createElement("a",{href:"/"+e.login,className:"show-user-link"},l.default.createElement("img",{className:"avatar-60",src:(0,u.getImageUrl)("/"+e.image_url),alt:""}))),l.default.createElement("div",{className:"ml12"},l.default.createElement("div",null,l.default.createElement(c.Link,{to:"/"+e.login,className:"font-16 text-primary task-hide max-w-200",style:{display:"block"},title:e.name},e.name)),l.default.createElement("div",{className:"font-12 text-gray grid-item pb5"},l.default.createElement("i",{className:"iconfont icon-shijian user-join-time"}),l.default.createElement("span",{className:"ml4"},"点赞列表"===a?"点赞":"关注列表"===a?"关注":"fork","时间:",e.format_time)),n&&n.login===e.login?l.default.createElement(r.default,{type:"default"},"当前用户"):l.default.createElement(i.default,{is_watch:e.is_watch,notReset:s,id:e.login,successFunc:o}))))}))},p(a,n)}return function(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)}(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.users,n=e.userClass,r=e.current_user,a=e.type_title,o=e.successFunc,l=e.notReset,u=e.title_type;return this.renderList(t,n,r,a,o,l,u)}}]),t}(o.Component);t.default=d},bkQV:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n("q1tI"),o=u(a),l=u(n("uaeZ"));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}var s=function(e){function t(){return c(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(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)}(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.user,n=e.current_user,r=e.match,a=e.fetchUser;return o.default.createElement("div",null,t&&t.login&&o.default.createElement(l.default,{userType:"fan_users",login:t.login,current_user:n,match:r,fetchUser:a}))}}]),t}(a.Component);t.default=s},uaeZ:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n("W9HT")),a=d(n("NUBc")),o=d(n("5rEg")),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n("04bd"),n("YQTV"),n("1vPl");var u=n("q1tI"),c=d(u),i=n("eO8H"),s=d(n("vDqi")),f=d(n("2CTR")),p=d(n("Xd6l"));function d(e){return e&&e.__esModule?e:{default:e}}var m=o.default.Search,h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.componentDidMount=function(){n.get_watchers()},n.get_watchers=function(){var e=n.props,t=e.userType,r="/users/"+e.match.params.username+"/"+t+".json",a=n.state,o=a.page,l=a.limit,u=a.search;n.setState({isSpin:!0}),s.default.get(r,{params:{page:o,limit:l,search:u}}).then((function(e){e&&e.data&&n.setState({users:e.data.users,total:e.data.count,isSpin:!1})})).catch((function(e){n.setState({isSpin:!1})}))},n.changePage=function(e){n.state.page=e,n.get_watchers()},n.changeSearchValue=function(e){n.setState({search:e.target.value})},n.successFunc=function(){var e=n.props.fetchUser;n.get_watchers(),e&&e()},n.state={page:1,limit:30,users:void 0,search:void 0,total:void 0},n}return function(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)}(t,e),l(t,[{key:"render",value:function(){var e=this.state,t=e.users,n=e.isSpin,o=e.total,l=e.search,u=e.limit,s=e.page,d=this.props,h=d.userType,y=d.login,b=d.current_user,g=b&&y===b.login?"我":"TA",_=o&&o>u?c.default.createElement("div",{className:"edu-txt-center pt30 mb30"},c.default.createElement(a.default,{simple:!0,defaultCurrent:s,total:o,pageSize:u,onChange:this.changePage})):"";return c.default.createElement(r.default,{spinning:n},c.default.createElement("div",{className:"minH-670"},c.default.createElement("div",{className:"grid-item pb20 bbt"},c.default.createElement("h3",{style:{marginBottom:"0px"}},c.default.createElement(i.Link,{to:"/"+y},c.default.createElement("i",{className:"iconfont icon-zuojiantou color-grey-9 font-16 mr8"})),"watch_users"===h?g+"关注的":"关注"+g+"的"),c.default.createElement("div",{className:"text-right"},c.default.createElement(m,{placeholder:"输入名称进行搜索",enterButton:"搜索",size:"large",onSearch:this.get_watchers,className:"list-r-Search",value:l,onChange:this.changeSearchValue}))),t&&t.length>0?c.default.createElement("div",{className:"w-100 inline-block"},c.default.createElement(p.default,{users:t,userClass:"w-33",type_title:"关注列表",current_user:b,successFunc:this.successFunc,notReset:"watch_users"!==h||"我"!==g,title_type:g})):c.default.createElement(f.default,{_html:"暂时没有数据~"}),c.default.createElement("div",{className:"w-100"},_)))}}]),t}(u.Component);t.default=h}}]);