正在显示
6 个修改的文件
包含
124 行增加
和
19 行删除
此 diff 太大无法显示。
@@ -13,16 +13,23 @@ | @@ -13,16 +13,23 @@ | ||
13 | </view> | 13 | </view> |
14 | <view class="mateitem" v-for="(item,index) in historylist" :key="index"> | 14 | <view class="mateitem" v-for="(item,index) in historylist" :key="index"> |
15 | <view class="contentBox"> | 15 | <view class="contentBox"> |
16 | - <image class="photo" src="../../static/logo_img@2x.png"></image> | 16 | + <image class="photo" :src="item.head_img"></image> |
17 | <view class="cont"> | 17 | <view class="cont"> |
18 | - <view class="title">红色的战旗</view> | 18 | + <view class="title">{{item.nickname}}</view> |
19 | 19 | ||
20 | - <view class="fen">就读体验</view> | 20 | + <view class="fen">{{item.title}}</view> |
21 | + <view class="txt">{{item.content}}</view> | ||
21 | </view> | 22 | </view> |
22 | - <view class="right"> | ||
23 | - <view class="text">已关注</view> | ||
24 | - </view> | ||
25 | - <view class="txt">班主任用“心”战“疫” 全力做好学生防疫工作</view> | 23 | + <view class="right" :class="item.is_like_user==0?'like':''"> |
24 | + <view class="text" @click="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;"> | ||
25 | + <view class='xin' style="width:28rpx;height:28rpx;font-size: 0;"> | ||
26 | + <image src="../../static/xin.png" mode=""></image> | ||
27 | + </view> | ||
28 | + 关注 | ||
29 | + </view> | ||
30 | + <view class="text" @click="noattention(item,index)" v-else>已关注</view> | ||
31 | + </view> | ||
32 | + | ||
26 | </view> | 33 | </view> |
27 | </view> | 34 | </view> |
28 | <view class="nodata" v-if="historylist.length==0">暂无数据</view> | 35 | <view class="nodata" v-if="historylist.length==0">暂无数据</view> |
@@ -40,15 +47,22 @@ | @@ -40,15 +47,22 @@ | ||
40 | <view class="mateitem" v-for="(item,index) in cellectlist" :key="index"> | 47 | <view class="mateitem" v-for="(item,index) in cellectlist" :key="index"> |
41 | <image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel"></image> | 48 | <image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel"></image> |
42 | <view class="contentBox" :style="{width:width}"> | 49 | <view class="contentBox" :style="{width:width}"> |
43 | - <image class="photo" src="../../static/logo_img@2x.png"></image> | 50 | + <image class="photo" :src="item.head_img"></image> |
44 | <view class="cont"> | 51 | <view class="cont"> |
45 | - <view class="title">红色的战旗</view> | ||
46 | - <view class="fen">就读体验</view> | ||
47 | - </view> | ||
48 | - <view class="right"> | ||
49 | - <view class="text">已关注</view> | 52 | + <view class="title">{{item.nickname}}</view> |
53 | + <view class="fen">{{item.title}}</view> | ||
54 | + <view class="txt">{{item.content}}</view> | ||
50 | </view> | 55 | </view> |
51 | - <view class="txt">班主任用“心”战“疫” 全力做好学生防疫工作</view> | 56 | + <view class="right" :class="item.is_like_user==0?'like':''"> |
57 | + <view class="text" @click="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;"> | ||
58 | + <view class='xin' style="width:28rpx;height:28rpx;font-size: 0;"> | ||
59 | + <image src="../../static/xin.png" mode=""></image> | ||
60 | + </view> | ||
61 | + 关注 | ||
62 | + </view> | ||
63 | + <view class="text" @click="noattention(item,index)" v-else>已关注</view> | ||
64 | + </view> | ||
65 | + | ||
52 | </view> | 66 | </view> |
53 | 67 | ||
54 | </view> | 68 | </view> |
@@ -75,6 +89,56 @@ export default { | @@ -75,6 +89,56 @@ export default { | ||
75 | } | 89 | } |
76 | }, | 90 | }, |
77 | methods:{ | 91 | methods:{ |
92 | + // 关注和取消关注 | ||
93 | + attention(item, index) { | ||
94 | + var that = this | ||
95 | + var url = "article/likeArticle" | ||
96 | + var token = uni.getStorageSync('token') | ||
97 | + var params = { | ||
98 | + article_id: item.id | ||
99 | + } | ||
100 | + app.post(url, params, "get").then((res) => { | ||
101 | + uni.showToast({ | ||
102 | + title: "关注成功", | ||
103 | + icon: 'none' | ||
104 | + }) | ||
105 | + if (that.active1 == true) { | ||
106 | + that.historylist[index].is_like_user = 1 | ||
107 | + } else if (that.active2 == true) { | ||
108 | + that.cellectlist[index].is_like_user = 1 | ||
109 | + | ||
110 | + } | ||
111 | + | ||
112 | + | ||
113 | + }).catch((err) => { | ||
114 | + console.log(err) | ||
115 | + }) | ||
116 | + }, | ||
117 | + noattention(item, index) { | ||
118 | + var that = this | ||
119 | + var url = "article/likeArticle" | ||
120 | + var token = uni.getStorageSync('token') | ||
121 | + var params = { | ||
122 | + article_id: item.id | ||
123 | + } | ||
124 | + app.post(url, params, "get").then((res) => { | ||
125 | + uni.showToast({ | ||
126 | + title: "取消关注成功", | ||
127 | + icon: 'none' | ||
128 | + }) | ||
129 | + if (that.active1 == true) { | ||
130 | + that.historylist[index].is_like_user = 0 | ||
131 | + } else if (that.active2 == true) { | ||
132 | + that.cellectlist[index].is_like_user = 0 | ||
133 | + | ||
134 | + } | ||
135 | + | ||
136 | + | ||
137 | + }).catch((err) => { | ||
138 | + console.log(err) | ||
139 | + }) | ||
140 | + | ||
141 | + }, | ||
78 | historyShow(){ | 142 | historyShow(){ |
79 | this.active1=true, | 143 | this.active1=true, |
80 | this.active2=false, | 144 | this.active2=false, |
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | <image class="photo" :src="articlelist.head_image"></image> | 7 | <image class="photo" :src="articlelist.head_image"></image> |
8 | <view class="nameTime" > | 8 | <view class="nameTime" > |
9 | <view class="name">{{articlelist.nickname}}</view> | 9 | <view class="name">{{articlelist.nickname}}</view> |
10 | - <view class="time">{{articlelist.date}}</view> | 10 | + <view class="time">{{articlelist.createtime}}</view> |
11 | </view> | 11 | </view> |
12 | </view> | 12 | </view> |
13 | 13 | ||
@@ -21,8 +21,12 @@ | @@ -21,8 +21,12 @@ | ||
21 | </view> | 21 | </view> |
22 | </view> | 22 | </view> |
23 | <view class="text"> | 23 | <view class="text"> |
24 | - {{articlelist.des_content}} | 24 | + {{articlelist.des_content==undefined?'':articlelist.des_content}} |
25 | </view> | 25 | </view> |
26 | + <view style="display:flex;"> | ||
27 | + <image :src="item" v-for="(item,index) in articlelist.des_images" :key="indexk" @click.stop="preimg(index)" style="margin-right:10rpx;margin-bottom:10rpx;width:128rpx; | ||
28 | + height:128rpx"></image> | ||
29 | + </view> | ||
26 | <!-- <image class="pic" src="../../static/bg_img@2x.png"></image> | 30 | <!-- <image class="pic" src="../../static/bg_img@2x.png"></image> |
27 | <view class="text"> | 31 | <view class="text"> |
28 | 积极主动的工作态度统筹做好内挖潜力和外拓资源,要针对不同学科专业特点和社会需求情况进行总体分析和研判,对内结合实际出台和完善各项推动措施和帮扶举措,深入挖掘潜力,积极调动各方力量共同参与就业工作,对外主动联络汇集各类就业资源、拓展就业渠道。三是要把握学生需求,以耐心细致的工作作风统筹抓好措施保障与精准落实,要宣传、解读、贯彻好各项政策举措,准确把握学生特点和需求做好学生的就业指导、技能培训、心理辅导,特别要有针对性做好各类就业困难学生帮扶工作,做到“一生一策”。 | 32 | 积极主动的工作态度统筹做好内挖潜力和外拓资源,要针对不同学科专业特点和社会需求情况进行总体分析和研判,对内结合实际出台和完善各项推动措施和帮扶举措,深入挖掘潜力,积极调动各方力量共同参与就业工作,对外主动联络汇集各类就业资源、拓展就业渠道。三是要把握学生需求,以耐心细致的工作作风统筹抓好措施保障与精准落实,要宣传、解读、贯彻好各项政策举措,准确把握学生特点和需求做好学生的就业指导、技能培训、心理辅导,特别要有针对性做好各类就业困难学生帮扶工作,做到“一生一策”。 |
@@ -53,6 +57,18 @@ export default { | @@ -53,6 +57,18 @@ export default { | ||
53 | console.log(err) | 57 | console.log(err) |
54 | }) | 58 | }) |
55 | }, | 59 | }, |
60 | + preimg(index){ | ||
61 | + let that=this; | ||
62 | + console.log(that.articlelist.des_images,index) | ||
63 | + uni.previewImage({ | ||
64 | + current: that.articlelist.des_images[index], | ||
65 | + urls: that.articlelist.des_images, | ||
66 | + success: function (res) { }, | ||
67 | + fail: function (res) { }, | ||
68 | + complete: function (res) { }, | ||
69 | + }) | ||
70 | + | ||
71 | + }, | ||
56 | cellect(){ | 72 | cellect(){ |
57 | var that = this | 73 | var that = this |
58 | var url = "article/likeArticle" | 74 | var url = "article/likeArticle" |
@@ -112,6 +128,7 @@ export default { | @@ -112,6 +128,7 @@ export default { | ||
112 | width: 68rpx; | 128 | width: 68rpx; |
113 | height: 68rpx; | 129 | height: 68rpx; |
114 | margin-right: 20rpx; | 130 | margin-right: 20rpx; |
131 | + border-radius: 50%; | ||
115 | } | 132 | } |
116 | .name{ | 133 | .name{ |
117 | color:rgba(61,68,77,1); | 134 | color:rgba(61,68,77,1); |
@@ -35,7 +35,10 @@ | @@ -35,7 +35,10 @@ | ||
35 | <view class="articleBox"> | 35 | <view class="articleBox"> |
36 | <view class="title">{{item.title}}</view> | 36 | <view class="title">{{item.title}}</view> |
37 | <view class="txt">{{item.des_content}}</view> | 37 | <view class="txt">{{item.des_content}}</view> |
38 | - <image :src="item" v-for="(item,index) in item.des_images" :key="index"></image> | 38 | + <view style="display:flex;"> |
39 | + <image :src="item" v-for="(item,indexk) in item.des_images" :key="indexk" @click.stop="preimg(index,indexk)" style="margin-right:10rpx;margin-bottom:10rpx"></image> | ||
40 | + </view> | ||
41 | + | ||
39 | <!-- <image src="../../static/bg_img@2x.png"></image> --> | 42 | <!-- <image src="../../static/bg_img@2x.png"></image> --> |
40 | </view> | 43 | </view> |
41 | </view> | 44 | </view> |
@@ -138,6 +141,17 @@ methods:{ | @@ -138,6 +141,17 @@ methods:{ | ||
138 | url: '../school/article?article_id=' + id | 141 | url: '../school/article?article_id=' + id |
139 | }) | 142 | }) |
140 | }, | 143 | }, |
144 | + preimg(index,indexk){ | ||
145 | + let that=this; | ||
146 | + uni.previewImage({ | ||
147 | + current: that.articleList[index].des_images[indexk], | ||
148 | + urls: that.articleList[index].des_images, | ||
149 | + success: function (res) { }, | ||
150 | + fail: function (res) { }, | ||
151 | + complete: function (res) { }, | ||
152 | + }) | ||
153 | + 微信程 | ||
154 | + }, | ||
141 | liuyanBoxShow(){ | 155 | liuyanBoxShow(){ |
142 | this.isliuyanBoxShow=true | 156 | this.isliuyanBoxShow=true |
143 | }, | 157 | }, |
@@ -246,6 +260,9 @@ methods:{ | @@ -246,6 +260,9 @@ methods:{ | ||
246 | token:token | 260 | token:token |
247 | } | 261 | } |
248 | app.post(url,params,"get").then((res)=>{ | 262 | app.post(url,params,"get").then((res)=>{ |
263 | + // res.forEach(function(value,index,array){ | ||
264 | + // value.head_image=app.globalData.imageBaseUrl+value.head_image | ||
265 | + // }) | ||
249 | this.articleList=res | 266 | this.articleList=res |
250 | }).catch((err)=>{ | 267 | }).catch((err)=>{ |
251 | console.log(err) | 268 | console.log(err) |
@@ -711,6 +728,7 @@ methods:{ | @@ -711,6 +728,7 @@ methods:{ | ||
711 | width: 68rpx; | 728 | width: 68rpx; |
712 | height: 68rpx; | 729 | height: 68rpx; |
713 | margin-right: 20rpx; | 730 | margin-right: 20rpx; |
731 | + border-radius: 50%; | ||
714 | } | 732 | } |
715 | } | 733 | } |
716 | .articleBox{ | 734 | .articleBox{ |
@@ -293,7 +293,7 @@ | @@ -293,7 +293,7 @@ | ||
293 | } | 293 | } |
294 | app.post(url, params, "get").then((res) => { | 294 | app.post(url, params, "get").then((res) => { |
295 | console.log(res) | 295 | console.log(res) |
296 | - this.schoolmateList = res | 296 | + this.schoolmateList =this.schoolmateList.concat(res) |
297 | }).catch((err) => { | 297 | }).catch((err) => { |
298 | console.log(err) | 298 | console.log(err) |
299 | }) | 299 | }) |
@@ -462,13 +462,18 @@ | @@ -462,13 +462,18 @@ | ||
462 | console.log(options.type) | 462 | console.log(options.type) |
463 | var type = options.type | 463 | var type = options.type |
464 | this.type = type | 464 | this.type = type |
465 | - this.getmatelist() | 465 | + // this.getmatelist() |
466 | // this.getAllSchool() | 466 | // this.getAllSchool() |
467 | this.getAllGraduated() | 467 | this.getAllGraduated() |
468 | this.getAllUp() | 468 | this.getAllUp() |
469 | this.getAllProvince() | 469 | this.getAllProvince() |
470 | 470 | ||
471 | }, | 471 | }, |
472 | + onShow(){ | ||
473 | + this.page=1; | ||
474 | + this.schoolmateList=[] | ||
475 | + this.getmatelist() | ||
476 | + } | ||
472 | 477 | ||
473 | } | 478 | } |
474 | </script> | 479 | </script> |
-
请 注册 或 登录 后发表评论