26.def46a228dc7673793a8.js 2.1 KB

1
  1. webpackJsonp([26],{Zm7D:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("SQ4B"),n=i("b9vf"),o=i("qI5z"),r=i("vGYV"),s={name:"ExpertDetail",components:{},data:function(){return{loading:!1,id:0,expert:{name:"",photo:"",introduction:"",title:""}}},mounted:function(){var t=this;this.$nextTick(function(){t.init()})},methods:{init:function(){this.id=this.$route.query.id,this.loadData()},back:function(){this.$router.push({name:"ExpertList"})},loadData:function(){var t=this;this.showLoading(),a.a.get(n.a.EXPERT.GET_DETAIL.replace("{id}",this.id)).then(function(e){t.expert.name=e.data.name,t.expert.photo=e.data.photo,t.expert.title=e.data.title,t.expert.introduction=e.data.introduction,t.hideLoading()}).catch(function(e){t.hideLoading(),Object(o.a)("error","打开详情失败:"+e.data)})},setUserInfo:function(){this.expert=Object(r.K)("expert")},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1}},watch:{expertType:function(t){this.expertType=t}}},c={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"create-container"},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"create-body"},[i("el-form",{staticClass:"demo",attrs:{model:t.expert,"label-width":"12%"}},[i("el-form-item",{attrs:{label:"用户名称",prop:"name"}},[i("span",[t._v(t._s(t.expert.name))])]),t._v(" "),i("el-form-item",{attrs:{label:"用户图标",prop:"photo"}},[i("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:t.expert.photo}})]),t._v(" "),i("el-form-item",{attrs:{label:"头衔",prop:"address"}},[i("span",[t._v(t._s(t.expert.title))])]),t._v(" "),i("el-form-item",{staticStyle:{height:"auto"},attrs:{label:"简介",prop:"address"}},[i("span",[t._v(t._s(t.expert.introduction))])]),t._v(" "),i("el-form-item",[i("div",{staticClass:"btn btn-medium",staticStyle:{"margin-top":"20px"},on:{click:function(e){return t.back()}}},[t._v("返回")])])],1)],1)])},staticRenderFns:[]};var d=i("VU/8")(s,c,!1,function(t){i("rYc8")},null,null);e.default=d.exports},rYc8:function(t,e){}});