(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{1018:function(t,e,n){"use strict";n.r(e);var r=n(4),o=Object(r.Create)({name:"banner",props:{data:Array},data:function(){return{isShowBtn:!1,bannerList:[]}},onInit:function(){},computed:{swiperOption:function(){var t=this;return{speed:1500,autoplay:{delay:3e3,disableOnInteraction:!1},loop:!0,effect:"fade",initialSlide:0,observer:!0,observeParents:!1,on:{slideChangeTransitionStart:function(){t.$emit("setIndex",this.realIndex)}},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination",clickable:!0}}}},methods:{bannerJump:function(data){var t;t=JSON.parse(data.linkParam);try{this.$env.inApp?(t.page,this.$app.gotoNative(t.page,t.param)):"supply"==t.page?window.location=this.$config.pc+"/"+t.page+"/"+t.param+"/":window.location=t.param}catch(t){}},goLink:function(data){}}}),c=(n(1173),n(8)),l=Object(c.a)(o,(function(){var t=this,e=t._self._c;t._self._setupProxy;return t.data&&t.data.length>0?e("div",{staticClass:"banner-bg",on:{mouseover:function(e){t.isShowBtn=!0},mouseleave:function(e){t.isShowBtn=!1}}},[e("div",{directives:[{name:"swiper",rawName:"v-swiper:purchaseSwiper",value:t.swiperOption,expression:"swiperOption",arg:"purchaseSwiper"}]},[e("div",{staticClass:"swiper-wrapper"},t._l(t.data,(function(img,t){return e("div",{key:t,staticClass:"swiper-slide"},[e("div",{staticClass:"banner-bg"},[e("r-link",{attrs:{href:[img.courseUrl?img.courseUrl:"javascript:void();"],target:"_blank"}},[e("img",{attrs:{src:img.advertImg,alt:"index"}})])],1)])})),0),t._v(" "),e("transition",{attrs:{name:"fade",mode:"out-in"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowBtn,expression:"isShowBtn"}],staticClass:"swiper-button-prev swiper-button-white"},[e("i",{staticClass:"iconfont icon-fanhui"})])]),t._v(" "),e("transition",{attrs:{name:"fade",mode:"out-in"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowBtn,expression:"isShowBtn"}],staticClass:"swiper-button-next swiper-button-white"},[e("i",{staticClass:"iconfont icon-lanmujiantou"})])]),t._v(" "),e("div",{staticClass:"swiper-pagination"})],1)]):t._e()}),[],!1,null,"67adb37c",null).exports,h=n(95);function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(){v=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,desc){t[e]=desc.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",h=o.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function m(t,e,n,o){var c=e&&e.prototype instanceof _?e:_,l=Object.create(c.prototype),h=new B(o||[]);return r(l,"_invoke",{value:j(t,n,h)}),l}function y(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=m;var w={};function _(){}function x(){}function L(){}var C={};d(C,c,(function(){return this}));var k=Object.getPrototypeOf,S=k&&k(k(T([])));S&&S!==e&&n.call(S,c)&&(C=S);var U=L.prototype=_.prototype=Object.create(C);function E(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){var o;r(this,"_invoke",{value:function(r,c){function l(){return new e((function(o,l){!function r(o,c,l,h){var v=y(t[o],t,c);if("throw"!==v.type){var d=v.arg,m=d.value;return m&&"object"==f(m)&&n.call(m,"__await")?e.resolve(m.__await).then((function(t){r("next",t,l,h)}),(function(t){r("throw",t,l,h)})):e.resolve(m).then((function(t){d.value=t,l(d)}),(function(t){return r("throw",t,l,h)}))}h(v.arg)}(r,c,o,l)}))}return o=o?o.then(l,l):l()}})}function j(t,e,n){var r="suspendedStart";return function(o,c){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw c;return G()}for(n.method=o,n.arg=c;;){var l=n.delegate;if(l){var h=P(l,n);if(h){if(h===w)continue;return h}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var f=y(t,e,n);if("normal"===f.type){if(r=n.done?"completed":"suspendedYield",f.arg===w)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(r="completed",n.method="throw",n.arg=f.arg)}}}function P(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,P(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var o=y(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,w;var c=o.arg;return c?c.done?(e[t.resultName]=c.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,w):c:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,w)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function e(){for(;++i=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),h=n.call(o,"finallyLoc");if(l&&h){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--i){var e=this.tryEntries[i];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),w}},catch:function(t){for(var i=this.tryEntries.length-1;i>=0;--i){var e=this.tryEntries[i];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var r=n.arg;N(e)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),w}},t}function d(t,e,n,r,o,c,l){try{var h=t[c](l),f=h.value}catch(t){return void n(t)}h.done?e(f):Promise.resolve(f).then(r,o)}var m=Object(r.Create)({name:"banner-info",components:{Banner:l},props:{bannerList:Array,typeList:Array},services:[h.default],data:function(){return{hnUser:{},isLogin:!1,currentIndex:0}},onInit:function(){var t,e=this;return(t=v().mark((function t(){var n;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=e.$auth).ticket){t.next=9;break}return e.isLogin=!0,t.next=5,e.$service.index.getUserNums(n.hnUserId);case 5:if(t.t0=t.sent,t.t0){t.next=8;break}t.t0={};case 8:e.hnUser=t.t0;case 9:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function l(t){d(c,r,o,l,h,"next",t)}function h(t){d(c,r,o,l,h,"throw",t)}l(void 0)}))})()},methods:{getIndex:function(t){this.currentIndex=t},doLogin:function(){this.$auth.actionLogin().then((function(){location.reload()}))}},filters:{toMin:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t?(t/60).toFixed(0):"-"}}}),y=(n(1174),Object(c.a)(m,(function(){var t=this,e=t._self._c;t._self._setupProxy;return e("div",{staticClass:"banner-bg",style:{backgroundImage:"url("+(t.bannerList.length&&t.bannerList[t.currentIndex]&&t.bannerList[t.currentIndex].advertCover?t.bannerList[t.currentIndex].advertCover:"")+")"}},[e("div",{staticClass:"content"},[e("div",{staticClass:"content-l"},t._l(t.typeList,(function(n){return t.typeList&&t.typeList.length?e("div",{staticClass:"type-item"},[e("r-link",{staticClass:"type-name",attrs:{tag:"courseList",target:"_blank",params:{pinyin:n.pinyin}}},[e("span",{staticClass:"s1"},[t._v(t._s(n.name))]),t._v(" "),e("i",{staticClass:"iconfont icon-pc-youjiantou"})]),t._v(" "),n.childType&&n.childType.length?e("div",{staticClass:"two-type"},t._l(n.childType,(function(i){return e("r-link",{staticClass:"s2",attrs:{tag:"courseList",target:"_blank",params:{pinyin:i.pinyin}}},[t._v("\n "+t._s(i.name))])})),1):t._e()],1):t._e()})),0),t._v(" "),e("div",{staticClass:"banner-ctn"},[e("Banner",{attrs:{data:t.bannerList},on:{setIndex:t.getIndex}})],1),t._v(" "),e("div",{staticClass:"content-r"},[e("div",{staticClass:"user-t",class:{"borser-line":t.hnUser.headPic}},[e("div",{staticClass:"user-head"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.hnUser.headPic?t.hnUser.headPic:"",expression:"hnUser.headPic?hnUser.headPic:''"}],attrs:{type:"avatar",src:"",alt:""}})]),t._v(" "),t.isLogin?[e("div",{staticClass:"name"},[t._v(t._s(t.hnUser.linkMan))]),t._v(" "),Object.keys(t.hnUser.userLabel||{}).length?e("div",{staticClass:"label-ctn"},[t.hnUser.userLabel.isYx?e("img",{staticClass:"icon",attrs:{src:n(1038)}}):t._e(),t._v(" "),t.hnUser.userLabel.isVip?e("img",{staticClass:"icon",attrs:{src:n(1039)}}):t._e(),t._v(" "),t.hnUser.userLabel.isBuyerProtectionUser?e("img",{staticClass:"icon",attrs:{src:n(1040)}}):t._e(),t._v(" "),t.hnUser.userLabel.isCompanyCer?e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/shop/qyrz.png"}}):t._e(),t._v(" "),t.hnUser.userLabel.isPersonCer?e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/shop/srrz.png"}}):t._e(),t._v(" "),t.hnUser.userLabel.isCargoprotection?e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/shop/khbz.png"}}):t._e(),t._v(" "),t.hnUser.userLabel.isSpot?e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/shop/sdrz.png"}}):t._e(),t._v(" "),t.hnUser.userLabel.isPersonBusiness?e("img",{staticClass:"icon",attrs:{src:"http://www.lianlianny.com/agricprod/lib/files/shop/gtgsh.png"}}):t._e()]):t._e()]:[e("div",{staticClass:"show-test"},[t._v("登录惠农网,查看更多精彩课程")])]],2),t._v(" "),t.isLogin?e("div",{staticClass:"learn-time"},[e("div",{staticClass:"time-item"},[e("div",{staticClass:"time-item-l"},[t._v("累计学习")]),t._v(" "),e("div",{staticClass:"time-item-r"},[e("span",{staticClass:"s1"},[t._v(t._s(t.hnUser.watchCourseNum?t.hnUser.watchCourseNum:"-"))]),t._v("(课时)\n ")])]),t._v(" "),e("div",{staticClass:"time-item"},[e("div",{staticClass:"time-item-l"},[t._v("累计时长")]),t._v(" "),e("div",{staticClass:"time-item-r"},[e("span",{staticClass:"s1"},[t._v(t._s(t._f("toMin")(t.hnUser.durationSum)))]),t._v("(分钟)\n ")])])]):e("div",{staticClass:"login-btn",on:{click:t.doLogin}},[t._v("\n 免注册登录\n ")])])])])}),[],!1,null,"6a67d2d0",null));e.default=y.exports},1038:function(t,e,n){t.exports=n.p+"img/de4e1b3.png"},1039:function(t,e,n){t.exports=n.p+"img/4d34e45.png"},1040:function(t,e,n){t.exports=n.p+"img/90001b6.png"},1110:function(t,e,n){},1111:function(t,e,n){},1173:function(t,e,n){"use strict";n(1110)},1174:function(t,e,n){"use strict";n(1111)}}]);