正在显示
23 个修改的文件
包含
991 行增加
和
324 行删除
1 | <template> | 1 | <template> |
2 | <view class="content"> | 2 | <view class="content"> |
3 | - <image class="bg" src="../../static/bg_img@2x(2).png"></image> | ||
4 | - <view class="card"> | ||
5 | - <image src="../../static/card_img@2x.png"></image> | 3 | + <view class="bg" style="position: relative;"> |
4 | + <image src="../../static/bg_img@2x(2).png"></image> | ||
5 | + <view class="swiper_image" style="position: absolute;top:26rpx;left:58rpx"> | ||
6 | + <swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" class="swiper_item_img" | ||
7 | + @change="swiperChange" :circular="true"> | ||
8 | + <block v-for="(item,index) in cardlist" :key="index"> | ||
9 | + <swiper-item style="position: relative;"> | ||
10 | + <image src="../../static/card_img@2x.png" class="slide-image" /> | ||
11 | + <view style="position: absolute;top:62rpx;left:40rpx;width:500rpx;height:284rpx"> | ||
12 | + <view class="title">{{item.name}}</view> | ||
13 | + <view class="money">{{item.money}}/月</view> | ||
14 | + <view style="display:flex;align-items:center;margin-top:70rpx;justify-content: space-between;width:556rpx"> | ||
15 | + <view class="time" v-if="item.vip_endtime">到期日期:{{item.vip_endtime}}</view> | ||
16 | + <view class="time" v-else style="width:200rpx"></view> | ||
17 | + <view class="btn" style="margin-left:20rpx" @click="buycard" :data-id="item.id">立即购买<image class="icon" src="../../static/dizhi_btn@2x2.png"></image> | ||
18 | + </view> | ||
6 | </view> | 19 | </view> |
7 | 20 | ||
8 | - <view class="cardText"> | 21 | + </view> |
22 | + </swiper-item> | ||
9 | 23 | ||
10 | - <swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :indicator-color="indicatorColor" :indicator-active-color="indicatorActiveColor" @change="swiperChange" :circle="true" circular="true"> | ||
11 | - <view v-for="(item,index) in cardlist" :key="index"> | ||
12 | - <swiper-item> | 24 | + </block> |
25 | + </swiper> | ||
26 | + <view class="dots"> | ||
27 | + <block v-for="(item,index) in cardlist" :key="index"> | ||
28 | + <view class="dot" :class="index == currentSwiper ? ' active' : ''"></view> | ||
29 | + </block> | ||
30 | + </view> | ||
31 | + </view> | ||
32 | + </view> | ||
13 | 33 | ||
34 | + | ||
35 | + | ||
36 | + <!-- <view class="cardText"> | ||
37 | + <view style="position: relative;"> | ||
38 | + <swiper class="swiper" style="636rpx;height:360rpx;position: relative;" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :indicator-color="indicatorColor" :indicator-active-color="indicatorActiveColor" @change="swiperChange" :circle="true" circular="true"> | ||
39 | + | ||
40 | + <swiper-item style="636rpx;height:360rpx" v-for="(item,index) in cardlist" :key="index"> | ||
41 | + | ||
42 | + <image src="../../static/card_img@2x.png"></image> | ||
43 | + <view style="position: absolute;top:62rpx;left:40rpx;width:500rpx;height:284rpx"> | ||
14 | <view class="title">{{item.name}}</view> | 44 | <view class="title">{{item.name}}</view> |
15 | <view class="money">{{item.money}}/月</view> | 45 | <view class="money">{{item.money}}/月</view> |
46 | + <view style="display:flex;align-items:center;margin-top:70rpx;justify-content: space-between;width:556rpx"> | ||
16 | <view class="time" v-if="item.vip_endtime">到期日期:{{item.vip_endtime}}</view> | 47 | <view class="time" v-if="item.vip_endtime">到期日期:{{item.vip_endtime}}</view> |
17 | - <view class="btn" @click="buycard" :data-id="item.id">立即购买<image class="icon" src="../../static/dizhi_btn@2x2.png"></image></view> | ||
18 | - <!-- <image class="big" src="../../static/juxing.png"></image> | ||
19 | - <image class="small" src="../../static/tuoyuan.png"></image> --> | 48 | + <view class="time" v-else style="width:200rpx"></view> |
49 | + <view class="btn" style="margin-left:20rpx" @click="buycard" :data-id="item.id">立即购买<image class="icon" src="../../static/dizhi_btn@2x2.png"></image></view> | ||
50 | + </view> | ||
20 | 51 | ||
21 | - </swiper-item> | ||
22 | </view> | 52 | </view> |
53 | + </swiper-item> | ||
54 | + | ||
23 | 55 | ||
24 | </swiper> | 56 | </swiper> |
57 | + | ||
25 | <view class="dots"> | 58 | <view class="dots"> |
26 | <block v-for="(item,index) in cardlist" :key="index"> | 59 | <block v-for="(item,index) in cardlist" :key="index"> |
27 | <view class="dot" :class="index == currentSwiper ? 'active' : ''"></view> | 60 | <view class="dot" :class="index == currentSwiper ? 'active' : ''"></view> |
28 | </block> | 61 | </block> |
29 | </view> | 62 | </view> |
30 | </view> | 63 | </view> |
64 | + | ||
65 | + | ||
66 | + </view> | ||
67 | + | ||
68 | + --> | ||
69 | + | ||
70 | + | ||
31 | <view class="textBox"> | 71 | <view class="textBox"> |
32 | YHA青年旅舍会员卡(一年)是国际青年旅舍联盟会员身份证明,全球通用,也是旅行者入住青年旅舍的凭证。拥有会员卡,可以享受国内外国际青年旅舍住宿价格的优惠,同时部分海外青年旅舍只允许会员入住。 | 72 | YHA青年旅舍会员卡(一年)是国际青年旅舍联盟会员身份证明,全球通用,也是旅行者入住青年旅舍的凭证。拥有会员卡,可以享受国内外国际青年旅舍住宿价格的优惠,同时部分海外青年旅舍只允许会员入住。 |
33 | 成为YHA青年旅舍会员的好处: | 73 | 成为YHA青年旅舍会员的好处: |
@@ -41,49 +81,50 @@ | @@ -41,49 +81,50 @@ | ||
41 | </template> | 81 | </template> |
42 | 82 | ||
43 | <script> | 83 | <script> |
44 | -import app from "../../App.vue"; | ||
45 | -export default { | ||
46 | - data(){ | ||
47 | - return{ | ||
48 | - name:'', | ||
49 | - province_id:'', | ||
50 | - city_id:'', | ||
51 | - cardlist:[], | 84 | + import app from "../../App.vue"; |
85 | + export default { | ||
86 | + data() { | ||
87 | + return { | ||
88 | + name: '', | ||
89 | + province_id: '', | ||
90 | + city_id: '', | ||
91 | + cardlist: [], | ||
52 | background: ['color1', 'color2', 'color3'], | 92 | background: ['color1', 'color2', 'color3'], |
93 | + indicatorColor: 'rgba(255,255,255,1)', | ||
94 | + indicatorActiveColor: '#ffffff', | ||
95 | + imgUrls: [1, 2], | ||
96 | + vip_id: '', | ||
53 | indicatorDots: false, | 97 | indicatorDots: false, |
54 | autoplay: true, | 98 | autoplay: true, |
55 | interval: 3000, | 99 | interval: 3000, |
56 | - duration: 500, | ||
57 | - indicatorColor:'rgba(255,255,255,1)', | ||
58 | - indicatorActiveColor:'#ffffff', | 100 | + duration: 2000, |
59 | currentSwiper: 0, | 101 | currentSwiper: 0, |
60 | - imgUrls:[1,2], | ||
61 | - vip_id:'' | ||
62 | } | 102 | } |
63 | }, | 103 | }, |
64 | - methods:{ | ||
65 | - getcardmsg(){ | 104 | + methods: { |
105 | + getcardmsg() { | ||
66 | var that = this | 106 | var that = this |
67 | var url = "vip/getVipConf" | 107 | var url = "vip/getVipConf" |
68 | var params = { | 108 | var params = { |
69 | - name:that.name, | ||
70 | - province_id:that.name, | ||
71 | - city_id:that.name | 109 | + name: that.name, |
110 | + province_id: that.name, | ||
111 | + city_id: that.name | ||
72 | } | 112 | } |
73 | - app.post(url,params,"post").then((res)=>{ | 113 | + app.post(url, params, "post").then((res) => { |
74 | console.log(res) | 114 | console.log(res) |
75 | - that.cardlist=res | ||
76 | - }).catch((err)=>{ | 115 | + that.cardlist = res |
116 | + }).catch((err) => { | ||
77 | console.log(err) | 117 | console.log(err) |
78 | }) | 118 | }) |
79 | }, | 119 | }, |
120 | + | ||
80 | swiperChange: function(e) { | 121 | swiperChange: function(e) { |
81 | - this.currentSwiper= e.detail.current | 122 | + this.currentSwiper = e.detail.current |
82 | 123 | ||
83 | }, | 124 | }, |
84 | - buycard(e){ | 125 | + buycard(e) { |
85 | var that = this | 126 | var that = this |
86 | - let vip_id=e.currentTarget.dataset.id; | 127 | + let vip_id = e.currentTarget.dataset.id; |
87 | console.log(vip_id) | 128 | console.log(vip_id) |
88 | var url = "vip/buyVip" | 129 | var url = "vip/buyVip" |
89 | var header = { | 130 | var header = { |
@@ -91,14 +132,14 @@ export default { | @@ -91,14 +132,14 @@ export default { | ||
91 | 132 | ||
92 | } | 133 | } |
93 | var params = { | 134 | var params = { |
94 | - token:uni.getStorageSync('token'), | ||
95 | - vip_id:vip_id | 135 | + token: uni.getStorageSync('token'), |
136 | + vip_id: vip_id | ||
96 | } | 137 | } |
97 | console.log(params) | 138 | console.log(params) |
98 | - app.post(url,params,"post").then((res)=>{ | 139 | + app.post(url, params, "post").then((res) => { |
99 | console.log(res) | 140 | console.log(res) |
100 | that.payment(res) | 141 | that.payment(res) |
101 | - }).catch((err)=>{ | 142 | + }).catch((err) => { |
102 | console.log(err) | 143 | console.log(err) |
103 | }) | 144 | }) |
104 | }, | 145 | }, |
@@ -126,105 +167,239 @@ export default { | @@ -126,105 +167,239 @@ export default { | ||
126 | }) | 167 | }) |
127 | }, | 168 | }, |
128 | }, | 169 | }, |
129 | - onLoad(){ | 170 | + onLoad() { |
130 | this.getcardmsg() | 171 | this.getcardmsg() |
131 | } | 172 | } |
132 | -} | 173 | + } |
133 | </script> | 174 | </script> |
134 | 175 | ||
135 | <style lang="less"> | 176 | <style lang="less"> |
136 | -.content{ | 177 | + .content { |
137 | 178 | ||
138 | - .bg{ | ||
139 | - width: 750rpx; | ||
140 | - height: 292rpx; | 179 | + /* 轮播图 */ |
180 | + .swiper_image { | ||
181 | + width: 636rpx; | ||
182 | + height: 360rpx; | ||
183 | + font-size: 0; | ||
184 | + margin: 0 auto; | ||
185 | + position: relative; | ||
186 | + // border-radius: 20rpx; | ||
141 | } | 187 | } |
142 | - .card{ | 188 | + |
189 | + swiper { | ||
190 | + width: 636rpx; | ||
191 | + height: 360rpx; | ||
192 | + // border-radius: 20rpx; | ||
193 | + } | ||
194 | + | ||
195 | + .swiper_image image { | ||
196 | + width: 100%; | ||
197 | + height: 100%; | ||
198 | + border-radius: 20rpx; | ||
199 | + } | ||
200 | + | ||
201 | + .swiper_item_img swiper-item { | ||
143 | width: 636rpx; | 202 | width: 636rpx; |
144 | height: 360rpx; | 203 | height: 360rpx; |
204 | + // border-radius: 20rpx; | ||
205 | + } | ||
206 | + | ||
207 | + .swiper_item_img swiper-item image { | ||
208 | + width: 100%; | ||
209 | + height: 100%; | ||
210 | + border-radius: 20rpx; | ||
211 | + } | ||
212 | + | ||
213 | + swiper-item { | ||
214 | + position: relative; | ||
215 | + } | ||
216 | + | ||
217 | + swiper-item image { | ||
218 | + border-radius: 20rpx; | ||
219 | + } | ||
220 | + | ||
221 | + .picimg { | ||
222 | + width: 156rpx; | ||
223 | + height: 76rpx; | ||
224 | + position: absolute; | ||
225 | + right: 36rpx; | ||
226 | + bottom: 30rpx; | ||
227 | + } | ||
228 | + | ||
229 | + .dots { | ||
230 | + height: 36rpx; | ||
231 | + display: flex; | ||
232 | + flex-direction: row; | ||
145 | position: absolute; | 233 | position: absolute; |
146 | - top: 26rpx; | ||
147 | left: 50%; | 234 | left: 50%; |
148 | - transform: translate(-50%); | 235 | + transform: translateX(-50%); |
236 | + bottom: 10rpx; | ||
237 | + } | ||
238 | + | ||
239 | + /*未选中时的小圆点样式 */ | ||
240 | + | ||
241 | + .dot { | ||
242 | + width: 8rpx; | ||
243 | + height: 8rpx; | ||
244 | + border-radius: 50%; | ||
245 | + margin-right: 16rpx; | ||
246 | + background-color: #fff; | ||
247 | + } | ||
248 | + | ||
249 | + /*选中以后的小圆点样式 */ | ||
250 | + | ||
251 | + .active { | ||
252 | + width: 24rpx; | ||
253 | + height: 8rpx; | ||
254 | + border-radius: 10rpx; | ||
255 | + background-color: #fff; | ||
256 | + } | ||
257 | + .title { | ||
258 | + color: rgba(130, 75, 59, 1); | ||
259 | + font-size: 50rpx; | ||
260 | + | ||
261 | + } | ||
262 | + | ||
263 | + .money { | ||
264 | + color: rgba(130, 75, 59, 1); | ||
265 | + font-size: 36rpx; | ||
266 | + } | ||
267 | + | ||
268 | + .time { | ||
269 | + color: rgba(130, 75, 59, 1); | ||
270 | + font-size: 24rpx; | ||
271 | + // margin-top: 70rpx; | ||
272 | + // position: absolute; | ||
273 | + // left:26rpx; | ||
274 | + // bottom:68rpx | ||
275 | + } | ||
276 | + | ||
277 | + .btn { | ||
278 | + width: 206rpx; | ||
279 | + height: 60rpx; | ||
280 | + background: rgba(130, 75, 59, 1); | ||
281 | + opacity: 1; | ||
282 | + border-radius: 42rpx; | ||
283 | + color: rgba(255, 255, 255, 1); | ||
284 | + font-size: 32rpx; | ||
285 | + text-align: center; | ||
286 | + line-height: 60rpx; | ||
287 | + | ||
288 | + // margin-left:20rpx; | ||
289 | + // position: absolute; | ||
290 | + // right: 26rpx; | ||
291 | + // bottom: 52rpx; | ||
292 | + .icon { | ||
293 | + width: 15rpx; | ||
294 | + height: 27rpx; | ||
295 | + margin-left: 10rpx; | ||
296 | + } | ||
149 | } | 297 | } |
150 | - .cardText{ | 298 | + |
299 | + | ||
300 | + .bg { | ||
301 | + width: 750rpx; | ||
302 | + height: 292rpx; | ||
303 | + } | ||
304 | + | ||
305 | + .card { | ||
306 | + width: 636rpx; | ||
307 | + height: 360rpx; | ||
308 | + // position: absolute; | ||
309 | + // top: 26rpx; | ||
310 | + // left: 50%; | ||
311 | + // transform: translate(-50%); | ||
312 | + } | ||
313 | + | ||
314 | + .cardText { | ||
151 | width: 636rpx; | 315 | width: 636rpx; |
152 | height: 360rpx; | 316 | height: 360rpx; |
153 | position: absolute; | 317 | position: absolute; |
154 | top: 26rpx; | 318 | top: 26rpx; |
155 | left: 50%; | 319 | left: 50%; |
156 | transform: translate(-50%); | 320 | transform: translate(-50%); |
157 | - padding: 30rpx 40rpx; | ||
158 | - box-sizing: border-box; | 321 | + // padding: 30rpx 40rpx; |
322 | + // box-sizing: border-box; | ||
159 | z-index: 777; | 323 | z-index: 777; |
160 | - .title{ | ||
161 | - color:rgba(130,75,59,1); | 324 | + |
325 | + .title { | ||
326 | + color: rgba(130, 75, 59, 1); | ||
162 | font-size: 50rpx; | 327 | font-size: 50rpx; |
163 | 328 | ||
164 | } | 329 | } |
165 | - .money{ | ||
166 | - color:rgba(130,75,59,1); | 330 | + |
331 | + .money { | ||
332 | + color: rgba(130, 75, 59, 1); | ||
167 | font-size: 36rpx; | 333 | font-size: 36rpx; |
168 | } | 334 | } |
169 | - .time{ | ||
170 | - color:rgba(130,75,59,1); | 335 | + |
336 | + .time { | ||
337 | + color: rgba(130, 75, 59, 1); | ||
171 | font-size: 24rpx; | 338 | font-size: 24rpx; |
172 | - margin-top: 70rpx; | ||
173 | - position: absolute; | ||
174 | - left:26rpx; | ||
175 | - bottom:68rpx | ||
176 | - } | ||
177 | - .btn{ | ||
178 | - width:206rpx; | ||
179 | - height:60rpx; | ||
180 | - background:rgba(130,75,59,1); | ||
181 | - opacity:1; | ||
182 | - border-radius:42rpx; | ||
183 | - color:rgba(255,255,255,1); | ||
184 | - font-size:32rpx; | 339 | + // margin-top: 70rpx; |
340 | + // position: absolute; | ||
341 | + // left:26rpx; | ||
342 | + // bottom:68rpx | ||
343 | + } | ||
344 | + | ||
345 | + .btn { | ||
346 | + width: 206rpx; | ||
347 | + height: 60rpx; | ||
348 | + background: rgba(130, 75, 59, 1); | ||
349 | + opacity: 1; | ||
350 | + border-radius: 42rpx; | ||
351 | + color: rgba(255, 255, 255, 1); | ||
352 | + font-size: 32rpx; | ||
185 | text-align: center; | 353 | text-align: center; |
186 | line-height: 60rpx; | 354 | line-height: 60rpx; |
187 | - position: absolute; | ||
188 | - right: 26rpx; | ||
189 | - bottom: 52rpx; | ||
190 | - .icon{ | 355 | + |
356 | + // margin-left:20rpx; | ||
357 | + // position: absolute; | ||
358 | + // right: 26rpx; | ||
359 | + // bottom: 52rpx; | ||
360 | + .icon { | ||
191 | width: 15rpx; | 361 | width: 15rpx; |
192 | height: 27rpx; | 362 | height: 27rpx; |
193 | margin-left: 10rpx; | 363 | margin-left: 10rpx; |
194 | } | 364 | } |
195 | } | 365 | } |
196 | - .dots{ | ||
197 | - // position: absolute; | 366 | + |
367 | + .dots { | ||
368 | + position: absolute; | ||
198 | bottom: 36rpx; | 369 | bottom: 36rpx; |
199 | left: 50%; | 370 | left: 50%; |
200 | transform: translate(-50%); | 371 | transform: translate(-50%); |
201 | width: 50rpx; | 372 | width: 50rpx; |
202 | height: 10rpx; | 373 | height: 10rpx; |
203 | z-index: 999; | 374 | z-index: 999; |
204 | - overflow: hidden; | ||
205 | - margin:0 auto; | 375 | + |
376 | + // overflow: hidden; | ||
377 | + // margin:0 auto; | ||
206 | // display: flex; | 378 | // display: flex; |
207 | // justify-content: space-between; | 379 | // justify-content: space-between; |
208 | - .dot{ | 380 | + .dot { |
209 | width: 10rpx; | 381 | width: 10rpx; |
210 | height: 10rpx; | 382 | height: 10rpx; |
211 | background-color: #fff; | 383 | background-color: #fff; |
212 | - border-radius:12rpx; | 384 | + border-radius: 12rpx; |
213 | float: left; | 385 | float: left; |
214 | } | 386 | } |
215 | - .active{ | 387 | + |
388 | + .active { | ||
216 | width: 30rpx; | 389 | width: 30rpx; |
217 | height: 10rpx; | 390 | height: 10rpx; |
218 | } | 391 | } |
219 | } | 392 | } |
220 | - .big{ | 393 | + |
394 | + .big { | ||
221 | width: 24rpx; | 395 | width: 24rpx; |
222 | height: 8rpx; | 396 | height: 8rpx; |
223 | position: absolute; | 397 | position: absolute; |
224 | bottom: 10rpx; | 398 | bottom: 10rpx; |
225 | left: 298rpx; | 399 | left: 298rpx; |
226 | } | 400 | } |
227 | - .small{ | 401 | + |
402 | + .small { | ||
228 | width: 8rpx; | 403 | width: 8rpx; |
229 | height: 8rpx; | 404 | height: 8rpx; |
230 | position: absolute; | 405 | position: absolute; |
@@ -232,11 +407,12 @@ export default { | @@ -232,11 +407,12 @@ export default { | ||
232 | left: 330rpx; | 407 | left: 330rpx; |
233 | } | 408 | } |
234 | } | 409 | } |
235 | - .textBox{ | 410 | + |
411 | + .textBox { | ||
236 | font-size: 24rpx; | 412 | font-size: 24rpx; |
237 | width: 640rpx; | 413 | width: 640rpx; |
238 | margin: 0 auto; | 414 | margin: 0 auto; |
239 | margin-top: 138rpx; | 415 | margin-top: 138rpx; |
240 | } | 416 | } |
241 | -} | 417 | + } |
242 | </style> | 418 | </style> |
@@ -6,89 +6,144 @@ | @@ -6,89 +6,144 @@ | ||
6 | <view class="cellect" :class="{active:active2}" @click="cellectShow">我的收藏</view> | 6 | <view class="cellect" :class="{active:active2}" @click="cellectShow">我的收藏</view> |
7 | </view> | 7 | </view> |
8 | <view class="historyBox" v-if="isHistoryShow"> | 8 | <view class="historyBox" v-if="isHistoryShow"> |
9 | + | ||
10 | + <view class="nodata" v-if="historylist.length==0">暂无数据</view> | ||
11 | + <view v-else> | ||
9 | <view class="liulan"> | 12 | <view class="liulan"> |
10 | <view class="liulantitle">浏览历史</view> | 13 | <view class="liulantitle">浏览历史</view> |
11 | - <view class="del">清空</view> | 14 | + <view class="del" @click="delhistory">清空</view> |
12 | <!-- <view class="del">完成</view> --> | 15 | <!-- <view class="del">完成</view> --> |
13 | </view> | 16 | </view> |
14 | - <view class="mateitem" v-for="(item,index) in historylist" :key="index"> | 17 | + <view class="mateitem" v-for="(item,index) in historylist" :key="index" @click="toarticl" :data-id="item.id"> |
15 | <view class="contentBox"> | 18 | <view class="contentBox"> |
16 | - <image class="photo" :src="item.head_img"></image> | 19 | + |
20 | + <image class="photo" style="border-radius: 50%;" :src="item.head_image"></image> | ||
17 | <view class="cont"> | 21 | <view class="cont"> |
18 | <view class="title">{{item.nickname}}</view> | 22 | <view class="title">{{item.nickname}}</view> |
19 | - | ||
20 | <view class="fen">{{item.title}}</view> | 23 | <view class="fen">{{item.title}}</view> |
21 | <view class="txt">{{item.content}}</view> | 24 | <view class="txt">{{item.content}}</view> |
22 | </view> | 25 | </view> |
23 | <view class="right" :class="item.is_like_user==0?'like':''"> | 26 | <view class="right" :class="item.is_like_user==0?'like':''"> |
24 | - <view class="text" @click="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;"> | 27 | + <view class="text" @click.stop="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;"> |
25 | <view class='xin' style="width:28rpx;height:28rpx;font-size: 0;"> | 28 | <view class='xin' style="width:28rpx;height:28rpx;font-size: 0;"> |
26 | <image src="../../static/xin.png" mode=""></image> | 29 | <image src="../../static/xin.png" mode=""></image> |
27 | </view> | 30 | </view> |
28 | 关注 | 31 | 关注 |
29 | </view> | 32 | </view> |
30 | - <view class="text" @click="noattention(item,index)" v-else>已关注</view> | 33 | + <view class="text" @click.stop="noattention(item,index)" v-else>已关注</view> |
31 | </view> | 34 | </view> |
32 | 35 | ||
33 | </view> | 36 | </view> |
34 | </view> | 37 | </view> |
35 | - <view class="nodata" v-if="historylist.length==0">暂无数据</view> | 38 | + |
39 | + </view> | ||
36 | 40 | ||
37 | 41 | ||
38 | </view> | 42 | </view> |
39 | 43 | ||
40 | <!-- 我的收藏 --> | 44 | <!-- 我的收藏 --> |
41 | <view class="cellectBox" v-else> | 45 | <view class="cellectBox" v-else> |
46 | + | ||
47 | + <view class="nodata" v-if="cellectlist.length==0">暂无数据</view> | ||
48 | + | ||
49 | + <view v-else> | ||
42 | <view class="liulan"> | 50 | <view class="liulan"> |
43 | <view class="liulantitle">我的收藏</view> | 51 | <view class="liulantitle">我的收藏</view> |
44 | - <view class="del" @click="change2" v-if="isdel">完成</view> | ||
45 | - <view class="del" @click="change" v-else>编辑</view> | 52 | + <!-- <view class="del" @click="change2" v-if="isdel">完成</view> |
53 | + <view class="del" @click="change" v-else>编辑</view> --> | ||
46 | </view> | 54 | </view> |
47 | - <view class="mateitem" v-for="(item,index) in cellectlist" :key="index"> | ||
48 | - <image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel"></image> | 55 | + <view class="mateitem" v-for="(item,index) in cellectlist" :key="index" @click="toarticl" :data-id="item.id"> |
56 | + <image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel" @click.stop="delarcial(item,index)"></image> | ||
49 | <view class="contentBox" :style="{width:width}"> | 57 | <view class="contentBox" :style="{width:width}"> |
50 | - <image class="photo" :src="item.head_img"></image> | 58 | + |
59 | + <image class="photo" :src="item.head_image" style="border-radius: 50%;"></image> | ||
51 | <view class="cont"> | 60 | <view class="cont"> |
52 | <view class="title">{{item.nickname}}</view> | 61 | <view class="title">{{item.nickname}}</view> |
53 | <view class="fen">{{item.title}}</view> | 62 | <view class="fen">{{item.title}}</view> |
54 | <view class="txt">{{item.content}}</view> | 63 | <view class="txt">{{item.content}}</view> |
55 | </view> | 64 | </view> |
56 | <view class="right" :class="item.is_like_user==0?'like':''"> | 65 | <view class="right" :class="item.is_like_user==0?'like':''"> |
57 | - <view class="text" @click="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;"> | 66 | + <view class="text" @click.stop="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;"> |
58 | <view class='xin' style="width:28rpx;height:28rpx;font-size: 0;"> | 67 | <view class='xin' style="width:28rpx;height:28rpx;font-size: 0;"> |
59 | <image src="../../static/xin.png" mode=""></image> | 68 | <image src="../../static/xin.png" mode=""></image> |
60 | </view> | 69 | </view> |
61 | 关注 | 70 | 关注 |
62 | </view> | 71 | </view> |
63 | - <view class="text" @click="noattention(item,index)" v-else>已关注</view> | 72 | + <view class="text" @click.stop="noattention(item,index)" v-else>已关注</view> |
64 | </view> | 73 | </view> |
65 | 74 | ||
66 | </view> | 75 | </view> |
67 | 76 | ||
68 | </view> | 77 | </view> |
69 | - <view class="nodata" v-if="cellectlist.length==0">暂无数据</view> | 78 | + |
79 | + | ||
80 | + </view> | ||
70 | 81 | ||
71 | </view> | 82 | </view> |
72 | </view> | 83 | </view> |
73 | </template> | 84 | </template> |
74 | 85 | ||
75 | <script> | 86 | <script> |
76 | -import app from "../../App.vue"; | ||
77 | -export default { | ||
78 | - data(){ | ||
79 | - return{ | ||
80 | - active1:true, | ||
81 | - active2:false, | ||
82 | - isHistoryShow:true, | ||
83 | - isdel:false, | ||
84 | - width:"660rpx", | ||
85 | - page:1, | ||
86 | - size:10, | ||
87 | - cellectlist:[], | ||
88 | - historylist:[] | 87 | + import app from "../../App.vue"; |
88 | + export default { | ||
89 | + data() { | ||
90 | + return { | ||
91 | + active1: true, | ||
92 | + active2: false, | ||
93 | + isHistoryShow: true, | ||
94 | + isdel: false, | ||
95 | + width: "660rpx", | ||
96 | + historypage: 1, | ||
97 | + collectpage: 1, | ||
98 | + page: 1, | ||
99 | + size: 10, | ||
100 | + cellectlist: [], | ||
101 | + historylist: [] | ||
102 | + } | ||
103 | + }, | ||
104 | + methods: { | ||
105 | + toarticl(e) { | ||
106 | + var id = e.currentTarget.dataset.id | ||
107 | + uni.navigateTo({ | ||
108 | + url: '../school/article?article_id=' + id | ||
109 | + }) | ||
110 | + }, | ||
111 | + // | ||
112 | + delarcial(item, index) { | ||
113 | + var that = this | ||
114 | + uni.showModal({ | ||
115 | + title: '提示', | ||
116 | + content: '是否删除该收藏', | ||
117 | + success: function(res) { | ||
118 | + if (res.confirm) { | ||
119 | + var url = "article/delArticle" | ||
120 | + var params = { | ||
121 | + token: uni.getStorageSync('token'), | ||
122 | + article_id: item.id | ||
89 | } | 123 | } |
124 | + app.post(url, params, "post").then((res) => { | ||
125 | + console.log(res) | ||
126 | + that.cellectlist.splice(index, 1); | ||
127 | + | ||
128 | + uni.showToast({ | ||
129 | + title: '删除成功', | ||
130 | + icon: 'none' | ||
131 | + }) | ||
132 | + }).catch((err) => { | ||
133 | + console.log(err) | ||
134 | + uni.showToast({ | ||
135 | + title:err.msg, | ||
136 | + icon:'none' | ||
137 | + }) | ||
138 | + }) | ||
139 | + } else if (res.cancel) { | ||
140 | + console.log('用户点击取消'); | ||
141 | + } | ||
142 | + } | ||
143 | + }); | ||
144 | + | ||
90 | }, | 145 | }, |
91 | - methods:{ | 146 | + |
92 | // 关注和取消关注 | 147 | // 关注和取消关注 |
93 | attention(item, index) { | 148 | attention(item, index) { |
94 | var that = this | 149 | var that = this |
@@ -139,116 +194,181 @@ export default { | @@ -139,116 +194,181 @@ export default { | ||
139 | }) | 194 | }) |
140 | 195 | ||
141 | }, | 196 | }, |
142 | - historyShow(){ | ||
143 | - this.active1=true, | ||
144 | - this.active2=false, | ||
145 | - this.isHistoryShow=true | 197 | + historyShow() { |
198 | + this.active1 = true; | ||
199 | + this.active2 = false; | ||
200 | + this.isHistoryShow = true; | ||
201 | + this.historypage = 1; | ||
202 | + this.historylist = []; | ||
203 | + this.gethistory() | ||
146 | }, | 204 | }, |
147 | - cellectShow(){ | ||
148 | - this.isHistoryShow=false, | ||
149 | - this.active2=true, | ||
150 | - this.active1=false | 205 | + cellectShow() { |
206 | + this.isHistoryShow = false; | ||
207 | + this.active2 = true; | ||
208 | + this.active1 = false; | ||
209 | + this.collectpage = 1; | ||
210 | + this.cellectlist = []; | ||
211 | + this.getMyCellect() | ||
151 | }, | 212 | }, |
152 | - change(){ | ||
153 | - this.isdel=true | ||
154 | - this.width="620rpx" | 213 | + change() { |
214 | + this.isdel = true | ||
215 | + this.width = "620rpx" | ||
155 | 216 | ||
156 | }, | 217 | }, |
157 | - change2(){ | ||
158 | - this.isdel=false | ||
159 | - this.width="660rpx" | 218 | + change2() { |
219 | + this.isdel = false | ||
220 | + this.width = "660rpx" | ||
160 | }, | 221 | }, |
161 | - getMyCellect(){ | 222 | + getMyCellect() { |
162 | var that = this | 223 | var that = this |
163 | var url = "article/getMyLikeArticle" | 224 | var url = "article/getMyLikeArticle" |
164 | var token = uni.getStorageSync('token') | 225 | var token = uni.getStorageSync('token') |
165 | var params = { | 226 | var params = { |
166 | - token:token, | ||
167 | - page:that.page, | ||
168 | - size:that.size | 227 | + token: token, |
228 | + page: that.collectpage, | ||
229 | + size: that.size | ||
169 | } | 230 | } |
170 | - app.post(url,params,"get").then((res)=>{ | 231 | + app.post(url, params, "get").then((res) => { |
171 | console.log(res) | 232 | console.log(res) |
172 | - that.cellectlist=res | ||
173 | - }).catch((err)=>{ | 233 | + that.cellectlist = that.cellectlist.concat(res) |
234 | + }).catch((err) => { | ||
174 | console.log(err) | 235 | console.log(err) |
175 | }) | 236 | }) |
176 | }, | 237 | }, |
177 | - gethistory(){ | 238 | + gethistory() { |
178 | var that = this | 239 | var that = this |
179 | var url = "article/getLookArticleList" | 240 | var url = "article/getLookArticleList" |
180 | var token = uni.getStorageSync('token') | 241 | var token = uni.getStorageSync('token') |
181 | var params = { | 242 | var params = { |
182 | - token:token, | ||
183 | - page:that.page, | ||
184 | - size:that.size | 243 | + token: token, |
244 | + page: that.historypage, | ||
245 | + size: that.size | ||
185 | } | 246 | } |
186 | - app.post(url,params,"get").then((res)=>{ | 247 | + app.post(url, params, "get").then((res) => { |
187 | console.log(res) | 248 | console.log(res) |
188 | - that.historylist=res | ||
189 | - }).catch((err)=>{ | 249 | + that.historylist = that.historylist.concat(res) |
250 | + }).catch((err) => { | ||
190 | console.log(err) | 251 | console.log(err) |
191 | }) | 252 | }) |
253 | + }, | ||
254 | + delhistory() { | ||
255 | + var that = this; | ||
256 | + uni.showModal({ | ||
257 | + title: '提示', | ||
258 | + content: '是否清空浏览记录', | ||
259 | + success: function(res) { | ||
260 | + if (res.confirm) { | ||
261 | + var url = "article/delLookArticle" | ||
262 | + var token = uni.getStorageSync('token') | ||
263 | + var params = { | ||
264 | + token: token | ||
265 | + } | ||
266 | + app.post(url, params, "post").then((res) => { | ||
267 | + that.historylist = res | ||
268 | + console.log(res) | ||
269 | + uni.showToast({ | ||
270 | + title: '浏览记录已清空', | ||
271 | + icon:"none" | ||
272 | + }) | ||
273 | + this.historypage=1; | ||
274 | + this.historylist=[]; | ||
275 | + this.gethistory() | ||
276 | + | ||
277 | + }).catch((err) => { | ||
278 | + console.log(err) | ||
279 | + }) | ||
280 | + } else if (res.cancel) { | ||
281 | + console.log('用户点击取消'); | ||
282 | + } | ||
192 | } | 283 | } |
284 | + }); | ||
285 | + | ||
193 | }, | 286 | }, |
194 | - onLoad(){ | ||
195 | - this.getMyCellect() | 287 | + |
288 | + | ||
289 | + }, | ||
290 | + onLoad() { | ||
291 | + this.gethistory() | ||
292 | + }, | ||
293 | + onReachBottom() { | ||
294 | + if (this.active1 == true) { | ||
295 | + let newpage = this.historypage; | ||
296 | + newpage++; | ||
297 | + this.historypage = newpage | ||
298 | + this.gethistory(); | ||
299 | + } else if (this.active2 == true) { | ||
300 | + let newpage = this.collectpage; | ||
301 | + this.collectpage = newpage; | ||
302 | + newpage++; | ||
303 | + this.getMyCellect(); | ||
304 | + } | ||
305 | + | ||
196 | } | 306 | } |
197 | 307 | ||
198 | -} | 308 | + } |
199 | </script> | 309 | </script> |
200 | 310 | ||
201 | <style lang="less"> | 311 | <style lang="less"> |
202 | -.content{ | 312 | + .content { |
313 | + | ||
203 | // background-color: #F9F9F9; | 314 | // background-color: #F9F9F9; |
204 | - .nodata{ | 315 | + .nodata { |
205 | font-size: 28rpx; | 316 | font-size: 28rpx; |
206 | text-align: center; | 317 | text-align: center; |
207 | } | 318 | } |
208 | - .title{ | 319 | + |
320 | + .title { | ||
209 | background-color: #fff; | 321 | background-color: #fff; |
210 | display: flex; | 322 | display: flex; |
211 | - .history,.cellect{ | 323 | + |
324 | + .history, | ||
325 | + .cellect { | ||
212 | width: 50%; | 326 | width: 50%; |
213 | text-align: center; | 327 | text-align: center; |
214 | - font-size:28rpx; | 328 | + font-size: 28rpx; |
215 | padding: 24rpx 0; | 329 | padding: 24rpx 0; |
216 | } | 330 | } |
217 | - .active{ | 331 | + |
332 | + .active { | ||
218 | background: url("../../static/xuanzhong_icon@2x.png") no-repeat; | 333 | background: url("../../static/xuanzhong_icon@2x.png") no-repeat; |
219 | background-size: 60rpx 12rpx; | 334 | background-size: 60rpx 12rpx; |
220 | background-position: 156rpx 70rpx; | 335 | background-position: 156rpx 70rpx; |
221 | - color: rgba(5,132,157,1); | 336 | + color: rgba(5, 132, 157, 1); |
222 | } | 337 | } |
223 | } | 338 | } |
224 | - .liulan{ | 339 | + |
340 | + .liulan { | ||
225 | display: flex; | 341 | display: flex; |
226 | - font-size:32rpx; | 342 | + font-size: 32rpx; |
227 | width: 686rpx; | 343 | width: 686rpx; |
228 | margin: 0 auto; | 344 | margin: 0 auto; |
229 | justify-content: space-between; | 345 | justify-content: space-between; |
230 | padding: 30rpx 0; | 346 | padding: 30rpx 0; |
231 | - .liulantitle{ | ||
232 | - color:rgba(45,85,117,1); | 347 | + |
348 | + .liulantitle { | ||
349 | + color: rgba(45, 85, 117, 1); | ||
233 | } | 350 | } |
234 | - .del{ | ||
235 | - font-size:24rpx; | 351 | + |
352 | + .del { | ||
353 | + font-size: 24rpx; | ||
236 | } | 354 | } |
237 | } | 355 | } |
238 | - .mateitem{ | 356 | + |
357 | + .mateitem { | ||
239 | display: flex; | 358 | display: flex; |
240 | align-items: center; | 359 | align-items: center; |
241 | - width:686rpx; | 360 | + width: 686rpx; |
242 | // height:172rpx; | 361 | // height:172rpx; |
243 | - background:rgba(255,255,255,1); | ||
244 | - opacity:1; | ||
245 | - border-radius:20rpx; | 362 | + background: rgba(255, 255, 255, 1); |
363 | + opacity: 1; | ||
364 | + border-radius: 20rpx; | ||
246 | margin: 0 auto; | 365 | margin: 0 auto; |
247 | background-color: #fff; | 366 | background-color: #fff; |
248 | padding: 24rpx 0; | 367 | padding: 24rpx 0; |
249 | // box-sizing: border-box; | 368 | // box-sizing: border-box; |
250 | margin-bottom: 24rpx; | 369 | margin-bottom: 24rpx; |
251 | - .delBtn{ | 370 | + |
371 | + .delBtn { | ||
252 | width: 28rpx; | 372 | width: 28rpx; |
253 | height: 28rpx; | 373 | height: 28rpx; |
254 | // position: absolute; | 374 | // position: absolute; |
@@ -257,55 +377,61 @@ export default { | @@ -257,55 +377,61 @@ export default { | ||
257 | // left: 28rpx; | 377 | // left: 28rpx; |
258 | margin-left: 26rpx; | 378 | margin-left: 26rpx; |
259 | } | 379 | } |
260 | - .contentBox{ | 380 | + |
381 | + .contentBox { | ||
261 | display: flex; | 382 | display: flex; |
262 | // align-items: center; | 383 | // align-items: center; |
263 | position: relative; | 384 | position: relative; |
264 | flex-wrap: wrap; | 385 | flex-wrap: wrap; |
265 | margin-left: 26rpx; | 386 | margin-left: 26rpx; |
266 | width: 660rpx; | 387 | width: 660rpx; |
267 | - .photo{ | 388 | + |
389 | + .photo { | ||
268 | width: 68rpx; | 390 | width: 68rpx; |
269 | height: 68rpx; | 391 | height: 68rpx; |
270 | margin-right: 26rpx; | 392 | margin-right: 26rpx; |
271 | margin-top: 6rpx; | 393 | margin-top: 6rpx; |
272 | } | 394 | } |
273 | - .cont{ | ||
274 | - .title{ | ||
275 | - color:rgba(61,68,77,1); | 395 | + |
396 | + .cont { | ||
397 | + .title { | ||
398 | + color: rgba(61, 68, 77, 1); | ||
276 | font-size: 24rpx; | 399 | font-size: 24rpx; |
277 | } | 400 | } |
278 | 401 | ||
279 | - .fen{ | 402 | + .fen { |
280 | font-size: 24rpx; | 403 | font-size: 24rpx; |
281 | - color:rgba(140,145,152,1); | 404 | + color: rgba(140, 145, 152, 1); |
282 | margin-top: 4rpx; | 405 | margin-top: 4rpx; |
283 | } | 406 | } |
284 | } | 407 | } |
285 | - .right{ | ||
286 | - width:118rpx; | ||
287 | - height:44rpx; | ||
288 | - border:2rpx solid rgba(189,196,206,1); | ||
289 | - opacity:1; | ||
290 | - border-radius:40rpx; | 408 | + |
409 | + .right { | ||
410 | + width: 118rpx; | ||
411 | + height: 44rpx; | ||
412 | + border: 2rpx solid rgba(189, 196, 206, 1); | ||
413 | + opacity: 1; | ||
414 | + border-radius: 40rpx; | ||
291 | position: absolute; | 415 | position: absolute; |
292 | right: 26rpx; | 416 | right: 26rpx; |
293 | top: 32rpx; | 417 | top: 32rpx; |
294 | - .text{ | ||
295 | - color:rgba(189,196,206,1); | 418 | + |
419 | + .text { | ||
420 | + color: rgba(189, 196, 206, 1); | ||
296 | text-align: center; | 421 | text-align: center; |
297 | line-height: 44rpx; | 422 | line-height: 44rpx; |
298 | - font-size:24rpx; | 423 | + font-size: 24rpx; |
299 | } | 424 | } |
300 | } | 425 | } |
301 | - .txt{ | 426 | + |
427 | + .txt { | ||
302 | // width: 600rpx; | 428 | // width: 600rpx; |
303 | - font-size:28rpx; | 429 | + font-size: 28rpx; |
304 | margin-top: 24rpx; | 430 | margin-top: 24rpx; |
305 | } | 431 | } |
306 | } | 432 | } |
307 | 433 | ||
308 | 434 | ||
309 | } | 435 | } |
310 | -} | 436 | + } |
311 | </style> | 437 | </style> |
@@ -5,7 +5,11 @@ | @@ -5,7 +5,11 @@ | ||
5 | <view class="history" :class="{active:active1}" @click="historyShow">浏览历史</view> | 5 | <view class="history" :class="{active:active1}" @click="historyShow">浏览历史</view> |
6 | <view class="cellect" :class="{active:active2}" @click="cellectShow">我的收藏</view> | 6 | <view class="cellect" :class="{active:active2}" @click="cellectShow">我的收藏</view> |
7 | </view> | 7 | </view> |
8 | + | ||
9 | + | ||
8 | <view class="mineBox" v-if="isMineShow==true&&isHistoryShow==false"> | 10 | <view class="mineBox" v-if="isMineShow==true&&isHistoryShow==false"> |
11 | + <view class="nodata" v-if="articlelist.length==0">暂无数据</view> | ||
12 | + <view v-else> | ||
9 | <view class="minetop"> | 13 | <view class="minetop"> |
10 | <view class="mineTitle">我的发布</view> | 14 | <view class="mineTitle">我的发布</view> |
11 | <view class="del" @click="edit" v-if="isedit==false">编辑</view> | 15 | <view class="del" @click="edit" v-if="isedit==false">编辑</view> |
@@ -20,9 +24,18 @@ | @@ -20,9 +24,18 @@ | ||
20 | <view class="rowThree">{{item.des_content}}</view> | 24 | <view class="rowThree">{{item.des_content}}</view> |
21 | </view> | 25 | </view> |
22 | </view> | 26 | </view> |
23 | - <view class="nodata" v-if="articlelist.length==0">暂无数据</view> | ||
24 | </view> | 27 | </view> |
28 | + | ||
29 | + | ||
30 | + </view> | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
25 | <view class="historyBox" v-if="isHistoryShow==true&&isMineShow==false"> | 36 | <view class="historyBox" v-if="isHistoryShow==true&&isMineShow==false"> |
37 | + <view class="nodata" v-if="historylist.length==0">暂无消息</view> | ||
38 | + <view v-else> | ||
26 | <view class="liulan"> | 39 | <view class="liulan"> |
27 | <view class="liulantitle">浏览历史</view> | 40 | <view class="liulantitle">浏览历史</view> |
28 | <view class="del" @click="delhistory">清空</view> | 41 | <view class="del" @click="delhistory">清空</view> |
@@ -49,14 +62,19 @@ | @@ -49,14 +62,19 @@ | ||
49 | 62 | ||
50 | </view> | 63 | </view> |
51 | </view> | 64 | </view> |
52 | - <view class="nodata" v-if="historylist.length==0">暂无消息</view> | 65 | + </view> |
53 | 66 | ||
54 | </view> | 67 | </view> |
68 | + | ||
69 | + | ||
70 | + | ||
71 | + <view class="nodata" v-if="cellectlist.length==0">暂无数据</view> | ||
72 | + <view v-else> | ||
55 | <view class="cellcetBox" v-if="isHistoryShow==false&&isMineShow==false"> | 73 | <view class="cellcetBox" v-if="isHistoryShow==false&&isMineShow==false"> |
56 | <view class="liulan"> | 74 | <view class="liulan"> |
57 | <view class="liulantitle">我的收藏</view> | 75 | <view class="liulantitle">我的收藏</view> |
58 | - <view class="del" @click="change2" v-if="isdel">完成</view> | ||
59 | - <view class="del" @click="change" v-else>编辑</view> | 76 | + <!-- <view class="del" @click="change2" v-if="isdel">完成</view> |
77 | + <view class="del" @click="change" v-else>编辑</view> --> | ||
60 | </view> | 78 | </view> |
61 | <view class="mateitem" v-for="(item,index) in cellectlist" :key="index" @click="toarticl" :data-id="item.id"> | 79 | <view class="mateitem" v-for="(item,index) in cellectlist" :key="index" @click="toarticl" :data-id="item.id"> |
62 | <image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel" @click.stop="delarcial(item,index)"></image> | 80 | <image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel" @click.stop="delarcial(item,index)"></image> |
@@ -80,10 +98,11 @@ | @@ -80,10 +98,11 @@ | ||
80 | 98 | ||
81 | </view> | 99 | </view> |
82 | </view> | 100 | </view> |
83 | - <view class="nodata" v-if="cellectlist.length==0">暂无数据</view> | ||
84 | 101 | ||
85 | </view> | 102 | </view> |
86 | </view> | 103 | </view> |
104 | + | ||
105 | + </view> | ||
87 | </template> | 106 | </template> |
88 | 107 | ||
89 | <script> | 108 | <script> |
@@ -232,7 +251,7 @@ | @@ -232,7 +251,7 @@ | ||
232 | } | 251 | } |
233 | app.post(url, params, "get").then((res) => { | 252 | app.post(url, params, "get").then((res) => { |
234 | console.log(res) | 253 | console.log(res) |
235 | - that.historylist = res | 254 | + that.historylist = that.historylist.concat(res) |
236 | console.log(res) | 255 | console.log(res) |
237 | }).catch((err) => { | 256 | }).catch((err) => { |
238 | console.log(err) | 257 | console.log(err) |
@@ -243,7 +262,7 @@ | @@ -243,7 +262,7 @@ | ||
243 | uni.showModal({ | 262 | uni.showModal({ |
244 | title: '提示', | 263 | title: '提示', |
245 | content: '是否清空浏览记录', | 264 | content: '是否清空浏览记录', |
246 | - success: function (res) { | 265 | + success: function(res) { |
247 | if (res.confirm) { | 266 | if (res.confirm) { |
248 | var url = "article/delLookArticle" | 267 | var url = "article/delLookArticle" |
249 | var token = uni.getStorageSync('token') | 268 | var token = uni.getStorageSync('token') |
@@ -266,6 +285,9 @@ | @@ -266,6 +285,9 @@ | ||
266 | }); | 285 | }); |
267 | 286 | ||
268 | }, | 287 | }, |
288 | + | ||
289 | + | ||
290 | + | ||
269 | getMyCellect() { | 291 | getMyCellect() { |
270 | var that = this | 292 | var that = this |
271 | var url = "article/getMyLikeArticle" | 293 | var url = "article/getMyLikeArticle" |
@@ -293,7 +315,7 @@ | @@ -293,7 +315,7 @@ | ||
293 | uni.showModal({ | 315 | uni.showModal({ |
294 | title: '提示', | 316 | title: '提示', |
295 | content: '是否删除该发布', | 317 | content: '是否删除该发布', |
296 | - success: function (res) { | 318 | + success: function(res) { |
297 | if (res.confirm) { | 319 | if (res.confirm) { |
298 | var url = "article/delArticle" | 320 | var url = "article/delArticle" |
299 | var params = { | 321 | var params = { |
@@ -303,9 +325,9 @@ | @@ -303,9 +325,9 @@ | ||
303 | app.post(url, params, "post").then((res) => { | 325 | app.post(url, params, "post").then((res) => { |
304 | console.log(res) | 326 | console.log(res) |
305 | console.log(that.active3) | 327 | console.log(that.active3) |
306 | - if(that.active3==true){ | 328 | + if (that.active3 == true) { |
307 | that.articlelist.splice(index, 1) | 329 | that.articlelist.splice(index, 1) |
308 | - }else if(that.active2==true){ | 330 | + } else if (that.active2 == true) { |
309 | that.cellectlist.splice(index, 1) | 331 | that.cellectlist.splice(index, 1) |
310 | } | 332 | } |
311 | uni.showToast({ | 333 | uni.showToast({ |
@@ -491,6 +513,7 @@ | @@ -491,6 +513,7 @@ | ||
491 | } | 513 | } |
492 | 514 | ||
493 | .cont { | 515 | .cont { |
516 | + width:500rpx; | ||
494 | .title { | 517 | .title { |
495 | color: rgba(61, 68, 77, 1); | 518 | color: rgba(61, 68, 77, 1); |
496 | font-size: 24rpx; | 519 | font-size: 24rpx; |
@@ -506,7 +529,7 @@ | @@ -506,7 +529,7 @@ | ||
506 | .right { | 529 | .right { |
507 | width: 118rpx; | 530 | width: 118rpx; |
508 | height: 44rpx; | 531 | height: 44rpx; |
509 | - border: 2rpx solid rgba(189, 196, 206, 1); | 532 | + border: 2rpx solid #81C3BF; |
510 | opacity: 1; | 533 | opacity: 1; |
511 | border-radius: 40rpx; | 534 | border-radius: 40rpx; |
512 | position: absolute; | 535 | position: absolute; |
@@ -529,6 +552,11 @@ | @@ -529,6 +552,11 @@ | ||
529 | // width: 600rpx; | 552 | // width: 600rpx; |
530 | font-size: 28rpx; | 553 | font-size: 28rpx; |
531 | margin-top: 24rpx; | 554 | margin-top: 24rpx; |
555 | + height:auto; | ||
556 | + display: -webkit-box; | ||
557 | + -webkit-box-orient: vertical; | ||
558 | + -webkit-line-clamp: 3; | ||
559 | + overflow: hidden; | ||
532 | } | 560 | } |
533 | } | 561 | } |
534 | 562 |
@@ -34,13 +34,13 @@ | @@ -34,13 +34,13 @@ | ||
34 | </view> | 34 | </view> |
35 | <!-- <tab></tab> --> | 35 | <!-- <tab></tab> --> |
36 | <view class="collegefooter" v-if="type == 2"> | 36 | <view class="collegefooter" v-if="type == 2"> |
37 | - <view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+2"> | 37 | + <view class="teacherfootitem" @click="footerselChange" :data-id="2" data-jump="1" :data-url="'/pages/schoolmate/schoolmate?type='+2"> |
38 | <view class="teacherfootitemtop"> | 38 | <view class="teacherfootitemtop"> |
39 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> | 39 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> |
40 | </view> | 40 | </view> |
41 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> | 41 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> |
42 | </view> | 42 | </view> |
43 | - <view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/homePage?type='+2"> | 43 | + <view class="teacherfootitem" @click="footerselChange" :data-id="3" > |
44 | <view class="teacherfootitemtop"> | 44 | <view class="teacherfootitemtop"> |
45 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> | 45 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> |
46 | </view> | 46 | </view> |
@@ -88,8 +88,9 @@ methods:{ | @@ -88,8 +88,9 @@ methods:{ | ||
88 | // 底部导航跳转 | 88 | // 底部导航跳转 |
89 | footerselChange(e){ | 89 | footerselChange(e){ |
90 | let url=e.currentTarget.dataset.url; | 90 | let url=e.currentTarget.dataset.url; |
91 | - console.log(url) | ||
92 | - uni.redirectTo({ | 91 | + |
92 | + | ||
93 | + uni.reLaunch({ | ||
93 | 94 | ||
94 | url:url | 95 | url:url |
95 | }) | 96 | }) |
@@ -136,8 +136,8 @@ methods:{ | @@ -136,8 +136,8 @@ methods:{ | ||
136 | that.image = tempFilePaths[0]; | 136 | that.image = tempFilePaths[0]; |
137 | app.upload('image',res.tempFilePaths[0],"post").then((res)=>{ | 137 | app.upload('image',res.tempFilePaths[0],"post").then((res)=>{ |
138 | // let newimage=that.image | 138 | // let newimage=that.image |
139 | - that.image=app.globalData.imageBaseUrl+res.url | ||
140 | - that.image2=res.url | 139 | + that.image=app.globalData.imageBaseUrl+res.kurl |
140 | + that.image2=res.kurl | ||
141 | console.log(res) | 141 | console.log(res) |
142 | console.log(that.image) | 142 | console.log(that.image) |
143 | console.log(res.url) | 143 | console.log(res.url) |
@@ -89,8 +89,8 @@ export default { | @@ -89,8 +89,8 @@ export default { | ||
89 | console.log(res) | 89 | console.log(res) |
90 | var date=new Date(); | 90 | var date=new Date(); |
91 | var year=date.getFullYear(); | 91 | var year=date.getFullYear(); |
92 | - var month=date.getMonth()+1; | ||
93 | - var day=date.getDate(); | 92 | + var month=date.getMonth()+1<10?'0'+(date.getMonth()+1):date.getMonth()+1; |
93 | + var day=date.getDate()<10?'0'+(date.getDate()):date.getDate(); | ||
94 | var datek=year+'-'+month+'-'+day | 94 | var datek=year+'-'+month+'-'+day |
95 | let obj={} | 95 | let obj={} |
96 | if(that.user_id==that.usera_id){ | 96 | if(that.user_id==that.usera_id){ |
@@ -84,9 +84,10 @@ | @@ -84,9 +84,10 @@ | ||
84 | that.image = tempFilePaths[0]; | 84 | that.image = tempFilePaths[0]; |
85 | that.image2 = tempFilePaths[0]; | 85 | that.image2 = tempFilePaths[0]; |
86 | app.upload('image', res.tempFilePaths[0], "post").then((res) => { | 86 | app.upload('image', res.tempFilePaths[0], "post").then((res) => { |
87 | + console.log(res) | ||
87 | // let newimage=that.image | 88 | // let newimage=that.image |
88 | - that.image = app.globalData.imageBaseUrl + res.url | ||
89 | - that.image2 = res.url | 89 | + that.image = app.globalData.imageBaseUrl+kurl |
90 | + that.image2 = res.kurl | ||
90 | console.log(res) | 91 | console.log(res) |
91 | console.log(that.image) | 92 | console.log(that.image) |
92 | console.log(res.url) | 93 | console.log(res.url) |
@@ -109,7 +110,7 @@ | @@ -109,7 +110,7 @@ | ||
109 | var date = new Date(timestamp * 1000);//时间戳为10位需*1000, | 110 | var date = new Date(timestamp * 1000);//时间戳为10位需*1000, |
110 | var Y = date.getFullYear(); | 111 | var Y = date.getFullYear(); |
111 | var M = date.getMonth() + 1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1 | 112 | var M = date.getMonth() + 1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1 |
112 | - var D = date.getDate(); | 113 | + var D = date.getDate()<10?'0'+(date.getDate()):date.getDate(); |
113 | var h = date.getHours() + ':'; | 114 | var h = date.getHours() + ':'; |
114 | var m = date.getMinutes() + ':'; | 115 | var m = date.getMinutes() + ':'; |
115 | var s = date.getSeconds(); | 116 | var s = date.getSeconds(); |
@@ -3,7 +3,15 @@ | @@ -3,7 +3,15 @@ | ||
3 | <image class="bg" src="../../static/bg_img2.png"></image> | 3 | <image class="bg" src="../../static/bg_img2.png"></image> |
4 | <image class="photo" :src="token=='' ? '../../static/touxiang_img@2x.png' :head_image" style="border-radius:50%;"></image> | 4 | <image class="photo" :src="token=='' ? '../../static/touxiang_img@2x.png' :head_image" style="border-radius:50%;"></image> |
5 | <view class="title">{{userinfolist.nickname}}</view> | 5 | <view class="title">{{userinfolist.nickname}}</view> |
6 | + <view class="cardchang"> | ||
6 | <image class="banner" src="../../static/banner_img@2x.png" @click="toBuyCard"></image> | 7 | <image class="banner" src="../../static/banner_img@2x.png" @click="toBuyCard"></image> |
8 | + <view class="cardread"> | ||
9 | + <view class="buynow">立即购买畅读卡</view> | ||
10 | + <view class="readmany">畅读更多优秀文章</view> | ||
11 | + </view> | ||
12 | + | ||
13 | + </view> | ||
14 | + | ||
7 | <view class="item" @click="togeren"> | 15 | <view class="item" @click="togeren"> |
8 | <view class="name"> | 16 | <view class="name"> |
9 | <image class="icon" src="../../static/8_icon@2x.png"></image>个人信息 | 17 | <image class="icon" src="../../static/8_icon@2x.png"></image>个人信息 |
@@ -13,7 +21,7 @@ | @@ -13,7 +21,7 @@ | ||
13 | 21 | ||
14 | <view class="item" @click="tocellect"> | 22 | <view class="item" @click="tocellect"> |
15 | <view class="name"> | 23 | <view class="name"> |
16 | - <image class="icon" src="../../static/7_icon@2x.png"></image>我的文章 | 24 | + <image class="icon" src="../../static/7_icon@2x.png"></image>收藏文章 |
17 | </view> | 25 | </view> |
18 | <image class="right" src="../../static/dizhi_btn@2x.png"></image> | 26 | <image class="right" src="../../static/dizhi_btn@2x.png"></image> |
19 | </view> | 27 | </view> |
@@ -40,21 +48,21 @@ | @@ -40,21 +48,21 @@ | ||
40 | </view> | 48 | </view> |
41 | <!-- <tab></tab> --> | 49 | <!-- <tab></tab> --> |
42 | <!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> --> | 50 | <!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> --> |
43 | - <view class="teacherfooter"> | 51 | + <view class="teacherfooter" v-if="type==1"> |
44 | 52 | ||
45 | - <view class="teacherfootitem" v-if="type==1"> | ||
46 | - <view class="teacherfootitemtop" @click="footerselChange" :data-id="1" :data-url="'/pages/school/school?type='+1"> | 53 | + <view class="teacherfootitem" @click="jumpschool==true?footerselChange(1,'/pages/school/school?type=1'):''" :data-id="1" :data-url="'/pages/school/school?type='+1"> |
54 | + <view class="teacherfootitemtop" > | ||
47 | <image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image> | 55 | <image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image> |
48 | </view> | 56 | </view> |
49 | <view class="teacherfootname" :class="footersel==1?'selactive':''">学校</view> | 57 | <view class="teacherfootname" :class="footersel==1?'selactive':''">学校</view> |
50 | </view> | 58 | </view> |
51 | - <view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1"> | 59 | + <view class="teacherfootitem" @click="jumpschool==true?footerselChange(2,'/pages/schoolmate/schoolmate?type=1'):''" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1"> |
52 | <view class="teacherfootitemtop"> | 60 | <view class="teacherfootitemtop"> |
53 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> | 61 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> |
54 | </view> | 62 | </view> |
55 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> | 63 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> |
56 | </view> | 64 | </view> |
57 | - <view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1"> | 65 | + <view class="teacherfootitem" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1"> |
58 | <view class="teacherfootitemtop"> | 66 | <view class="teacherfootitemtop"> |
59 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> | 67 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> |
60 | </view> | 68 | </view> |
@@ -62,13 +70,13 @@ | @@ -62,13 +70,13 @@ | ||
62 | </view> | 70 | </view> |
63 | </view> | 71 | </view> |
64 | <view class="collegefooter" v-if="type == 2"> | 72 | <view class="collegefooter" v-if="type == 2"> |
65 | - <view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+2"> | 73 | + <view class="teacherfootitem" @click="jumpschoolk==true?footerselChangek(2,'/pages/schoolmate/schoolmate?type=2'):''" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+2"> |
66 | <view class="teacherfootitemtop"> | 74 | <view class="teacherfootitemtop"> |
67 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> | 75 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> |
68 | </view> | 76 | </view> |
69 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> | 77 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> |
70 | </view> | 78 | </view> |
71 | - <view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/collegeHome?type='+2"> | 79 | + <view class="teacherfootitem" :data-id="3" :data-url="'/pages/homePage/collegeHome?type='+2"> |
72 | <view class="teacherfootitemtop"> | 80 | <view class="teacherfootitemtop"> |
73 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> | 81 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> |
74 | </view> | 82 | </view> |
@@ -91,7 +99,9 @@ | @@ -91,7 +99,9 @@ | ||
91 | type:"", | 99 | type:"", |
92 | userinfolist:{}, | 100 | userinfolist:{}, |
93 | token:'', | 101 | token:'', |
94 | - head_image:'' | 102 | + head_image:'', |
103 | + jumpschool:true, | ||
104 | + jumpschoolk:true | ||
95 | } | 105 | } |
96 | }, | 106 | }, |
97 | methods: { | 107 | methods: { |
@@ -107,13 +117,21 @@ | @@ -107,13 +117,21 @@ | ||
107 | } | 117 | } |
108 | }, | 118 | }, |
109 | // 底部导航跳转 | 119 | // 底部导航跳转 |
110 | - footerselChange(e){ | ||
111 | - let url=e.currentTarget.dataset.url; | 120 | + footerselChange(id,url){ |
121 | + // let url=e.currentTarget.dataset.url; | ||
112 | console.log(url) | 122 | console.log(url) |
113 | uni.redirectTo({ | 123 | uni.redirectTo({ |
114 | 124 | ||
115 | url:url | 125 | url:url |
116 | }) | 126 | }) |
127 | + this.jumpschool=false | ||
128 | + }, | ||
129 | + footerselChangek(id,url){ | ||
130 | + uni.redirectTo({ | ||
131 | + | ||
132 | + url:url | ||
133 | + }) | ||
134 | + this.jumpschoolk=false | ||
117 | }, | 135 | }, |
118 | getuserinfo(){ | 136 | getuserinfo(){ |
119 | var that = this | 137 | var that = this |
@@ -234,6 +252,7 @@ | @@ -234,6 +252,7 @@ | ||
234 | 252 | ||
235 | <style lang="less"> | 253 | <style lang="less"> |
236 | 254 | ||
255 | + | ||
237 | .content { | 256 | .content { |
238 | text-align: center; | 257 | text-align: center; |
239 | color: rgba(6, 18, 30, 1); | 258 | color: rgba(6, 18, 30, 1); |
@@ -262,6 +281,25 @@ | @@ -262,6 +281,25 @@ | ||
262 | height: 216rpx; | 281 | height: 216rpx; |
263 | margin-bottom: 30rpx; | 282 | margin-bottom: 30rpx; |
264 | } | 283 | } |
284 | + .cardchang{ | ||
285 | + position: relative; | ||
286 | + } | ||
287 | + .buynow{ | ||
288 | + color:#fff; | ||
289 | + font-size: 28rpx; | ||
290 | + text-align: left; | ||
291 | + } | ||
292 | + .readmany{ | ||
293 | + color:#fff; | ||
294 | + font-size: 36rpx; | ||
295 | + text-align: left; | ||
296 | + font-weight: bold; | ||
297 | + } | ||
298 | + .cardread{ | ||
299 | + position: absolute; | ||
300 | + top:111rpx; | ||
301 | + left:72rpx; | ||
302 | + } | ||
265 | 303 | ||
266 | .item { | 304 | .item { |
267 | display: flex; | 305 | display: flex; |
@@ -9,10 +9,16 @@ | @@ -9,10 +9,16 @@ | ||
9 | <view class="time">{{item.createtime}}</view> | 9 | <view class="time">{{item.createtime}}</view> |
10 | </view> | 10 | </view> |
11 | </view> | 11 | </view> |
12 | - | 12 | + <view v-if="item.usera_id==user_id"> |
13 | + <view class="right" style="color:#BDC4CE">已读</view> | ||
14 | + </view> | ||
15 | + <view v-else> | ||
13 | <view class="right" v-if="item.readtime==null">未读</view> | 16 | <view class="right" v-if="item.readtime==null">未读</view> |
14 | <view class="right" style="color:#BDC4CE" v-else>已读</view> | 17 | <view class="right" style="color:#BDC4CE" v-else>已读</view> |
15 | </view> | 18 | </view> |
19 | + | ||
20 | + | ||
21 | + </view> | ||
16 | <view class="bottomrow"> | 22 | <view class="bottomrow"> |
17 | {{item.des_content}} | 23 | {{item.des_content}} |
18 | </view> | 24 | </view> |
@@ -94,7 +94,8 @@ export default { | @@ -94,7 +94,8 @@ export default { | ||
94 | console.log(e.target) | 94 | console.log(e.target) |
95 | this.type = e.target.value | 95 | this.type = e.target.value |
96 | console.log(e.currentTarget) | 96 | console.log(e.currentTarget) |
97 | - this.article_type_id=e.currentTarget.dataset.id | 97 | + this.article_type_id=this.typearray[e.target.value].id; |
98 | + console.log(this.article_type_id,999999) | ||
98 | }, | 99 | }, |
99 | upload(){ | 100 | upload(){ |
100 | var that = this; | 101 | var that = this; |
@@ -184,7 +185,7 @@ export default { | @@ -184,7 +185,7 @@ export default { | ||
184 | app.post(url,params,"post").then((res)=>{ | 185 | app.post(url,params,"post").then((res)=>{ |
185 | console.log(res) | 186 | console.log(res) |
186 | uni.showToast({ | 187 | uni.showToast({ |
187 | - title:"文章已发布,审核中", | 188 | + title:"发布成功", |
188 | icon:"none" | 189 | icon:"none" |
189 | }) | 190 | }) |
190 | setTimeout(() => { | 191 | setTimeout(() => { |
@@ -4,8 +4,8 @@ | @@ -4,8 +4,8 @@ | ||
4 | <view class="card"> | 4 | <view class="card"> |
5 | <view class="title">提现到微信余额(元)</view> | 5 | <view class="title">提现到微信余额(元)</view> |
6 | <!-- <view class="money">100.00</view> --> | 6 | <!-- <view class="money">100.00</view> --> |
7 | - <input type="text" v-model="money" class="money" placeholder="100.00" placeholder-style="padding-bottom: 10rpx;color:rgba(189,196,206,1);font-size: 80rpx;margin-top: 16rpx;border-bottom: 1rpx solid rgba(112,112,112,1);"> | ||
8 | - <view class="text">最多可提{{yue}}元,<text>全部提现</text></view> | 7 | + <input type="digit" v-model="money" class="money" placeholder-style="padding-bottom: 10rpx;color:rgba(189,196,206,1);font-size: 80rpx;margin-top: 16rpx;border-bottom: 1rpx solid rgba(112,112,112,1);"> |
8 | + <view class="text">最多可提{{yue}}元,<text @click="tixianall">全部提现</text></view> | ||
9 | <view class="btn" @click="tixian">提现</view> | 9 | <view class="btn" @click="tixian">提现</view> |
10 | </view> | 10 | </view> |
11 | <view class="textBox"> | 11 | <view class="textBox"> |
@@ -32,6 +32,12 @@ export default { | @@ -32,6 +32,12 @@ export default { | ||
32 | methods:{ | 32 | methods:{ |
33 | tixian(){ | 33 | tixian(){ |
34 | var that = this | 34 | var that = this |
35 | + if(that.money==0){ | ||
36 | + uni.showToast({ | ||
37 | + title:'提现金额不能为0', | ||
38 | + icon:'none' | ||
39 | + }) | ||
40 | + }else{ | ||
35 | if(that.money==''){ | 41 | if(that.money==''){ |
36 | uni.showToast({ | 42 | uni.showToast({ |
37 | title:"提现金额不能为空", | 43 | title:"提现金额不能为空", |
@@ -46,6 +52,7 @@ export default { | @@ -46,6 +52,7 @@ export default { | ||
46 | }) | 52 | }) |
47 | return false | 53 | return false |
48 | } | 54 | } |
55 | + | ||
49 | var url = "money/gotMoney" | 56 | var url = "money/gotMoney" |
50 | var token = uni.getStorageSync('token') | 57 | var token = uni.getStorageSync('token') |
51 | var params = { | 58 | var params = { |
@@ -54,6 +61,59 @@ export default { | @@ -54,6 +61,59 @@ export default { | ||
54 | } | 61 | } |
55 | app.post(url,params,"post").then((res)=>{ | 62 | app.post(url,params,"post").then((res)=>{ |
56 | console.log(res) | 63 | console.log(res) |
64 | + uni.showToast({ | ||
65 | + title:'提现成功', | ||
66 | + icon:'none' | ||
67 | + }) | ||
68 | + setTimeout(function(){ | ||
69 | + uni.navigateBack({ | ||
70 | + checked:true | ||
71 | + }) | ||
72 | + },1500) | ||
73 | + }).catch((err)=>{ | ||
74 | + console.log(err); | ||
75 | + uni.showToast({ | ||
76 | + title:err.msg, | ||
77 | + icon:'none', | ||
78 | + duration:2500 | ||
79 | + }) | ||
80 | + | ||
81 | + }) | ||
82 | + } | ||
83 | + | ||
84 | + }, | ||
85 | + // 全部提现 | ||
86 | + tixianall(){ | ||
87 | + let that=this; | ||
88 | + if(that.yue==0.00){ | ||
89 | + uni.showToast({ | ||
90 | + title:"余额为0,不能提现", | ||
91 | + icon:"none" | ||
92 | + }) | ||
93 | + }else{ | ||
94 | + uni.showModal({ | ||
95 | + title: '提示', | ||
96 | + content: '是否要全部提现', | ||
97 | + success: function (res) { | ||
98 | + if (res.confirm) { | ||
99 | + that.money=that.yue | ||
100 | + var url = "money/gotMoney" | ||
101 | + var token = uni.getStorageSync('token') | ||
102 | + var params = { | ||
103 | + token:token, | ||
104 | + money:that.yue | ||
105 | + } | ||
106 | + app.post(url,params,"post").then((res)=>{ | ||
107 | + console.log(res) | ||
108 | + uni.showToast({ | ||
109 | + title:'提现成功', | ||
110 | + icon:'none' | ||
111 | + }) | ||
112 | + setTimeout(function(){ | ||
113 | + uni.navigateBack({ | ||
114 | + checked:true | ||
115 | + }) | ||
116 | + },1500) | ||
57 | }).catch((err)=>{ | 117 | }).catch((err)=>{ |
58 | console.log(err); | 118 | console.log(err); |
59 | uni.showToast({ | 119 | uni.showToast({ |
@@ -61,10 +121,18 @@ export default { | @@ -61,10 +121,18 @@ export default { | ||
61 | icon:'none' | 121 | icon:'none' |
62 | }) | 122 | }) |
63 | }) | 123 | }) |
124 | + } else if (res.cancel) { | ||
125 | + console.log('用户点击取消'); | ||
126 | + } | ||
127 | + } | ||
128 | + }); | ||
129 | + } | ||
130 | + | ||
64 | } | 131 | } |
65 | }, | 132 | }, |
66 | onLoad(options){ | 133 | onLoad(options){ |
67 | - this.yue=options.money | 134 | + this.yue=options.money; |
135 | + this.money=options.money | ||
68 | } | 136 | } |
69 | 137 | ||
70 | } | 138 | } |
@@ -44,11 +44,32 @@ | @@ -44,11 +44,32 @@ | ||
44 | url:'../school/school' | 44 | url:'../school/school' |
45 | }) | 45 | }) |
46 | } | 46 | } |
47 | - this.get_code() | 47 | + this.get_code(); |
48 | + | ||
48 | }, | 49 | }, |
49 | methods: { | 50 | methods: { |
51 | + // 用code 换token | ||
52 | + code2Token(){ | ||
53 | + let that = this; | ||
54 | + uni.login({ | ||
55 | + success(res) { | ||
56 | + let url = 'common/codeToToken' | ||
57 | + app.post(url,{ | ||
58 | + code: res.code | ||
59 | + }).then(r=>{ | ||
60 | + console.log('code换取token',r) | ||
61 | + uni.setStorageSync("token",r.userInfo.token) | ||
62 | + | ||
63 | + // uni.setStorageSync('token',r.userInfo.token); | ||
64 | + // uni.setStorageSync('isRegister',r.userInfo.is_register); | ||
65 | + // that.isRegister = r.userInfo.is_register; | ||
66 | + }) | ||
67 | + } | ||
68 | + }) | ||
69 | + }, | ||
50 | // 获取个人信息 | 70 | // 获取个人信息 |
51 | getusermsg(){ | 71 | getusermsg(){ |
72 | + console.log('3743473734737487834') | ||
52 | 73 | ||
53 | var url = "student/getMyInfo" | 74 | var url = "student/getMyInfo" |
54 | var params={ | 75 | var params={ |
@@ -66,6 +87,7 @@ | @@ -66,6 +87,7 @@ | ||
66 | } | 87 | } |
67 | }).catch((err)=>{ | 88 | }).catch((err)=>{ |
68 | console.log(err) | 89 | console.log(err) |
90 | + uni.clearStorageSync() | ||
69 | wx.redirectTo({ | 91 | wx.redirectTo({ |
70 | url:'../school/school' | 92 | url:'../school/school' |
71 | }) | 93 | }) |
@@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
7 | </view> | 7 | </view> |
8 | <view class="searchBtn">搜索</view> | 8 | <view class="searchBtn">搜索</view> |
9 | </view> --> | 9 | </view> --> |
10 | + <view class="nodata" v-if="collegeList.length==0">暂无数据</view> | ||
10 | <view class="contentBox"> | 11 | <view class="contentBox"> |
11 | <view class="item" @click="tocollegepage(item)" v-for="(item,index) in collegeList" :key="index">{{item.name}}</view> | 12 | <view class="item" @click="tocollegepage(item)" v-for="(item,index) in collegeList" :key="index">{{item.name}}</view> |
12 | 13 | ||
@@ -42,7 +43,7 @@ methods:{ | @@ -42,7 +43,7 @@ methods:{ | ||
42 | let id = item.university_id | 43 | let id = item.university_id |
43 | let name = item.name | 44 | let name = item.name |
44 | uni.navigateTo({ | 45 | uni.navigateTo({ |
45 | - url:'./academyDetails?university_id='+id+'&name='+name | 46 | + url:'./academyDetails?university_id='+id+'&name='+name+'&college_id='+item.id |
46 | }) | 47 | }) |
47 | } | 48 | } |
48 | }, | 49 | }, |
1 | <template> | 1 | <template> |
2 | <view class="content"> | 2 | <view class="content"> |
3 | - <image class="background" :src="university.des_image=='http://school.t.brotop.cn'?'../../static/bg_img@2x.png':university.des_image"></image> | 3 | + <image class="background" :src="university.data.des_image==''?'../../static/bg_img@2x.png':university.des_image"></image> |
4 | 4 | ||
5 | <view class="titleBox"> | 5 | <view class="titleBox"> |
6 | <view class="title">{{university.name}}</view> | 6 | <view class="title">{{university.name}}</view> |
7 | <view class="eng">{{name}}</view> | 7 | <view class="eng">{{name}}</view> |
8 | </view> | 8 | </view> |
9 | <view class="table"> | 9 | <view class="table"> |
10 | - <navigator class="colum" hover-class="none" url="./highSchoolmate"> | ||
11 | - <view class="num">{{university.same_school_total_num}}</view> | 10 | + <view class="colum" @click="highschoollist"> |
11 | + <view class="num">{{university.total1}}</view> | ||
12 | <view class="title">高中校友</view> | 12 | <view class="title">高中校友</view> |
13 | - </navigator> | ||
14 | - <view class="colum" @click="popupShow"> | ||
15 | - <view class="num">{{university.same_city_total_num}}</view> | 13 | + </view> |
14 | + <view class="colum" @click="popupShow" data-type="1"> | ||
15 | + <view class="num">{{university.total3}}</view> | ||
16 | <view class="title">同城学长</view> | 16 | <view class="title">同城学长</view> |
17 | </view> | 17 | </view> |
18 | - <view class="colum" @click="popupShow"> | ||
19 | - <view class="num">{{university.same_province_total_num}}</view> | 18 | + <view class="colum" @click="popupShow" data-type=2> |
19 | + <view class="num">{{university.total2}}</view> | ||
20 | <view class="title">同省学长</view> | 20 | <view class="title">同省学长</view> |
21 | </view> | 21 | </view> |
22 | </view> | 22 | </view> |
@@ -36,8 +36,8 @@ | @@ -36,8 +36,8 @@ | ||
36 | </view> | 36 | </view> |
37 | <view class="nodata" v-if="articleList.length==0">暂无数据</view> | 37 | <view class="nodata" v-if="articleList.length==0">暂无数据</view> |
38 | <view class="articl" v-else> | 38 | <view class="articl" v-else> |
39 | - <block v-for="(item,index) in articleList" :key="index"> | ||
40 | - <view class="articltitle"> | 39 | + <view v-for="(item,index) in articleList" :key="index" style="border-bottom:1rpx solid #eee"> |
40 | + <view class="articltitle" > | ||
41 | <image class="photo" :src="item.head_image"></image> | 41 | <image class="photo" :src="item.head_image"></image> |
42 | <view class="msg"> | 42 | <view class="msg"> |
43 | <view class="name">{{item.nickname}}</view> | 43 | <view class="name">{{item.nickname}}</view> |
@@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
50 | <image :src="item" v-for="(item,index) in item.des_images" :key="index"></image> | 50 | <image :src="item" v-for="(item,index) in item.des_images" :key="index"></image> |
51 | <!-- <image src="../../static/bg_img@2x.png"></image> --> | 51 | <!-- <image src="../../static/bg_img@2x.png"></image> --> |
52 | </view> | 52 | </view> |
53 | - </block> | 53 | + </view> |
54 | 54 | ||
55 | 55 | ||
56 | </view> | 56 | </view> |
@@ -88,28 +88,71 @@ export default { | @@ -88,28 +88,71 @@ export default { | ||
88 | size:'10', | 88 | size:'10', |
89 | type_id:'', | 89 | type_id:'', |
90 | sel:0, | 90 | sel:0, |
91 | - isPopupShow:false | 91 | + isPopupShow:false, |
92 | + vip_level:'', | ||
93 | + college_id:'' | ||
92 | } | 94 | } |
93 | 95 | ||
94 | }, | 96 | }, |
95 | onLoad(options){ | 97 | onLoad(options){ |
98 | + console.log(348348934,options) | ||
96 | this.university_id=options.university_id | 99 | this.university_id=options.university_id |
97 | - this.name=options.name | 100 | + this.name=options.name; |
101 | + this.college_id=options.college_id | ||
98 | this.getschooldetails() | 102 | this.getschooldetails() |
99 | this.getarticletype() | 103 | this.getarticletype() |
100 | this.getAllArticle() | 104 | this.getAllArticle() |
105 | + this.getpersoninfo() | ||
101 | }, | 106 | }, |
102 | methods:{ | 107 | methods:{ |
103 | - popupShow(){ | 108 | + // 获取个人信息 |
109 | + getpersoninfo(){ | ||
110 | + let that = this; | ||
111 | + var url='student/getMyInfo'; | ||
112 | + var params={ | ||
113 | + | ||
114 | + } | ||
115 | + app.post(url,params,"get").then((res)=>{ | ||
116 | + console.log(res) | ||
117 | + this.vip_level=res.vip_level | ||
118 | + }).catch((err)=>{ | ||
119 | + console.log(err) | ||
120 | + }) | ||
121 | + }, | ||
122 | + highschoollist(){ | ||
123 | + uni.navigateTo({ | ||
124 | + url:'./highSchoolmate?schooltype='+1+'&university_id='+this.university_id+'&college_id='+this.college_id | ||
125 | + }) | ||
126 | + | ||
127 | + }, | ||
128 | + popupShow(e){ | ||
129 | + let type=e.currentTarget.dataset.type; | ||
130 | + if(type==1){ | ||
131 | + if(this.vip_level==1||this.vip_level==2){ | ||
132 | + uni.navigateTo({ | ||
133 | + url:"./highSchoolmate?schooltype="+2+'&university_id='+this.university_id+'&college_id='+this.college_id | ||
134 | + }) | ||
135 | + }else{ | ||
136 | + this.isPopupShow=true | ||
137 | + } | ||
138 | + }else if(type==2){ | ||
139 | + if(this.vip_level==2){ | ||
140 | + uni.navigateTo({ | ||
141 | + url:"./highSchoolmate?schooltype="+3+'&university_id='+this.university_id+'&college_id='+this.college_id | ||
142 | + }) | ||
143 | + | ||
144 | + }else{ | ||
104 | this.isPopupShow=true | 145 | this.isPopupShow=true |
146 | + } | ||
147 | + } | ||
105 | 148 | ||
106 | }, | 149 | }, |
107 | getschooldetails(){ | 150 | getschooldetails(){ |
108 | var token = uni.getStorageSync('token') | 151 | var token = uni.getStorageSync('token') |
109 | let that = this; | 152 | let that = this; |
110 | - var url='university/getUniversityInfo' | 153 | + var url='university/getCollegeDetail' |
111 | var params={ | 154 | var params={ |
112 | - university_id:that.university_id, | 155 | + college_id:that.college_id, |
113 | token:token | 156 | token:token |
114 | } | 157 | } |
115 | app.post(url,params,"get").then((res)=>{ | 158 | app.post(url,params,"get").then((res)=>{ |
@@ -137,6 +180,7 @@ export default { | @@ -137,6 +180,7 @@ export default { | ||
137 | var url="article/getArticleList" | 180 | var url="article/getArticleList" |
138 | var params = { | 181 | var params = { |
139 | university_id:that.university_id, | 182 | university_id:that.university_id, |
183 | + college_id:that.college_id, | ||
140 | page:that.page, | 184 | page:that.page, |
141 | size:that.size, | 185 | size:that.size, |
142 | type_id:that.type_id, | 186 | type_id:that.type_id, |
@@ -289,8 +333,10 @@ export default { | @@ -289,8 +333,10 @@ export default { | ||
289 | box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1); | 333 | box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1); |
290 | border-radius:20rpx; | 334 | border-radius:20rpx; |
291 | margin-bottom: 42rpx; | 335 | margin-bottom: 42rpx; |
336 | + padding-bottom: 32rpx; | ||
337 | + box-sizing: border-box; | ||
292 | .articltitle{ | 338 | .articltitle{ |
293 | - border-bottom: 1rpx solid rgba(238,238,238,1); | 339 | + // border-bottom: 1rpx solid rgba(238,238,238,1); |
294 | padding: 40rpx 0 26rpx 0; | 340 | padding: 40rpx 0 26rpx 0; |
295 | display: flex; | 341 | display: flex; |
296 | font-size: 24rpx; | 342 | font-size: 24rpx; |
@@ -55,6 +55,15 @@ export default { | @@ -55,6 +55,15 @@ export default { | ||
55 | that.articlelist=res | 55 | that.articlelist=res |
56 | }).catch((err)=>{ | 56 | }).catch((err)=>{ |
57 | console.log(err) | 57 | console.log(err) |
58 | + uni.showToast({ | ||
59 | + title:'文章已删除', | ||
60 | + icon:"none" | ||
61 | + }) | ||
62 | + setTimeout(function(){ | ||
63 | + uni.navigateBack({ | ||
64 | + checked:true | ||
65 | + }) | ||
66 | + },1500) | ||
58 | }) | 67 | }) |
59 | }, | 68 | }, |
60 | preimg(index){ | 69 | preimg(index){ |
1 | <template> | 1 | <template> |
2 | <view class="content"> | 2 | <view class="content"> |
3 | - | 3 | + <view class="nodata" v-if="hightmatelist.length==0">暂无数据</view> |
4 | + <view v-else> | ||
4 | <view class="item" v-for="(item,index) in hightmatelist" :key="index" @click="toacademypage(item)"> | 5 | <view class="item" v-for="(item,index) in hightmatelist" :key="index" @click="toacademypage(item)"> |
5 | - <image class="photo" :src="item.head_image"></image> | 6 | + <image class="photo" :src="item.head_image" style="border-radius:50%"></image> |
6 | <view class="cont"> | 7 | <view class="cont"> |
7 | <view class="title">{{item.nickname}}</view> | 8 | <view class="title">{{item.nickname}}</view> |
8 | <view class="academy"> | 9 | <view class="academy"> |
@@ -23,6 +24,11 @@ | @@ -23,6 +24,11 @@ | ||
23 | <view class="text"> <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注</view> | 24 | <view class="text"> <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注</view> |
24 | </view> | 25 | </view> |
25 | </view> | 26 | </view> |
27 | + | ||
28 | + | ||
29 | + </view> | ||
30 | + | ||
31 | + | ||
26 | </view> | 32 | </view> |
27 | </template> | 33 | </template> |
28 | 34 | ||
@@ -38,12 +44,18 @@ export default { | @@ -38,12 +44,18 @@ export default { | ||
38 | up_id:"", | 44 | up_id:"", |
39 | hightmatelist:[], | 45 | hightmatelist:[], |
40 | type:'', | 46 | type:'', |
41 | - schooltype:'' | 47 | + schooltype:'', |
48 | + college_id:'' | ||
42 | } | 49 | } |
43 | }, | 50 | }, |
44 | onLoad(options){ | 51 | onLoad(options){ |
45 | - this.schooltype=options.schooltype | ||
46 | - this.gethightmate() | 52 | + console.log('32348394893',options) |
53 | + this.schooltype=options.schooltype; | ||
54 | + this.university_id=options.university_id; | ||
55 | + if(options.college_id){ | ||
56 | + this.college_id=options.college_id; | ||
57 | + } | ||
58 | + this.gethightmate(); | ||
47 | }, | 59 | }, |
48 | methods:{ | 60 | methods:{ |
49 | gethightmate(){ | 61 | gethightmate(){ |
@@ -57,6 +69,7 @@ export default { | @@ -57,6 +69,7 @@ export default { | ||
57 | size:that.size, | 69 | size:that.size, |
58 | university_id:that.university_id, | 70 | university_id:that.university_id, |
59 | graduated_id:that.graduated_id, | 71 | graduated_id:that.graduated_id, |
72 | + college_id:that.college_id, | ||
60 | up_id:that.up_id | 73 | up_id:that.up_id |
61 | } | 74 | } |
62 | app.post(url,params,"get").then((res)=>{ | 75 | app.post(url,params,"get").then((res)=>{ |
@@ -33,18 +33,18 @@ | @@ -33,18 +33,18 @@ | ||
33 | <!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> --> | 33 | <!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> --> |
34 | <view class="teacherfooter"> | 34 | <view class="teacherfooter"> |
35 | <view class="teacherfootitem"> | 35 | <view class="teacherfootitem"> |
36 | - <view class="teacherfootitemtop" @click="footerselChange" :data-id="1" :data-url="'/pages/school/school?type='+1"> | 36 | + <view class="teacherfootitemtop" @click="footerselChange" :data-id="1" > |
37 | <image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image> | 37 | <image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image> |
38 | </view> | 38 | </view> |
39 | <view class="teacherfootname" :class="footersel==1?'selactive':''">学校</view> | 39 | <view class="teacherfootname" :class="footersel==1?'selactive':''">学校</view> |
40 | </view> | 40 | </view> |
41 | - <view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1"> | 41 | + <view class="teacherfootitem" @click="jumpshchool==true?footerselChange(2,'/pages/schoolmate/schoolmate?type=1'):''" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1"> |
42 | <view class="teacherfootitemtop"> | 42 | <view class="teacherfootitemtop"> |
43 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> | 43 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> |
44 | </view> | 44 | </view> |
45 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> | 45 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> |
46 | </view> | 46 | </view> |
47 | - <view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1"> | 47 | + <view class="teacherfootitem" @click="jumpshchool==true?footerselChange(3,'/pages/homePage/homePage?type=1'):''" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1"> |
48 | <view class="teacherfootitemtop"> | 48 | <view class="teacherfootitemtop"> |
49 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> | 49 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> |
50 | </view> | 50 | </view> |
@@ -71,6 +71,7 @@ | @@ -71,6 +71,7 @@ | ||
71 | isnulldata:false, | 71 | isnulldata:false, |
72 | token:'', | 72 | token:'', |
73 | isRegister: 0, | 73 | isRegister: 0, |
74 | + jumpshchool:true | ||
74 | } | 75 | } |
75 | }, | 76 | }, |
76 | onLoad(options){ | 77 | onLoad(options){ |
@@ -85,16 +86,19 @@ | @@ -85,16 +86,19 @@ | ||
85 | onShow() { | 86 | onShow() { |
86 | this.page=1; | 87 | this.page=1; |
87 | this.schoollist=[]; | 88 | this.schoollist=[]; |
88 | - this.getlikeschool() | 89 | + this.getlikeschool(); |
90 | + this.jumpshchool=true | ||
89 | }, | 91 | }, |
90 | methods: { | 92 | methods: { |
91 | // 底部导航跳转 | 93 | // 底部导航跳转 |
92 | - footerselChange(e) { | ||
93 | - let url = e.currentTarget.dataset.url; | ||
94 | - console.log(url) | 94 | + footerselChange(id,url) { |
95 | + console.log(34783478) | ||
96 | + // let url = e.currentTarget.dataset.url; | ||
97 | + // console.log(url) | ||
95 | uni.redirectTo({ | 98 | uni.redirectTo({ |
96 | url: url | 99 | url: url |
97 | }) | 100 | }) |
101 | + this.jumpshchool=false | ||
98 | }, | 102 | }, |
99 | code2Token(){ | 103 | code2Token(){ |
100 | let that = this; | 104 | let that = this; |
@@ -24,19 +24,19 @@ | @@ -24,19 +24,19 @@ | ||
24 | 24 | ||
25 | </view> | 25 | </view> |
26 | <view class="schoolMsg"> | 26 | <view class="schoolMsg"> |
27 | - <view class="row"> | 27 | + <view class="row" @click="copaywang"> |
28 | <image src="../../static/guanwang_icon@2x.png" class="icon"></image> | 28 | <image src="../../static/guanwang_icon@2x.png" class="icon"></image> |
29 | <view class="websit">官方网站:<text class="lianjie">{{university.url}}</text></view> | 29 | <view class="websit">官方网站:<text class="lianjie">{{university.url}}</text></view> |
30 | </view> | 30 | </view> |
31 | - <view class="row"> | 31 | + <view class="row" @click="copyzhong"> |
32 | <image src="../../static/gongzhonghao_icon@2x.png" class="icon"></image> | 32 | <image src="../../static/gongzhonghao_icon@2x.png" class="icon"></image> |
33 | <view class="websit">本科生招生公众号:<text class="lianjie">{{university.wechat}}</text></view> | 33 | <view class="websit">本科生招生公众号:<text class="lianjie">{{university.wechat}}</text></view> |
34 | </view> | 34 | </view> |
35 | <view class="table"> | 35 | <view class="table"> |
36 | - <navigator class="colum" hover-class="none" url="./highSchoolmate?schooltype=1"> | 36 | + <view class="colum" hover-class="none" @click="highschoollist"> |
37 | <view class="num">{{university.same_school_total_num}}</view> | 37 | <view class="num">{{university.same_school_total_num}}</view> |
38 | <view class="title">高中校友</view> | 38 | <view class="title">高中校友</view> |
39 | - </navigator> | 39 | + </view> |
40 | <view class="colum" @click="popupShow" data-type="1"> | 40 | <view class="colum" @click="popupShow" data-type="1"> |
41 | <view class="num">{{university.same_city_total_num}}</view> | 41 | <view class="num">{{university.same_city_total_num}}</view> |
42 | <view class="title">同城学长</view> | 42 | <view class="title">同城学长</view> |
@@ -55,7 +55,8 @@ | @@ -55,7 +55,8 @@ | ||
55 | <image class="right" src="../../static/dizhi_btn@2x.png"></image> | 55 | <image class="right" src="../../static/dizhi_btn@2x.png"></image> |
56 | </view> | 56 | </view> |
57 | </view> | 57 | </view> |
58 | - <view class="card"> | 58 | + <view class="nodata" v-if="collegeList.length==0" style="margin:27rpx auto 32rpx">暂无数据</view> |
59 | + <view class="card" v-else> | ||
59 | 60 | ||
60 | <view class="item" style="width: 188rpx;" v-for="(item,index) in collegeList" :key="index" @click="tocollegepage(item)"><view class="bor">{{item.name}}</view></view> | 61 | <view class="item" style="width: 188rpx;" v-for="(item,index) in collegeList" :key="index" @click="tocollegepage(item)"><view class="bor">{{item.name}}</view></view> |
61 | 62 | ||
@@ -76,7 +77,7 @@ | @@ -76,7 +77,7 @@ | ||
76 | <view class="articl" v-else> | 77 | <view class="articl" v-else> |
77 | 78 | ||
78 | 79 | ||
79 | - <view v-for="(item,index) in articleList" :key="index" @click="toarticlemsg(item)"> | 80 | + <view class="listitem" v-for="(item,index) in articleList" :key="index" @click="toarticlemsg(item)" style="border-bottom:1rpx solid #eee"> |
80 | <view class="articltitle"> | 81 | <view class="articltitle"> |
81 | <image class="photo" :src="item.head_image" style="border-radius: 50%;"></image> | 82 | <image class="photo" :src="item.head_image" style="border-radius: 50%;"></image> |
82 | <view class="msg"> | 83 | <view class="msg"> |
@@ -87,7 +88,7 @@ | @@ -87,7 +88,7 @@ | ||
87 | <view class="articleBox"> | 88 | <view class="articleBox"> |
88 | <view class="title">{{item.title}}</view> | 89 | <view class="title">{{item.title}}</view> |
89 | <view class="txt">{{item.des_content}}</view> | 90 | <view class="txt">{{item.des_content}}</view> |
90 | - <image :src="item" v-for="(item,indexk) in item.des_images" :kry="index" @click.stop="preimg(index,indexk)"></image> | 91 | + <image :src="item" v-for="(item,indexk) in item.des_images" :key="indexk" @click.stop="preimg(index,indexk)"></image> |
91 | </view> | 92 | </view> |
92 | </view> | 93 | </view> |
93 | </view> | 94 | </view> |
@@ -135,12 +136,11 @@ export default { | @@ -135,12 +136,11 @@ export default { | ||
135 | baseurl:app.globalData.imageBaseUrl, | 136 | baseurl:app.globalData.imageBaseUrl, |
136 | isactive:false, | 137 | isactive:false, |
137 | vip_level:'' | 138 | vip_level:'' |
138 | - | ||
139 | - | ||
140 | } | 139 | } |
141 | }, | 140 | }, |
142 | 141 | ||
143 | onLoad(options){ | 142 | onLoad(options){ |
143 | + | ||
144 | console.log(options) | 144 | console.log(options) |
145 | this.uni_id=options.id | 145 | this.uni_id=options.id |
146 | this.id=options.id; | 146 | this.id=options.id; |
@@ -149,26 +149,49 @@ export default { | @@ -149,26 +149,49 @@ export default { | ||
149 | this.getschooldetails() | 149 | this.getschooldetails() |
150 | this.getollege() | 150 | this.getollege() |
151 | this.getarticletype() | 151 | this.getarticletype() |
152 | - | ||
153 | this.getAllArticle(); | 152 | this.getAllArticle(); |
153 | + }, | ||
154 | + onShow() { | ||
154 | // 获取个人信息 | 155 | // 获取个人信息 |
155 | - this.getpersoninfo() | 156 | + this.getpersoninfo(); |
157 | + this.isPopupShow=false | ||
156 | 158 | ||
157 | }, | 159 | }, |
158 | methods:{ | 160 | methods:{ |
161 | + // 复制官网 | ||
162 | + copaywang(){ | ||
163 | + uni.setClipboardData({ | ||
164 | + data: this.university.url | ||
165 | + }); | ||
166 | + | ||
167 | + }, | ||
168 | + copyzhong(){ | ||
169 | + | ||
170 | + uni.setClipboardData({ | ||
171 | + data: this.university.wechat | ||
172 | + }); | ||
173 | + }, | ||
159 | tocollegepage(item){ | 174 | tocollegepage(item){ |
175 | + console.log(item) | ||
160 | let id = item.university_id | 176 | let id = item.university_id |
161 | let name = item.name | 177 | let name = item.name |
178 | + let college_id=item.id | ||
179 | + uni.navigateTo({ | ||
180 | + url:'./academyDetails?university_id='+this.id+'&name='+name+"&college_id="+college_id | ||
181 | + }) | ||
182 | + }, | ||
183 | + highschoollist(){ | ||
162 | uni.navigateTo({ | 184 | uni.navigateTo({ |
163 | - url:'./academyDetails?university_id='+id+'&name='+name | 185 | + url:'./highSchoolmate?schooltype='+1+'&university_id='+this.id |
164 | }) | 186 | }) |
187 | + | ||
165 | }, | 188 | }, |
166 | popupShow(e){ | 189 | popupShow(e){ |
167 | let type=e.currentTarget.dataset.type; | 190 | let type=e.currentTarget.dataset.type; |
168 | if(type==1){ | 191 | if(type==1){ |
169 | if(this.vip_level==1||this.vip_level==2){ | 192 | if(this.vip_level==1||this.vip_level==2){ |
170 | uni.navigateTo({ | 193 | uni.navigateTo({ |
171 | - url:"./highSchoolmate?schooltype="+2 | 194 | + url:"./highSchoolmate?schooltype="+2+'&university_id='+this.id |
172 | }) | 195 | }) |
173 | }else{ | 196 | }else{ |
174 | this.isPopupShow=true | 197 | this.isPopupShow=true |
@@ -176,7 +199,7 @@ export default { | @@ -176,7 +199,7 @@ export default { | ||
176 | }else if(type==2){ | 199 | }else if(type==2){ |
177 | if(this.vip_level==2){ | 200 | if(this.vip_level==2){ |
178 | uni.navigateTo({ | 201 | uni.navigateTo({ |
179 | - url:"./highSchoolmate?schooltype="+3 | 202 | + url:"./highSchoolmate?schooltype="+3+'&university_id='+this.id |
180 | }) | 203 | }) |
181 | 204 | ||
182 | }else{ | 205 | }else{ |
@@ -184,8 +207,6 @@ export default { | @@ -184,8 +207,6 @@ export default { | ||
184 | } | 207 | } |
185 | } | 208 | } |
186 | 209 | ||
187 | - | ||
188 | - | ||
189 | }, | 210 | }, |
190 | popupHide(){ | 211 | popupHide(){ |
191 | this.isPopupShow=false | 212 | this.isPopupShow=false |
@@ -266,7 +287,8 @@ export default { | @@ -266,7 +287,8 @@ export default { | ||
266 | token:token | 287 | token:token |
267 | } | 288 | } |
268 | app.post(url,params,"get").then((res)=>{ | 289 | app.post(url,params,"get").then((res)=>{ |
269 | - this.articleList=res | 290 | + this.articleList=this.articleList.concat(res) |
291 | + // this.articleList=res; | ||
270 | }).catch((err)=>{ | 292 | }).catch((err)=>{ |
271 | console.log(err) | 293 | console.log(err) |
272 | }) | 294 | }) |
@@ -289,7 +311,9 @@ export default { | @@ -289,7 +311,9 @@ export default { | ||
289 | }, | 311 | }, |
290 | selecttype(item,index){ | 312 | selecttype(item,index){ |
291 | this.sel=index | 313 | this.sel=index |
292 | - this.type_id=item.id | 314 | + this.type_id=item.id; |
315 | + this.articleList=[]; | ||
316 | + this.page=1; | ||
293 | this.getAllArticle() | 317 | this.getAllArticle() |
294 | }, | 318 | }, |
295 | toacademypage(item){ | 319 | toacademypage(item){ |
@@ -351,6 +375,11 @@ export default { | @@ -351,6 +375,11 @@ export default { | ||
351 | } | 375 | } |
352 | 376 | ||
353 | }, | 377 | }, |
378 | + onReachBottom() { | ||
379 | + // let newpage=this.page; | ||
380 | + // newpage++; | ||
381 | + // this.getAllArticle() | ||
382 | + } | ||
354 | 383 | ||
355 | 384 | ||
356 | } | 385 | } |
@@ -505,6 +534,11 @@ export default { | @@ -505,6 +534,11 @@ export default { | ||
505 | color:rgba(45,85,117,1); | 534 | color:rgba(45,85,117,1); |
506 | font-size: 32rpx; | 535 | font-size: 32rpx; |
507 | margin-left: 16rpx; | 536 | margin-left: 16rpx; |
537 | + height:auto; | ||
538 | + display: -webkit-box; | ||
539 | + -webkit-box-orient: vertical; | ||
540 | + -webkit-line-clamp: 3; | ||
541 | + overflow: hidden; | ||
508 | } | 542 | } |
509 | .more{ | 543 | .more{ |
510 | display: flex; | 544 | display: flex; |
@@ -596,12 +630,16 @@ export default { | @@ -596,12 +630,16 @@ export default { | ||
596 | .articl{ | 630 | .articl{ |
597 | background-color: #fff; | 631 | background-color: #fff; |
598 | margin-top: 24rpx; | 632 | margin-top: 24rpx; |
599 | - padding: 0 34rpx; | 633 | + padding: 0 34rpx 32rpx; |
634 | + box-sizing: border-box; | ||
600 | box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1); | 635 | box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1); |
601 | border-radius:20rpx; | 636 | border-radius:20rpx; |
602 | margin-bottom: 42rpx; | 637 | margin-bottom: 42rpx; |
638 | + .listitem:last-child{ | ||
639 | + border-bottom:none | ||
640 | + } | ||
603 | .articltitle{ | 641 | .articltitle{ |
604 | - border-bottom: 1rpx solid rgba(238,238,238,1); | 642 | + // border-bottom: 1rpx solid rgba(238,238,238,1); |
605 | padding: 40rpx 0 26rpx 0; | 643 | padding: 40rpx 0 26rpx 0; |
606 | display: flex; | 644 | display: flex; |
607 | font-size: 24rpx; | 645 | font-size: 24rpx; |
@@ -628,6 +666,11 @@ export default { | @@ -628,6 +666,11 @@ export default { | ||
628 | font-size: 24rpx; | 666 | font-size: 24rpx; |
629 | margin-top: 8rpx; | 667 | margin-top: 8rpx; |
630 | margin-bottom: 20rpx; | 668 | margin-bottom: 20rpx; |
669 | + hieght:auto; | ||
670 | + display: -webkit-box; | ||
671 | + -webkit-box-orient: vertical; | ||
672 | + -webkit-line-clamp: 3; | ||
673 | + overflow: hidden; | ||
631 | } | 674 | } |
632 | image{ | 675 | image{ |
633 | width: 128rpx; | 676 | width: 128rpx; |
1 | <template> | 1 | <template> |
2 | <view class="content"> | 2 | <view class="content"> |
3 | - <image class="background" :src="universitylist.des_image"></image> | 3 | + <image class="background" :src="universitylist.des_image=='http://school.t.brotop.cn'?'../../static/bg_img@2x.png':universitylist.des_image"></image> |
4 | <view class="titleBox"> | 4 | <view class="titleBox"> |
5 | <view class="title">{{universitylist.name}}</view> | 5 | <view class="title">{{universitylist.name}}</view> |
6 | <view class="eng">Hebei University of Technology</view> | 6 | <view class="eng">Hebei University of Technology</view> |
7 | </view> | 7 | </view> |
8 | + | ||
8 | <view class="schoolMsg"> | 9 | <view class="schoolMsg"> |
9 | <view class="titleAcademy"> | 10 | <view class="titleAcademy"> |
10 | - <image class="icon" :src="universitylist.icon_image"></image> | 11 | + <image class="icon" :src="universitylist.icon_image=='http://school.t.brotop.cn'?'../../static/logo_img@2x.png':universitylist.icon_image"></image> |
11 | <view class="txt">学校介绍</view> | 12 | <view class="txt">学校介绍</view> |
12 | </view> | 13 | </view> |
13 | <view class="text"> | 14 | <view class="text"> |
15 | + <view class="" v-if="universitylist.des_content==''">暂无简介</view> | ||
14 | <rich-text :nodes="universitylist.des_content"></rich-text> | 16 | <rich-text :nodes="universitylist.des_content"></rich-text> |
15 | </view> | 17 | </view> |
16 | <!-- <view | 18 | <!-- <view |
17 | {{universitylist.des_content}} | 19 | {{universitylist.des_content}} |
18 | </view> --> | 20 | </view> --> |
19 | - | ||
20 | </view> | 21 | </view> |
21 | - | ||
22 | </view> | 22 | </view> |
23 | </template> | 23 | </template> |
24 | - | ||
25 | <script> | 24 | <script> |
26 | import app from "../../App.vue"; | 25 | import app from "../../App.vue"; |
27 | export default { | 26 | export default { |
@@ -66,7 +65,7 @@ export default { | @@ -66,7 +65,7 @@ export default { | ||
66 | // background: url('../../static/bg_img@2x.png') no-repeat; | 65 | // background: url('../../static/bg_img@2x.png') no-repeat; |
67 | // background-size: 750rpx 334rpx; | 66 | // background-size: 750rpx 334rpx; |
68 | // height: 100vh; | 67 | // height: 100vh; |
69 | - overflow: hidden; | 68 | + // overflow: hidden; |
70 | // padding: 0 32rpx; | 69 | // padding: 0 32rpx; |
71 | 70 | ||
72 | .titleBox{ | 71 | .titleBox{ |
@@ -83,7 +82,7 @@ export default { | @@ -83,7 +82,7 @@ export default { | ||
83 | } | 82 | } |
84 | .schoolMsg{ | 83 | .schoolMsg{ |
85 | width:686rpx; | 84 | width:686rpx; |
86 | - height:2294rpx; | 85 | + // height:2294rpx; |
87 | background:rgba(255,255,255,1); | 86 | background:rgba(255,255,255,1); |
88 | box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1); | 87 | box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1); |
89 | opacity:1; | 88 | opacity:1; |
@@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
44 | {{item.des_content}} | 44 | {{item.des_content}} |
45 | </view> | 45 | </view> |
46 | 46 | ||
47 | - <text class="alltext" style="color:#2D5575;font-size:24rpx;font-weight:bold;" @click="toarticlemsg(item)" v-if="item.des_content.length>150">全部</text> | 47 | + <!-- <text class="alltext" style="color:#2D5575;font-size:24rpx;font-weight:bold;" @click="toarticlemsg(item)" v-if="item.des_content.length>150">全部</text> --> |
48 | </view> | 48 | </view> |
49 | <view style="display:flex;"> | 49 | <view style="display:flex;"> |
50 | <image :src="item" v-for="(item,indexk) in item.des_images" :key="indexk" @click.stop="preimg(index,indexk)" | 50 | <image :src="item" v-for="(item,indexk) in item.des_images" :key="indexk" @click.stop="preimg(index,indexk)" |
@@ -304,7 +304,21 @@ | @@ -304,7 +304,21 @@ | ||
304 | // res.forEach(function(value,index,array){ | 304 | // res.forEach(function(value,index,array){ |
305 | // value.head_image=app.globalData.imageBaseUrl+value.head_image | 305 | // value.head_image=app.globalData.imageBaseUrl+value.head_image |
306 | // }) | 306 | // }) |
307 | + console.log(res) | ||
308 | + if(res.length!=0){ | ||
307 | this.articleList =this.articleList.concat(res) | 309 | this.articleList =this.articleList.concat(res) |
310 | + | ||
311 | + }else{ | ||
312 | + if(that.page>1){ | ||
313 | + uni.showToast({ | ||
314 | + title:'没有更多了~', | ||
315 | + icon:"none" | ||
316 | + }) | ||
317 | + | ||
318 | + } | ||
319 | + } | ||
320 | + | ||
321 | + | ||
308 | }).catch((err) => { | 322 | }).catch((err) => { |
309 | console.log(err) | 323 | console.log(err) |
310 | }) | 324 | }) |
@@ -320,6 +334,10 @@ | @@ -320,6 +334,10 @@ | ||
320 | } | 334 | } |
321 | app.post(url, params, "post").then((res) => { | 335 | app.post(url, params, "post").then((res) => { |
322 | console.log(res) | 336 | console.log(res) |
337 | + uni.showToast({ | ||
338 | + title:'发送成功', | ||
339 | + icon:"none" | ||
340 | + }) | ||
323 | that.content = '' | 341 | that.content = '' |
324 | that.isliuyanBoxShow = false | 342 | that.isliuyanBoxShow = false |
325 | }).catch((err) => { | 343 | }).catch((err) => { |
@@ -358,9 +376,16 @@ | @@ -358,9 +376,16 @@ | ||
358 | paySign: res.paySign, | 376 | paySign: res.paySign, |
359 | success: function(res) { | 377 | success: function(res) { |
360 | console.log(res) | 378 | console.log(res) |
379 | + uni.showToast({ | ||
380 | + title:'打赏成功', | ||
381 | + icon:'none' | ||
382 | + }) | ||
383 | + setTimeout(function(){ | ||
361 | wx.navigateTo({ | 384 | wx.navigateTo({ |
362 | url: '/pages/orderbox/orderbox?index=' + 0 | 385 | url: '/pages/orderbox/orderbox?index=' + 0 |
363 | }) | 386 | }) |
387 | + },1500) | ||
388 | + | ||
364 | }, | 389 | }, |
365 | fail: function(res) { | 390 | fail: function(res) { |
366 | console.log(123); | 391 | console.log(123); |
@@ -436,6 +461,12 @@ | @@ -436,6 +461,12 @@ | ||
436 | this.articleList=[]; | 461 | this.articleList=[]; |
437 | this.getAllArticle() | 462 | this.getAllArticle() |
438 | }, | 463 | }, |
464 | + }, | ||
465 | + onReachBottom() { | ||
466 | + let newpage=this.page; | ||
467 | + newpage++; | ||
468 | + this.page=newpage; | ||
469 | + this.getAllArticle() | ||
439 | } | 470 | } |
440 | } | 471 | } |
441 | </script> | 472 | </script> |
@@ -11,10 +11,10 @@ | @@ -11,10 +11,10 @@ | ||
11 | placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;" | 11 | placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;" |
12 | style="font-size:28rpx;" | 12 | style="font-size:28rpx;" |
13 | v-model="word" | 13 | v-model="word" |
14 | - @confirm="getschoollist" | 14 | + @confirm="getschoollistk" |
15 | /> | 15 | /> |
16 | </view> | 16 | </view> |
17 | - <view class="searchBtn" @click="getschoollist">搜索</view> | 17 | + <view class="searchBtn" @click="getschoollistk">搜索</view> |
18 | </view> | 18 | </view> |
19 | <view class="type"> | 19 | <view class="type"> |
20 | <view class="paiming" :class="{ active: active1 }" @click="paimingShow">排名</view> | 20 | <view class="paiming" :class="{ active: active1 }" @click="paimingShow">排名</view> |
@@ -85,7 +85,7 @@ export default { | @@ -85,7 +85,7 @@ export default { | ||
85 | let index=e.currentTarget.dataset.index; | 85 | let index=e.currentTarget.dataset.index; |
86 | 86 | ||
87 | this.levelindex=index; | 87 | this.levelindex=index; |
88 | - this.province_id=''; | 88 | + this.city_id=''; |
89 | this.level_id=id; | 89 | this.level_id=id; |
90 | this.page=1; | 90 | this.page=1; |
91 | this.schoolList=[]; | 91 | this.schoolList=[]; |
@@ -141,7 +141,7 @@ export default { | @@ -141,7 +141,7 @@ export default { | ||
141 | selectallprovince() { | 141 | selectallprovince() { |
142 | this.selpro=-2; | 142 | this.selpro=-2; |
143 | this.selcity=-1; | 143 | this.selcity=-1; |
144 | - this.province_id=''; | 144 | + this.city_id=''; |
145 | this.city_id=''; | 145 | this.city_id=''; |
146 | this.level_id=''; | 146 | this.level_id=''; |
147 | this.page=1; | 147 | this.page=1; |
@@ -150,6 +150,12 @@ export default { | @@ -150,6 +150,12 @@ export default { | ||
150 | 150 | ||
151 | this.isDiquShow = false; | 151 | this.isDiquShow = false; |
152 | }, | 152 | }, |
153 | + getschoollistk(){ | ||
154 | + this.page=1; | ||
155 | + this.schoolList=[]; | ||
156 | + | ||
157 | + this.getschoollist(); | ||
158 | + }, | ||
153 | //点击选中全部市 | 159 | //点击选中全部市 |
154 | selectallcity() { | 160 | selectallcity() { |
155 | this.level_id=''; | 161 | this.level_id=''; |
@@ -189,7 +195,7 @@ export default { | @@ -189,7 +195,7 @@ export default { | ||
189 | size: 10, | 195 | size: 10, |
190 | word: that.word, | 196 | word: that.word, |
191 | level_id: that.level_id, | 197 | level_id: that.level_id, |
192 | - province_id: that.province_id | 198 | + city_id: that.city_id |
193 | }; | 199 | }; |
194 | app.post(url, params,'post') | 200 | app.post(url, params,'post') |
195 | .then(res => { | 201 | .then(res => { |
@@ -233,6 +239,13 @@ export default { | @@ -233,6 +239,13 @@ export default { | ||
233 | this.getAllProvince(); | 239 | this.getAllProvince(); |
234 | this.getschoollist(); | 240 | this.getschoollist(); |
235 | this.getAllLevel(); | 241 | this.getAllLevel(); |
242 | + }, | ||
243 | + onReachBottom() { | ||
244 | + let newpage=this.page; | ||
245 | + newpage++; | ||
246 | + this.page=newpage; | ||
247 | + this.getschoollist(); | ||
248 | + | ||
236 | } | 249 | } |
237 | }; | 250 | }; |
238 | </script> | 251 | </script> |
@@ -68,13 +68,13 @@ | @@ -68,13 +68,13 @@ | ||
68 | </view> | 68 | </view> |
69 | <view class="fen">{{item.up_name}}</view> | 69 | <view class="fen">{{item.up_name}}</view> |
70 | </view> | 70 | </view> |
71 | - <view class="right" v-if="item.is_like==1"> | 71 | + <view class="right" v-if="item.is_like==1" @click.stop=like(index,item.user_id,2)> |
72 | <image src="../../static/yiguanzhu_img@2x.png"></image> | 72 | <image src="../../static/yiguanzhu_img@2x.png"></image> |
73 | <view class="text">已关注</view> | 73 | <view class="text">已关注</view> |
74 | </view> | 74 | </view> |
75 | <view class="right" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;"> | 75 | <view class="right" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;"> |
76 | <!-- <image src="../../static/yiguanzhu_img@2x.png"></image> --> | 76 | <!-- <image src="../../static/yiguanzhu_img@2x.png"></image> --> |
77 | - <view class="text" style="align-items: center;"> | 77 | + <view class="text" style="align-items: center;" @click.stop=like(index,item.user_id,1)> |
78 | <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注 | 78 | <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注 |
79 | </view> | 79 | </view> |
80 | </view> | 80 | </view> |
@@ -87,19 +87,19 @@ | @@ -87,19 +87,19 @@ | ||
87 | <!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> --> | 87 | <!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> --> |
88 | <view class="teacherfooter" v-if="type == 1"> | 88 | <view class="teacherfooter" v-if="type == 1"> |
89 | 89 | ||
90 | - <view class="teacherfootitem"> | ||
91 | - <view class="teacherfootitemtop" @click="footerselChange" :data-id="1" :data-url="'/pages/school/school?type='+1"> | 90 | + <view class="teacherfootitem" @click="jumpschool==true?footerselChange(1,'/pages/school/school?type=1'):''" :data-id="1" :data-url="'/pages/school/school?type='+1"> |
91 | + <view class="teacherfootitemtop" > | ||
92 | <image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image> | 92 | <image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image> |
93 | </view> | 93 | </view> |
94 | <view class="teacherfootname" :class="footersel==1?'selactive':''">学校</view> | 94 | <view class="teacherfootname" :class="footersel==1?'selactive':''">学校</view> |
95 | </view> | 95 | </view> |
96 | - <view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1"> | 96 | + <view class="teacherfootitem" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1"> |
97 | <view class="teacherfootitemtop"> | 97 | <view class="teacherfootitemtop"> |
98 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> | 98 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> |
99 | </view> | 99 | </view> |
100 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> | 100 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> |
101 | </view> | 101 | </view> |
102 | - <view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1"> | 102 | + <view class="teacherfootitem" @click="jumpschool==true?footerselChange(3,'/pages/homePage/homePage?type=1'):''" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1"> |
103 | <view class="teacherfootitemtop"> | 103 | <view class="teacherfootitemtop"> |
104 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> | 104 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> |
105 | </view> | 105 | </view> |
@@ -107,13 +107,14 @@ | @@ -107,13 +107,14 @@ | ||
107 | </view> | 107 | </view> |
108 | </view> | 108 | </view> |
109 | <view class="collegefooter" v-if="type == 2"> | 109 | <view class="collegefooter" v-if="type == 2"> |
110 | - <view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+2"> | 110 | + <view class="teacherfootitem" > |
111 | <view class="teacherfootitemtop"> | 111 | <view class="teacherfootitemtop"> |
112 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> | 112 | <image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image> |
113 | </view> | 113 | </view> |
114 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> | 114 | <view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view> |
115 | </view> | 115 | </view> |
116 | - <view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/collegeHome?type='+2"> | 116 | + <!-- --> |
117 | + <view class="teacherfootitem" @click="footerselChangek" :data-id="3"> | ||
117 | <view class="teacherfootitemtop"> | 118 | <view class="teacherfootitemtop"> |
118 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> | 119 | <image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image> |
119 | </view> | 120 | </view> |
@@ -122,14 +123,10 @@ | @@ -122,14 +123,10 @@ | ||
122 | </view> | 123 | </view> |
123 | </view> | 124 | </view> |
124 | </view> | 125 | </view> |
125 | - | ||
126 | </template> | 126 | </template> |
127 | - | ||
128 | <script> | 127 | <script> |
129 | import app from "../../App.vue"; | 128 | import app from "../../App.vue"; |
130 | - | ||
131 | export default { | 129 | export default { |
132 | - | ||
133 | data() { | 130 | data() { |
134 | return { | 131 | return { |
135 | selpro:-1, | 132 | selpro:-1, |
@@ -150,7 +147,6 @@ | @@ -150,7 +147,6 @@ | ||
150 | type: "", | 147 | type: "", |
151 | province_id: "", | 148 | province_id: "", |
152 | city_id: '', | 149 | city_id: '', |
153 | - | ||
154 | schoolmate: { | 150 | schoolmate: { |
155 | page: '1', | 151 | page: '1', |
156 | size: '10', | 152 | size: '10', |
@@ -160,13 +156,11 @@ | @@ -160,13 +156,11 @@ | ||
160 | up_id: '', | 156 | up_id: '', |
161 | 157 | ||
162 | }, | 158 | }, |
163 | - | ||
164 | school: { | 159 | school: { |
165 | page: '1', | 160 | page: '1', |
166 | size: '10', | 161 | size: '10', |
167 | word: '' | 162 | word: '' |
168 | }, | 163 | }, |
169 | - | ||
170 | graduatedList: [], | 164 | graduatedList: [], |
171 | upList: [], | 165 | upList: [], |
172 | schoolmateList: [], | 166 | schoolmateList: [], |
@@ -175,17 +169,47 @@ | @@ -175,17 +169,47 @@ | ||
175 | schoolList: [], | 169 | schoolList: [], |
176 | word: "", | 170 | word: "", |
177 | vip_level:'', | 171 | vip_level:'', |
172 | + jumpschool:true, | ||
173 | + jumpschoolk:true | ||
178 | 174 | ||
179 | } | 175 | } |
180 | }, | 176 | }, |
181 | methods: { | 177 | methods: { |
182 | hidekk() { | 178 | hidekk() { |
183 | - console.log(3889348439) | ||
184 | this.isDiquShow = false | 179 | this.isDiquShow = false |
185 | }, | 180 | }, |
186 | showhide() { | 181 | showhide() { |
187 | 182 | ||
188 | }, | 183 | }, |
184 | + // 关注和取消关注 | ||
185 | + like(index,userid,type) { | ||
186 | + var that = this | ||
187 | + var url = "student/likeStudent" | ||
188 | + var token = uni.getStorageSync('token') | ||
189 | + var params = { | ||
190 | + token: token, | ||
191 | + userb_id: userid | ||
192 | + } | ||
193 | + app.post(url, params, "post").then((res) => { | ||
194 | + if(type==1){ | ||
195 | + uni.showToast({ | ||
196 | + title:"关注成功", | ||
197 | + icon:"none" | ||
198 | + }) | ||
199 | + that.schoolmateList[index].is_like=1; | ||
200 | + that.schoolmateList=that.schoolmateList | ||
201 | + }else{ | ||
202 | + uni.showToast({ | ||
203 | + title:"取消关注成功", | ||
204 | + icon:"none" | ||
205 | + }) | ||
206 | + that.schoolmateList[index].is_like=2; | ||
207 | + that.schoolmateList=that.schoolmateList | ||
208 | + } | ||
209 | + }).catch((err) => { | ||
210 | + console.log(err) | ||
211 | + }) | ||
212 | + }, | ||
189 | tobuy() { | 213 | tobuy() { |
190 | if (uni.getStorageSync('token') == '') { | 214 | if (uni.getStorageSync('token') == '') { |
191 | uni.navigateTo({ | 215 | uni.navigateTo({ |
@@ -199,7 +223,7 @@ | @@ -199,7 +223,7 @@ | ||
199 | 223 | ||
200 | }, | 224 | }, |
201 | diquShow() { | 225 | diquShow() { |
202 | - this.isDiquShow = true; | 226 | + this.isDiquShow = !this.isDiquShow; |
203 | this.isSchoolShow = false; | 227 | this.isSchoolShow = false; |
204 | this.isMajorShow = false | 228 | this.isMajorShow = false |
205 | this.isStyleShow = false | 229 | this.isStyleShow = false |
@@ -212,7 +236,7 @@ | @@ -212,7 +236,7 @@ | ||
212 | this.isDiquShow = false, | 236 | this.isDiquShow = false, |
213 | this.isSchoolShow = false; | 237 | this.isSchoolShow = false; |
214 | this.isMajorShow = false | 238 | this.isMajorShow = false |
215 | - this.isStyleShow = false | 239 | + this.isStyleShow = false, |
216 | this.active1 = false, | 240 | this.active1 = false, |
217 | this.active2 = false | 241 | this.active2 = false |
218 | this.active3 = false | 242 | this.active3 = false |
@@ -230,7 +254,7 @@ | @@ -230,7 +254,7 @@ | ||
230 | // }, | 254 | // }, |
231 | 255 | ||
232 | majorShow() { | 256 | majorShow() { |
233 | - this.isMajorShow = true | 257 | + this.isMajorShow = !this.isMajorShow; |
234 | this.isDiquShow = false, | 258 | this.isDiquShow = false, |
235 | this.isSchoolShow = false; | 259 | this.isSchoolShow = false; |
236 | this.isStyleShow = false | 260 | this.isStyleShow = false |
@@ -242,13 +266,13 @@ | @@ -242,13 +266,13 @@ | ||
242 | 266 | ||
243 | styleShow() { | 267 | styleShow() { |
244 | console.log(37844374378) | 268 | console.log(37844374378) |
245 | - this.isStyleShow = true | ||
246 | - this.isMajorShow = false | ||
247 | - this.isSchoolShow = false | ||
248 | - this.isDiquShow = false | ||
249 | - this.active1 = false, | ||
250 | - this.active2 = false | ||
251 | - this.active3 = false | 269 | + this.isStyleShow = !this.isStyleShow; |
270 | + this.isMajorShow = false; | ||
271 | + this.isSchoolShow = false; | ||
272 | + this.isDiquShow = false; | ||
273 | + this.active1 = false; | ||
274 | + this.active2 = false; | ||
275 | + this.active3 = false; | ||
252 | this.active4 = true; | 276 | this.active4 = true; |
253 | // this.this.schoolmate.page=1; | 277 | // this.this.schoolmate.page=1; |
254 | // this.schoolmateList=[] | 278 | // this.schoolmateList=[] |
@@ -256,13 +280,23 @@ | @@ -256,13 +280,23 @@ | ||
256 | }, | 280 | }, |
257 | 281 | ||
258 | // 底部导航跳转 | 282 | // 底部导航跳转 |
259 | - footerselChange(e) { | ||
260 | - let url = e.currentTarget.dataset.url; | 283 | + footerselChange(id,url) { |
284 | + // let url = e.currentTarget.dataset.url; | ||
261 | // console.log(e) | 285 | // console.log(e) |
262 | uni.redirectTo({ | 286 | uni.redirectTo({ |
263 | url: url | 287 | url: url |
264 | }) | 288 | }) |
289 | + this.jumpschool=false | ||
290 | + }, | ||
291 | + footerselChangek(e){ | ||
292 | + | ||
293 | + // let url = e.currentTarget.dataset.url; | ||
265 | 294 | ||
295 | + // console.log(e) | ||
296 | + uni.navigateTo({ | ||
297 | + url: '/pages/homePage/collegeHome?type=2' | ||
298 | + }) | ||
299 | + this.jumpschoolk=false | ||
266 | }, | 300 | }, |
267 | // 获取个人信息 | 301 | // 获取个人信息 |
268 | getpersoninfo(){ | 302 | getpersoninfo(){ |
@@ -294,11 +328,11 @@ | @@ -294,11 +328,11 @@ | ||
294 | }, 1500); | 328 | }, 1500); |
295 | 329 | ||
296 | } else { | 330 | } else { |
297 | - this.schoolmate.page=1; | ||
298 | - this.schoolmateList=[]; | 331 | + // this.schoolmate.page=1; |
332 | + // this.schoolmateList=[]; | ||
299 | var url = "student/getStudentList" | 333 | var url = "student/getStudentList" |
300 | var token = uni.getStorageSync('token') | 334 | var token = uni.getStorageSync('token') |
301 | - let type=1; | 335 | + let type=''; |
302 | console.log('3443743873478',this.vip_level) | 336 | console.log('3443743873478',this.vip_level) |
303 | if(this.vip_level==0){ | 337 | if(this.vip_level==0){ |
304 | type=1 | 338 | type=1 |
@@ -318,8 +352,7 @@ | @@ -318,8 +352,7 @@ | ||
318 | token: token | 352 | token: token |
319 | } | 353 | } |
320 | app.post(url, params, "get").then((res) => { | 354 | app.post(url, params, "get").then((res) => { |
321 | - console.log(res) | ||
322 | - this.schoolmateList = this.schoolmateList.concat(res) | 355 | + this.schoolmateList = this.schoolmate.page==1?res:this.schoolmateList.concat(res) |
323 | }).catch((err) => { | 356 | }).catch((err) => { |
324 | console.log(err) | 357 | console.log(err) |
325 | }) | 358 | }) |
@@ -344,11 +377,11 @@ | @@ -344,11 +377,11 @@ | ||
344 | var params = {} | 377 | var params = {} |
345 | app.post(url, params, "get").then((res) => { | 378 | app.post(url, params, "get").then((res) => { |
346 | console.log(res[0].name) | 379 | console.log(res[0].name) |
347 | - let obj = { | ||
348 | - id: '', | ||
349 | - name: '全部' | ||
350 | - } | ||
351 | - res.unshift(obj) | 380 | + // let obj = { |
381 | + // id: '', | ||
382 | + // name: '全部' | ||
383 | + // } | ||
384 | + // res.unshift(obj) | ||
352 | this.upList = res | 385 | this.upList = res |
353 | }).catch((err) => { | 386 | }).catch((err) => { |
354 | console.log(err) | 387 | console.log(err) |
@@ -528,6 +561,14 @@ | @@ -528,6 +561,14 @@ | ||
528 | 561 | ||
529 | // 获取个人信息 | 562 | // 获取个人信息 |
530 | this.getpersoninfo() | 563 | this.getpersoninfo() |
564 | + this.jumpschool=true; | ||
565 | + this.jumpschoolk=true | ||
566 | + }, | ||
567 | + onReachBottom() { | ||
568 | + let newpage=this.schoolmate.page; | ||
569 | + newpage++; | ||
570 | + this.schoolmate.page=newpage; | ||
571 | + this.getmatelist() | ||
531 | } | 572 | } |
532 | 573 | ||
533 | } | 574 | } |
-
请 注册 或 登录 后发表评论