article.vue
4.8 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<template>
<view class="content">
<view class="title">{{articlelist.title}}</view>
<view class="msg" style="display:flex;align-items: center;justify-content: space-between;">
<view style="display:flex">
<image class="photo" :src="articlelist.head_image"></image>
<view class="nameTime" >
<view class="name">{{articlelist.nickname}}</view>
<view class="time">{{articlelist.date}}</view>
</view>
</view>
<view class="cellect" v-if="articlelist.is_like==0" @click="cellect">
<image class="icon" src="../../static/shoucang.png"></image>
<view class="txt">收藏</view>
</view>
<view class="cellect" v-else @click="notcellect" style="border:2rpx solid #BDC4CE;text-align: center;">
<view class="txt" style="color: #BDC4CE;">已收藏</view>
</view>
</view>
<view class="text">
{{articlelist.des_content}}
</view>
<!-- <image class="pic" src="../../static/bg_img@2x.png"></image>
<view class="text">
积极主动的工作态度统筹做好内挖潜力和外拓资源,要针对不同学科专业特点和社会需求情况进行总体分析和研判,对内结合实际出台和完善各项推动措施和帮扶举措,深入挖掘潜力,积极调动各方力量共同参与就业工作,对外主动联络汇集各类就业资源、拓展就业渠道。三是要把握学生需求,以耐心细致的工作作风统筹抓好措施保障与精准落实,要宣传、解读、贯彻好各项政策举措,准确把握学生特点和需求做好学生的就业指导、技能培训、心理辅导,特别要有针对性做好各类就业困难学生帮扶工作,做到“一生一策”。
</view> -->
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
article_id:'',
articlelist:{}
}
},
methods:{
getArticleDetial(){
var that = this
var url = "article/getArticleInfo"
var params = {
article_id:that.article_id
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.articlelist=res
}).catch((err)=>{
console.log(err)
})
},
cellect(){
var that = this
var url = "article/likeArticle"
var params = {
token:uni.getStorageSync('token'),
article_id:that.article_id
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.articlelist.is_like=1
}).catch((err)=>{
console.log(err)
})
},
notcellect(){
var that = this
var url = "article/likeArticle"
var params = {
token:uni.getStorageSync('token'),
article_id:that.article_id
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.articlelist.is_like=0
}).catch((err)=>{
console.log(err)
})
},
},
onLoad(options){
this.article_id = options.article_id
this.getArticleDetial()
}
}
</script>
<style lang="less">
.content{
padding: 32rpx;
.title{
font-weight:500;
color:rgba(61,68,77,1);
font-size:32rpx;
}
.msg{
display: flex;
margin-top: 40rpx;
margin-bottom: 40rpx;
.photo{
width: 68rpx;
height: 68rpx;
margin-right: 20rpx;
}
.name{
color:rgba(61,68,77,1);
font-size: 24rpx;
}
.time{
color:rgba(140,145,152,1);
font-size:24rpx;
}
.cellect{
width:132rpx;
height:54rpx;
border:2rpx solid rgba(129,195,191,1);
opacity:1;
border-radius:40rpx;
display: flex;
align-items: center;
padding: 0 22rpx;
text-align: center;
box-sizing: border-box;
align-items: center;
// margin-left: 340rpx;
.icon{
width: 32rpx;
height: 32rpx;
}
.txt{
color:rgba(129,195,191,1);
font-size: 24rpx;
margin-left: 6rpx;
margin: 0 auto;
}
}
}
.text{
font-size:24rpx;
color:rgba(6,18,30,1);
margin-bottom: 26rpx;
}
.pic{
width: 686rpx;
height: 454rpx;
margin-bottom: 26rpx;
}
}
</style>