service-detail.vue
3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<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> {{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>