webpackJsonp([13],{Ofhq:function(t,e){},mGlL:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={data:function(){return{type:this.$route.query.type,id:this.$route.query.id,res:[],finished:!1,isRate:!1,photo:[],eType:""}},methods:{goTo:function(t,e){var s=this;if(e){var i=[{cid:e}];this.ajax.post(this.$store.state.api+"addCourseCount",i).then(function(e){s.$router.push(t)}).catch(function(t){console.error(t)})}else this.$router.push(t)},SignUp:function(){var t=this;if(1!=this.eType)if(2!=this.eType){if(this.time()){var e=[{hid:this.id,uid:this.$store.state.userInfo.userid}];this.ajax.post(this.$store.state.api+"submitExamine",e).then(function(e){console.log(e),"1"==e.data[0][0].success?t.$toast.success("报名成功,请等待管理员审核"):"2"==e.data[0][0].success&&t.$toast.success("已报名成功,请等待管理员审核"),t.isExamine()}).catch(function(t){console.error(t)})}}else this.$toast.success("您的报名已被拒绝");else this.$toast.success("您的报名已通过，请前往我的-义工中心提交作业")},goBack:function(){if(this.$router.isBack=!0,window.history.length<=1)return this.$router.push({path:"/"}),!1;this.$router.go(-1)},getDetail:function(){var t=this,e={aid:this.id};this.ajax.get(this.$store.state.api+"getHomeSchoolAppDetail",e).then(function(e){t.res=e.data[0],t.photo=JSON.parse(t.res[0].file).photo.split(","),console.log(e.data)}).catch(function(t){console.error(t)})},lookWork:function(){var t=this,e={id:this.id,uid:this.$store.state.userInfo.userid};this.ajax.get(this.$store.state.api+"getHomeSchoolDetailApp",e).then(function(e){var s=e.data[0][0];s&&(t.finished=!0,s.rate&&(t.isRate=!0),"3"==t.type&&"1"==s.examine&&(t.isRate=!0))}).catch(function(t){console.error(t)})},isExamine:function(){var t=this,e={hid:this.id,uid:this.$store.state.userInfo.userid};this.ajax.get(this.$store.state.api+"isExamine",e).then(function(e){var s=e.data[0][0];console.log(s),s&&s.type&&(t.eType=s.type)}).catch(function(t){console.error(t)})},time:function(){if(this.now){var t=(new Date).getTime();return t-this.now>3e3&&(this.now=t,!0)}return this.now=(new Date).getTime(),!0}},created:function(){this.getDetail(),"1"!=this.$route.query.type&&this.isExamine(),this.lookWork()}},o={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"pb_content2",staticStyle:{background:"#e8e7e7"}},[s("div",{staticClass:"pb_head"},[s("van-icon",{staticClass:"pb_back",attrs:{name:"arrow-left",color:"#fff",size:"1.2rem"},on:{click:t.goBack}}),t._v(" "),s("span",[t._v("作业详情")])],1),t._v(" "),s("div",{staticClass:"pb_content_body",staticStyle:{position:"relative",height:"calc(100% - 3rem)","min-height":"unset"}},[s("div",{staticClass:"wd_box",style:t.finished?"height: 100%":""},[s("div",{staticClass:"work_detail"},[s("div",{staticClass:"work_top"},[t._m(0),t._v(" "),s("div",{staticClass:"work_title"},[t._v(t._s(t.res[0].workName))])]),t._v(" "),s("div",{staticClass:"work_content",domProps:{innerHTML:t._s(t.res[0].content)}}),t._v(" "),s("div",{staticStyle:{width:"90%",margin:"0 auto"}},t._l(t.photo,function(t){return s("el-image",{key:t,attrs:{src:t,fit:"cover"}})}),1),t._v(" "),s("div",{staticClass:"work_time"},[t._v(t._s(t.res[0].time)+"发布")]),t._v(" "),s("div",{staticClass:"mwd_comment"},[t.finished&&"3"==t.type?s("span",[t._v(t._s(t.isRate?"老师已审核":"老师未审核"))]):t.finished&&"1"==t.type?s("span",[t._v(t._s(t.isRate?"老师已评价":"老师未评价"))]):s("span"),t._v(" "),1==t.type?s("span",{class:{finish:t.finished}},[t._v(t._s(t.finished?"已完成":"未完成"))]):s("span",{class:{finish:"1"==t.eType}},[t._v(t._s("1"==t.eType?"审核通过,进行中...":"2"==t.eType?"已拒绝":"0"==t.eType?"未审核":"未报名"))])])])]),t._v(" "),1!=t.type&&3!=t.type||t.finished?2!=t.type||t.finished?t._e():s("div",{staticClass:"wd_button"},[s("div",{staticClass:"upload_work",on:{click:function(e){return t.SignUp()}}},[t._v("我要报名")])]):s("div",{staticClass:"wd_button"},[s("div",{staticClass:"upload_work2",on:{click:function(e){return t.goTo("/class?cid="+t.res[0].courseId,t.res[0].courseId)}}},[t._v("\n        前往课程\n      ")]),t._v(" "),s("div",{staticClass:"upload_work",on:{click:function(e){return t.goTo("/submitWork2?id="+t.id+"&type="+t.type)}}},[t._v("\n        提交作业\n      ")])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"lag"},[e("img",{attrs:{src:s("qGis"),alt:""}})])}]};var n=s("VU/8")(i,o,!1,function(t){s("Ofhq")},"data-v-4ccd6bfc",null);e.default=n.exports},qGis:function(t,e){t.exports="data:image/png;base64,[encoded data, 9572 characters]"}});
//# sourceMappingURL=13.7baa35270435ffe5ff64.js.map