正在显示
19 个修改的文件
包含
774 行增加
和
486 行删除
@@ -104,6 +104,16 @@ | @@ -104,6 +104,16 @@ | ||
104 | 104 | ||
105 | <style lang="less"> | 105 | <style lang="less"> |
106 | /*每个页面公共css */ | 106 | /*每个页面公共css */ |
107 | + image{ | ||
108 | + width:100%; | ||
109 | + height:100%; | ||
110 | + } | ||
111 | + .nodata{ | ||
112 | + color:#999; | ||
113 | + font-size: 32rpx; | ||
114 | + text-align: center; | ||
115 | + margin :100rpx auto 0; | ||
116 | + } | ||
107 | button::after{ | 117 | button::after{ |
108 | border:none; | 118 | border:none; |
109 | outline:none; | 119 | outline:none; |
1 | { | 1 | { |
2 | "pages": [ | 2 | "pages": [ |
3 | { | 3 | { |
4 | - "path": "pages/school/school", | 4 | + "path": "pages/register/register", |
5 | "style": { | 5 | "style": { |
6 | "navigationBarTitleText": "学长说", | 6 | "navigationBarTitleText": "学长说", |
7 | "navigationBarBackgroundColor": "#2D5575", | 7 | "navigationBarBackgroundColor": "#2D5575", |
@@ -10,14 +10,15 @@ | @@ -10,14 +10,15 @@ | ||
10 | } | 10 | } |
11 | }, | 11 | }, |
12 | { | 12 | { |
13 | - "path": "pages/register/register", | 13 | + "path": "pages/school/school", |
14 | "style": { | 14 | "style": { |
15 | "navigationBarTitleText": "学长说", | 15 | "navigationBarTitleText": "学长说", |
16 | "navigationBarBackgroundColor": "#2D5575", | 16 | "navigationBarBackgroundColor": "#2D5575", |
17 | "navigationBarTextStyle": "white" | 17 | "navigationBarTextStyle": "white" |
18 | 18 | ||
19 | } | 19 | } |
20 | - },{ | 20 | + }, |
21 | + { | ||
21 | "path": "pages/register/highRegister", | 22 | "path": "pages/register/highRegister", |
22 | "style": { | 23 | "style": { |
23 | "navigationBarTitleText": "学长说", | 24 | "navigationBarTitleText": "学长说", |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | <view class="item" v-for="(item,index) in articlelist" :key="index"> | 15 | <view class="item" v-for="(item,index) in articlelist" :key="index"> |
16 | <image class="icon" src="../../static/shanchu_icon@2x.png" v-if="isedit" @click="delarcial(item,index)"></image> | 16 | <image class="icon" src="../../static/shanchu_icon@2x.png" v-if="isedit" @click="delarcial(item,index)"></image> |
17 | <view class="cont" :style="{width:width}" @click="toarticl" :data-id="item.id"> | 17 | <view class="cont" :style="{width:width}" @click="toarticl" :data-id="item.id"> |
18 | - <view class="rowOne">{{item.article_type_name}}</view> | 18 | + <view class="rowOne">{{item.nickname}}</view> |
19 | <view class="rowTwo">{{item.title}}</view> | 19 | <view class="rowTwo">{{item.title}}</view> |
20 | <view class="rowThree">{{item.des_content}}</view> | 20 | <view class="rowThree">{{item.des_content}}</view> |
21 | </view> | 21 | </view> |
@@ -28,18 +28,25 @@ | @@ -28,18 +28,25 @@ | ||
28 | <view class="del" @click="delhistory">清空</view> | 28 | <view class="del" @click="delhistory">清空</view> |
29 | <!-- <view class="del">完成</view> --> | 29 | <!-- <view class="del">完成</view> --> |
30 | </view> | 30 | </view> |
31 | - <view class="mateitem" v-for="(item,index) in historylist" :key="index"> | 31 | + <view class="mateitem" v-for="(item,index) in historylist" :key="index" @click="toarticl" :data-id="item.id"> |
32 | <view class="contentBox"> | 32 | <view class="contentBox"> |
33 | - <image class="photo" src="../../static/logo_img@2x.png"></image> | 33 | + <image class="photo" :src="item.head_image"></image> |
34 | <view class="cont"> | 34 | <view class="cont"> |
35 | - <view class="title">红色的战旗</view> | 35 | + <view class="title">{{item.nickname}}</view> |
36 | 36 | ||
37 | - <view class="fen">就读体验</view> | 37 | + <view class="fen">{{item.title}}</view> |
38 | + <view class="txt">{{item.des_content}}</view> | ||
38 | </view> | 39 | </view> |
39 | - <view class="right"> | ||
40 | - <view class="text">已关注</view> | 40 | + <view class="right" :class="item.is_like_user==0?'like':''"> |
41 | + <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;"> | ||
42 | + <view class='xin' style="width:28rpx;height:28rpx;font-size: 0;"> | ||
43 | + <image src="../../static/xin.png" mode=""></image> | ||
44 | + </view> | ||
45 | + 关注 | ||
46 | + </view> | ||
47 | + <view class="text" @click="noattention(item,index)" v-else>已关注</view> | ||
41 | </view> | 48 | </view> |
42 | - <view class="txt">班主任用“心”战“疫” 全力做好学生防疫工作</view> | 49 | + |
43 | </view> | 50 | </view> |
44 | </view> | 51 | </view> |
45 | <view class="nodata" v-if="historylist.length==0">暂无消息</view> | 52 | <view class="nodata" v-if="historylist.length==0">暂无消息</view> |
@@ -51,19 +58,26 @@ | @@ -51,19 +58,26 @@ | ||
51 | <view class="del" @click="change2" v-if="isdel">完成</view> | 58 | <view class="del" @click="change2" v-if="isdel">完成</view> |
52 | <view class="del" @click="change" v-else>编辑</view> | 59 | <view class="del" @click="change" v-else>编辑</view> |
53 | </view> | 60 | </view> |
54 | - <view class="mateitem" v-for="(item,index) in cellectlist" :key="index"> | 61 | + <view class="mateitem" v-for="(item,index) in cellectlist" :key="index" @click="toarticl" :data-id="item.id"> |
55 | <image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel"></image> | 62 | <image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel"></image> |
56 | <view class="contentBox" :style="{width:width2}"> | 63 | <view class="contentBox" :style="{width:width2}"> |
57 | - <image class="photo" src="../../static/logo_img@2x.png"></image> | 64 | + <image class="photo" :src="item.head_image"></image> |
58 | <view class="cont"> | 65 | <view class="cont"> |
59 | <view class="title">{{item.nickname}}</view> | 66 | <view class="title">{{item.nickname}}</view> |
60 | 67 | ||
61 | <view class="fen">{{item.title}}</view> | 68 | <view class="fen">{{item.title}}</view> |
69 | + <view class="txt">{{item.des_content}}</view> | ||
62 | </view> | 70 | </view> |
63 | <view class="right"> | 71 | <view class="right"> |
64 | - <view class="text">已关注</view> | 72 | + <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;"> |
73 | + <view class='xin' style="width:28rpx;height:28rpx;font-size: 0;"> | ||
74 | + <image src="../../static/xin.png" mode=""></image> | ||
65 | </view> | 75 | </view> |
66 | - <view class="txt">{{item.des_content}}</view> | 76 | + 关注 |
77 | + </view> | ||
78 | + <view class="text" @click="noattention(item,index)" v-else>已关注</view> | ||
79 | + </view> | ||
80 | + | ||
67 | </view> | 81 | </view> |
68 | </view> | 82 | </view> |
69 | <view class="nodata" v-if="cellectlist.length==0">暂无数据</view> | 83 | <view class="nodata" v-if="cellectlist.length==0">暂无数据</view> |
@@ -73,263 +87,379 @@ | @@ -73,263 +87,379 @@ | ||
73 | </template> | 87 | </template> |
74 | 88 | ||
75 | <script> | 89 | <script> |
76 | -import app from "../../App.vue"; | ||
77 | -export default { | ||
78 | - data(){ | ||
79 | - return{ | ||
80 | - active3:true, | ||
81 | - active1:false, | ||
82 | - active2:false, | ||
83 | - isHistoryShow:false, | ||
84 | - isMineShow:true, | ||
85 | - isdel:false, | ||
86 | - isedit:false, | ||
87 | - width:'686rpx', | ||
88 | - width2:'660rpx', | ||
89 | - page:1, | ||
90 | - size:10, | ||
91 | - articlelist:[], | ||
92 | - historylist:[], | ||
93 | - cellectlist:[] | 90 | + import app from "../../App.vue"; |
91 | + export default { | ||
92 | + data() { | ||
93 | + return { | ||
94 | + active3: true, | ||
95 | + active1: false, | ||
96 | + active2: false, | ||
97 | + isHistoryShow: false, | ||
98 | + isMineShow: true, | ||
99 | + isdel: false, | ||
100 | + isedit: false, | ||
101 | + width: '686rpx', | ||
102 | + width2: '660rpx', | ||
103 | + page: 1, | ||
104 | + size: 10, | ||
105 | + collectpage: 1, | ||
106 | + articlelist: [], | ||
107 | + historylist: [], | ||
108 | + cellectlist: [] | ||
94 | } | 109 | } |
95 | }, | 110 | }, |
96 | - methods:{ | ||
97 | - historyShow(){ | ||
98 | - this.active1=true, | ||
99 | - this.active2=false, | ||
100 | - this.isHistoryShow=true | ||
101 | - this.isMineShow=false, | ||
102 | - this.active3=false | 111 | + methods: { |
112 | + // 关注和取消关注 | ||
113 | + attention(item, index) { | ||
114 | + var that = this | ||
115 | + var url = "article/likeArticle" | ||
116 | + var token = uni.getStorageSync('token') | ||
117 | + var params = { | ||
118 | + article_id: item.id | ||
119 | + } | ||
120 | + app.post(url, params, "get").then((res) => { | ||
121 | + uni.showToast({ | ||
122 | + title: "关注成功", | ||
123 | + icon: 'none' | ||
124 | + }) | ||
125 | + if (that.active1 == true) { | ||
126 | + that.historylist[index].is_like_user = 1 | ||
127 | + } else if (that.active2 == true) { | ||
128 | + that.cellectlist[index].is_like_user = 1 | ||
129 | + | ||
130 | + } | ||
131 | + | ||
132 | + | ||
133 | + }).catch((err) => { | ||
134 | + console.log(err) | ||
135 | + }) | ||
103 | }, | 136 | }, |
104 | - cellectShow(){ | ||
105 | - this.isHistoryShow=false, | ||
106 | - this.active2=true, | ||
107 | - this.active1=false, | ||
108 | - this.isMineShow=false, | ||
109 | - this.active3=false | 137 | + noattention(item, index) { |
138 | + var that = this | ||
139 | + var url = "article/likeArticle" | ||
140 | + var token = uni.getStorageSync('token') | ||
141 | + var params = { | ||
142 | + article_id: item.id | ||
143 | + } | ||
144 | + app.post(url, params, "get").then((res) => { | ||
145 | + uni.showToast({ | ||
146 | + title: "取消关注成功", | ||
147 | + icon: 'none' | ||
148 | + }) | ||
149 | + if (that.active1 == true) { | ||
150 | + that.historylist[index].is_like_user = 0 | ||
151 | + } else if (that.active2 == true) { | ||
152 | + that.cellectlist[index].is_like_user = 0 | ||
153 | + | ||
154 | + } | ||
155 | + | ||
156 | + | ||
157 | + }).catch((err) => { | ||
158 | + console.log(err) | ||
159 | + }) | ||
160 | + | ||
110 | }, | 161 | }, |
111 | - mineShow(){ | ||
112 | - this.active3=true, | ||
113 | - this.active1=false, | ||
114 | - this.active2=false, | ||
115 | - this.isMineShow=true, | ||
116 | - this.isHistoryShow=false | 162 | + historyShow() { |
163 | + this.active1 = true, | ||
164 | + this.active2 = false, | ||
165 | + this.isHistoryShow = true | ||
166 | + this.isMineShow = false, | ||
167 | + this.active3 = false; | ||
168 | + this.gethistory() | ||
117 | }, | 169 | }, |
118 | - edit(){ | ||
119 | - this.isedit=true, | ||
120 | - this.width="580rpx" | 170 | + cellectShow() { |
171 | + this.isHistoryShow = false, | ||
172 | + this.active2 = true, | ||
173 | + this.active1 = false, | ||
174 | + this.isMineShow = false, | ||
175 | + this.active3 = false; | ||
176 | + this.collectpage = 1; | ||
177 | + this.cellectlist = []; | ||
178 | + this.getMyCellect() | ||
121 | }, | 179 | }, |
122 | - editok(){ | ||
123 | - this.isedit=false, | ||
124 | - this.width="686rpx" | 180 | + mineShow() { |
181 | + this.active3 = true; | ||
182 | + this.active1 = false; | ||
183 | + this.active2 = false; | ||
184 | + this.isMineShow = true; | ||
185 | + this.isHistoryShow = false; | ||
186 | + | ||
187 | + this.page = 1; | ||
188 | + this.articlelist = [] | ||
189 | + this.getMyArticle() | ||
190 | + | ||
191 | + | ||
192 | + }, | ||
193 | + edit() { | ||
194 | + this.isedit = true, | ||
195 | + this.width = "580rpx" | ||
196 | + }, | ||
197 | + editok() { | ||
198 | + this.isedit = false, | ||
199 | + this.width = "686rpx" | ||
125 | }, | 200 | }, |
126 | - change(){ | ||
127 | - this.isdel=true | ||
128 | - this.width="620rpx" | 201 | + change() { |
202 | + this.isdel = true | ||
203 | + this.width = "620rpx" | ||
129 | 204 | ||
130 | }, | 205 | }, |
131 | - change2(){ | ||
132 | - this.isdel=false | ||
133 | - this.width="660rpx" | 206 | + change2() { |
207 | + this.isdel = false | ||
208 | + this.width = "660rpx" | ||
134 | }, | 209 | }, |
135 | - getMyArticle(){ | 210 | + getMyArticle() { |
136 | var that = this | 211 | var that = this |
137 | var url = "article/getMyArticle" | 212 | var url = "article/getMyArticle" |
138 | var token = uni.getStorageSync('token') | 213 | var token = uni.getStorageSync('token') |
139 | var params = { | 214 | var params = { |
140 | - token:token, | ||
141 | - page:that.page, | ||
142 | - size:that.size | 215 | + token: token, |
216 | + page: that.page, | ||
217 | + size: that.size | ||
143 | } | 218 | } |
144 | - app.post(url,params,"get").then((res)=>{ | 219 | + app.post(url, params, "get").then((res) => { |
145 | console.log(res) | 220 | console.log(res) |
146 | - that.articlelist=res | ||
147 | - }).catch((err)=>{ | 221 | + that.articlelist = this.articlelist.concat(res) |
222 | + }).catch((err) => { | ||
148 | console.log(err) | 223 | console.log(err) |
149 | }) | 224 | }) |
150 | }, | 225 | }, |
151 | - gethistory(){ | 226 | + gethistory() { |
152 | var that = this | 227 | var that = this |
153 | var url = "article/getLookArticleList" | 228 | var url = "article/getLookArticleList" |
154 | var token = uni.getStorageSync('token') | 229 | var token = uni.getStorageSync('token') |
155 | var params = { | 230 | var params = { |
156 | - token:token | 231 | + token: token |
157 | } | 232 | } |
158 | - app.post(url,params,"get").then((res)=>{ | ||
159 | - that.historylist=res | 233 | + app.post(url, params, "get").then((res) => { |
160 | console.log(res) | 234 | console.log(res) |
161 | - }).catch((err)=>{ | 235 | + that.historylist = res |
236 | + console.log(res) | ||
237 | + }).catch((err) => { | ||
162 | console.log(err) | 238 | console.log(err) |
163 | }) | 239 | }) |
164 | }, | 240 | }, |
165 | - delhistory(){ | ||
166 | - var that = this | 241 | + delhistory() { |
242 | + var that = this; | ||
243 | + uni.showModal({ | ||
244 | + title: '提示', | ||
245 | + content: '是否清空浏览记录', | ||
246 | + success: function (res) { | ||
247 | + if (res.confirm) { | ||
167 | var url = "article/delLookArticle" | 248 | var url = "article/delLookArticle" |
168 | var token = uni.getStorageSync('token') | 249 | var token = uni.getStorageSync('token') |
169 | var params = { | 250 | var params = { |
170 | - token:token | 251 | + token: token |
171 | } | 252 | } |
172 | - app.post(url,params,"post").then((res)=>{ | ||
173 | - that.historylist=res | 253 | + app.post(url, params, "post").then((res) => { |
254 | + that.historylist = res | ||
174 | console.log(res) | 255 | console.log(res) |
175 | uni.showToast({ | 256 | uni.showToast({ |
176 | - title:'浏览记录已清空' | 257 | + title: '浏览记录已清空' |
177 | }) | 258 | }) |
178 | - }).catch((err)=>{ | 259 | + }).catch((err) => { |
179 | console.log(err) | 260 | console.log(err) |
180 | }) | 261 | }) |
262 | + } else if (res.cancel) { | ||
263 | + console.log('用户点击取消'); | ||
264 | + } | ||
265 | + } | ||
266 | + }); | ||
267 | + | ||
181 | }, | 268 | }, |
182 | - getMyCellect(){ | 269 | + getMyCellect() { |
183 | var that = this | 270 | var that = this |
184 | var url = "article/getMyLikeArticle" | 271 | var url = "article/getMyLikeArticle" |
185 | var token = uni.getStorageSync('token') | 272 | var token = uni.getStorageSync('token') |
186 | var params = { | 273 | var params = { |
187 | - token:token, | ||
188 | - page:that.page, | ||
189 | - size:that.size | 274 | + token: token, |
275 | + page: that.collectpage, | ||
276 | + size: that.size | ||
190 | } | 277 | } |
191 | - app.post(url,params,"get").then((res)=>{ | 278 | + app.post(url, params, "get").then((res) => { |
192 | console.log(res) | 279 | console.log(res) |
193 | - that.cellectlist=res | ||
194 | - }).catch((err)=>{ | 280 | + that.cellectlist = that.cellectlist.concat(res) |
281 | + }).catch((err) => { | ||
195 | console.log(err) | 282 | console.log(err) |
196 | }) | 283 | }) |
197 | }, | 284 | }, |
198 | - toarticl(e){ | 285 | + toarticl(e) { |
199 | var id = e.currentTarget.dataset.id | 286 | var id = e.currentTarget.dataset.id |
200 | uni.navigateTo({ | 287 | uni.navigateTo({ |
201 | - url:'../school/article?article_id='+id | 288 | + url: '../school/article?article_id=' + id |
202 | }) | 289 | }) |
203 | }, | 290 | }, |
204 | - delarcial(item,index){ | 291 | + delarcial(item, index) { |
205 | var that = this | 292 | var that = this |
293 | + uni.showModal({ | ||
294 | + title: '提示', | ||
295 | + content: '是否删除该发布', | ||
296 | + success: function (res) { | ||
297 | + if (res.confirm) { | ||
206 | var url = "article/delArticle" | 298 | var url = "article/delArticle" |
207 | var params = { | 299 | var params = { |
208 | - token:uni.getStorageSync('token'), | ||
209 | - article_id:item.id | 300 | + token: uni.getStorageSync('token'), |
301 | + article_id: item.id | ||
210 | } | 302 | } |
211 | - app.post(url,params,"post").then((res)=>{ | 303 | + app.post(url, params, "post").then((res) => { |
212 | console.log(res) | 304 | console.log(res) |
213 | - that.articlelist.splice(index, 1) | 305 | + that.articlelist.splice(index, 1) |
214 | uni.showToast({ | 306 | uni.showToast({ |
215 | - title:'删除成功', | ||
216 | - icon:'none' | 307 | + title: '删除成功', |
308 | + icon: 'none' | ||
217 | }) | 309 | }) |
218 | - }).catch((err)=>{ | 310 | + }).catch((err) => { |
219 | console.log(err) | 311 | console.log(err) |
220 | }) | 312 | }) |
313 | + } else if (res.cancel) { | ||
314 | + console.log('用户点击取消'); | ||
315 | + } | ||
316 | + } | ||
317 | + }); | ||
318 | + | ||
221 | } | 319 | } |
222 | }, | 320 | }, |
223 | - onLoad(){ | 321 | + onLoad() { |
224 | this.getMyArticle() | 322 | this.getMyArticle() |
225 | this.gethistory() | 323 | this.gethistory() |
226 | this.getMyCellect() | 324 | this.getMyCellect() |
325 | + }, | ||
326 | + onReachBottom() { | ||
327 | + if (this.active3 == true) { | ||
328 | + let newpage = this.page; | ||
329 | + newpage++; | ||
330 | + this.page = newpage; | ||
331 | + this.getMyArticle() | ||
332 | + } else if (this.active2 == true) { | ||
333 | + let newpage = this.collectpage; | ||
334 | + newpage++; | ||
335 | + this.collectpage = newpage; | ||
336 | + this.getMyCellect() | ||
337 | + } | ||
227 | } | 338 | } |
228 | 339 | ||
229 | -} | 340 | + } |
230 | </script> | 341 | </script> |
231 | 342 | ||
232 | <style lang="less"> | 343 | <style lang="less"> |
233 | - .content{ | ||
234 | - background:rgba(249,249,249,1); | 344 | + .content { |
345 | + background: rgba(249, 249, 249, 1); | ||
235 | height: 100vh; | 346 | height: 100vh; |
347 | + | ||
236 | // padding: 32rpx; | 348 | // padding: 32rpx; |
237 | - .nodata{ | 349 | + .nodata { |
238 | text-align: center; | 350 | text-align: center; |
239 | font-size: 28rpx; | 351 | font-size: 28rpx; |
240 | } | 352 | } |
241 | - .title{ | 353 | + |
354 | + .title { | ||
242 | background-color: #fff; | 355 | background-color: #fff; |
243 | display: flex; | 356 | display: flex; |
244 | - .history,.cellect,.mine{ | 357 | + |
358 | + .history, | ||
359 | + .cellect, | ||
360 | + .mine { | ||
245 | width: 33%; | 361 | width: 33%; |
246 | text-align: center; | 362 | text-align: center; |
247 | - font-size:28rpx; | 363 | + font-size: 28rpx; |
248 | padding: 24rpx 0; | 364 | padding: 24rpx 0; |
249 | } | 365 | } |
250 | - .active{ | 366 | + |
367 | + .active { | ||
251 | background: url("../../static/xuanzhong_icon@2x.png") no-repeat; | 368 | background: url("../../static/xuanzhong_icon@2x.png") no-repeat; |
252 | background-size: 60rpx 12rpx; | 369 | background-size: 60rpx 12rpx; |
253 | background-position: 95rpx 70rpx; | 370 | background-position: 95rpx 70rpx; |
254 | - color: rgba(5,132,157,1); | 371 | + color: rgba(5, 132, 157, 1); |
255 | } | 372 | } |
256 | } | 373 | } |
257 | - .minetop{ | 374 | + |
375 | + .minetop { | ||
258 | display: flex; | 376 | display: flex; |
259 | - font-size:32rpx; | 377 | + font-size: 32rpx; |
260 | width: 686rpx; | 378 | width: 686rpx; |
261 | margin: 0 auto; | 379 | margin: 0 auto; |
262 | justify-content: space-between; | 380 | justify-content: space-between; |
263 | padding: 30rpx 0; | 381 | padding: 30rpx 0; |
264 | - .mineTitle{ | ||
265 | - color:rgba(45,85,117,1); | 382 | + |
383 | + .mineTitle { | ||
384 | + color: rgba(45, 85, 117, 1); | ||
266 | } | 385 | } |
267 | - .del{ | ||
268 | - font-size:24rpx; | 386 | + |
387 | + .del { | ||
388 | + font-size: 24rpx; | ||
269 | } | 389 | } |
270 | } | 390 | } |
271 | - .item{ | 391 | + |
392 | + .item { | ||
272 | width: 686rpx; | 393 | width: 686rpx; |
273 | background-color: #fff; | 394 | background-color: #fff; |
274 | margin: 0 auto; | 395 | margin: 0 auto; |
275 | - border-radius:20rpx; | 396 | + border-radius: 20rpx; |
276 | padding: 20rpx 30rpx; | 397 | padding: 20rpx 30rpx; |
277 | box-sizing: border-box; | 398 | box-sizing: border-box; |
278 | margin-bottom: 14rpx; | 399 | margin-bottom: 14rpx; |
279 | display: flex; | 400 | display: flex; |
280 | align-items: center; | 401 | align-items: center; |
281 | - .cont{ | ||
282 | - .rowOne{ | ||
283 | - font-size:24rpx; | ||
284 | - color:rgba(140,145,152,1); | ||
285 | - } | ||
286 | - .rowTwo{ | ||
287 | - font-size:28rpx; | ||
288 | - color:rgba(61,68,77,1); | 402 | + |
403 | + .cont { | ||
404 | + .rowOne { | ||
405 | + font-size: 24rpx; | ||
406 | + color: rgba(140, 145, 152, 1); | ||
407 | + } | ||
408 | + | ||
409 | + .rowTwo { | ||
410 | + font-size: 28rpx; | ||
411 | + color: rgba(61, 68, 77, 1); | ||
289 | margin-top: 16rpx; | 412 | margin-top: 16rpx; |
290 | } | 413 | } |
291 | - .rowThree{ | ||
292 | - font-size:24rpx; | ||
293 | - color:rgba(140,145,152,1); | 414 | + |
415 | + .rowThree { | ||
416 | + font-size: 24rpx; | ||
417 | + color: rgba(140, 145, 152, 1); | ||
294 | margin-top: 4rpx; | 418 | margin-top: 4rpx; |
295 | height: 74rpx; | 419 | height: 74rpx; |
296 | overflow: hidden; | 420 | overflow: hidden; |
297 | } | 421 | } |
298 | } | 422 | } |
299 | - .icon{ | 423 | + |
424 | + .icon { | ||
300 | width: 28rpx; | 425 | width: 28rpx; |
301 | height: 28rpx; | 426 | height: 28rpx; |
302 | margin-right: 26rpx; | 427 | margin-right: 26rpx; |
303 | } | 428 | } |
304 | } | 429 | } |
305 | - .liulan{ | 430 | + |
431 | + .liulan { | ||
306 | display: flex; | 432 | display: flex; |
307 | - font-size:32rpx; | 433 | + font-size: 32rpx; |
308 | width: 686rpx; | 434 | width: 686rpx; |
309 | margin: 0 auto; | 435 | margin: 0 auto; |
310 | justify-content: space-between; | 436 | justify-content: space-between; |
311 | padding: 30rpx 0; | 437 | padding: 30rpx 0; |
312 | - .liulantitle{ | ||
313 | - color:rgba(45,85,117,1); | 438 | + |
439 | + .liulantitle { | ||
440 | + color: rgba(45, 85, 117, 1); | ||
314 | } | 441 | } |
315 | - .del{ | ||
316 | - font-size:24rpx; | 442 | + |
443 | + .del { | ||
444 | + font-size: 24rpx; | ||
317 | } | 445 | } |
318 | } | 446 | } |
319 | - .mateitem{ | 447 | + |
448 | + .mateitem { | ||
320 | display: flex; | 449 | display: flex; |
321 | align-items: center; | 450 | align-items: center; |
322 | - width:686rpx; | 451 | + width: 686rpx; |
323 | // height:172rpx; | 452 | // height:172rpx; |
324 | - background:rgba(255,255,255,1); | ||
325 | - opacity:1; | ||
326 | - border-radius:20rpx; | 453 | + background: rgba(255, 255, 255, 1); |
454 | + opacity: 1; | ||
455 | + border-radius: 20rpx; | ||
327 | margin: 0 auto; | 456 | margin: 0 auto; |
328 | background-color: #fff; | 457 | background-color: #fff; |
329 | padding: 24rpx 0; | 458 | padding: 24rpx 0; |
330 | // box-sizing: border-box; | 459 | // box-sizing: border-box; |
331 | margin-bottom: 24rpx; | 460 | margin-bottom: 24rpx; |
332 | - .delBtn{ | 461 | + |
462 | + .delBtn { | ||
333 | width: 28rpx; | 463 | width: 28rpx; |
334 | height: 28rpx; | 464 | height: 28rpx; |
335 | // position: absolute; | 465 | // position: absolute; |
@@ -338,50 +468,60 @@ export default { | @@ -338,50 +468,60 @@ export default { | ||
338 | // left: 28rpx; | 468 | // left: 28rpx; |
339 | margin-left: 26rpx; | 469 | margin-left: 26rpx; |
340 | } | 470 | } |
341 | - .contentBox{ | 471 | + |
472 | + .contentBox { | ||
342 | display: flex; | 473 | display: flex; |
343 | // align-items: center; | 474 | // align-items: center; |
344 | position: relative; | 475 | position: relative; |
345 | flex-wrap: wrap; | 476 | flex-wrap: wrap; |
346 | margin-left: 26rpx; | 477 | margin-left: 26rpx; |
347 | width: 660rpx; | 478 | width: 660rpx; |
348 | - .photo{ | 479 | + |
480 | + .photo { | ||
349 | width: 68rpx; | 481 | width: 68rpx; |
350 | height: 68rpx; | 482 | height: 68rpx; |
351 | margin-right: 26rpx; | 483 | margin-right: 26rpx; |
352 | margin-top: 6rpx; | 484 | margin-top: 6rpx; |
353 | } | 485 | } |
354 | - .cont{ | ||
355 | - .title{ | ||
356 | - color:rgba(61,68,77,1); | 486 | + |
487 | + .cont { | ||
488 | + .title { | ||
489 | + color: rgba(61, 68, 77, 1); | ||
357 | font-size: 24rpx; | 490 | font-size: 24rpx; |
358 | } | 491 | } |
359 | 492 | ||
360 | - .fen{ | 493 | + .fen { |
361 | font-size: 24rpx; | 494 | font-size: 24rpx; |
362 | - color:rgba(140,145,152,1); | 495 | + color: rgba(140, 145, 152, 1); |
363 | margin-top: 4rpx; | 496 | margin-top: 4rpx; |
364 | } | 497 | } |
365 | } | 498 | } |
366 | - .right{ | ||
367 | - width:118rpx; | ||
368 | - height:44rpx; | ||
369 | - border:2rpx solid rgba(189,196,206,1); | ||
370 | - opacity:1; | ||
371 | - border-radius:40rpx; | 499 | + |
500 | + .right { | ||
501 | + width: 118rpx; | ||
502 | + height: 44rpx; | ||
503 | + border: 2rpx solid rgba(189, 196, 206, 1); | ||
504 | + opacity: 1; | ||
505 | + border-radius: 40rpx; | ||
372 | position: absolute; | 506 | position: absolute; |
373 | right: 26rpx; | 507 | right: 26rpx; |
374 | top: 32rpx; | 508 | top: 32rpx; |
375 | - .text{ | ||
376 | - color:rgba(189,196,206,1); | 509 | + |
510 | + .text { | ||
511 | + color: rgba(189, 196, 206, 1); | ||
377 | text-align: center; | 512 | text-align: center; |
378 | line-height: 44rpx; | 513 | line-height: 44rpx; |
379 | - font-size:24rpx; | 514 | + font-size: 24rpx; |
515 | + } | ||
380 | } | 516 | } |
517 | + | ||
518 | + .like { | ||
519 | + border: 1rpx solid #81C3BF | ||
381 | } | 520 | } |
382 | - .txt{ | 521 | + |
522 | + .txt { | ||
383 | // width: 600rpx; | 523 | // width: 600rpx; |
384 | - font-size:28rpx; | 524 | + font-size: 28rpx; |
385 | margin-top: 24rpx; | 525 | margin-top: 24rpx; |
386 | } | 526 | } |
387 | } | 527 | } |
@@ -4,7 +4,8 @@ | @@ -4,7 +4,8 @@ | ||
4 | <view class="item"> | 4 | <view class="item"> |
5 | <view class="name">姓名</view> | 5 | <view class="name">姓名</view> |
6 | <!-- <view class="cont">爱学习的王笑笑</view> --> | 6 | <!-- <view class="cont">爱学习的王笑笑</view> --> |
7 | - <input type="text" v-model="username" class="cont" :placeholder="userinfolist.nickname=='undefide' ? '' : userinfolist.nickname" placeholder-style="text-align: right" style="text-align: right"> | 7 | + <input type="text" v-model="username" class="cont" :placeholder="userinfolist.nickname=='undefide' ? '' : userinfolist.nickname" |
8 | + placeholder-style="text-align: right" style="text-align: right"> | ||
8 | </view> | 9 | </view> |
9 | <view class="item"> | 10 | <view class="item"> |
10 | <view class="name">头像</view> | 11 | <view class="name">头像</view> |
@@ -12,13 +13,16 @@ | @@ -12,13 +13,16 @@ | ||
12 | </view> | 13 | </view> |
13 | <view class="item"> | 14 | <view class="item"> |
14 | <view class="name">高中</view> | 15 | <view class="name">高中</view> |
15 | - <view class="cont">青岛市 青岛第一中学 | 16 | + <view class="cont">{{userinfolist.school_info.name}} |
16 | <image class="icon" src="../../static/dizhi_btn@2x.png"></image> | 17 | <image class="icon" src="../../static/dizhi_btn@2x.png"></image> |
17 | </view> | 18 | </view> |
18 | </view> | 19 | </view> |
20 | + <!-- <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange"> | ||
21 | + | ||
22 | + </picker> --> | ||
19 | <view class="item" style="border-bottom:none"> | 23 | <view class="item" style="border-bottom:none"> |
20 | <view class="name">入学年份</view> | 24 | <view class="name">入学年份</view> |
21 | - <view class="cont">2020年 | 25 | + <view class="cont">{{userinfolist.starttime}} |
22 | <image class="icon" src="../../static/dizhi_btn@2x.png"></image> | 26 | <image class="icon" src="../../static/dizhi_btn@2x.png"></image> |
23 | </view> | 27 | </view> |
24 | </view> | 28 | </view> |
@@ -28,38 +32,66 @@ | @@ -28,38 +32,66 @@ | ||
28 | </template> | 32 | </template> |
29 | 33 | ||
30 | <script> | 34 | <script> |
31 | -import app from "../../App.vue"; | ||
32 | -export default { | ||
33 | - data(){ | ||
34 | - return{ | ||
35 | - username:'', | ||
36 | - image:'', | ||
37 | - image2:'', | ||
38 | - isUpload:false, | ||
39 | - userinfolist:{} | 35 | + import app from "../../App.vue"; |
36 | + export default { | ||
37 | + data() { | ||
38 | + return { | ||
39 | + username: '', | ||
40 | + image: '', | ||
41 | + image2: '', | ||
42 | + isUpload: false, | ||
43 | + userinfolist: {} | ||
44 | + } | ||
45 | + }, | ||
46 | + computed: { | ||
47 | + startDate() { | ||
48 | + return this.getDate('start'); | ||
49 | + }, | ||
50 | + endDate() { | ||
51 | + return this.getDate('end'); | ||
52 | + } | ||
53 | + }, | ||
54 | + methods: { | ||
55 | + // 选择年月日 | ||
56 | + bindDateChange: function(e) { | ||
57 | + this.userinfolist.starttime = e.target.value; | ||
58 | + this.userinfolist=this.userinfolist | ||
59 | + }, | ||
60 | + getDate(type) { | ||
61 | + const date = new Date(); | ||
62 | + let year = date.getFullYear(); | ||
63 | + let month = date.getMonth() + 1; | ||
64 | + let day = date.getDate(); | ||
65 | + | ||
66 | + if (type === 'start') { | ||
67 | + year = year - 60; | ||
68 | + } else if (type === 'end') { | ||
69 | + year = year + 2; | ||
40 | } | 70 | } |
71 | + month = month > 9 ? month : '0' + month;; | ||
72 | + day = day > 9 ? day : '0' + day; | ||
73 | + return `${year}-${month}-${day}`; | ||
41 | }, | 74 | }, |
42 | - methods:{ | ||
43 | - upload(){ | 75 | + upload() { |
44 | var that = this; | 76 | var that = this; |
45 | uni.chooseImage({ | 77 | uni.chooseImage({ |
46 | count: 1, | 78 | count: 1, |
47 | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 | 79 | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
48 | sourceType: ['album'], //从相册选择 | 80 | sourceType: ['album'], //从相册选择 |
49 | - success: function (res) { | 81 | + success: function(res) { |
50 | const tempFilePaths = res.tempFilePaths; | 82 | const tempFilePaths = res.tempFilePaths; |
51 | that.image = tempFilePaths[0]; | 83 | that.image = tempFilePaths[0]; |
52 | that.image2 = tempFilePaths[0]; | 84 | that.image2 = tempFilePaths[0]; |
53 | - app.upload('image',res.tempFilePaths[0],"post").then((res)=>{ | 85 | + app.upload('image', res.tempFilePaths[0], "post").then((res) => { |
54 | // let newimage=that.image | 86 | // let newimage=that.image |
55 | - that.image=app.globalData.imageBaseUrl+res.url | 87 | + that.image = app.globalData.imageBaseUrl + res.url |
56 | that.image2 = res.url | 88 | that.image2 = res.url |
57 | console.log(res) | 89 | console.log(res) |
58 | console.log(that.image) | 90 | console.log(that.image) |
59 | console.log(res.url) | 91 | console.log(res.url) |
60 | // newimage.push(res.url) | 92 | // newimage.push(res.url) |
61 | - that.isUpload=true | ||
62 | - }).catch((err)=>{ | 93 | + that.isUpload = true |
94 | + }).catch((err) => { | ||
63 | console.log(err) | 95 | console.log(err) |
64 | }) | 96 | }) |
65 | // console.log("tempFilePaths[0]",tempFilePaths[0]) //能够打印出选中的图片 | 97 | // console.log("tempFilePaths[0]",tempFilePaths[0]) //能够打印出选中的图片 |
@@ -67,79 +99,80 @@ export default { | @@ -67,79 +99,80 @@ export default { | ||
67 | // that.head_image=tempFilePaths[0] | 99 | // that.head_image=tempFilePaths[0] |
68 | // that.iconcheck = 1;//点击后图片更改状态由0变成1 | 100 | // that.iconcheck = 1;//点击后图片更改状态由0变成1 |
69 | }, | 101 | }, |
70 | - error : function(e){ | 102 | + error: function(e) { |
71 | console.log(e); | 103 | console.log(e); |
72 | } | 104 | } |
73 | }); | 105 | }); |
74 | }, | 106 | }, |
75 | - getuserinfo(){ | 107 | + getuserinfo() { |
76 | var that = this | 108 | var that = this |
77 | var url = "student/getMyInfo" | 109 | var url = "student/getMyInfo" |
78 | var token = uni.getStorageSync('token') | 110 | var token = uni.getStorageSync('token') |
79 | var params = { | 111 | var params = { |
80 | - token:token | 112 | + token: token |
81 | } | 113 | } |
82 | - app.post(url,params,"get").then((res)=>{ | 114 | + app.post(url, params, "get").then((res) => { |
83 | console.log(res) | 115 | console.log(res) |
84 | - that.userinfolist=res | ||
85 | - }).catch((err)=>{ | 116 | + that.userinfolist = res |
117 | + }).catch((err) => { | ||
86 | console.log(err) | 118 | console.log(err) |
87 | }) | 119 | }) |
88 | }, | 120 | }, |
89 | - update(){ | 121 | + update() { |
90 | var that = this | 122 | var that = this |
91 | var url = "student/updateStudentInfo" | 123 | var url = "student/updateStudentInfo" |
92 | var token = uni.getStorageSync('token') | 124 | var token = uni.getStorageSync('token') |
93 | - var params= { | ||
94 | - token:token, | ||
95 | - nickname:that.username, | ||
96 | - head_image:that.image2=='' ? that.userinfolist.head_image : that.image2 | 125 | + var params = { |
126 | + token: token, | ||
127 | + nickname: that.userinfolist.nickname, | ||
128 | + head_image: that.image2 == '' ? that.userinfolist.head_image : that.image2 | ||
97 | } | 129 | } |
98 | - app.post(url,params,"post").then((res)=>{ | 130 | + app.post(url, params, "post").then((res) => { |
99 | console.log(res) | 131 | console.log(res) |
100 | 132 | ||
101 | 133 | ||
102 | uni.showToast({ | 134 | uni.showToast({ |
103 | - title:'个人信息保存成功', | ||
104 | - icon:'none' | 135 | + title: '个人信息保存成功', |
136 | + icon: 'none' | ||
105 | }) | 137 | }) |
106 | setTimeout(() => { | 138 | setTimeout(() => { |
107 | uni.navigateBack() | 139 | uni.navigateBack() |
108 | - },1500); | 140 | + }, 1500); |
109 | 141 | ||
110 | - }).catch((err)=>{ | 142 | + }).catch((err) => { |
111 | console.log(err) | 143 | console.log(err) |
112 | - if(err.code==0){ | 144 | + if (err.code == 0) { |
113 | uni.showToast({ | 145 | uni.showToast({ |
114 | - title:err.msg, | ||
115 | - icon:'none' | 146 | + title: err.msg, |
147 | + icon: 'none' | ||
116 | }) | 148 | }) |
117 | } | 149 | } |
118 | }) | 150 | }) |
119 | 151 | ||
120 | } | 152 | } |
121 | }, | 153 | }, |
122 | - onLoad(){ | 154 | + onLoad() { |
123 | this.getuserinfo() | 155 | this.getuserinfo() |
124 | } | 156 | } |
125 | 157 | ||
126 | -} | 158 | + } |
127 | </script> | 159 | </script> |
128 | 160 | ||
129 | <style lang="less"> | 161 | <style lang="less"> |
130 | -.content{ | ||
131 | - background-color: rgba(249,249,249,1); | 162 | + .content { |
163 | + background-color: rgba(249, 249, 249, 1); | ||
132 | padding: 32rpx 0; | 164 | padding: 32rpx 0; |
133 | height: 100vh; | 165 | height: 100vh; |
134 | - .card{ | ||
135 | - width:686rpx; | 166 | + |
167 | + .card { | ||
168 | + width: 686rpx; | ||
136 | // height:428rpx; | 169 | // height:428rpx; |
137 | - background:rgba(255,255,255,1); | ||
138 | - opacity:1; | ||
139 | - border-radius:20rpx; | 170 | + background: rgba(255, 255, 255, 1); |
171 | + opacity: 1; | ||
172 | + border-radius: 20rpx; | ||
140 | margin: 0 auto; | 173 | margin: 0 auto; |
141 | 174 | ||
142 | - .item{ | 175 | + .item { |
143 | width: 622rpx; | 176 | width: 622rpx; |
144 | display: flex; | 177 | display: flex; |
145 | justify-content: space-between; | 178 | justify-content: space-between; |
@@ -148,30 +181,33 @@ export default { | @@ -148,30 +181,33 @@ export default { | ||
148 | box-sizing: border-box; | 181 | box-sizing: border-box; |
149 | font-size: 28rpx; | 182 | font-size: 28rpx; |
150 | margin: 0 auto; | 183 | margin: 0 auto; |
151 | - border-bottom: 1rpx solid rgba(238,238,238,1); | ||
152 | - .photo{ | 184 | + border-bottom: 1rpx solid rgba(238, 238, 238, 1); |
185 | + | ||
186 | + .photo { | ||
153 | width: 64rpx; | 187 | width: 64rpx; |
154 | height: 64rpx; | 188 | height: 64rpx; |
155 | border-radius: 50%; | 189 | border-radius: 50%; |
156 | } | 190 | } |
157 | - .icon{ | 191 | + |
192 | + .icon { | ||
158 | width: 11rpx; | 193 | width: 11rpx; |
159 | height: 22rpx; | 194 | height: 22rpx; |
160 | margin-left: 10rpx; | 195 | margin-left: 10rpx; |
161 | } | 196 | } |
162 | } | 197 | } |
163 | } | 198 | } |
164 | - .btn{ | ||
165 | - width:684rpx; | ||
166 | - height:80rpx; | ||
167 | - background:rgba(45,85,117,1); | ||
168 | - opacity:1; | ||
169 | - border-radius:8rpx; | 199 | + |
200 | + .btn { | ||
201 | + width: 684rpx; | ||
202 | + height: 80rpx; | ||
203 | + background: rgba(45, 85, 117, 1); | ||
204 | + opacity: 1; | ||
205 | + border-radius: 8rpx; | ||
170 | color: #fff; | 206 | color: #fff; |
171 | line-height: 80rpx; | 207 | line-height: 80rpx; |
172 | text-align: center; | 208 | text-align: center; |
173 | margin: 0 auto; | 209 | margin: 0 auto; |
174 | margin-top: 620rpx; | 210 | margin-top: 620rpx; |
175 | } | 211 | } |
176 | -} | 212 | + } |
177 | </style> | 213 | </style> |
@@ -76,7 +76,7 @@ export default { | @@ -76,7 +76,7 @@ export default { | ||
76 | 76 | ||
77 | <style lang="less"> | 77 | <style lang="less"> |
78 | .content{ | 78 | .content{ |
79 | - background:rgba(249,249,249,1); | 79 | + // background:rgba(249,249,249,1); |
80 | padding: 28rpx 0; | 80 | padding: 28rpx 0; |
81 | .nodata{ | 81 | .nodata{ |
82 | font-size: 28rpx; | 82 | font-size: 28rpx; |
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | </view> | 28 | </view> |
29 | </view> | 29 | </view> |
30 | <view class="item2"> | 30 | <view class="item2"> |
31 | - <textarea v-model="articlecontent" name="" id="" cols="30" rows="10" class="textarea" placeholder="请输入文章内容" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx"></textarea> | 31 | + <textarea v-model="articlecontent" name="" id="" cols="30" rows="10" class="textarea" placeholder="请输入文章内容" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx" maxlength="1000"></textarea> |
32 | <view class="tips">可输入1000字</view> | 32 | <view class="tips">可输入1000字</view> |
33 | </view> | 33 | </view> |
34 | <view class="picBox"> | 34 | <view class="picBox"> |
@@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
54 | <image :src="item" style="width:128rpx;height:128rpx;margin-right: 24rpx;margin-bottom: 24rpx;"></image> | 54 | <image :src="item" style="width:128rpx;height:128rpx;margin-right: 24rpx;margin-bottom: 24rpx;"></image> |
55 | <image class="icon" src="../../static/shanchu_icon@2x.png" @click="delimage(index)"></image> | 55 | <image class="icon" src="../../static/shanchu_icon@2x.png" @click="delimage(index)"></image> |
56 | </view> | 56 | </view> |
57 | - <image class="pic" src="../../static/shangchuan_img@2x.png" @click="upload"></image> | 57 | + <image class="pic" src="../../static/shangchuan_img@2x.png" v-if="image.length<5" @click="upload"></image> |
58 | </view> | 58 | </view> |
59 | 59 | ||
60 | </view> | 60 | </view> |
@@ -99,6 +99,7 @@ export default { | @@ -99,6 +99,7 @@ export default { | ||
99 | upload(){ | 99 | upload(){ |
100 | var that = this; | 100 | var that = this; |
101 | uni.chooseImage({ | 101 | uni.chooseImage({ |
102 | + | ||
102 | count: 1, | 103 | count: 1, |
103 | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 | 104 | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
104 | sourceType: ['album'], //从相册选择 | 105 | sourceType: ['album'], //从相册选择 |
@@ -106,15 +107,16 @@ export default { | @@ -106,15 +107,16 @@ export default { | ||
106 | const tempFilePaths = res.tempFilePaths; | 107 | const tempFilePaths = res.tempFilePaths; |
107 | // that.image = that.image.push(tempFilePaths[0]) ; | 108 | // that.image = that.image.push(tempFilePaths[0]) ; |
108 | app.upload('image',res.tempFilePaths[0],"post").then((res)=>{ | 109 | app.upload('image',res.tempFilePaths[0],"post").then((res)=>{ |
110 | + console.log(res) | ||
109 | // let newimage=that.image | 111 | // let newimage=that.image |
110 | - var url= app.globalData.imageBaseUrl+res.url | 112 | + var url= res.url |
111 | // that.image=app.globalData.imageBaseUrl+res.url | 113 | // that.image=app.globalData.imageBaseUrl+res.url |
112 | console.log(res) | 114 | console.log(res) |
113 | console.log(res.url) | 115 | console.log(res.url) |
114 | console.log(that.image) | 116 | console.log(that.image) |
115 | 117 | ||
116 | that.image.push(url) | 118 | that.image.push(url) |
117 | - that.image2.push(res.url) | 119 | + that.image2.push(res.kurl) |
118 | console.log(that.image) | 120 | console.log(that.image) |
119 | 121 | ||
120 | // that.image=that.image | 122 | // that.image=that.image |
@@ -210,6 +212,9 @@ export default { | @@ -210,6 +212,9 @@ export default { | ||
210 | }, | 212 | }, |
211 | delimage(index){ | 213 | delimage(index){ |
212 | this.image.splice(index,1) | 214 | this.image.splice(index,1) |
215 | + this.image2.splice(index,1) | ||
216 | + this.image=this.image; | ||
217 | + this.image2=this.image2; | ||
213 | } | 218 | } |
214 | }, | 219 | }, |
215 | onLoad(){ | 220 | onLoad(){ |
@@ -281,11 +286,12 @@ export default { | @@ -281,11 +286,12 @@ export default { | ||
281 | } | 286 | } |
282 | .picBox{ | 287 | .picBox{ |
283 | padding: 32rpx; | 288 | padding: 32rpx; |
284 | - width: 460rpx; | 289 | + box-sizing: border-box; |
290 | + width: 686rpx; | ||
285 | display: flex; | 291 | display: flex; |
286 | flex-wrap: wrap; | 292 | flex-wrap: wrap; |
287 | .boxitem{ | 293 | .boxitem{ |
288 | - width: 460rpx; | 294 | + width: 100%; |
289 | 295 | ||
290 | // margin-right: 24rpx; | 296 | // margin-right: 24rpx; |
291 | // margin-bottom: 24rpx; | 297 | // margin-bottom: 24rpx; |
@@ -297,13 +303,13 @@ export default { | @@ -297,13 +303,13 @@ export default { | ||
297 | height: 128rpx; | 303 | height: 128rpx; |
298 | position: relative; | 304 | position: relative; |
299 | display: inline-block; | 305 | display: inline-block; |
300 | - margin-right: 24rpx;margin-bottom: 24rpx; | 306 | + margin-right: 10rpx;margin-bottom: 24rpx; |
301 | 307 | ||
302 | } | 308 | } |
303 | .pic{ | 309 | .pic{ |
304 | width: 128rpx; | 310 | width: 128rpx; |
305 | height: 128rpx; | 311 | height: 128rpx; |
306 | - margin-right: 24rpx;margin-bottom: 24rpx; | 312 | + margin-left: 24rpx;margin-bottom: 24rpx; |
307 | } | 313 | } |
308 | .icon{ | 314 | .icon{ |
309 | width: 36rpx; | 315 | width: 36rpx; |
@@ -55,7 +55,11 @@ export default { | @@ -55,7 +55,11 @@ export default { | ||
55 | app.post(url,params,"post").then((res)=>{ | 55 | app.post(url,params,"post").then((res)=>{ |
56 | console.log(res) | 56 | console.log(res) |
57 | }).catch((err)=>{ | 57 | }).catch((err)=>{ |
58 | - console.log(err) | 58 | + console.log(err); |
59 | + uni.showToast({ | ||
60 | + title:err.msg, | ||
61 | + icon:'none' | ||
62 | + }) | ||
59 | }) | 63 | }) |
60 | } | 64 | } |
61 | }, | 65 | }, |
@@ -2,10 +2,10 @@ | @@ -2,10 +2,10 @@ | ||
2 | <view class="content"> | 2 | <view class="content"> |
3 | <view class="item" v-for="(item,index) in mingxilist" :key="index"> | 3 | <view class="item" v-for="(item,index) in mingxilist" :key="index"> |
4 | <view class="left"> | 4 | <view class="left"> |
5 | - <view class="title">xx收益</view> | ||
6 | - <view class="time">2020-2-19</view> | 5 | + <view class="title">{{item.memo}}</view> |
6 | + <view class="time">{{item.createtime}}</view> | ||
7 | </view> | 7 | </view> |
8 | - <view class="right">¥800.00</view> | 8 | + <view class="right">¥{{item.money}}</view> |
9 | </view> | 9 | </view> |
10 | <view class="nodata" v-if="mingxilist.length==0">暂无数据</view> | 10 | <view class="nodata" v-if="mingxilist.length==0">暂无数据</view> |
11 | </view> | 11 | </view> |
@@ -132,7 +132,7 @@ export default { | @@ -132,7 +132,7 @@ export default { | ||
132 | date: '请选择毕业年份', | 132 | date: '请选择毕业年份', |
133 | isDateShow: false, | 133 | isDateShow: false, |
134 | uplist: [], | 134 | uplist: [], |
135 | - upid: '1', | 135 | + upid: '', |
136 | subid: [], | 136 | subid: [], |
137 | sublist: [], | 137 | sublist: [], |
138 | collegename: '请选择就读大学', | 138 | collegename: '请选择就读大学', |
@@ -416,6 +416,7 @@ export default { | @@ -416,6 +416,7 @@ export default { | ||
416 | border-bottom: 1rpx solid rgba(238, 238, 238, 1); | 416 | border-bottom: 1rpx solid rgba(238, 238, 238, 1); |
417 | font-size: 28rpx; | 417 | font-size: 28rpx; |
418 | .title { | 418 | .title { |
419 | + width:172rpx; | ||
419 | // line-height: 114px; | 420 | // line-height: 114px; |
420 | padding: 30rpx 0; | 421 | padding: 30rpx 0; |
421 | // box-sizing: border-box; | 422 | // box-sizing: border-box; |
@@ -430,6 +431,7 @@ export default { | @@ -430,6 +431,7 @@ export default { | ||
430 | margin-left: 8rpx; | 431 | margin-left: 8rpx; |
431 | } | 432 | } |
432 | .inpt { | 433 | .inpt { |
434 | + width:100%; | ||
433 | height: 114rpx; | 435 | height: 114rpx; |
434 | text-align: right; | 436 | text-align: right; |
435 | // width: 250rpx; | 437 | // width: 250rpx; |
@@ -162,7 +162,7 @@ export default { | @@ -162,7 +162,7 @@ export default { | ||
162 | that.image = tempFilePaths[0]; | 162 | that.image = tempFilePaths[0]; |
163 | app.upload('image',res.tempFilePaths[0],"post").then((res)=>{ | 163 | app.upload('image',res.tempFilePaths[0],"post").then((res)=>{ |
164 | // let newimage=that.image | 164 | // let newimage=that.image |
165 | - that.image=res.url; | 165 | + that.image=app.globalData.imageBaseUrl+res.kurl; |
166 | that.chuanimg=res.kurl | 166 | that.chuanimg=res.kurl |
167 | console.log(res) | 167 | console.log(res) |
168 | console.log(that.image) | 168 | console.log(that.image) |
@@ -208,11 +208,13 @@ page{ | @@ -208,11 +208,13 @@ page{ | ||
208 | justify-content: space-between; | 208 | justify-content: space-between; |
209 | // text-align: center; | 209 | // text-align: center; |
210 | .title{ | 210 | .title{ |
211 | + width:172rpx; | ||
211 | color:rgba(6,18,30,1); | 212 | color:rgba(6,18,30,1); |
212 | font-size: 28rpx; | 213 | font-size: 28rpx; |
213 | line-height: 105rpx; | 214 | line-height: 105rpx; |
214 | } | 215 | } |
215 | .inpt{ | 216 | .inpt{ |
217 | + width:100%; | ||
216 | text-align: right; | 218 | text-align: right; |
217 | height: 105rpx; | 219 | height: 105rpx; |
218 | font-size: 28rpx; | 220 | font-size: 28rpx; |
@@ -122,7 +122,7 @@ | @@ -122,7 +122,7 @@ | ||
122 | // 获取token 登录 | 122 | // 获取token 登录 |
123 | login() { | 123 | login() { |
124 | let that = this; | 124 | let that = this; |
125 | - uni.showLoading({ title: '加载中' }) | 125 | + // uni.showLoading({ title: '加载中' }) |
126 | console.log(343438) | 126 | console.log(343438) |
127 | console.log(that.session_key); | 127 | console.log(that.session_key); |
128 | console.log() | 128 | console.log() |
@@ -59,8 +59,14 @@ onLoad(){ | @@ -59,8 +59,14 @@ onLoad(){ | ||
59 | </script> | 59 | </script> |
60 | 60 | ||
61 | <style lang="less"> | 61 | <style lang="less"> |
62 | + page{ | ||
63 | + background-color: #f9f9f9; | ||
64 | + | ||
65 | + } | ||
66 | + | ||
67 | + | ||
62 | .content{ | 68 | .content{ |
63 | - background-color: rgba(249,249,249,1); | 69 | + // background-color: rgba(249,249,249,1); |
64 | .top{ | 70 | .top{ |
65 | padding: 18rpx 32rpx; | 71 | padding: 18rpx 32rpx; |
66 | display: flex; | 72 | display: flex; |
1 | <template> | 1 | <template> |
2 | <view class="content"> | 2 | <view class="content"> |
3 | <view class="title">{{articlelist.title}}</view> | 3 | <view class="title">{{articlelist.title}}</view> |
4 | - <view class="msg"> | 4 | + <view class="msg" style="display:flex;align-items: center;justify-content: space-between;"> |
5 | + <view style="display:flex"> | ||
6 | + | ||
5 | <image class="photo" :src="articlelist.head_image"></image> | 7 | <image class="photo" :src="articlelist.head_image"></image> |
6 | - <view class="nameTime"> | 8 | + <view class="nameTime" > |
7 | <view class="name">{{articlelist.nickname}}</view> | 9 | <view class="name">{{articlelist.nickname}}</view> |
8 | <view class="time">{{articlelist.date}}</view> | 10 | <view class="time">{{articlelist.date}}</view> |
9 | </view> | 11 | </view> |
12 | + </view> | ||
13 | + | ||
10 | <view class="cellect" v-if="articlelist.is_like==0" @click="cellect"> | 14 | <view class="cellect" v-if="articlelist.is_like==0" @click="cellect"> |
11 | <image class="icon" src="../../static/shoucang.png"></image> | 15 | <image class="icon" src="../../static/shoucang.png"></image> |
12 | <view class="txt">收藏</view> | 16 | <view class="txt">收藏</view> |
@@ -116,7 +120,7 @@ export default { | @@ -116,7 +120,7 @@ export default { | ||
116 | .time{ | 120 | .time{ |
117 | color:rgba(140,145,152,1); | 121 | color:rgba(140,145,152,1); |
118 | font-size:24rpx; | 122 | font-size:24rpx; |
119 | - width: 80rpx; | 123 | + |
120 | } | 124 | } |
121 | .cellect{ | 125 | .cellect{ |
122 | width:132rpx; | 126 | width:132rpx; |
@@ -130,7 +134,7 @@ export default { | @@ -130,7 +134,7 @@ export default { | ||
130 | text-align: center; | 134 | text-align: center; |
131 | box-sizing: border-box; | 135 | box-sizing: border-box; |
132 | align-items: center; | 136 | align-items: center; |
133 | - margin-left: 340rpx; | 137 | + // margin-left: 340rpx; |
134 | .icon{ | 138 | .icon{ |
135 | width: 32rpx; | 139 | width: 32rpx; |
136 | height: 32rpx; | 140 | height: 32rpx; |
@@ -80,8 +80,13 @@ | @@ -80,8 +80,13 @@ | ||
80 | console.log(options); | 80 | console.log(options); |
81 | // this.getschoollist(); | 81 | // this.getschoollist(); |
82 | // this.isuesrlogin() | 82 | // this.isuesrlogin() |
83 | - this.getlikeschool() | ||
84 | 83 | ||
84 | + | ||
85 | + }, | ||
86 | + onShow() { | ||
87 | + this.page=1; | ||
88 | + this.schoollist=[]; | ||
89 | + this.getlikeschool() | ||
85 | }, | 90 | }, |
86 | methods: { | 91 | methods: { |
87 | // 底部导航跳转 | 92 | // 底部导航跳转 |
@@ -141,8 +146,11 @@ | @@ -141,8 +146,11 @@ | ||
141 | } | 146 | } |
142 | app.post(url,params,"get").then((res)=>{ | 147 | app.post(url,params,"get").then((res)=>{ |
143 | that.schoollist=that.schoollist.concat(res) | 148 | that.schoollist=that.schoollist.concat(res) |
149 | + | ||
144 | if(that.schoollist.length==0){ | 150 | if(that.schoollist.length==0){ |
145 | that.isnulldata=true | 151 | that.isnulldata=true |
152 | + }else{ | ||
153 | + that.isnulldata=false | ||
146 | } | 154 | } |
147 | }).catch((err)=>{ | 155 | }).catch((err)=>{ |
148 | console.log(err) | 156 | console.log(err) |
@@ -202,6 +210,7 @@ | @@ -202,6 +210,7 @@ | ||
202 | } | 210 | } |
203 | }, | 211 | }, |
204 | 212 | ||
213 | + | ||
205 | onReachBottom: function() { | 214 | onReachBottom: function() { |
206 | let newpage=this.page; | 215 | let newpage=this.page; |
207 | newpage++; | 216 | newpage++; |
@@ -60,15 +60,16 @@ | @@ -60,15 +60,16 @@ | ||
60 | <view class="txt">文章分享</view> | 60 | <view class="txt">文章分享</view> |
61 | </view> | 61 | </view> |
62 | <view class="tabCard"> | 62 | <view class="tabCard"> |
63 | - <view class="item" :class="sel==index?'active':''" @click="selecttype(item,index)" v-for="(item,index) in articletypelist" :key="index" :data-id="item.id">{{item.name}} | 63 | + <view class="item" style="width:446rpx" :class="sel==index?'active':''" @click="selecttype(item,index)" v-for="(item,index) in articletypelist" :key="index" :data-id="item.id">{{item.name}} |
64 | <image class="selected" src="../../static/xuanzhong_icon@2x.png" v-if="sel==index"></image> | 64 | <image class="selected" src="../../static/xuanzhong_icon@2x.png" v-if="sel==index"></image> |
65 | <!-- <image class="selected" src="" v-else></image> --> | 65 | <!-- <image class="selected" src="" v-else></image> --> |
66 | </view> | 66 | </view> |
67 | 67 | ||
68 | </view> | 68 | </view> |
69 | - <view class="articl"> | ||
70 | - | ||
71 | <view class="nodata" v-if="articleList.length==0">暂无数据</view> | 69 | <view class="nodata" v-if="articleList.length==0">暂无数据</view> |
70 | + <view class="articl" v-else> | ||
71 | + | ||
72 | + | ||
72 | <block v-for="(item,index) in articleList" :key="index" @click="toarticle(item)"> | 73 | <block v-for="(item,index) in articleList" :key="index" @click="toarticle(item)"> |
73 | <view class="articltitle"> | 74 | <view class="articltitle"> |
74 | <image class="photo" :src="baceurl+item.head_image"></image> | 75 | <image class="photo" :src="baceurl+item.head_image"></image> |
@@ -141,7 +142,7 @@ export default { | @@ -141,7 +142,7 @@ export default { | ||
141 | this.getschooldetails() | 142 | this.getschooldetails() |
142 | this.getollege() | 143 | this.getollege() |
143 | this.getarticletype() | 144 | this.getarticletype() |
144 | - this.getAllArticle() | 145 | + |
145 | }, | 146 | }, |
146 | methods:{ | 147 | methods:{ |
147 | popupShow(){ | 148 | popupShow(){ |
@@ -190,7 +191,9 @@ export default { | @@ -190,7 +191,9 @@ export default { | ||
190 | item.issel='' | 191 | item.issel='' |
191 | return; | 192 | return; |
192 | }) | 193 | }) |
193 | - this.articletypelist=res | 194 | + this.articletypelist=res; |
195 | + this.type_id=res[0].id; | ||
196 | + this.getAllArticle() | ||
194 | console.log(res) | 197 | console.log(res) |
195 | }).catch((err)=>{ | 198 | }).catch((err)=>{ |
196 | console.log(err) | 199 | console.log(err) |
@@ -446,6 +449,7 @@ export default { | @@ -446,6 +449,7 @@ export default { | ||
446 | .card{ | 449 | .card{ |
447 | width:686rpx; | 450 | width:686rpx; |
448 | height:288rpx; | 451 | height:288rpx; |
452 | + overflow: hidden; | ||
449 | background:rgba(255,255,255,1); | 453 | background:rgba(255,255,255,1); |
450 | box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1); | 454 | box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1); |
451 | opacity:1; | 455 | opacity:1; |
@@ -453,22 +457,27 @@ export default { | @@ -453,22 +457,27 @@ export default { | ||
453 | display: flex; | 457 | display: flex; |
454 | flex-wrap: wrap; | 458 | flex-wrap: wrap; |
455 | padding: 0 40rpx; | 459 | padding: 0 40rpx; |
456 | - padding-top: 40rpx; | 460 | + padding: 20rpx 0; |
457 | box-sizing: border-box; | 461 | box-sizing: border-box; |
458 | margin-top: 16rpx; | 462 | margin-top: 16rpx; |
459 | margin-bottom: 44rpx; | 463 | margin-bottom: 44rpx; |
460 | 464 | ||
461 | .item{ | 465 | .item{ |
462 | - | 466 | + width:227rpx!important; |
463 | // padding: 40rpx 0; | 467 | // padding: 40rpx 0; |
464 | // box-sizing: border-box; | 468 | // box-sizing: border-box; |
465 | font-size: 24rpx; | 469 | font-size: 24rpx; |
466 | color:rgba(45,85,117,1); | 470 | color:rgba(45,85,117,1); |
467 | text-align: center; | 471 | text-align: center; |
468 | .bor{ | 472 | .bor{ |
469 | - border-right: 1rpx solid rgba(238,238,238,1); | ||
470 | - width: 225rpx; | ||
471 | - padding-right: 20rpx; | 473 | + // border-right: 1rpx solid rgba(238,238,238,1); |
474 | + width: 227rpx; | ||
475 | + overflow: hidden; | ||
476 | + text-overflow: ellipsis; | ||
477 | + white-space: nowrap; | ||
478 | + padding:0 20rpx; | ||
479 | + box-sizing: border-box; | ||
480 | + | ||
472 | height: 64rpx; | 481 | height: 64rpx; |
473 | line-height: 64rpx; | 482 | line-height: 64rpx; |
474 | box-sizing: border-box; | 483 | box-sizing: border-box; |
@@ -588,7 +597,7 @@ export default { | @@ -588,7 +597,7 @@ export default { | ||
588 | z-index: 999; | 597 | z-index: 999; |
589 | .card{ | 598 | .card{ |
590 | width: 628rpx; | 599 | width: 628rpx; |
591 | - height: 288rpx; | 600 | + // height: 288rpx; |
592 | background:rgba(255,255,255,1); | 601 | background:rgba(255,255,255,1); |
593 | position: fixed; | 602 | position: fixed; |
594 | top: 50%; | 603 | top: 50%; |
@@ -599,6 +608,8 @@ export default { | @@ -599,6 +608,8 @@ export default { | ||
599 | position: relative; | 608 | position: relative; |
600 | text-align: center; | 609 | text-align: center; |
601 | overflow: hidden; | 610 | overflow: hidden; |
611 | + padding: 20rpx 0; | ||
612 | + box-sizing: border-box; | ||
602 | .close{ | 613 | .close{ |
603 | width: 35rpx; | 614 | width: 35rpx; |
604 | height: 35rpx; | 615 | height: 35rpx; |
@@ -2,10 +2,10 @@ | @@ -2,10 +2,10 @@ | ||
2 | <view class="content"> | 2 | <view class="content"> |
3 | <view class="msgCard"> | 3 | <view class="msgCard"> |
4 | <image :src="matemsg.head_image" class="photo"></image> | 4 | <image :src="matemsg.head_image" class="photo"></image> |
5 | - <view class="title">{{matemsg.nickname}}</view> | ||
6 | - <view class="o">{{matemsg.university_name}} | {{matemsg.college_name}} | {{matemsg.end_year}}</view> | ||
7 | - <view class="t">{{matemsg.school_name}} | <text v-for="(item,index) in matemsg.subject_names" :key="index">{{item}}</text> | {{matemsg.up_name}}</view> | ||
8 | - <view class="mall">个人邮箱:{{matemsg.email}}</view> | 5 | + <view class="title">{{matemsg.nickname==undefined?'':matemsg.nickname}}</view> |
6 | + <view class="o">{{matemsg.university_name==undefined?'':matemsg.university_name}} | {{matemsg.college_name==undefined?'':matemsg.college_name}} | {{matemsg.end_year==undefined?'':matemsg.end_year}}</view> | ||
7 | + <view class="t">{{matemsg.school_name==undefined?'':matemsg.school_name}} | <text v-for="(item,index) in matemsg.subject_names" :key="index">{{item}}</text> | {{matemsg.up_name==undefined?'':matemsg.up_name}}</view> | ||
8 | + <view class="mall">个人邮箱:{{matemsg.email==undefined?'':matemsg.email}}</view> | ||
9 | <view class="right" v-if="matemsg.is_like==1" @click="notlike"> | 9 | <view class="right" v-if="matemsg.is_like==1" @click="notlike"> |
10 | <image src="../../static/yiguanzhu_img@2x.png"></image> | 10 | <image src="../../static/yiguanzhu_img@2x.png"></image> |
11 | <view class="text">已关注</view> | 11 | <view class="text">已关注</view> |
@@ -22,8 +22,8 @@ | @@ -22,8 +22,8 @@ | ||
22 | <!-- <image class="selected" src="" v-else></image> --> | 22 | <!-- <image class="selected" src="" v-else></image> --> |
23 | </view> | 23 | </view> |
24 | </view> | 24 | </view> |
25 | - | ||
26 | - <view class="articl"> | 25 | + <view class="nodata" v-if="articleList.length==0">暂无数据</view> |
26 | + <view class="articl" v-else> | ||
27 | <block v-for="(item,index) in articleList" :key="index" @click="toarticlemsg(item)"> | 27 | <block v-for="(item,index) in articleList" :key="index" @click="toarticlemsg(item)"> |
28 | <view class="articltitle"> | 28 | <view class="articltitle"> |
29 | <image class="photo" :src="item.head_image"></image> | 29 | <image class="photo" :src="item.head_image"></image> |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | </view> | 40 | </view> |
41 | </block> | 41 | </block> |
42 | 42 | ||
43 | - <view class="nodata" v-if="articleList.length==0">暂无数据</view> | 43 | + |
44 | </view> | 44 | </view> |
45 | <view v-if="type==1"> | 45 | <view v-if="type==1"> |
46 | <view class="botmBox"> | 46 | <view class="botmBox"> |
@@ -120,13 +120,14 @@ data(){ | @@ -120,13 +120,14 @@ data(){ | ||
120 | } | 120 | } |
121 | }, | 121 | }, |
122 | onLoad(options){ | 122 | onLoad(options){ |
123 | + console.log('我的数据',options) | ||
123 | this.id=options.id; | 124 | this.id=options.id; |
124 | this.user_id=options.user_id | 125 | this.user_id=options.user_id |
125 | this.type=options.type | 126 | this.type=options.type |
126 | console.log(options) | 127 | console.log(options) |
127 | this.getmatemsg() | 128 | this.getmatemsg() |
128 | this.getarticletype() | 129 | this.getarticletype() |
129 | - this.getAllArticle() | 130 | + |
130 | }, | 131 | }, |
131 | methods:{ | 132 | methods:{ |
132 | liuyanBoxShow(){ | 133 | liuyanBoxShow(){ |
@@ -172,12 +173,15 @@ methods:{ | @@ -172,12 +173,15 @@ methods:{ | ||
172 | var url = "article/getArticleType" | 173 | var url = "article/getArticleType" |
173 | var params = {} | 174 | var params = {} |
174 | app.post(url,params,"get").then((res)=>{ | 175 | app.post(url,params,"get").then((res)=>{ |
175 | - this.articletypelist=res | ||
176 | - | 176 | + this.articletypelist=res; |
177 | + this.type_id=res[0].id; | ||
178 | + console.log('我是typeid',this.type_id) | ||
179 | + that.getAllArticle() | ||
177 | console.log(res) | 180 | console.log(res) |
178 | }).catch((err)=>{ | 181 | }).catch((err)=>{ |
179 | console.log(err) | 182 | console.log(err) |
180 | }) | 183 | }) |
184 | + | ||
181 | }, | 185 | }, |
182 | getAllArticle(){ | 186 | getAllArticle(){ |
183 | var token = uni.getStorageSync('token') | 187 | var token = uni.getStorageSync('token') |
@@ -187,7 +191,7 @@ methods:{ | @@ -187,7 +191,7 @@ methods:{ | ||
187 | // university_id:that.university_id, | 191 | // university_id:that.university_id, |
188 | page:that.page, | 192 | page:that.page, |
189 | size:that.size, | 193 | size:that.size, |
190 | - user_id:that.id, | 194 | + user_id:that.user_id, |
191 | type_id:that.type_id, | 195 | type_id:that.type_id, |
192 | token:token | 196 | token:token |
193 | } | 197 | } |
@@ -491,7 +495,7 @@ methods:{ | @@ -491,7 +495,7 @@ methods:{ | ||
491 | } | 495 | } |
492 | .content{ | 496 | .content{ |
493 | background: url("../../static/bg_img@2x(2).png") no-repeat; | 497 | background: url("../../static/bg_img@2x(2).png") no-repeat; |
494 | - background-color: rgba(249,249,249,1); | 498 | + // background-color: rgba(249,249,249,1); |
495 | // height: 100vh; | 499 | // height: 100vh; |
496 | background-size: 750rpx 292rpx; | 500 | background-size: 750rpx 292rpx; |
497 | overflow: hidden; | 501 | overflow: hidden; |
@@ -628,7 +632,8 @@ methods:{ | @@ -628,7 +632,8 @@ methods:{ | ||
628 | background-color: #fff; | 632 | background-color: #fff; |
629 | margin: 0 auto; | 633 | margin: 0 auto; |
630 | margin-top: 24rpx; | 634 | margin-top: 24rpx; |
631 | - padding: 0 34rpx; | 635 | + padding: 0 34rpx 32rpx; |
636 | + box-sizing: border-box; | ||
632 | box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1); | 637 | box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1); |
633 | border-radius:20rpx; | 638 | border-radius:20rpx; |
634 | margin-bottom: 42rpx; | 639 | margin-bottom: 42rpx; |
1 | <template> | 1 | <template> |
2 | - <view class="content"> | 2 | + <view class="content" @click="hide"> |
3 | + <view @click.stop="showhide"> | ||
3 | <view class="top"> | 4 | <view class="top"> |
4 | <view class="search"> | 5 | <view class="search"> |
5 | <image class="icon" src="../../static/sousuo_icon@2x.png"></image> | 6 | <image class="icon" src="../../static/sousuo_icon@2x.png"></image> |
6 | - <input type="text" v-model="word" placeholder="请输入搜索内容" class="input" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;" style="font-size:28rpx;"> | 7 | + <input type="text" v-model="word" placeholder="请输入搜索内容" class="input" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;" |
8 | + style="font-size:28rpx;"> | ||
7 | </view> | 9 | </view> |
8 | <view class="searchBtn" @click="getmatelist">搜索</view> | 10 | <view class="searchBtn" @click="getmatelist">搜索</view> |
9 | </view> | 11 | </view> |
@@ -44,7 +46,8 @@ | @@ -44,7 +46,8 @@ | ||
44 | <view class="majorPopup" v-if="isMajorShow"> | 46 | <view class="majorPopup" v-if="isMajorShow"> |
45 | <view class="cont" style="display:flex;flex-direction: column;overflow: auto;height: 600rpx;"> | 47 | <view class="cont" style="display:flex;flex-direction: column;overflow: auto;height: 600rpx;"> |
46 | <view class="title" @click="selectgraduated" :data-id="null">全部</view> | 48 | <view class="title" @click="selectgraduated" :data-id="null">全部</view> |
47 | - <view class="item" style="width:330rpx" @click="selectgraduated" v-for="(item,index) in graduatedList" :key="index" :data-id="item.id">{{item.name}}</view> | 49 | + <view class="item" style="width:330rpx" @click="selectgraduated" v-for="(item,index) in graduatedList" :key="index" |
50 | + :data-id="item.id">{{item.name}}</view> | ||
48 | </view> | 51 | </view> |
49 | </view> | 52 | </view> |
50 | <view class="stylePopup" v-if="isStyleShow"> | 53 | <view class="stylePopup" v-if="isStyleShow"> |
@@ -63,33 +66,31 @@ | @@ -63,33 +66,31 @@ | ||
63 | <view class="cont"> | 66 | <view class="cont"> |
64 | <view class="title">{{item.nickname}}</view> | 67 | <view class="title">{{item.nickname}}</view> |
65 | <view class="academy"> | 68 | <view class="academy"> |
66 | - <image class="icon" src="../../static/xuexiao_icon@2x2.png"></image>{{ item.university_name }} {{ item.college_name }} {{ item.graduated_name }} | 69 | + <image class="icon" src="../../static/xuexiao_icon@2x2.png"></image>{{ item.university_name }} |
70 | + {{ item.college_name }} {{ item.graduated_name }} | ||
67 | </view> | 71 | </view> |
68 | <view class="fen">{{item.up_name}}</view> | 72 | <view class="fen">{{item.up_name}}</view> |
69 | </view> | 73 | </view> |
70 | - <view class="right" v-if="item.is_like==0"> | 74 | + <view class="right" v-if="item.is_like==1"> |
71 | <image src="../../static/yiguanzhu_img@2x.png"></image> | 75 | <image src="../../static/yiguanzhu_img@2x.png"></image> |
72 | <view class="text">已关注</view> | 76 | <view class="text">已关注</view> |
73 | </view> | 77 | </view> |
74 | <view class="right" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;"> | 78 | <view class="right" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;"> |
75 | <!-- <image src="../../static/yiguanzhu_img@2x.png"></image> --> | 79 | <!-- <image src="../../static/yiguanzhu_img@2x.png"></image> --> |
76 | - <view class="text" style="align-items: center;"> <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注</view> | 80 | + <view class="text" style="align-items: center;"> |
81 | + <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注 | ||
82 | + </view> | ||
77 | </view> | 83 | </view> |
78 | </view> | 84 | </view> |
79 | <view class="nodata" v-if="schoolmateList.length==0">暂无数据</view> | 85 | <view class="nodata" v-if="schoolmateList.length==0">暂无数据</view> |
80 | 86 | ||
81 | - | ||
82 | <!-- <view class="box"> | 87 | <!-- <view class="box"> |
83 | <view class="text"><text @click="tobuy">购买畅读卡</text>可以额外找到888人</view> | 88 | <view class="text"><text @click="tobuy">购买畅读卡</text>可以额外找到888人</view> |
84 | </view> --> | 89 | </view> --> |
85 | - | ||
86 | - | ||
87 | - | ||
88 | - | ||
89 | <!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> --> | 90 | <!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> --> |
90 | <view class="teacherfooter" v-if="type == 1"> | 91 | <view class="teacherfooter" v-if="type == 1"> |
91 | 92 | ||
92 | - <view class="teacherfootitem" > | 93 | + <view class="teacherfootitem"> |
93 | <view class="teacherfootitemtop" @click="footerselChange" :data-id="1" :data-url="'/pages/school/school?type='+1"> | 94 | <view class="teacherfootitemtop" @click="footerselChange" :data-id="1" :data-url="'/pages/school/school?type='+1"> |
94 | <image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image> | 95 | <image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image> |
95 | </view> | 96 | </view> |
@@ -126,86 +127,101 @@ | @@ -126,86 +127,101 @@ | ||
126 | 127 | ||
127 | 128 | ||
128 | </view> | 129 | </view> |
130 | + | ||
131 | + | ||
132 | + </view> | ||
133 | + | ||
134 | + | ||
135 | + | ||
136 | + | ||
129 | </template> | 137 | </template> |
130 | 138 | ||
131 | <script> | 139 | <script> |
132 | import app from "../../App.vue"; | 140 | import app from "../../App.vue"; |
133 | 141 | ||
134 | -export default { | 142 | + export default { |
135 | 143 | ||
136 | -data(){ | ||
137 | - return{ | 144 | + data() { |
145 | + return { | ||
138 | 146 | ||
139 | - isDiquShow:false, | 147 | + isDiquShow: false, |
140 | // isSchoolShow:false, | 148 | // isSchoolShow:false, |
141 | - isMajorShow:false, | ||
142 | - isStyleShow:false, | ||
143 | - active1:false, | 149 | + isMajorShow: false, |
150 | + isStyleShow: false, | ||
151 | + active1: false, | ||
144 | // active2:false, | 152 | // active2:false, |
145 | - active3:false, | ||
146 | - active4:false, | ||
147 | - currentTabIndex:1, | ||
148 | - footersel:2, | ||
149 | - type:"", | ||
150 | - province_id:"", | ||
151 | - city_id:'', | ||
152 | - | ||
153 | - schoolmate:{ | ||
154 | - page:'1', | ||
155 | - size:'10', | ||
156 | - type:'1', | ||
157 | - university_id:'', | ||
158 | - graduated_id:'', | ||
159 | - up_id:'', | 153 | + active3: false, |
154 | + active4: false, | ||
155 | + currentTabIndex: 1, | ||
156 | + footersel: 2, | ||
157 | + type: "", | ||
158 | + province_id: "", | ||
159 | + city_id: '', | ||
160 | + | ||
161 | + schoolmate: { | ||
162 | + page: '1', | ||
163 | + size: '10', | ||
164 | + type: '1', | ||
165 | + university_id: '', | ||
166 | + graduated_id: '', | ||
167 | + up_id: '', | ||
168 | + | ||
169 | + }, | ||
160 | 170 | ||
171 | + school: { | ||
172 | + page: '1', | ||
173 | + size: '10', | ||
174 | + word: '' | ||
161 | }, | 175 | }, |
162 | 176 | ||
163 | - school:{ | ||
164 | - page:'1', | ||
165 | - size:'10', | ||
166 | - word:'' | 177 | + graduatedList: [], |
178 | + upList: [], | ||
179 | + schoolmateList: [], | ||
180 | + provinceList: [], | ||
181 | + cityList: [], | ||
182 | + schoolList: [], | ||
183 | + word:"" | ||
184 | + } | ||
167 | }, | 185 | }, |
186 | + methods: { | ||
187 | + hide() { | ||
188 | + console.log(3889348439) | ||
189 | + this.isDiquShow = false | ||
190 | + }, | ||
191 | + showhide() { | ||
168 | 192 | ||
169 | - graduatedList:[], | ||
170 | - upList:[], | ||
171 | - schoolmateList:[], | ||
172 | - provinceList:[], | ||
173 | - cityList:[], | ||
174 | - schoolList:[] | ||
175 | - } | ||
176 | -}, | ||
177 | -methods:{ | ||
178 | - tobuy(){ | ||
179 | - if(uni.getStorageSync('token')==''){ | 193 | + }, |
194 | + tobuy() { | ||
195 | + if (uni.getStorageSync('token') == '') { | ||
180 | uni.navigateTo({ | 196 | uni.navigateTo({ |
181 | - url:'../register/register?istoken='+1 | 197 | + url: '../register/register?istoken=' + 1 |
182 | }) | 198 | }) |
183 | - }else{ | 199 | + } else { |
184 | uni.navigateTo({ | 200 | uni.navigateTo({ |
185 | - url:'../homePage/buyCard' | 201 | + url: '../homePage/buyCard' |
186 | }) | 202 | }) |
187 | } | 203 | } |
188 | 204 | ||
189 | }, | 205 | }, |
190 | - diquShow(){ | ||
191 | - this.isDiquShow=true; | ||
192 | - this.isSchoolShow=false; | ||
193 | - this.isMajorShow=false | ||
194 | - this.isStyleShow=false | ||
195 | - this.active1=true, | ||
196 | - this.active2=false | ||
197 | - this.active3=false | ||
198 | - this.active4=false | 206 | + diquShow() { |
207 | + this.isDiquShow = true; | ||
208 | + this.isSchoolShow = false; | ||
209 | + this.isMajorShow = false | ||
210 | + this.isStyleShow = false | ||
211 | + this.active1 = true, | ||
212 | + this.active2 = false | ||
213 | + this.active3 = false | ||
214 | + this.active4 = false | ||
199 | }, | 215 | }, |
200 | - hide(){ | ||
201 | - this.isDiquShow=false, | ||
202 | - this.isSchoolShow=false; | ||
203 | - this.isMajorShow=false | ||
204 | - this.isStyleShow=false | ||
205 | - this.active1=false, | ||
206 | - this.active2=false | ||
207 | - this.active3=false | ||
208 | - this.active4=false | 216 | + hide() { |
217 | + this.isDiquShow = false, | ||
218 | + this.isSchoolShow = false; | ||
219 | + this.isMajorShow = false | ||
220 | + this.isStyleShow = false | ||
221 | + this.active1 = false, | ||
222 | + this.active2 = false | ||
223 | + this.active3 = false | ||
224 | + this.active4 = false | ||
209 | }, | 225 | }, |
210 | // schoolShow(){ | 226 | // schoolShow(){ |
211 | // this.isSchoolShow=true; | 227 | // this.isSchoolShow=true; |
@@ -218,26 +234,26 @@ methods:{ | @@ -218,26 +234,26 @@ methods:{ | ||
218 | // this.active4=false | 234 | // this.active4=false |
219 | // }, | 235 | // }, |
220 | 236 | ||
221 | - majorShow(){ | ||
222 | - this.isMajorShow=true | ||
223 | - this.isDiquShow=false, | ||
224 | - this.isSchoolShow=false; | ||
225 | - this.isStyleShow=false | ||
226 | - this.active1=false, | ||
227 | - this.active2=false | ||
228 | - this.active3=true | ||
229 | - this.active4=false | 237 | + majorShow() { |
238 | + this.isMajorShow = true | ||
239 | + this.isDiquShow = false, | ||
240 | + this.isSchoolShow = false; | ||
241 | + this.isStyleShow = false | ||
242 | + this.active1 = false, | ||
243 | + this.active2 = false | ||
244 | + this.active3 = true | ||
245 | + this.active4 = false | ||
230 | }, | 246 | }, |
231 | 247 | ||
232 | - styleShow(){ | ||
233 | - this.isStyleShow=true | ||
234 | - this.isMajorShow=false | ||
235 | - this.isSchoolShow=false | ||
236 | - this.isDiquShow=false | ||
237 | - this.active1=false, | ||
238 | - this.active2=false | ||
239 | - this.active3=false | ||
240 | - this.active4=true | 248 | + styleShow() { |
249 | + this.isStyleShow = true | ||
250 | + this.isMajorShow = false | ||
251 | + this.isSchoolShow = false | ||
252 | + this.isDiquShow = false | ||
253 | + this.active1 = false, | ||
254 | + this.active2 = false | ||
255 | + this.active3 = false | ||
256 | + this.active4 = true | ||
241 | }, | 257 | }, |
242 | 258 | ||
243 | // 底部导航跳转 | 259 | // 底部导航跳转 |
@@ -250,35 +266,35 @@ methods:{ | @@ -250,35 +266,35 @@ methods:{ | ||
250 | 266 | ||
251 | }, | 267 | }, |
252 | //获取学长列表 | 268 | //获取学长列表 |
253 | - getmatelist(){ | ||
254 | - if(uni.getStorageSync('token')==''){ | 269 | + getmatelist() { |
270 | + if (uni.getStorageSync('token') == '') { | ||
255 | uni.showToast({ | 271 | uni.showToast({ |
256 | - title:"请登陆后操作", | ||
257 | - icon:"none" | 272 | + title: "请登陆后操作", |
273 | + icon: "none" | ||
258 | }) | 274 | }) |
259 | setTimeout(() => { | 275 | setTimeout(() => { |
260 | uni.navigateTo({ | 276 | uni.navigateTo({ |
261 | - url:'../register/register?istoken='+1 | 277 | + url: '../register/register?istoken=' + 1 |
262 | }) | 278 | }) |
263 | }, 1500); | 279 | }, 1500); |
264 | 280 | ||
265 | - }else{ | ||
266 | - var url="student/getStudentList" | 281 | + } else { |
282 | + var url = "student/getStudentList" | ||
267 | var token = uni.getStorageSync('token') | 283 | var token = uni.getStorageSync('token') |
268 | var params = { | 284 | var params = { |
269 | - page:this.schoolmate.page, | ||
270 | - size:this.schoolmate.size, | ||
271 | - type:this.schoolmate.type, | ||
272 | - university_id:this.schoolmate.university_id, | ||
273 | - graduated_id:this.schoolmate.graduated_id, | ||
274 | - up_id:this.schoolmate.up_id, | ||
275 | - word:this.word, | ||
276 | - token:token | ||
277 | - } | ||
278 | - app.post(url,params,"get").then((res)=>{ | 285 | + page: this.schoolmate.page, |
286 | + size: this.schoolmate.size, | ||
287 | + type: this.schoolmate.type, | ||
288 | + university_id: this.schoolmate.university_id, | ||
289 | + graduated_id: this.schoolmate.graduated_id, | ||
290 | + up_id: this.schoolmate.up_id, | ||
291 | + word: this.word, | ||
292 | + token: token | ||
293 | + } | ||
294 | + app.post(url, params, "get").then((res) => { | ||
279 | console.log(res) | 295 | console.log(res) |
280 | - this.schoolmateList=res | ||
281 | - }).catch((err)=>{ | 296 | + this.schoolmateList = res |
297 | + }).catch((err) => { | ||
282 | console.log(err) | 298 | console.log(err) |
283 | }) | 299 | }) |
284 | } | 300 | } |
@@ -286,143 +302,143 @@ methods:{ | @@ -286,143 +302,143 @@ methods:{ | ||
286 | }, | 302 | }, |
287 | 303 | ||
288 | //获取所有专业 | 304 | //获取所有专业 |
289 | - getAllGraduated(){ | ||
290 | - var url="university/getGraduated" | ||
291 | - var parmas={} | ||
292 | - app.post(url,parmas,"get").then((res)=>{ | 305 | + getAllGraduated() { |
306 | + var url = "university/getGraduated" | ||
307 | + var parmas = {} | ||
308 | + app.post(url, parmas, "get").then((res) => { | ||
293 | console.log(res) | 309 | console.log(res) |
294 | - this.graduatedList=res | ||
295 | - }).catch((err)=>{ | 310 | + this.graduatedList = res |
311 | + }).catch((err) => { | ||
296 | console.log(err) | 312 | console.log(err) |
297 | }) | 313 | }) |
298 | }, | 314 | }, |
299 | //获取所有升学方式 | 315 | //获取所有升学方式 |
300 | - getAllUp(){ | ||
301 | - var url="university/getAllUp" | ||
302 | - var params={} | ||
303 | - app.post(url,params,"get").then((res)=>{ | 316 | + getAllUp() { |
317 | + var url = "university/getAllUp" | ||
318 | + var params = {} | ||
319 | + app.post(url, params, "get").then((res) => { | ||
304 | console.log(res[0].name) | 320 | console.log(res[0].name) |
305 | - this.upList=res | ||
306 | - }).catch((err)=>{ | 321 | + this.upList = res |
322 | + }).catch((err) => { | ||
307 | console.log(err) | 323 | console.log(err) |
308 | }) | 324 | }) |
309 | }, | 325 | }, |
310 | //获取全部地区(省) | 326 | //获取全部地区(省) |
311 | - getAllProvince(){ | ||
312 | - var url ="city/getAllProvince" | ||
313 | - var params ={} | ||
314 | - app.post(url,params,"get").then((res)=>{ | ||
315 | - this.provinceList=res | ||
316 | - }).catch((err)=>{ | 327 | + getAllProvince() { |
328 | + var url = "city/getAllProvince" | ||
329 | + var params = {} | ||
330 | + app.post(url, params, "get").then((res) => { | ||
331 | + this.provinceList = res | ||
332 | + }).catch((err) => { | ||
317 | console.log(err) | 333 | console.log(err) |
318 | }) | 334 | }) |
319 | }, | 335 | }, |
320 | 336 | ||
321 | //市 | 337 | //市 |
322 | - getAllCity(){ | 338 | + getAllCity() { |
323 | var url = "city/getCity" | 339 | var url = "city/getCity" |
324 | var params = { | 340 | var params = { |
325 | - province_id:this.province_id | 341 | + province_id: this.province_id |
326 | } | 342 | } |
327 | - app.post(url,params,"get").then((res)=>{ | 343 | + app.post(url, params, "get").then((res) => { |
328 | console.log(res) | 344 | console.log(res) |
329 | - this.cityList=res | ||
330 | - }).catch((err)=>{ | 345 | + this.cityList = res |
346 | + }).catch((err) => { | ||
331 | console.log(err) | 347 | console.log(err) |
332 | }) | 348 | }) |
333 | }, | 349 | }, |
334 | 350 | ||
335 | //学校 | 351 | //学校 |
336 | - getAllSchool(){ | ||
337 | - var url="city/getUniversityByCity" | ||
338 | - var params ={ | ||
339 | - city_id:this.city_id | 352 | + getAllSchool() { |
353 | + var url = "city/getUniversityByCity" | ||
354 | + var params = { | ||
355 | + city_id: this.city_id | ||
340 | } | 356 | } |
341 | - app.post(url,params,"get").then((res)=>{ | 357 | + app.post(url, params, "get").then((res) => { |
342 | console.log(res) | 358 | console.log(res) |
343 | - this.schoolList=res | ||
344 | - }).catch((err)=>{ | 359 | + this.schoolList = res |
360 | + }).catch((err) => { | ||
345 | console.log(err) | 361 | console.log(err) |
346 | }) | 362 | }) |
347 | }, | 363 | }, |
348 | 364 | ||
349 | //点击选中的升学方式 | 365 | //点击选中的升学方式 |
350 | - selectup(e){ | ||
351 | - this.schoolmate.up_id=e.currentTarget.dataset.id | 366 | + selectup(e) { |
367 | + this.schoolmate.up_id = e.currentTarget.dataset.id | ||
352 | console.log(e.currentTarget.dataset.id) | 368 | console.log(e.currentTarget.dataset.id) |
353 | this.getmatelist() | 369 | this.getmatelist() |
354 | - this.isStyleShow=false | 370 | + this.isStyleShow = false |
355 | }, | 371 | }, |
356 | 372 | ||
357 | //点击选中的专业 | 373 | //点击选中的专业 |
358 | - selectgraduated(e){ | ||
359 | - this.schoolmate.graduated_id=e.currentTarget.dataset.id | ||
360 | - this.isMajorShow=false | 374 | + selectgraduated(e) { |
375 | + this.schoolmate.graduated_id = e.currentTarget.dataset.id | ||
376 | + this.isMajorShow = false | ||
361 | this.getmatelist() | 377 | this.getmatelist() |
362 | 378 | ||
363 | 379 | ||
364 | }, | 380 | }, |
365 | //点击选中的学校 | 381 | //点击选中的学校 |
366 | - selectschool(e){ | ||
367 | - this.schoolmate.university_id=e.currentTarget.dataset.id | 382 | + selectschool(e) { |
383 | + this.schoolmate.university_id = e.currentTarget.dataset.id | ||
368 | console.log(e.currentTarget.dataset.id) | 384 | console.log(e.currentTarget.dataset.id) |
369 | - this.isDiquShow=false | 385 | + this.isDiquShow = false |
370 | 386 | ||
371 | this.getmatelist() | 387 | this.getmatelist() |
372 | 388 | ||
373 | }, | 389 | }, |
374 | //点击选中的省 | 390 | //点击选中的省 |
375 | - selectprovince(e){ | ||
376 | - if(this.province_id!=e.currentTarget.dataset.id){ | ||
377 | - this.province_id=e.currentTarget.dataset.id; | 391 | + selectprovince(e) { |
392 | + if (this.province_id != e.currentTarget.dataset.id) { | ||
393 | + this.province_id = e.currentTarget.dataset.id; | ||
378 | this.schoolList = []; | 394 | this.schoolList = []; |
379 | this.getAllCity() | 395 | this.getAllCity() |
380 | } | 396 | } |
381 | 397 | ||
382 | }, | 398 | }, |
383 | //点击全部省 | 399 | //点击全部省 |
384 | - selectallprovince(){ | 400 | + selectallprovince() { |
385 | this.getmatelist() | 401 | this.getmatelist() |
386 | - this.isDiquShow=false | 402 | + this.isDiquShow = false |
387 | }, | 403 | }, |
388 | //点击选中全部市 | 404 | //点击选中全部市 |
389 | - selectallcity(){ | 405 | + selectallcity() { |
390 | this.getmatelist() | 406 | this.getmatelist() |
391 | - this.isDiquShow=false | 407 | + this.isDiquShow = false |
392 | 408 | ||
393 | }, | 409 | }, |
394 | //点击选中的市 | 410 | //点击选中的市 |
395 | - selectcity(e){ | ||
396 | - if(this.city_id!=e.currentTarget.dataset.id){ | ||
397 | - this.city_id=e.currentTarget.dataset.id | 411 | + selectcity(e) { |
412 | + if (this.city_id != e.currentTarget.dataset.id) { | ||
413 | + this.city_id = e.currentTarget.dataset.id | ||
398 | this.schoolList = []; | 414 | this.schoolList = []; |
399 | this.getAllSchool() | 415 | this.getAllSchool() |
400 | } | 416 | } |
401 | 417 | ||
402 | 418 | ||
403 | }, | 419 | }, |
404 | - todetile(e){ | ||
405 | - if(uni.getStorageSync('token')==''){ | 420 | + todetile(e) { |
421 | + if (uni.getStorageSync('token') == '') { | ||
406 | uni.navigateTo({ | 422 | uni.navigateTo({ |
407 | - url:'../register/register?istoken='+1 | 423 | + url: '../register/register?istoken=' + 1 |
408 | }) | 424 | }) |
409 | - }else{ | 425 | + } else { |
410 | var type = this.type | 426 | var type = this.type |
411 | var id = e.currentTarget.dataset.id.user_id | 427 | var id = e.currentTarget.dataset.id.user_id |
412 | - console.log( e.currentTarget.dataset.id) | 428 | + console.log(e.currentTarget.dataset.id) |
413 | uni.navigateTo({ | 429 | uni.navigateTo({ |
414 | - url:"../school/schoolmateMsg?user_id="+id+"&type="+type | 430 | + url: "../school/schoolmateMsg?user_id=" + id + "&type=" + type |
415 | }) | 431 | }) |
416 | } | 432 | } |
417 | 433 | ||
418 | } | 434 | } |
419 | 435 | ||
420 | 436 | ||
421 | -}, | ||
422 | - onLoad(options){ | 437 | + }, |
438 | + onLoad(options) { | ||
423 | console.log(options.type) | 439 | console.log(options.type) |
424 | - var type=options.type | ||
425 | - this.type=type | 440 | + var type = options.type |
441 | + this.type = type | ||
426 | this.getmatelist() | 442 | this.getmatelist() |
427 | // this.getAllSchool() | 443 | // this.getAllSchool() |
428 | this.getAllGraduated() | 444 | this.getAllGraduated() |
@@ -431,67 +447,80 @@ methods:{ | @@ -431,67 +447,80 @@ methods:{ | ||
431 | 447 | ||
432 | }, | 448 | }, |
433 | 449 | ||
434 | -} | 450 | + } |
435 | </script> | 451 | </script> |
436 | 452 | ||
437 | <style lang="less"> | 453 | <style lang="less"> |
438 | -.content{ | ||
439 | - background-color: rgba(249,249,249,1); | 454 | + .content { |
455 | + background-color: rgba(249, 249, 249, 1); | ||
440 | height: 100vh; | 456 | height: 100vh; |
441 | padding-bottom: 120rpx; | 457 | padding-bottom: 120rpx; |
442 | - .nodata{ | 458 | + |
459 | + .nodata { | ||
443 | text-align: center; | 460 | text-align: center; |
444 | font-size: 28rpx; | 461 | font-size: 28rpx; |
445 | padding: 20rpx 0; | 462 | padding: 20rpx 0; |
446 | } | 463 | } |
447 | - .top{ | 464 | + |
465 | + .top { | ||
448 | padding: 18rpx 32rpx; | 466 | padding: 18rpx 32rpx; |
449 | display: flex; | 467 | display: flex; |
450 | background-color: #fff; | 468 | background-color: #fff; |
451 | } | 469 | } |
452 | - .search{ | 470 | + |
471 | + .search { | ||
453 | // background-color: #fff; | 472 | // background-color: #fff; |
454 | display: flex; | 473 | display: flex; |
455 | // text-align: center; | 474 | // text-align: center; |
456 | align-items: center; | 475 | align-items: center; |
457 | - width:596rpx; | ||
458 | - height:64rpx; | ||
459 | - background:rgba(238,238,238,1); | ||
460 | - opacity:1; | ||
461 | - border-radius:40rpx; | 476 | + width: 596rpx; |
477 | + height: 64rpx; | ||
478 | + background: rgba(238, 238, 238, 1); | ||
479 | + opacity: 1; | ||
480 | + border-radius: 40rpx; | ||
462 | padding: 0 28rpx; | 481 | padding: 0 28rpx; |
463 | box-sizing: border-box; | 482 | box-sizing: border-box; |
464 | - .icon{ | 483 | + |
484 | + .icon { | ||
465 | width: 30rpx; | 485 | width: 30rpx; |
466 | height: 30rpx; | 486 | height: 30rpx; |
467 | } | 487 | } |
468 | - .input{ | 488 | + |
489 | + .input { | ||
469 | height: 64rpx; | 490 | height: 64rpx; |
470 | width: 500rpx; | 491 | width: 500rpx; |
471 | text-align: center; | 492 | text-align: center; |
472 | } | 493 | } |
473 | 494 | ||
474 | } | 495 | } |
475 | - .searchBtn{ | ||
476 | - color:rgba(6,18,30,1); | 496 | + |
497 | + .searchBtn { | ||
498 | + color: rgba(6, 18, 30, 1); | ||
477 | font-size: 28rpx; | 499 | font-size: 28rpx; |
478 | line-height: 64rpx; | 500 | line-height: 64rpx; |
479 | margin-left: 20rpx; | 501 | margin-left: 20rpx; |
480 | } | 502 | } |
481 | - .type{ | 503 | + |
504 | + .type { | ||
482 | display: flex; | 505 | display: flex; |
483 | - color:rgba(6,18,30,1); | 506 | + color: rgba(6, 18, 30, 1); |
484 | font-size: 24rpx; | 507 | font-size: 24rpx; |
485 | background-color: #fff; | 508 | background-color: #fff; |
486 | padding: 24rpx 32rpx; | 509 | padding: 24rpx 32rpx; |
487 | margin-bottom: 24rpx; | 510 | margin-bottom: 24rpx; |
488 | - .typeitem{ | 511 | + |
512 | + .typeitem { | ||
489 | width: 132rpx; | 513 | width: 132rpx; |
490 | } | 514 | } |
491 | - .active{ | 515 | + |
516 | + .active { | ||
492 | color: #05849D; | 517 | color: #05849D; |
493 | } | 518 | } |
494 | - .diquPopup,.schoolPopup,.majorPopup,.stylePopup{ | 519 | + |
520 | + .diquPopup, | ||
521 | + .schoolPopup, | ||
522 | + .majorPopup, | ||
523 | + .stylePopup { | ||
495 | width: 750rpx; | 524 | width: 750rpx; |
496 | // height: 314rpx; | 525 | // height: 314rpx; |
497 | position: absolute; | 526 | position: absolute; |
@@ -501,21 +530,25 @@ methods:{ | @@ -501,21 +530,25 @@ methods:{ | ||
501 | padding: 22rpx 32rpx; | 530 | padding: 22rpx 32rpx; |
502 | // box-sizing: border-box; | 531 | // box-sizing: border-box; |
503 | z-index: 999; | 532 | z-index: 999; |
504 | - box-shadow:0px 4px 4px rgba(0,0,0,0.06); | ||
505 | - border-top: 1rpx solid rgba(249,249,249,1); | ||
506 | - .item{ | 533 | + box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.06); |
534 | + border-top: 1rpx solid rgba(249, 249, 249, 1); | ||
535 | + | ||
536 | + .item { | ||
507 | margin-bottom: 22rpx; | 537 | margin-bottom: 22rpx; |
508 | // height: 74rpx; | 538 | // height: 74rpx; |
509 | width: 170rpx; | 539 | width: 170rpx; |
510 | } | 540 | } |
511 | - .title{ | 541 | + |
542 | + .title { | ||
512 | margin-bottom: 20rpx; | 543 | margin-bottom: 20rpx; |
513 | } | 544 | } |
514 | - .cont{ | ||
515 | - .colum{ | 545 | + |
546 | + .cont { | ||
547 | + .colum { | ||
516 | width: 30%; | 548 | width: 30%; |
517 | 549 | ||
518 | } | 550 | } |
551 | + | ||
519 | display: flex; | 552 | display: flex; |
520 | // height: 314rpx; | 553 | // height: 314rpx; |
521 | // flex-direction: column; | 554 | // flex-direction: column; |
@@ -524,12 +557,13 @@ methods:{ | @@ -524,12 +557,13 @@ methods:{ | ||
524 | } | 557 | } |
525 | } | 558 | } |
526 | } | 559 | } |
527 | - .mateitem{ | ||
528 | - width:686rpx; | ||
529 | - height:172rpx; | ||
530 | - background:rgba(255,255,255,1); | ||
531 | - opacity:1; | ||
532 | - border-radius:8px; | 560 | + |
561 | + .mateitem { | ||
562 | + width: 686rpx; | ||
563 | + height: 172rpx; | ||
564 | + background: rgba(255, 255, 255, 1); | ||
565 | + opacity: 1; | ||
566 | + border-radius: 8px; | ||
533 | margin: 0 auto; | 567 | margin: 0 auto; |
534 | background-color: #fff; | 568 | background-color: #fff; |
535 | display: flex; | 569 | display: flex; |
@@ -537,38 +571,44 @@ methods:{ | @@ -537,38 +571,44 @@ methods:{ | ||
537 | box-sizing: border-box; | 571 | box-sizing: border-box; |
538 | position: relative; | 572 | position: relative; |
539 | margin-bottom: 24rpx; | 573 | margin-bottom: 24rpx; |
540 | - .photo{ | 574 | + |
575 | + .photo { | ||
541 | width: 112rpx; | 576 | width: 112rpx; |
542 | height: 112rpx; | 577 | height: 112rpx; |
543 | margin-right: 26rpx; | 578 | margin-right: 26rpx; |
544 | margin-top: 6rpx; | 579 | margin-top: 6rpx; |
545 | 580 | ||
546 | } | 581 | } |
547 | - .cont{ | ||
548 | - .title{ | ||
549 | - color:rgba(61,68,77,1); | 582 | + |
583 | + .cont { | ||
584 | + .title { | ||
585 | + color: rgba(61, 68, 77, 1); | ||
550 | font-size: 28rpx; | 586 | font-size: 28rpx; |
551 | } | 587 | } |
552 | - .academy{ | ||
553 | - color:rgba(61,68,77,1); | 588 | + |
589 | + .academy { | ||
590 | + color: rgba(61, 68, 77, 1); | ||
554 | font-size: 22rpx; | 591 | font-size: 22rpx; |
555 | margin-top: 4rpx; | 592 | margin-top: 4rpx; |
556 | display: flex; | 593 | display: flex; |
557 | align-items: center; | 594 | align-items: center; |
595 | + | ||
558 | // line-height: 24rpx; | 596 | // line-height: 24rpx; |
559 | - .icon{ | 597 | + .icon { |
560 | width: 24rpx; | 598 | width: 24rpx; |
561 | height: 24rpx; | 599 | height: 24rpx; |
562 | margin-right: 6rpx; | 600 | margin-right: 6rpx; |
563 | } | 601 | } |
564 | } | 602 | } |
565 | - .fen{ | 603 | + |
604 | + .fen { | ||
566 | font-size: 22rpx; | 605 | font-size: 22rpx; |
567 | - color:rgba(140,145,152,1); | 606 | + color: rgba(140, 145, 152, 1); |
568 | margin-top: 10rpx; | 607 | margin-top: 10rpx; |
569 | } | 608 | } |
570 | } | 609 | } |
571 | - .right{ | 610 | + |
611 | + .right { | ||
572 | width: 132rpx; | 612 | width: 132rpx; |
573 | height: 54rpx; | 613 | height: 54rpx; |
574 | position: absolute; | 614 | position: absolute; |
@@ -576,16 +616,19 @@ methods:{ | @@ -576,16 +616,19 @@ methods:{ | ||
576 | top: 16rpx; | 616 | top: 16rpx; |
577 | display: flex; | 617 | display: flex; |
578 | align-items: center; | 618 | align-items: center; |
579 | - .icon{ | 619 | + |
620 | + .icon { | ||
580 | width: 28rpx; | 621 | width: 28rpx; |
581 | height: 28rpx; | 622 | height: 28rpx; |
582 | // margin-right: 6rpx; | 623 | // margin-right: 6rpx; |
583 | } | 624 | } |
584 | - image{ | 625 | + |
626 | + image { | ||
585 | width: 132rpx; | 627 | width: 132rpx; |
586 | height: 54rpx; | 628 | height: 54rpx; |
587 | } | 629 | } |
588 | - .text{ | 630 | + |
631 | + .text { | ||
589 | color: #fff; | 632 | color: #fff; |
590 | font-size: 24rpx; | 633 | font-size: 24rpx; |
591 | width: 80rpx; | 634 | width: 80rpx; |
@@ -593,44 +636,49 @@ methods:{ | @@ -593,44 +636,49 @@ methods:{ | ||
593 | position: absolute; | 636 | position: absolute; |
594 | top: 50%; | 637 | top: 50%; |
595 | left: 50%; | 638 | left: 50%; |
596 | - transform: translate(-50%,-50%); | 639 | + transform: translate(-50%, -50%); |
597 | display: flex; | 640 | display: flex; |
598 | align-items: center; | 641 | align-items: center; |
599 | } | 642 | } |
600 | } | 643 | } |
601 | } | 644 | } |
602 | - .box{ | 645 | + |
646 | + .box { | ||
603 | width: 686rpx; | 647 | width: 686rpx; |
604 | height: 110rpx; | 648 | height: 110rpx; |
605 | background-color: #fff; | 649 | background-color: #fff; |
606 | margin: 0 auto; | 650 | margin: 0 auto; |
607 | - font-size:28rpx; | 651 | + font-size: 28rpx; |
608 | line-height: 110rpx; | 652 | line-height: 110rpx; |
609 | text-align: center; | 653 | text-align: center; |
610 | - text{ | ||
611 | - color:rgba(129,195,191,1); | 654 | + |
655 | + text { | ||
656 | + color: rgba(129, 195, 191, 1); | ||
612 | } | 657 | } |
613 | } | 658 | } |
614 | 659 | ||
615 | -} | ||
616 | -.tabBar{ | 660 | + } |
661 | + | ||
662 | + .tabBar { | ||
617 | display: flex; | 663 | display: flex; |
618 | position: fixed; | 664 | position: fixed; |
619 | width: 100%; | 665 | width: 100%; |
620 | height: 100rpx; | 666 | height: 100rpx; |
621 | background-color: #fff; | 667 | background-color: #fff; |
622 | bottom: 0; | 668 | bottom: 0; |
623 | - .item{ | 669 | + |
670 | + .item { | ||
624 | flex: 4; | 671 | flex: 4; |
625 | text-align: center; | 672 | text-align: center; |
626 | font-size: 22rpx; | 673 | font-size: 22rpx; |
627 | - color:rgba(189,196,206,1); | 674 | + color: rgba(189, 196, 206, 1); |
628 | // display: ; | 675 | // display: ; |
629 | margin-top: 10rpx; | 676 | margin-top: 10rpx; |
630 | - image{ | 677 | + |
678 | + image { | ||
631 | width: 48rpx; | 679 | width: 48rpx; |
632 | height: 48rpx; | 680 | height: 48rpx; |
633 | } | 681 | } |
634 | } | 682 | } |
635 | -} | 683 | + } |
636 | </style> | 684 | </style> |
src/static/xin.png
0 → 100644
665 字节
-
请 注册 或 登录 后发表评论