service-detail.vue 3.42 KB
<style>
.service-con1 h2{
font-weight: normal;
padding-top: 10px;
border-bottom: 1px #e6e6e6 solid;
margin-bottom: 0px;
padding-bottom: 10px;
}
.service-con1 h2 span{    width: 30px;
    height: 30px;
    border-radius: 30px;
    line-height: 30px;
    text-align: center;
    display: inline-block;
    background: #86b8bc;
    font-size: 16px;
    color: #fff;}

.service-con1 h3{font-size: 14px;  font-weight: normal;    
  margin:0px;display: inline-block;float:left;
  padding-right:10px;}
.service-con1 footer {margin-top:10px;}
.service-con1 footer p{padding:5px;margin:0px;text-indent: 0px;}
.service-con1 footer  a{margin-right:10px;float:left;}
.service-con1 footer:after{content:"";display: block;
width:100%;clear:both;}

.service-con1 h4{margin:10px 0px;margin-top:20px;padding:0px;
font-size: 18px;    font-weight: normal;
    border-bottom: 1px #e6e6e6 solid;
    padding-bottom: 10px;}
.service-ulzy{padding:0px;margin:0px;}
.service-ulzy li{padding-left:20px;position: relative;
line-height: 20px;height:20px;margin-bottom:5px;}
.service-ulzy li:before{content: "";
    width: 14px;
    height: 14px;
    border-radius: 16px;
    background: #2eef19;
    left: 0px;
    top: 2px;
    position: absolute;
    display: inline-block;}
.service-con1 article{padding:0px;    margin: 0px;}
.service-con1 article p{margin:10px 0px;}
</style>

<template>
<div class="container resource close-left-menu">

  <div class="pop-banner clearfix">
    <div class="operate-btns">
     
    </div>
    <h3 class="current-module">服务</h3>
  </div>
  
  <h1 class="service-h1" 
  style="background:none;box-shadow:0px 0px 0px #fff;padding:0px;">
    {{objdata.title}}
  </h1>
  <!-- <p class="service-desc">发布时间:{{objdata.time}}        
  浏览 {{objdata.browsenumber}}</p>  -->
  
  <div class="service-con1" v-for="item in objdata.steplist">
    <h2 class="h2">
      <span>{{$index+1}}</span>&nbsp;&nbsp;{{item.title}}
    </h2>
    <article>
        <p>{{{item.content}}}</p>
    </article>
      
      <footer>
        <h3>引用网址:</h3>        
        <a :href="link.path" v-for="link in item.links"
        target="_blank">{{link.title}}</a>
        
      </footer>
  </div>


  <div class="service-con1" >
    <h4 >注意事项:</h4>
    <ul class="service-ulzy">
        <li v-for="item in objdata.noticlist">
          {{{item.content}}}
        </li>
    </ul>
  </div>

</div>
</template>

<script>
module.exports={
	data:function(){
		return {
			id:'',objdata:{}
		}
	},methods:{
    getData:function(){
      this.id=this.$route.params.id;
      Ajax.post('/platform/sys_helper_getOneDetail',{
        guid:this.id
      }).then(function(res){
        var result=res.data;        
        var data=result.data;
        var href=location.href.substr(0,location.href.indexOf('#!/')+3)

        for(var i=0;i<data.steplist.length;i++){
            var links=JSON.parse(data.steplist[i].refs)
            var arr=[];
            for(var y=0;y<links.length;y++){
              if(links[y].path.indexOf('//')==-1){
                arr.push({title:links[y].title,
                  path:href+'serviceDetail/'+links[y].path})
              }else{
                arr.push(links[y])
              }
            }

            data.steplist[i].links=arr;
        }
        if(result.data){
          this.$set('objdata',data);          
        }

      }.bind(this))
    }
  },route:{
		activate:function(){
		    this.getData();
		}
	},ready:function(){

  }
}
</script>