app.c95d6a0c54ebd20855cc.js 5.23 KB
webpackJsonp([1],{"5Fms":function(t,e){},AKAA:function(t,e){},NHnr:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=s("7+uW"),i={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("header",[n("div",{staticClass:"headerBox"},[n("div",{staticClass:"logo_content"},[t._v(" KHU NOTICE")]),t._v(" "),n("div",{staticClass:"logo_content_medium"},[t._v(" FOR LAZE")]),t._v(" "),n("div",{staticClass:"logo_content_little"},[t._v(" started by 2020-2 open source project visit khu-hub registory")]),t._v(" "),n("a",{attrs:{href:"http://khuhub.khu.ac.kr/2019100538/khu-notice-project"}},[n("div",{staticClass:"visit"},[t._v(" Visit")])]),t._v(" "),n("img",{staticClass:"logo",attrs:{src:s("hxEs")}}),t._v(" "),n("div",{staticClass:"search"},[n("input",{staticClass:"search_blank"})])])])}]};var a=s("VU/8")({name:"header",data:function(){return{}}},i,!1,function(t){s("NcoU")},null,null).exports,o=s("mtWM"),r=s.n(o),c={data:function(){return{username:"",password:""}},methods:{login:function(){r.a.post("/api/login",{username:this.username,password:this.password}).then(function(t){"isExist"===t.data&&alert("isExist"),"success"===t.data&&(window.location.href="/")})}}},l={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"login-menu"},[s("div",{staticClass:"input-box"},[s("form",{on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[s("ul",{staticClass:"login-input-list"},[s("li",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.username,expression:"username"}],attrs:{type:"text",placeholder:"USERNAME"},domProps:{value:t.username},on:{input:function(e){e.target.composing||(t.username=e.target.value)}}})]),t._v(" "),s("li",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],attrs:{type:"password",placeholder:"PASSWORD"},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})]),t._v(" "),t._m(0)])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("button",{attrs:{type:"submit"}},[this._v("login")])])}]};var u=s("VU/8")(c,l,!1,function(t){s("AKAA")},null,null).exports,d={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("setting",t._l(t.setting,function(e){return s("span",{key:e.name,staticClass:"site",class:[e.seen?e.code:"unSelected"],on:{click:function(s){return t.toggle(e.code)}}},[t._v("\r\n  "+t._s(e.name)+"\r\n ")])}),0)},staticRenderFns:[]};var f={el:".noticeList",components:{setting:s("VU/8")({el:"setting",data:function(){return{setting:[{name:"SW융합",seen:!0,code:"sw",official:"소프트웨어 융합대학 공지사항"},{name:"경희대",seen:!0,code:"khu",official:"경희대학교 공지사항"},{name:"장학센터",seen:!0,code:"janghak",official:"경희대학교 장학센터"}]}},methods:{toggle:function(t){this.setting.some(function(e){e.code===t&&(e.seen=!e.seen)}),this.$emit("settingchanged",this.setting)}}},d,!1,function(t){s("b8jG")},null,null).exports},data:function(){return{noticeList:[],sql:'select title,link,date_format(date,"%Y-%m-%d") as date,site from noticeList order by date desc',basic:'select title,link,date_format(date,"%Y-%m-%d") as date,site from noticeList'}},created:function(){this.fetchNoticeList()},methods:{fetchNoticeList:function(){var t=this;r.a.post("/api/fetchNoticeList",{sql:this.sql}).then(function(e){t.noticeList=e.data})},reload:function(t){var e=this.basic;e+=" where 0",t.forEach(function(t){!0===t.seen&&(e+=" or site = '"+t.official+"'")}),this.sql=e+" order by date desc",this.fetchNoticeList()}}},p={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"noticeList"},[s("setting",{on:{settingchanged:t.reload}}),t._v(" "),s("ul",t._l(t.noticeList,function(e){return s("li",{key:e,staticClass:"item"},[s("a",{attrs:{href:e.link,target:"_blank"}},[s("div",{staticClass:"title"},[t._v(t._s(e.title))])]),t._v(" "),s("div",{staticClass:"noticeInfo"},["경희대학교 공지사항"==e.site?s("span",{staticClass:"site khu"},[t._v("경희대")]):"소프트웨어 융합대학 공지사항"==e.site?s("span",{staticClass:"site sw"},[t._v("SW융합")]):"경희대학교 장학센터"==e.site?s("span",{staticClass:"site janghak"},[t._v("장학센터")]):t._e(),t._v(" "),s("span",{staticClass:"date"},[t._v(t._s(e.date))])])])}),0)],1)},staticRenderFns:[]};var m={name:"App",components:{siteHeader:a,loginMenu:u,noticeList:s("VU/8")(f,p,!1,function(t){s("dwgo")},null,null).exports}},v={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("siteHeader"),this._v(" "),e("div",{staticClass:"body"},[e("setting"),this._v(" "),e("noticeList")],1)],1)},staticRenderFns:[]};var h=s("VU/8")(m,v,!1,function(t){s("5Fms")},null,null).exports,_=s("/ocq");n.a.use(_.a);var g=new _.a({routes:[{path:"/",name:"App",component:h}],mode:"history"});n.a.config.productionTip=!1,new n.a({el:"#app",router:g,axios:r.a,components:{App:h},template:"<App/>"})},NcoU:function(t,e){},b8jG:function(t,e){},dwgo:function(t,e){},hxEs:function(t,e,s){t.exports=s.p+"static/img/khlogo.f48860a.png"}},["NHnr"]);
//# sourceMappingURL=app.c95d6a0c54ebd20855cc.js.map