正在显示
9 个修改的文件
包含
429 行增加
和
200 行删除
@@ -77,46 +77,48 @@ | @@ -77,46 +77,48 @@ | ||
77 | </view> | 77 | </view> |
78 | </view> | 78 | </view> |
79 | <view class="meBot"> | 79 | <view class="meBot"> |
80 | - <view class="meBotontt"> | 80 | + <view class="meBotontt" @click="onIssue"> |
81 | <view class="meBotontPic"> | 81 | <view class="meBotontPic"> |
82 | - <image src="../../../static/image/fabu_icon_3@2x.png" style="width: 32rpx;height: 32rpx;margin-right: 14rpx;" mode=""></image> | 82 | + <image src="../../../static/image/fabu_icon_3@2x.png" style="width: 32rpx;height: 32rpx;margin-right: 14rpx;" |
83 | + mode=""></image> | ||
83 | </view> | 84 | </view> |
84 | - <view class="meBotontText" @click="onIssue"> | 85 | + <view class="meBotontText" > |
85 | <text class="meBotText">我的发布</text> | 86 | <text class="meBotText">我的发布</text> |
86 | </view> | 87 | </view> |
87 | <view class="meBotontImg"> | 88 | <view class="meBotontImg"> |
88 | <image src="../../../static/image/gengduo_icon_5@2x.png" style="width: 32rpx;height: 32rpx;" mode=""></image> | 89 | <image src="../../../static/image/gengduo_icon_5@2x.png" style="width: 32rpx;height: 32rpx;" mode=""></image> |
89 | </view> | 90 | </view> |
90 | </view> | 91 | </view> |
91 | - <view class="meBotontt"> | 92 | + <view class="meBotontt" @click="onGroup"> |
92 | <view class="meBotontPic"> | 93 | <view class="meBotontPic"> |
93 | <image src="../../../static/image/wodepintuan_icon_1@2x.png" style="width: 32rpx;height: 32rpx;margin-right: 14rpx;" | 94 | <image src="../../../static/image/wodepintuan_icon_1@2x.png" style="width: 32rpx;height: 32rpx;margin-right: 14rpx;" |
94 | mode=""></image> | 95 | mode=""></image> |
95 | </view> | 96 | </view> |
96 | - <view class="meBotontText" @click="onGroup"> | 97 | + <view class="meBotontText" > |
97 | <text class="meBotText">我的活动</text> | 98 | <text class="meBotText">我的活动</text> |
98 | </view> | 99 | </view> |
99 | <view class="meBotontImg"> | 100 | <view class="meBotontImg"> |
100 | <image src="../../../static/image/gengduo_icon_5@2x.png" style="width: 32rpx;height: 32rpx;" mode=""></image> | 101 | <image src="../../../static/image/gengduo_icon_5@2x.png" style="width: 32rpx;height: 32rpx;" mode=""></image> |
101 | </view> | 102 | </view> |
102 | </view> | 103 | </view> |
103 | - <view class="meBotontt"> | 104 | + <view class="meBotontt" @click="onYaoQing"> |
104 | <view class="meBotontPic"> | 105 | <view class="meBotontPic"> |
105 | <image src="../../../static/image/yaoqingyouli_icon_1@2x.png" style="width: 32rpx;height: 32rpx;margin-right: 14rpx;" | 106 | <image src="../../../static/image/yaoqingyouli_icon_1@2x.png" style="width: 32rpx;height: 32rpx;margin-right: 14rpx;" |
106 | mode=""></image> | 107 | mode=""></image> |
107 | </view> | 108 | </view> |
108 | - <view class="meBotontText" @click="onYaoQing"> | 109 | + <view class="meBotontText" > |
109 | <text class="meBotText">邀请有礼</text> | 110 | <text class="meBotText">邀请有礼</text> |
110 | </view> | 111 | </view> |
111 | <view class="meBotontImg"> | 112 | <view class="meBotontImg"> |
112 | <image src="../../../static/image/gengduo_icon_5@2x.png" style="width: 32rpx;height: 32rpx;" mode=""></image> | 113 | <image src="../../../static/image/gengduo_icon_5@2x.png" style="width: 32rpx;height: 32rpx;" mode=""></image> |
113 | </view> | 114 | </view> |
114 | </view> | 115 | </view> |
115 | - <view class="meBotontt kefuBorder"> | 116 | + <view class="meBotontt kefuBorder" @click="onKeFu"> |
116 | <view class="meBotontPic"> | 117 | <view class="meBotontPic"> |
117 | - <image src="../../../static/image/kefu_icon_1@2x.png" style="width: 32rpx;height: 32rpx;margin-right: 14rpx;" mode=""></image> | 118 | + <image src="../../../static/image/kefu_icon_1@2x.png" style="width: 32rpx;height: 32rpx;margin-right: 14rpx;" |
119 | + mode=""></image> | ||
118 | </view> | 120 | </view> |
119 | - <view class="meBotontText " @click="onKeFu"> | 121 | + <view class="meBotontText " > |
120 | <text class="meBotText">客服</text> | 122 | <text class="meBotText">客服</text> |
121 | </view> | 123 | </view> |
122 | <view class="meBotontImg"> | 124 | <view class="meBotontImg"> |
@@ -156,10 +158,13 @@ | @@ -156,10 +158,13 @@ | ||
156 | <text class="botTextFa">发布</text> | 158 | <text class="botTextFa">发布</text> |
157 | </view> | 159 | </view> |
158 | </li> | 160 | </li> |
159 | - <li @click="goMessage"> | 161 | + <li @click="goMessage" style="position: relative;"> |
160 | 162 | ||
161 | <image src="../../../static/image/xiaoxi_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> | 163 | <image src="../../../static/image/xiaoxi_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> |
162 | <text class="botText">消息</text> | 164 | <text class="botText">消息</text> |
165 | + <view class="num"> | ||
166 | + {{messageNum>99?'99+':messageNum}} | ||
167 | + </view> | ||
163 | </li> | 168 | </li> |
164 | <li @click="goMe"> | 169 | <li @click="goMe"> |
165 | <image src="../../../static/image/wode_icon_7@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> | 170 | <image src="../../../static/image/wode_icon_7@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> |
@@ -174,7 +179,7 @@ | @@ -174,7 +179,7 @@ | ||
174 | export default { | 179 | export default { |
175 | data() { | 180 | data() { |
176 | return { | 181 | return { |
177 | - token:false, | 182 | + token: false, |
178 | userData: '', | 183 | userData: '', |
179 | show: false, | 184 | show: false, |
180 | sum: 966, | 185 | sum: 966, |
@@ -183,32 +188,34 @@ | @@ -183,32 +188,34 @@ | ||
183 | guanzhu: 0, | 188 | guanzhu: 0, |
184 | shoucang: 0, | 189 | shoucang: 0, |
185 | phoneNumber: '', | 190 | phoneNumber: '', |
191 | + messageNum: 0, //留言个数 | ||
186 | } | 192 | } |
187 | }, | 193 | }, |
188 | onShow() { | 194 | onShow() { |
189 | if (uni.getStorageSync('token')) { | 195 | if (uni.getStorageSync('token')) { |
190 | this.token = true | 196 | this.token = true |
191 | - setTimeout(()=>{ | 197 | + setTimeout(() => { |
192 | this.getUserInfo() | 198 | this.getUserInfo() |
193 | this.fenSums() | 199 | this.fenSums() |
194 | this.guanzhus() | 200 | this.guanzhus() |
195 | this.shoucangs() | 201 | this.shoucangs() |
196 | this.jifens() | 202 | this.jifens() |
197 | - },500) | 203 | + this.messageNums() |
204 | + }, 500) | ||
198 | } | 205 | } |
199 | }, | 206 | }, |
200 | created() { | 207 | created() { |
201 | if (uni.getStorageSync('token')) { | 208 | if (uni.getStorageSync('token')) { |
202 | this.token = true | 209 | this.token = true |
203 | - setTimeout(()=>{ | 210 | + setTimeout(() => { |
204 | this.getUserInfo() | 211 | this.getUserInfo() |
205 | this.fenSums() | 212 | this.fenSums() |
206 | this.guanzhus() | 213 | this.guanzhus() |
207 | this.shoucangs() | 214 | this.shoucangs() |
208 | this.jifens() | 215 | this.jifens() |
209 | - },500) | 216 | + }, 500) |
210 | } | 217 | } |
211 | - | 218 | + |
212 | }, | 219 | }, |
213 | methods: { | 220 | methods: { |
214 | // | 221 | // |
@@ -290,7 +297,7 @@ | @@ -290,7 +297,7 @@ | ||
290 | } else { | 297 | } else { |
291 | this.login() | 298 | this.login() |
292 | } | 299 | } |
293 | - | 300 | + |
294 | }, | 301 | }, |
295 | //粉丝 | 302 | //粉丝 |
296 | GoFens() { | 303 | GoFens() { |
@@ -317,11 +324,11 @@ | @@ -317,11 +324,11 @@ | ||
317 | }, | 324 | }, |
318 | //收藏 | 325 | //收藏 |
319 | shoucangs() { | 326 | shoucangs() { |
320 | - request.get('/api/personal/collectSum', {}).then(res => { | ||
321 | - this.shoucang = res.data | ||
322 | - }).catch(err => { | 327 | + request.get('/api/personal/collectSum', {}).then(res => { |
328 | + this.shoucang = res.data | ||
329 | + }).catch(err => { | ||
323 | 330 | ||
324 | - }) | 331 | + }) |
325 | }, | 332 | }, |
326 | //关注 | 333 | //关注 |
327 | guanzhus() { | 334 | guanzhus() { |
@@ -337,7 +344,7 @@ | @@ -337,7 +344,7 @@ | ||
337 | this.jf = res.data | 344 | this.jf = res.data |
338 | }).catch(err => { | 345 | }).catch(err => { |
339 | 346 | ||
340 | - }) | 347 | + }) |
341 | }, | 348 | }, |
342 | //粉丝数量 | 349 | //粉丝数量 |
343 | fenSums() { | 350 | fenSums() { |
@@ -346,13 +353,14 @@ | @@ -346,13 +353,14 @@ | ||
346 | console.log(this.fensi, 'data') | 353 | console.log(this.fensi, 'data') |
347 | }).catch(err => { | 354 | }).catch(err => { |
348 | 355 | ||
349 | - }) | 356 | + }) |
350 | }, | 357 | }, |
351 | onUserInfo() { | 358 | onUserInfo() { |
352 | if (this.token) { | 359 | if (this.token) { |
353 | - uni.navigateTo({ | ||
354 | - url: '/myPackage/pages/me/personal' | ||
355 | - })} else { | 360 | + uni.navigateTo({ |
361 | + url: '/myPackage/pages/me/personal' | ||
362 | + }) | ||
363 | + } else { | ||
356 | this.login() | 364 | this.login() |
357 | } | 365 | } |
358 | }, | 366 | }, |
@@ -360,19 +368,21 @@ | @@ -360,19 +368,21 @@ | ||
360 | //邀请有礼 | 368 | //邀请有礼 |
361 | onYaoQing() { | 369 | onYaoQing() { |
362 | if (this.token) { | 370 | if (this.token) { |
363 | - uni.navigateTo({ | ||
364 | - url: '/myPackage/pages/me/invite' | ||
365 | - })} else { | 371 | + uni.navigateTo({ |
372 | + url: '/myPackage/pages/me/invite' | ||
373 | + }) | ||
374 | + } else { | ||
366 | this.login() | 375 | this.login() |
367 | } | 376 | } |
368 | }, | 377 | }, |
369 | //客服 | 378 | //客服 |
370 | onKeFu() { | 379 | onKeFu() { |
371 | if (this.token) { | 380 | if (this.token) { |
372 | - this.kefu() | ||
373 | - uni.makePhoneCall({ | ||
374 | - phoneNumber: this.phoneNumber | ||
375 | - })} else { | 381 | + this.kefu() |
382 | + uni.makePhoneCall({ | ||
383 | + phoneNumber: this.phoneNumber | ||
384 | + }) | ||
385 | + } else { | ||
376 | this.login() | 386 | this.login() |
377 | } | 387 | } |
378 | }, | 388 | }, |
@@ -430,6 +440,14 @@ | @@ -430,6 +440,14 @@ | ||
430 | uni.navigateTo({ | 440 | uni.navigateTo({ |
431 | url: '/myPackage/pages/me/member' | 441 | url: '/myPackage/pages/me/member' |
432 | }); | 442 | }); |
443 | + }, | ||
444 | + //留言个数 | ||
445 | + messageNums() { | ||
446 | + request.get('/api/mation/unreadNumber', {}).then(res => { | ||
447 | + this.messageNum = res.data.number | ||
448 | + }).catch(err => { | ||
449 | + | ||
450 | + }) | ||
433 | } | 451 | } |
434 | } | 452 | } |
435 | } | 453 | } |
@@ -487,4 +505,20 @@ | @@ -487,4 +505,20 @@ | ||
487 | font-size: 18rpx; | 505 | font-size: 18rpx; |
488 | color: #FF834D; | 506 | color: #FF834D; |
489 | } | 507 | } |
508 | + | ||
509 | + .num { | ||
510 | + position: absolute; | ||
511 | + background: red; | ||
512 | + height: 30rpx; | ||
513 | + font-size: 22rpx; | ||
514 | + line-height: 30rpx; | ||
515 | + text-align: center; | ||
516 | + border-radius: 16rpx; | ||
517 | + color: #fff; | ||
518 | + top: 6rpx; | ||
519 | + right: 30rpx; | ||
520 | + min-width: 18rpx; | ||
521 | + max-width: 60rpx; | ||
522 | + padding: 0 6rpx; | ||
523 | + } | ||
490 | </style> | 524 | </style> |
@@ -83,10 +83,12 @@ | @@ -83,10 +83,12 @@ | ||
83 | <text class="botTextFa">发布</text> | 83 | <text class="botTextFa">发布</text> |
84 | </view> | 84 | </view> |
85 | </li> | 85 | </li> |
86 | - <li @click="goMessage"> | ||
87 | - | 86 | + <li @click="goMessage" style="position: relative;"> |
88 | <image src="../../static/image/xiaoxi_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> | 87 | <image src="../../static/image/xiaoxi_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> |
89 | <text class="botText">消息</text> | 88 | <text class="botText">消息</text> |
89 | + <view class="num"> | ||
90 | + {{messageNum>99?'99+':messageNum}} | ||
91 | + </view> | ||
90 | </li> | 92 | </li> |
91 | <li @click="goMe"> | 93 | <li @click="goMe"> |
92 | <image src="../../static/image/wode_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> | 94 | <image src="../../static/image/wode_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> |
@@ -108,7 +110,8 @@ | @@ -108,7 +110,8 @@ | ||
108 | location: '', | 110 | location: '', |
109 | jifen: '', | 111 | jifen: '', |
110 | list: [], | 112 | list: [], |
111 | - touchBottom:false //触底提示 | 113 | + touchBottom:false ,//触底提示 |
114 | + messageNum:0, | ||
112 | } | 115 | } |
113 | }, | 116 | }, |
114 | onReachBottom: function() { | 117 | onReachBottom: function() { |
@@ -129,6 +132,7 @@ | @@ -129,6 +132,7 @@ | ||
129 | }, | 132 | }, |
130 | onShow() { | 133 | onShow() { |
131 | this.myNum() | 134 | this.myNum() |
135 | + this.messageNums() | ||
132 | }, | 136 | }, |
133 | methods: { | 137 | methods: { |
134 | login(){ | 138 | login(){ |
@@ -224,6 +228,14 @@ | @@ -224,6 +228,14 @@ | ||
224 | uni.reLaunch({ | 228 | uni.reLaunch({ |
225 | url: '/myPackage/pages/me/me' | 229 | url: '/myPackage/pages/me/me' |
226 | }); | 230 | }); |
231 | + }, | ||
232 | + //留言个数 | ||
233 | + messageNums(){ | ||
234 | + request.get('/api/mation/unreadNumber',{}).then(res=>{ | ||
235 | + this.messageNum=res.data.number | ||
236 | + }).catch(err=>{ | ||
237 | + | ||
238 | + }) | ||
227 | } | 239 | } |
228 | } | 240 | } |
229 | } | 241 | } |
@@ -281,4 +293,19 @@ | @@ -281,4 +293,19 @@ | ||
281 | color: #879099; | 293 | color: #879099; |
282 | font-size: 18rpx; | 294 | font-size: 18rpx; |
283 | } | 295 | } |
296 | + .num { | ||
297 | + position: absolute; | ||
298 | + background: red; | ||
299 | + height: 30rpx; | ||
300 | + font-size: 22rpx; | ||
301 | + line-height: 30rpx; | ||
302 | + text-align: center; | ||
303 | + border-radius: 16rpx; | ||
304 | + color: #fff; | ||
305 | + top: 6rpx; | ||
306 | + right: 30rpx; | ||
307 | + min-width: 18rpx; | ||
308 | + max-width: 60rpx; | ||
309 | + padding: 0 6rpx; | ||
310 | + } | ||
284 | </style> | 311 | </style> |
@@ -14,16 +14,19 @@ | @@ -14,16 +14,19 @@ | ||
14 | <view class="rightBox" @click="yimai(goodDatas.goods_id)" v-if="yimaiBtn"> | 14 | <view class="rightBox" @click="yimai(goodDatas.goods_id)" v-if="yimaiBtn"> |
15 | 已买 | 15 | 已买 |
16 | </view> | 16 | </view> |
17 | - <view class="rightBox1" v-if="!yimaiBtn"> | 17 | + <view class="rightBox1" v-if="!yimaiBtn"> |
18 | 已买 | 18 | 已买 |
19 | </view> | 19 | </view> |
20 | </view> | 20 | </view> |
21 | <view :class="Number(index)==2?'margin1':'margin0'"> | 21 | <view :class="Number(index)==2?'margin1':'margin0'"> |
22 | <view class="" v-if="index==1"> | 22 | <view class="" v-if="index==1"> |
23 | - <view class="" v-for="(item,index) in list" :key="index" :class="item.type==1?'leftItem':'rightItem'"> | ||
24 | - <image :src="item.avatar1" mode="" class="headImg" v-if="item.type==1"></image> | ||
25 | - <image :src="item.avatar1" mode="" class="headImg" v-if="item.type==0"></image> | ||
26 | - <view :class="item.type==1?'leftContent':'rightContent'" style="position: relative;"> | 23 | + <view class="" v-for="(item,index) in list" :key="index" :class="item.type==1&&item.datetime?'leftItem1':item.type==1&&!item.datetime?'leftItem':item.type==0&&item.datetime?'rightItem1':item.type==0&&!item.datetime?'rightItem':''"> |
24 | + <view class="dateTime" v-if="item.datetime!==undefined"> | ||
25 | + {{item.datetime}} | ||
26 | + </view> | ||
27 | + <image :src="item.avatar1" mode="" :class="item.datetime?'headImg1':'headImg'" v-if="item.type==1"></image> | ||
28 | + <image :src="item.avatar1" mode="" :class="item.datetime?'headImg1':'headImg'" v-if="item.type==0"></image> | ||
29 | + <view :class="item.type==1&&item.datetime?'leftContent1':item.type==1&&!item.datetime?'leftContent':item.type==0&&item.datetime?'rightContent1':'rightContent'" style="position: relative;"> | ||
27 | {{item.content}} | 30 | {{item.content}} |
28 | <view class="" style="width: 20rpx;height: 20rpx;background-color: #fff;transform: rotate(45deg);position: absolute;top: 36rpx;left: -10rpx;" | 31 | <view class="" style="width: 20rpx;height: 20rpx;background-color: #fff;transform: rotate(45deg);position: absolute;top: 36rpx;left: -10rpx;" |
29 | v-if="item.type==1"> | 32 | v-if="item.type==1"> |
@@ -39,6 +42,9 @@ | @@ -39,6 +42,9 @@ | ||
39 | </view> | 42 | </view> |
40 | <view class="" v-if="index==2"> | 43 | <view class="" v-if="index==2"> |
41 | <view class="" v-for="(item,index) in list" :key="index" :class="item.type==0?'leftItem':'rightItem'"> | 44 | <view class="" v-for="(item,index) in list" :key="index" :class="item.type==0?'leftItem':'rightItem'"> |
45 | + <view class="dateTime" v-if="item.datetime!==undefined"> | ||
46 | + {{item.datetime}} | ||
47 | + </view> | ||
42 | <image :src="item.avatar1" mode="" class="headImg" v-if="item.type==0"></image> | 48 | <image :src="item.avatar1" mode="" class="headImg" v-if="item.type==0"></image> |
43 | <image :src="item.avatar1" mode="" class="headImg" v-if="item.type==1"></image> | 49 | <image :src="item.avatar1" mode="" class="headImg" v-if="item.type==1"></image> |
44 | <view :class="item.type==0?'leftContent':'rightContent'" style="position: relative;"> | 50 | <view :class="item.type==0?'leftContent':'rightContent'" style="position: relative;"> |
@@ -58,7 +64,7 @@ | @@ -58,7 +64,7 @@ | ||
58 | 64 | ||
59 | </view> | 65 | </view> |
60 | <view :class="!picList?'inputBox':'inputBox inputBoxHeight'"> | 66 | <view :class="!picList?'inputBox':'inputBox inputBoxHeight'"> |
61 | - <textarea type="text" value="inputText" v-model="inputText" @input="bindInput" placeholder="请输入最新消息" cursor-spacing='40'/> | 67 | + <textarea type="text" value="inputText" v-model="inputText" @input="bindInput" placeholder="请输入最新消息" cursor-spacing='40' /> |
62 | <!-- <view class="addIcon" @click.stop="addPic" v-if="inputText==''"> | 68 | <!-- <view class="addIcon" @click.stop="addPic" v-if="inputText==''"> |
63 | + | 69 | + |
64 | </view> --> | 70 | </view> --> |
@@ -296,6 +302,12 @@ | @@ -296,6 +302,12 @@ | ||
296 | height: 88rpx; | 302 | height: 88rpx; |
297 | border-radius: 50%; | 303 | border-radius: 50%; |
298 | } | 304 | } |
305 | + .headImg1 { | ||
306 | + width: 88rpx; | ||
307 | + height: 88rpx; | ||
308 | + border-radius: 50%; | ||
309 | + margin-top: 72rpx; | ||
310 | + } | ||
299 | .sendBtn{ | 311 | .sendBtn{ |
300 | padding: 6rpx 10rpx; | 312 | padding: 6rpx 10rpx; |
301 | font-size: 24rpx; | 313 | font-size: 24rpx; |
@@ -305,24 +317,22 @@ | @@ -305,24 +317,22 @@ | ||
305 | margin-left: 20rpx; | 317 | margin-left: 20rpx; |
306 | 318 | ||
307 | } | 319 | } |
308 | -.sendBtn1{ | ||
309 | - padding: 6rpx 10rpx; | ||
310 | - font-size: 24rpx; | ||
311 | - border: 2rpx solid #d7d7d8; | ||
312 | - color: #d7d7d8; | ||
313 | - border-radius: 10rpx; | ||
314 | - margin-left: 20rpx; | ||
315 | - | ||
316 | -} | ||
317 | /* 左边 */ | 320 | /* 左边 */ |
318 | .leftItem { | 321 | .leftItem { |
319 | display: flex; | 322 | display: flex; |
320 | padding: 0 24rpx; | 323 | padding: 0 24rpx; |
321 | box-sizing: border-box; | 324 | box-sizing: border-box; |
322 | - margin-bottom: 20rpx; | ||
323 | - | 325 | + margin-bottom: 40rpx; |
326 | + position: relative; | ||
327 | + } | ||
328 | +.leftItem1 { | ||
329 | + display: flex; | ||
330 | + padding: 0 24rpx; | ||
331 | + box-sizing: border-box; | ||
332 | + margin-bottom: 40rpx; | ||
333 | + position: relative; | ||
334 | + margin-top: 70rpx; | ||
324 | } | 335 | } |
325 | - | ||
326 | .leftContent { | 336 | .leftContent { |
327 | background-color: #fff; | 337 | background-color: #fff; |
328 | padding: 26rpx 20rpx; | 338 | padding: 26rpx 20rpx; |
@@ -331,14 +341,32 @@ | @@ -331,14 +341,32 @@ | ||
331 | max-width: 560rpx; | 341 | max-width: 560rpx; |
332 | border-radius: 16rpx; | 342 | border-radius: 16rpx; |
333 | } | 343 | } |
334 | - | 344 | +.leftContent1 { |
345 | + background-color: #fff; | ||
346 | + padding: 26rpx 20rpx; | ||
347 | + box-sizing: border-box; | ||
348 | + margin-left: 20rpx; | ||
349 | + max-width: 560rpx; | ||
350 | + border-radius: 16rpx; | ||
351 | + margin-top: 72rpx; | ||
352 | + } | ||
335 | /* 右边 */ | 353 | /* 右边 */ |
336 | .rightItem { | 354 | .rightItem { |
337 | display: flex; | 355 | display: flex; |
338 | padding: 0 24rpx; | 356 | padding: 0 24rpx; |
339 | box-sizing: border-box; | 357 | box-sizing: border-box; |
340 | - margin-bottom: 20rpx; | 358 | + margin-bottom: 40rpx; |
359 | + flex-direction: row-reverse; | ||
360 | + position:relative; | ||
361 | + } | ||
362 | + .rightItem1 { | ||
363 | + display: flex; | ||
364 | + padding: 0 24rpx; | ||
365 | + box-sizing: border-box; | ||
366 | + margin-bottom: 40rpx; | ||
341 | flex-direction: row-reverse; | 367 | flex-direction: row-reverse; |
368 | + position:relative; | ||
369 | + margin-top: 70rpx; | ||
342 | } | 370 | } |
343 | 371 | ||
344 | .rightContent { | 372 | .rightContent { |
@@ -350,6 +378,16 @@ | @@ -350,6 +378,16 @@ | ||
350 | color: #fff; | 378 | color: #fff; |
351 | border-radius: 16rpx; | 379 | border-radius: 16rpx; |
352 | } | 380 | } |
381 | +.rightContent1 { | ||
382 | + background-color: #FF834D; | ||
383 | + padding: 20rpx; | ||
384 | + box-sizing: border-box; | ||
385 | + margin-right: 20rpx; | ||
386 | + max-width: 560rpx; | ||
387 | + color: #fff; | ||
388 | + border-radius: 16rpx; | ||
389 | + margin-top: 72rpx; | ||
390 | + } | ||
353 | 391 | ||
354 | .inputBox { | 392 | .inputBox { |
355 | width: 100%; | 393 | width: 100%; |
@@ -394,4 +432,15 @@ | @@ -394,4 +432,15 @@ | ||
394 | line-height: 40rpx; | 432 | line-height: 40rpx; |
395 | margin-left: 20rpx; | 433 | margin-left: 20rpx; |
396 | } | 434 | } |
435 | + .dateTime{ | ||
436 | + position: absolute; | ||
437 | + top:-44rpx; | ||
438 | + left: 44%; | ||
439 | + opacity: 1; | ||
440 | + background: #cccccc; | ||
441 | + border-radius: 16px; | ||
442 | + padding: 0 30rpx; | ||
443 | + font-size: 20rpx; | ||
444 | + color: #fff; | ||
445 | + } | ||
397 | </style> | 446 | </style> |
@@ -128,9 +128,9 @@ | @@ -128,9 +128,9 @@ | ||
128 | <view class="maskAddress"> | 128 | <view class="maskAddress"> |
129 | {{item.address}} | 129 | {{item.address}} |
130 | </view> | 130 | </view> |
131 | - <view class="maskAddress"> | 131 | + <!-- <view class="maskAddress"> |
132 | {{item.dis}}km | 132 | {{item.dis}}km |
133 | - </view> | 133 | + </view> --> |
134 | </view> | 134 | </view> |
135 | </view> | 135 | </view> |
136 | </view> | 136 | </view> |
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | {{addressText}} | 7 | {{addressText}} |
8 | <!-- <image src="/static/image/Frame_11@2x.png" mode="" style="width: 24rpx;height: 24rpx;"></image> --> | 8 | <!-- <image src="/static/image/Frame_11@2x.png" mode="" style="width: 24rpx;height: 24rpx;"></image> --> |
9 | <view class="arrowWhite"> | 9 | <view class="arrowWhite"> |
10 | - | 10 | + |
11 | </view> | 11 | </view> |
12 | </view> | 12 | </view> |
13 | </view> | 13 | </view> |
@@ -37,16 +37,14 @@ | @@ -37,16 +37,14 @@ | ||
37 | </view> | 37 | </view> |
38 | </view> | 38 | </view> |
39 | <view class="swiperBox"> | 39 | <view class="swiperBox"> |
40 | - <swiper class="swiper" :indicator-dots="indicatorDots" | ||
41 | - :duration="duration" | ||
42 | - :circular="true" autoplay="true"> | 40 | + <swiper class="swiper" :indicator-dots="indicatorDots" :duration="duration" :circular="true" autoplay="true"> |
43 | <swiper-item v-for="(item,index) in swiperList" :key="index" @click="goGood(item.id_status)"> | 41 | <swiper-item v-for="(item,index) in swiperList" :key="index" @click="goGood(item.id_status)"> |
44 | <image :src="item.image" mode="" class="swiper"></image> | 42 | <image :src="item.image" mode="" class="swiper"></image> |
45 | </swiper-item> | 43 | </swiper-item> |
46 | </swiper> | 44 | </swiper> |
47 | </view> | 45 | </view> |
48 | <view class="classifyBox"> | 46 | <view class="classifyBox"> |
49 | - <view class="classifyPic" v-for="(item,index) in ClassifyList" :key="index" @click="goClass(index,item.id)" v-if="index<3"> | 47 | + <view class="classifyPic" v-for="(item,index) in ClassifyList1" :key="index" @click="goClass(index,item.id)" v-if="index<3"> |
50 | <image :src="item.image" mode=""></image> | 48 | <image :src="item.image" mode=""></image> |
51 | <text class="classifyText">{{item.name}}</text> | 49 | <text class="classifyText">{{item.name}}</text> |
52 | </view> | 50 | </view> |
@@ -55,7 +53,7 @@ | @@ -55,7 +53,7 @@ | ||
55 | <text class="classifyText">分类</text> | 53 | <text class="classifyText">分类</text> |
56 | </view> | 54 | </view> |
57 | </view> | 55 | </view> |
58 | - <view style="margin: 0 30rpx 0 34rpx;"> | 56 | + <view style="margin: 0 30rpx 0 34rpx;" v-if="listTypecont.length>0"> |
59 | <view class="pintuanBox"> | 57 | <view class="pintuanBox"> |
60 | <view class="pintuanTop"> | 58 | <view class="pintuanTop"> |
61 | <view class="topLeft" style="display: flex;align-items: center;"> | 59 | <view class="topLeft" style="display: flex;align-items: center;"> |
@@ -106,7 +104,7 @@ | @@ -106,7 +104,7 @@ | ||
106 | </view> | 104 | </view> |
107 | <view class="picker" style="position: relative;"> | 105 | <view class="picker" style="position: relative;"> |
108 | <picker @change="bindPickerChange" :value="index" :range="array" class="picker"> | 106 | <picker @change="bindPickerChange" :value="index" :range="array" class="picker"> |
109 | - <view class="uni-input pickerIner" >{{array[index]}}</view> | 107 | + <view class="uni-input pickerIner">{{array[index]}}</view> |
110 | <view class="image" style="position: absolute;top: 0;left: 150rpx;"> | 108 | <view class="image" style="position: absolute;top: 0;left: 150rpx;"> |
111 | <image src="/static/image/fenlei_icon_3@2x.png" mode="" style="width: 28rpx;height: 28rpx;"></image> | 109 | <image src="/static/image/fenlei_icon_3@2x.png" mode="" style="width: 28rpx;height: 28rpx;"></image> |
112 | </view> | 110 | </view> |
@@ -174,12 +172,12 @@ | @@ -174,12 +172,12 @@ | ||
174 | </view> | 172 | </view> |
175 | <view class="addressMask"> | 173 | <view class="addressMask"> |
176 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> | 174 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> |
177 | - <view class="maskAddress" style="max-width: 104rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | 175 | + <view class="maskAddress" style="max-width: 204rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> |
178 | {{item.address}} | 176 | {{item.address}} |
179 | </view> | 177 | </view> |
180 | - <view class="maskAddress"> | 178 | + <!-- <view class="maskAddress"> |
181 | {{item.distance}}km | 179 | {{item.distance}}km |
182 | - </view> | 180 | + </view> --> |
183 | </view> | 181 | </view> |
184 | </view> | 182 | </view> |
185 | </view> | 183 | </view> |
@@ -219,12 +217,12 @@ | @@ -219,12 +217,12 @@ | ||
219 | </view> | 217 | </view> |
220 | <view class="addressMask"> | 218 | <view class="addressMask"> |
221 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> | 219 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> |
222 | - <view class="maskAddress" style="max-width: 104rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | 220 | + <view class="maskAddress" style="max-width: 204rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> |
223 | {{item.address}} | 221 | {{item.address}} |
224 | </view> | 222 | </view> |
225 | - <view class="maskAddress"> | 223 | + <!-- <view class="maskAddress"> |
226 | {{item.distance.toFixed(2)}}km | 224 | {{item.distance.toFixed(2)}}km |
227 | - </view> | 225 | + </view> --> |
228 | </view> | 226 | </view> |
229 | </view> | 227 | </view> |
230 | </view> | 228 | </view> |
@@ -263,16 +261,19 @@ | @@ -263,16 +261,19 @@ | ||
263 | <text class="botTextFa">发布</text> | 261 | <text class="botTextFa">发布</text> |
264 | </view> | 262 | </view> |
265 | </li> | 263 | </li> |
266 | - <li @click="goMessage"> | 264 | + <li @click="goMessage" style="position: relative;"> |
267 | <image src="../../static/image/xiaoxi_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> | 265 | <image src="../../static/image/xiaoxi_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> |
268 | <text class="botText">消息</text> | 266 | <text class="botText">消息</text> |
267 | + <view class="num" > | ||
268 | + {{messageNum>99?'99+':messageNum}} | ||
269 | + </view> | ||
269 | </li> | 270 | </li> |
270 | <li @click="goMe"> | 271 | <li @click="goMe"> |
271 | <image src="../../static/image/wode_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> | 272 | <image src="../../static/image/wode_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> |
272 | <text class="botText">我的</text> | 273 | <text class="botText">我的</text> |
273 | </li> | 274 | </li> |
274 | </ul> | 275 | </ul> |
275 | - | 276 | + |
276 | </view> | 277 | </view> |
277 | 278 | ||
278 | 279 | ||
@@ -282,45 +283,46 @@ | @@ -282,45 +283,46 @@ | ||
282 | import request from '../../utils/request.js' | 283 | import request from '../../utils/request.js' |
283 | export default { | 284 | export default { |
284 | onLoad: function(options) { | 285 | onLoad: function(options) { |
285 | - uni.setStorageSync('pid',options.userId) | ||
286 | - if(options.address){ | ||
287 | - this.addressText=options.address | ||
288 | - uni.setStorageSync('aaa',11) | ||
289 | - uni.setStorageSync('City',options.address) | ||
290 | - uni.setStorageSync('lat',options.lat) | ||
291 | - uni.setStorageSync('lot',options.lot) | ||
292 | - }else{ | ||
293 | - | 286 | + uni.setStorageSync('pid', options.userId) |
287 | + if (options.address) { | ||
288 | + this.addressText = options.address | ||
289 | + uni.setStorageSync('aaa', 11) | ||
290 | + uni.setStorageSync('City', options.address) | ||
291 | + uni.setStorageSync('lat', options.lat) | ||
292 | + uni.setStorageSync('lot', options.lot) | ||
293 | + } else { | ||
294 | + | ||
294 | } | 295 | } |
295 | - | ||
296 | - if(uni.getStorageSync('token')){ | ||
297 | - this.token=true | 296 | + |
297 | + if (uni.getStorageSync('token')) { | ||
298 | + this.token = true | ||
298 | } | 299 | } |
299 | - setTimeout(()=>{ | ||
300 | - this.swiper(); | ||
301 | - this.classifyData(); //分类 | ||
302 | - this.jfavtivity(); //拼团 | ||
303 | - this.board() //广告 | ||
304 | - this.jvliSelect(); //距离选择 | ||
305 | - this.classifylistss(); //分类选择 | ||
306 | - this.goodsXy(); //发现需要 | ||
307 | - this.goodsXz(); //闲置物品 | ||
308 | - },500) | 300 | + |
309 | }, | 301 | }, |
310 | - onShow: function(){ | 302 | + onShow: function() { |
311 | let that = this | 303 | let that = this |
312 | - if(uni.getStorageSync("City") == ""){ | 304 | + if (uni.getStorageSync("City") == "") { |
313 | this.getLocations(); | 305 | this.getLocations(); |
314 | - }else{ | 306 | + } else { |
315 | that.addressText = uni.getStorageSync("City") | 307 | that.addressText = uni.getStorageSync("City") |
316 | } | 308 | } |
317 | - | 309 | + setTimeout(() => { |
310 | + this.swiper(); | ||
311 | + this.classifyData(); //分类 | ||
312 | + this.jfavtivity(); //拼团 | ||
313 | + this.board() //广告 | ||
314 | + this.jvliSelect(); //距离选择 | ||
315 | + this.classifylistss(); //分类选择 | ||
316 | + this.goodsXy(); //发现需要 | ||
317 | + this.goodsXz(); //闲置物品 | ||
318 | + this.messageNums()//留言个数 | ||
319 | + }, 500) | ||
318 | }, | 320 | }, |
319 | data() { | 321 | data() { |
320 | return { | 322 | return { |
321 | - token:false, | ||
322 | - pageNums:1, | ||
323 | - pageNum:1, | 323 | + token: false, |
324 | + pageNums: 1, | ||
325 | + pageNum: 1, | ||
324 | addressText: '', | 326 | addressText: '', |
325 | IndexImg: 'https://s3.ax1x.com/2021/01/11/s8PyTK.png', | 327 | IndexImg: 'https://s3.ax1x.com/2021/01/11/s8PyTK.png', |
326 | longitude: '', | 328 | longitude: '', |
@@ -328,56 +330,67 @@ | @@ -328,56 +330,67 @@ | ||
328 | address: '', //定位 | 330 | address: '', //定位 |
329 | noAddress: false, | 331 | noAddress: false, |
330 | swiperList: [], //轮播图 | 332 | swiperList: [], //轮播图 |
331 | - autoplay:true, | ||
332 | - duration:1500, | ||
333 | - indicatorDots:true, | 333 | + autoplay: true, |
334 | + duration: 1500, | ||
335 | + indicatorDots: true, | ||
334 | boardImg: '', //广告 | 336 | boardImg: '', //广告 |
335 | IndexImg: 'https://s3.ax1x.com/2021/01/11/s8PyTK.png', | 337 | IndexImg: 'https://s3.ax1x.com/2021/01/11/s8PyTK.png', |
336 | address: '', //定位 | 338 | address: '', //定位 |
337 | - inputValue: '', | 339 | + inputValue: '', |
338 | //拼团 | 340 | //拼团 |
339 | listTypecont: [], | 341 | listTypecont: [], |
340 | scrollTop: 0, | 342 | scrollTop: 0, |
341 | tabList: ['闲置物品', '发现需要'], | 343 | tabList: ['闲置物品', '发现需要'], |
342 | tabIndex: 0, | 344 | tabIndex: 0, |
343 | //距离 | 345 | //距离 |
344 | - arrayList:[], | 346 | + arrayList: [], |
345 | array: [], | 347 | array: [], |
346 | index: 0, | 348 | index: 0, |
347 | //分类 | 349 | //分类 |
350 | + ClassifyList1: [], | ||
348 | ClassifyList: [], | 351 | ClassifyList: [], |
349 | classArray: [], | 352 | classArray: [], |
350 | index1: 0, | 353 | index1: 0, |
351 | //商品 | 354 | //商品 |
352 | goodsList: [], | 355 | goodsList: [], |
353 | goodsList1: [], | 356 | goodsList1: [], |
354 | - show: false | 357 | + show: false, |
358 | + messageNum:0 //消息个数 | ||
355 | } | 359 | } |
356 | }, | 360 | }, |
357 | created() { | 361 | created() { |
358 | - | 362 | + |
363 | + }, | ||
364 | + onReachBottom() { | ||
365 | + if (this.tabIndex == 0) { | ||
366 | + this.pageNum = this.pageNum + 1 | ||
367 | + this.goodsXz() | ||
368 | + } else { | ||
369 | + this.pageNum = this.pageNum + 1 | ||
370 | + this.goodsXy() | ||
371 | + } | ||
359 | }, | 372 | }, |
360 | methods: { | 373 | methods: { |
361 | - login(){ | 374 | + login() { |
362 | uni.navigateTo({ | 375 | uni.navigateTo({ |
363 | - url:"/pages/index/login" | 376 | + url: "/pages/index/login" |
364 | }) | 377 | }) |
365 | }, | 378 | }, |
366 | //签到 | 379 | //签到 |
367 | signIn() { | 380 | signIn() { |
368 | - if(this.token){ | 381 | + if (this.token) { |
369 | request.get('/api/number/signIn', {}).then(res => { | 382 | request.get('/api/number/signIn', {}).then(res => { |
370 | uni.showToast({ | 383 | uni.showToast({ |
371 | title: res.msg, | 384 | title: res.msg, |
372 | icon: 'none' | 385 | icon: 'none' |
373 | }) | 386 | }) |
374 | }).catch(err => { | 387 | }).catch(err => { |
375 | - | 388 | + |
376 | }) | 389 | }) |
377 | - }else{ | 390 | + } else { |
378 | this.login() | 391 | this.login() |
379 | } | 392 | } |
380 | - | 393 | + |
381 | 394 | ||
382 | }, | 395 | }, |
383 | getLocations() { | 396 | getLocations() { |
@@ -396,10 +409,10 @@ | @@ -396,10 +409,10 @@ | ||
396 | }, | 409 | }, |
397 | success: res => { | 410 | success: res => { |
398 | wx.setStorageSync('City', res.data.result.address_component.city) | 411 | wx.setStorageSync('City', res.data.result.address_component.city) |
399 | - if(that.addressText==''){ | ||
400 | - if(uni.getStorageSync("City") == ""){ | ||
401 | - that.addressText = res.data.result.address_component.city | ||
402 | - }else{ | 412 | + if (that.addressText == '') { |
413 | + if (uni.getStorageSync("City") == "") { | ||
414 | + that.addressText = res.data.result.address_component.city | ||
415 | + } else { | ||
403 | that.addressText = uni.getStorageSync("City") | 416 | that.addressText = uni.getStorageSync("City") |
404 | } | 417 | } |
405 | } | 418 | } |
@@ -413,10 +426,10 @@ | @@ -413,10 +426,10 @@ | ||
413 | }, | 426 | }, |
414 | //藏宝图 | 427 | //藏宝图 |
415 | cangbao() { | 428 | cangbao() { |
416 | - if(this.token){ | 429 | + if (this.token) { |
417 | var t = this; | 430 | var t = this; |
418 | let lat = uni.getStorageSync('lat') | 431 | let lat = uni.getStorageSync('lat') |
419 | - if (!lat ) { | 432 | + if (!lat) { |
420 | uni.authorize({ | 433 | uni.authorize({ |
421 | scope: 'scope.userLocation', | 434 | scope: 'scope.userLocation', |
422 | success(res) { | 435 | success(res) { |
@@ -447,16 +460,16 @@ | @@ -447,16 +460,16 @@ | ||
447 | url: '/pages/index/map' | 460 | url: '/pages/index/map' |
448 | }) | 461 | }) |
449 | } | 462 | } |
450 | - }else{ | 463 | + } else { |
451 | this.login() | 464 | this.login() |
452 | } | 465 | } |
453 | - | 466 | + |
454 | }, | 467 | }, |
455 | goSelectAddress() { | 468 | goSelectAddress() { |
456 | - if(this.token){ | 469 | + if (this.token) { |
457 | var t = this; | 470 | var t = this; |
458 | let lat = uni.getStorageSync('lat') | 471 | let lat = uni.getStorageSync('lat') |
459 | - if (!lat ) { | 472 | + if (!lat) { |
460 | uni.authorize({ | 473 | uni.authorize({ |
461 | scope: 'scope.userLocation', | 474 | scope: 'scope.userLocation', |
462 | success(res) { | 475 | success(res) { |
@@ -487,10 +500,10 @@ | @@ -487,10 +500,10 @@ | ||
487 | url: '/pages/index/select-location' | 500 | url: '/pages/index/select-location' |
488 | }) | 501 | }) |
489 | } | 502 | } |
490 | - }else{ | 503 | + } else { |
491 | this.login() | 504 | this.login() |
492 | } | 505 | } |
493 | - | 506 | + |
494 | }, | 507 | }, |
495 | 508 | ||
496 | //轮播图 | 509 | //轮播图 |
@@ -504,7 +517,7 @@ | @@ -504,7 +517,7 @@ | ||
504 | }, | 517 | }, |
505 | goGood(status) { | 518 | goGood(status) { |
506 | uni.navigateTo({ | 519 | uni.navigateTo({ |
507 | - url: '/pages/index/integral-good?status='+status | 520 | + url: '/pages/index/integral-good?status=' + status |
508 | }) | 521 | }) |
509 | }, | 522 | }, |
510 | //积分活动 | 523 | //积分活动 |
@@ -545,6 +558,7 @@ | @@ -545,6 +558,7 @@ | ||
545 | list.forEach((item, index) => { | 558 | list.forEach((item, index) => { |
546 | this.classArray.push(item.name) | 559 | this.classArray.push(item.name) |
547 | }) | 560 | }) |
561 | + this.classArray.unshift('全部') | ||
548 | }).catch(ex => { | 562 | }).catch(ex => { |
549 | 563 | ||
550 | }); | 564 | }); |
@@ -555,9 +569,9 @@ | @@ -555,9 +569,9 @@ | ||
555 | .then(res => { | 569 | .then(res => { |
556 | let list = res.data.info | 570 | let list = res.data.info |
557 | list.forEach((item, index) => { | 571 | list.forEach((item, index) => { |
558 | - this.array.push(item.long+"km") | 572 | + this.array.push(item.long + "km") |
559 | this.arrayList.push(item) | 573 | this.arrayList.push(item) |
560 | - | 574 | + |
561 | }) | 575 | }) |
562 | }).catch(ex => { | 576 | }).catch(ex => { |
563 | 577 | ||
@@ -571,7 +585,15 @@ | @@ -571,7 +585,15 @@ | ||
571 | }, | 585 | }, |
572 | classifyData() { | 586 | classifyData() { |
573 | request.get('/api/index/inFen', {}).then(res => { | 587 | request.get('/api/index/inFen', {}).then(res => { |
588 | + // this.ClassifyList1=res.data.info | ||
574 | this.ClassifyList = res.data.info | 589 | this.ClassifyList = res.data.info |
590 | + this.ClassifyList.unshift({ | ||
591 | + id: '', | ||
592 | + name: '全部' | ||
593 | + }) | ||
594 | + let list = this.ClassifyList | ||
595 | + list.shift() | ||
596 | + this.ClassifyList1 = list | ||
575 | }).catch(err => { | 597 | }).catch(err => { |
576 | 598 | ||
577 | }) | 599 | }) |
@@ -579,13 +601,13 @@ | @@ -579,13 +601,13 @@ | ||
579 | //闲置商品 | 601 | //闲置商品 |
580 | goGoodDetailXz(ids) { | 602 | goGoodDetailXz(ids) { |
581 | uni.navigateTo({ | 603 | uni.navigateTo({ |
582 | - url: "/pages/index/good-details?goos_id=" + ids+'&index=1' | 604 | + url: "/pages/index/good-details?goos_id=" + ids + '&index=1' |
583 | }) | 605 | }) |
584 | }, | 606 | }, |
585 | //发现需要 | 607 | //发现需要 |
586 | goGoodDetailFx(ids) { | 608 | goGoodDetailFx(ids) { |
587 | uni.navigateTo({ | 609 | uni.navigateTo({ |
588 | - url: "/pages/index/good-details?id=" + ids+'&index=2' | 610 | + url: "/pages/index/good-details?id=" + ids + '&index=2' |
589 | }) | 611 | }) |
590 | }, | 612 | }, |
591 | //全部分类 | 613 | //全部分类 |
@@ -595,36 +617,38 @@ | @@ -595,36 +617,38 @@ | ||
595 | }) | 617 | }) |
596 | }, | 618 | }, |
597 | // 闲置物品 | 619 | // 闲置物品 |
598 | - goodsXz() { | ||
599 | - let that=this; | 620 | + goodsXz() { |
621 | + let that = this; | ||
600 | request.get("/api/index/xianZhi", { | 622 | request.get("/api/index/xianZhi", { |
601 | lat2: uni.getStorageSync('lat'), | 623 | lat2: uni.getStorageSync('lat'), |
602 | lng2: uni.getStorageSync('lot'), | 624 | lng2: uni.getStorageSync('lot'), |
603 | - id:this.index?that.arrayList[that.index].id:"", | ||
604 | - sort_id:that.index1?that.ClassifyList[that.index1].id:'', | 625 | + id: this.index ? that.arrayList[that.index].id : "", |
626 | + sort_id: that.index1 ? that.ClassifyList[that.index1].id : '', | ||
605 | page: that.pageNum, | 627 | page: that.pageNum, |
606 | rows: 10 | 628 | rows: 10 |
607 | }) | 629 | }) |
608 | .then(res => { | 630 | .then(res => { |
609 | - this.goodsList = res.data.data | 631 | + let list = that.pageNum == 1 ? res.data.data : that.goodsList.concat(res.data.data) |
632 | + this.goodsList = list | ||
610 | }).catch(ex => { | 633 | }).catch(ex => { |
611 | 634 | ||
612 | }); | 635 | }); |
613 | }, | 636 | }, |
614 | //发现需要 | 637 | //发现需要 |
615 | goodsXy() { | 638 | goodsXy() { |
616 | - let that=this | ||
617 | - request.get("/api/index/faXian",{ | 639 | + let that = this |
640 | + request.get("/api/index/faXian", { | ||
618 | lat2: uni.getStorageSync('lat'), | 641 | lat2: uni.getStorageSync('lat'), |
619 | lng2: uni.getStorageSync('lot'), | 642 | lng2: uni.getStorageSync('lot'), |
620 | page: that.pageNums, | 643 | page: that.pageNums, |
621 | rows: 10, | 644 | rows: 10, |
622 | - id:this.index?that.arrayList[that.index].id:"", | ||
623 | - sort_id:that.index1?that.ClassifyList[that.index1].id:'', | 645 | + id: this.index ? that.arrayList[that.index].id : "", |
646 | + sort_id: that.index1 ? that.ClassifyList[that.index1].id : '', | ||
624 | // id:that.arrayList[that.index].id?that.arrayList[that.index].id:'', | 647 | // id:that.arrayList[that.index].id?that.arrayList[that.index].id:'', |
625 | // sort_id:that.classifylist[that.index1].id?that.classifylist[that.index1].id:'', | 648 | // sort_id:that.classifylist[that.index1].id?that.classifylist[that.index1].id:'', |
626 | }) | 649 | }) |
627 | .then(res => { | 650 | .then(res => { |
651 | + let list = that.pageNum == 1 ? res.data.data : that.goodsList1.concat(res.data.data) | ||
628 | that.goodsList1 = res.data.data | 652 | that.goodsList1 = res.data.data |
629 | }).catch(ex => { | 653 | }).catch(ex => { |
630 | 654 | ||
@@ -651,30 +675,31 @@ | @@ -651,30 +675,31 @@ | ||
651 | 675 | ||
652 | //tab | 676 | //tab |
653 | changeTab(Inv) { | 677 | changeTab(Inv) { |
654 | - let that=this | 678 | + let that = this |
655 | that.tabIndex = Inv; | 679 | that.tabIndex = Inv; |
656 | - if(that.tabIndex==0){ | 680 | + if (that.tabIndex == 0) { |
681 | + this.pageNum = 1 | ||
657 | that.goodsXz() | 682 | that.goodsXz() |
658 | - }else{ | 683 | + } else { |
684 | + this.pageNum = 1 | ||
659 | that.goodsXy() | 685 | that.goodsXy() |
660 | } | 686 | } |
661 | }, | 687 | }, |
662 | bindPickerChange: function(e) { | 688 | bindPickerChange: function(e) { |
663 | this.index = e.target.value | 689 | this.index = e.target.value |
664 | - if(this.tabIndex==0){ | 690 | + if (this.tabIndex == 0) { |
665 | this.goodsXz() | 691 | this.goodsXz() |
666 | - }else{ | 692 | + } else { |
667 | this.goodsXy() | 693 | this.goodsXy() |
668 | } | 694 | } |
669 | - | 695 | + |
670 | }, | 696 | }, |
671 | bindPickerChange1: function(e) { | 697 | bindPickerChange1: function(e) { |
672 | - let _that=this | 698 | + let _that = this |
673 | _that.index1 = e.target.value | 699 | _that.index1 = e.target.value |
674 | - if(_that.tabIndex==0){ | 700 | + if (_that.tabIndex == 0) { |
675 | _that.goodsXz() | 701 | _that.goodsXz() |
676 | - }else{ | ||
677 | - console.log('发现') | 702 | + } else { |
678 | _that.goodsXy() | 703 | _that.goodsXy() |
679 | } | 704 | } |
680 | }, | 705 | }, |
@@ -692,24 +717,24 @@ | @@ -692,24 +717,24 @@ | ||
692 | }, | 717 | }, |
693 | //发布 | 718 | //发布 |
694 | goFa() { | 719 | goFa() { |
695 | - if(this.token){ | 720 | + if (this.token) { |
696 | this.show = true | 721 | this.show = true |
697 | - }else{ | 722 | + } else { |
698 | this.login() | 723 | this.login() |
699 | } | 724 | } |
700 | - | 725 | + |
701 | }, | 726 | }, |
702 | //消息 | 727 | //消息 |
703 | goMessage() { | 728 | goMessage() { |
704 | uni.reLaunch({ | 729 | uni.reLaunch({ |
705 | url: '/pages/message/message' | 730 | url: '/pages/message/message' |
706 | - | 731 | + |
707 | }); | 732 | }); |
708 | }, | 733 | }, |
709 | //我的 | 734 | //我的 |
710 | goMe() { | 735 | goMe() { |
711 | uni.reLaunch({ | 736 | uni.reLaunch({ |
712 | - url:'/myPackage/pages/me/me' | 737 | + url: '/myPackage/pages/me/me' |
713 | }); | 738 | }); |
714 | }, | 739 | }, |
715 | onClose() { | 740 | onClose() { |
@@ -725,6 +750,14 @@ | @@ -725,6 +750,14 @@ | ||
725 | // fail() {} | 750 | // fail() {} |
726 | // }) | 751 | // }) |
727 | // } | 752 | // } |
753 | + //留言个数 | ||
754 | + messageNums(){ | ||
755 | + request.get('/api/mation/unreadNumber',{}).then(res=>{ | ||
756 | + this.messageNum=res.data.number | ||
757 | + }).catch(err=>{ | ||
758 | + | ||
759 | + }) | ||
760 | + } | ||
728 | } | 761 | } |
729 | } | 762 | } |
730 | </script> | 763 | </script> |
@@ -756,6 +789,7 @@ | @@ -756,6 +789,7 @@ | ||
756 | bottom: 0; | 789 | bottom: 0; |
757 | width: 100%; | 790 | width: 100%; |
758 | display: flex; | 791 | display: flex; |
792 | + z-index: 99; | ||
759 | } | 793 | } |
760 | 794 | ||
761 | ul li { | 795 | ul li { |
@@ -783,4 +817,20 @@ | @@ -783,4 +817,20 @@ | ||
783 | width: 88rpx; | 817 | width: 88rpx; |
784 | height: 88rpx; | 818 | height: 88rpx; |
785 | } | 819 | } |
820 | + | ||
821 | + .num { | ||
822 | + position: absolute; | ||
823 | + background: red; | ||
824 | + height: 30rpx; | ||
825 | + font-size: 22rpx; | ||
826 | + line-height: 30rpx; | ||
827 | + text-align: center; | ||
828 | + border-radius: 16rpx; | ||
829 | + color: #fff; | ||
830 | + top: 6rpx; | ||
831 | + right: 30rpx; | ||
832 | + min-width: 18rpx; | ||
833 | + max-width: 60rpx; | ||
834 | + padding: 0 6rpx; | ||
835 | + } | ||
786 | </style> | 836 | </style> |
@@ -4,10 +4,11 @@ | @@ -4,10 +4,11 @@ | ||
4 | <view> | 4 | <view> |
5 | <scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll" scroll-left="120"> | 5 | <scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll" scroll-left="120"> |
6 | <view class="" v-for="(item,index) in list" :key="index" style="display: inline-block;margin-right: 108rpx;"> | 6 | <view class="" v-for="(item,index) in list" :key="index" style="display: inline-block;margin-right: 108rpx;"> |
7 | - <view :class="index==indexs?'active':''" @click="selectClassify(item.id,index)"> | 7 | + <view :class="index==indexs?'active':''" @click="selectClassify(item,index)"> |
8 | {{item.name}} | 8 | {{item.name}} |
9 | </view> | 9 | </view> |
10 | - <view class="secondBox" v-if="show&&!!secondList"> | 10 | + <!-- <view class="secondBox" v-if="show&&!!secondList"> --> |
11 | + <view class="secondBox" v-if="secondList.length>0"> | ||
11 | <view :class="secondIndex==indexs?'secondItem activeSecond':'secondItem'" v-for="(items,indexs) in secondList" | 12 | <view :class="secondIndex==indexs?'secondItem activeSecond':'secondItem'" v-for="(items,indexs) in secondList" |
12 | :key="indexs" @click="selectSecond(indexs,items.id)"> | 13 | :key="indexs" @click="selectSecond(indexs,items.id)"> |
13 | {{items.name}} | 14 | {{items.name}} |
@@ -77,42 +78,73 @@ | @@ -77,42 +78,73 @@ | ||
77 | }, | 78 | }, |
78 | methods: { | 79 | methods: { |
79 | selectClassify(ids, index) { | 80 | selectClassify(ids, index) { |
81 | + this.secondList=[] | ||
82 | + let that = this; | ||
80 | this.indexs = index | 83 | this.indexs = index |
81 | - this.secndClassify(ids) | ||
82 | - if (this.secondList.length !== 0) { | ||
83 | - if(this.indexs!==0){ | ||
84 | - this.show = true; | ||
85 | - this.secondIndex = 0; | ||
86 | - }else{ | ||
87 | - this.show = false; | 84 | + if(index==0){ |
85 | + request.get('/api/index/cang', { | ||
86 | + sort2_id:'' | ||
87 | + }).then(res => { | ||
88 | + console.log(1111) | ||
89 | + console.log(res) | ||
90 | + that.goodListLength = res.data.length | ||
91 | + let tempData = res.data; | ||
92 | + that.goodList = res.data; | ||
93 | + that.covers = []; | ||
94 | + for (let obj of tempData) { | ||
95 | + let tempInfo = JSON.parse(JSON.stringify(that.obj)); | ||
96 | + tempInfo.id = Number(obj.goods_id); | ||
97 | + tempInfo.callout.content = obj.goods_name; | ||
98 | + tempInfo.latitude = obj.lat; | ||
99 | + tempInfo.longitude = obj.lng; | ||
100 | + tempInfo.longitude = obj.lng; | ||
101 | + tempInfo.iconPath = obj.good_image; | ||
102 | + console.log(obj.good_image,'imahe') | ||
103 | + that.covers=tempInfo | ||
104 | + } | ||
105 | + }).catch(err => { | ||
106 | + }) | ||
107 | + }else{ | ||
108 | + this.secndClassify(ids) | ||
109 | + if (this.secondList.length !== 0) { | ||
110 | + if(this.indexs!==0){ | ||
111 | + this.show = true; | ||
112 | + this.secondIndex = 0; | ||
113 | + }else{ | ||
114 | + this.show = false; | ||
115 | + } | ||
116 | + | ||
117 | + } else { | ||
118 | + this.show = !this.show; | ||
88 | } | 119 | } |
89 | - | ||
90 | - } else { | ||
91 | - this.show = !this.show; | 120 | + this.$forceUpdate() |
92 | } | 121 | } |
93 | - this.$forceUpdate() | 122 | + |
94 | }, | 123 | }, |
95 | //一级分类 | 124 | //一级分类 |
96 | firstClassify() { | 125 | firstClassify() { |
97 | - request.get('/api/index/fen', {}).then(res => { | ||
98 | - this.list = res.data.info | ||
99 | - this.list.unshift({id:-1,name:'全部'}) | ||
100 | - this.secndClassify(this.list[0].id) | ||
101 | - }).catch(err => { | ||
102 | - | ||
103 | - }) | 126 | + request.get('/api/index/fen', {}).then(res => { |
127 | + this.list = res.data.info | ||
128 | + this.list.unshift({id:'',name:'全部'}) | ||
129 | + this.secndClassify(this.list[0].id) | ||
130 | + }).catch(err => { | ||
131 | + | ||
132 | + }) | ||
133 | + | ||
104 | }, | 134 | }, |
105 | //二级分类 | 135 | //二级分类 |
106 | secndClassify(ids) { | 136 | secndClassify(ids) { |
107 | - request.get('/api/push/fenLei', { | ||
108 | - id: ids | ||
109 | - }).then(res => { | ||
110 | - this.secondList = res.data.info | ||
111 | - this.secondId=this.secondList[0].id | ||
112 | - this.goodData() | ||
113 | - }).catch(err => { | ||
114 | - | ||
115 | - }) | 137 | + request.get('/api/push/fenLei', { |
138 | + id: ids.id | ||
139 | + }).then(res => { | ||
140 | + this.secondList = res.data.info | ||
141 | + this.secondId=this.secondList[0].id | ||
142 | + this.goodData() | ||
143 | + }).catch(err => { | ||
144 | + | ||
145 | + }) | ||
146 | + | ||
147 | + | ||
116 | }, | 148 | }, |
117 | selectSecond(index, id) { | 149 | selectSecond(index, id) { |
118 | this.secondIndex = index; | 150 | this.secondIndex = index; |
@@ -45,11 +45,11 @@ | @@ -45,11 +45,11 @@ | ||
45 | } | 45 | } |
46 | }, | 46 | }, |
47 | onShow() { | 47 | onShow() { |
48 | - this.getAdress() | 48 | + this.getAdress() |
49 | }, | 49 | }, |
50 | data() { | 50 | data() { |
51 | return { | 51 | return { |
52 | - list:[], //历史位置 | 52 | + list: [], //历史位置 |
53 | qqmapsdk: '', | 53 | qqmapsdk: '', |
54 | value: '', | 54 | value: '', |
55 | currentAddress: '', | 55 | currentAddress: '', |
@@ -62,10 +62,19 @@ | @@ -62,10 +62,19 @@ | ||
62 | methods: { | 62 | methods: { |
63 | //获取历史位置 | 63 | //获取历史位置 |
64 | getAdress() { | 64 | getAdress() { |
65 | - request.get('/api/index/addressList',{}).then(res=>{ | ||
66 | - this.list=res.data.info | ||
67 | - }).catch(err=>{ | ||
68 | - | 65 | + request.get('/api/index/addressList', {}).then(res => { |
66 | + let lists = res.data.info | ||
67 | + let ary = [] | ||
68 | + let list2 = [] | ||
69 | + lists.forEach((item, index) => { | ||
70 | + if (ary.indexOf(item.lat2) == -1) { | ||
71 | + ary.push(item.lat2) | ||
72 | + list2.push(item) | ||
73 | + } | ||
74 | + }) | ||
75 | + this.list=list2 | ||
76 | + }).catch(err => { | ||
77 | + | ||
69 | }) | 78 | }) |
70 | }, | 79 | }, |
71 | selectCity() { | 80 | selectCity() { |
@@ -118,9 +118,9 @@ | @@ -118,9 +118,9 @@ | ||
118 | <view class="maskAddress" style="max-width: 104rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | 118 | <view class="maskAddress" style="max-width: 104rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> |
119 | {{item.address}} | 119 | {{item.address}} |
120 | </view> | 120 | </view> |
121 | - <view class="maskAddress"> | 121 | + <!-- <view class="maskAddress"> |
122 | {{item.dis}}km | 122 | {{item.dis}}km |
123 | - </view> | 123 | + </view> --> |
124 | </view> | 124 | </view> |
125 | </view> | 125 | </view> |
126 | 126 | ||
@@ -157,9 +157,9 @@ | @@ -157,9 +157,9 @@ | ||
157 | <view class="maskAddress" style="max-width: 104rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | 157 | <view class="maskAddress" style="max-width: 104rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> |
158 | {{item.address}} | 158 | {{item.address}} |
159 | </view> | 159 | </view> |
160 | - <view class="maskAddress"> | 160 | + <!-- <view class="maskAddress"> |
161 | {{item.dis}}km | 161 | {{item.dis}}km |
162 | - </view> | 162 | + </view> --> |
163 | </view> | 163 | </view> |
164 | </view> | 164 | </view> |
165 | 165 |
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | <view class="mesBavRow" v-for="(item,index) in AnList" :key="index" @click="messageDetail(item.type,item.user_id)"> | 25 | <view class="mesBavRow" v-for="(item,index) in AnList" :key="index" @click="messageDetail(item.type,item.user_id)"> |
26 | <view class="mesBavRowImg" style="position: relative;"> | 26 | <view class="mesBavRowImg" style="position: relative;"> |
27 | <image :src="item.user.avatar" style="width: 80rpx;height: 80rpx;border-radius: 50%;" mode=""></image> | 27 | <image :src="item.user.avatar" style="width: 80rpx;height: 80rpx;border-radius: 50%;" mode=""></image> |
28 | - <view class="redCircle"> | 28 | + <view class="redCircle" v-if="item.is_read==0"> |
29 | 29 | ||
30 | </view> | 30 | </view> |
31 | </view> | 31 | </view> |
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | <text class="mesBavRowName">{{item.user.nickname}}</text> | 34 | <text class="mesBavRowName">{{item.user.nickname}}</text> |
35 | <text class="mesBavRowTime">{{item.news.createtime}}</text> | 35 | <text class="mesBavRowTime">{{item.news.createtime}}</text> |
36 | </view> | 36 | </view> |
37 | - <view style="width: 530rpx;overflow: hidden;white-space: nowrap;"> | 37 | + <view style="width: 530rpx;overflow: hidden;white-space: nowrap;max-height: 40rpx;"> |
38 | <text class="mesBavRowTitleTe">{{item.news.content}}</text> | 38 | <text class="mesBavRowTitleTe">{{item.news.content}}</text> |
39 | </view> | 39 | </view> |
40 | </view> | 40 | </view> |
@@ -105,9 +105,12 @@ | @@ -105,9 +105,12 @@ | ||
105 | <text class="botTextFa">发布</text> | 105 | <text class="botTextFa">发布</text> |
106 | </view> | 106 | </view> |
107 | </li> | 107 | </li> |
108 | - <li @click="goMessage"> | 108 | + <li @click="goMessage" style="position: relative;"> |
109 | <image src="../../static/image/xioaxi_icon_1@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> | 109 | <image src="../../static/image/xioaxi_icon_1@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> |
110 | <text class="botTextXX">消息</text> | 110 | <text class="botTextXX">消息</text> |
111 | + <view class="num"> | ||
112 | + {{messageNum>99?'99+':messageNum}} | ||
113 | + </view> | ||
111 | </li> | 114 | </li> |
112 | <li @click="goMe"> | 115 | <li @click="goMe"> |
113 | <image src="../../static/image/wode_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> | 116 | <image src="../../static/image/wode_icon_5@2x.png" style="width: 48rpx;height: 44rpx;" mode=""></image> |
@@ -122,6 +125,7 @@ | @@ -122,6 +125,7 @@ | ||
122 | export default { | 125 | export default { |
123 | onShow() { | 126 | onShow() { |
124 | this.myData() | 127 | this.myData() |
128 | + this.messageNums()//留言个数 | ||
125 | }, | 129 | }, |
126 | data() { | 130 | data() { |
127 | return { | 131 | return { |
@@ -130,7 +134,8 @@ | @@ -130,7 +134,8 @@ | ||
130 | AnList: [], | 134 | AnList: [], |
131 | index: 0, | 135 | index: 0, |
132 | show: false, | 136 | show: false, |
133 | - pageNum:1 | 137 | + pageNum:1, |
138 | + messageNum:0 //消息个数 | ||
134 | } | 139 | } |
135 | }, | 140 | }, |
136 | onReachBottom: function () { | 141 | onReachBottom: function () { |
@@ -289,6 +294,14 @@ | @@ -289,6 +294,14 @@ | ||
289 | uni.navigateTo({ | 294 | uni.navigateTo({ |
290 | url: '/pages/message/systematic?id='+id | 295 | url: '/pages/message/systematic?id='+id |
291 | }); | 296 | }); |
297 | + }, | ||
298 | + //留言个数 | ||
299 | + messageNums(){ | ||
300 | + request.get('/api/mation/unreadNumber',{}).then(res=>{ | ||
301 | + this.messageNum=res.data.number | ||
302 | + }).catch(err=>{ | ||
303 | + | ||
304 | + }) | ||
292 | } | 305 | } |
293 | } | 306 | } |
294 | } | 307 | } |
@@ -357,4 +370,19 @@ | @@ -357,4 +370,19 @@ | ||
357 | top: 22rpx; | 370 | top: 22rpx; |
358 | z-index: 99; | 371 | z-index: 99; |
359 | } | 372 | } |
373 | + .num { | ||
374 | + position: absolute; | ||
375 | + background: red; | ||
376 | + height: 30rpx; | ||
377 | + font-size: 22rpx; | ||
378 | + line-height: 30rpx; | ||
379 | + text-align: center; | ||
380 | + border-radius: 16rpx; | ||
381 | + color: #fff; | ||
382 | + top: 6rpx; | ||
383 | + right: 30rpx; | ||
384 | + min-width: 18rpx; | ||
385 | + max-width: 60rpx; | ||
386 | + padding: 0 6rpx; | ||
387 | + } | ||
360 | </style> | 388 | </style> |
-
请 注册 或 登录 后发表评论