正在显示
7 个修改的文件
包含
67 行增加
和
48 行删除
@@ -325,17 +325,29 @@ | @@ -325,17 +325,29 @@ | ||
325 | margin-right: 12rpx; | 325 | margin-right: 12rpx; |
326 | } | 326 | } |
327 | 327 | ||
328 | -.goodImg { | 328 | +.goodsPic { |
329 | width: 330rpx; | 329 | width: 330rpx; |
330 | height: 282rpx; | 330 | height: 282rpx; |
331 | + overflow: hidden; | ||
332 | + display: flex; | ||
333 | + align-items: center; | ||
334 | + justify-content: center; | ||
331 | border-radius: 16rpx 16rpx 0rpx 0rpx; | 335 | border-radius: 16rpx 16rpx 0rpx 0rpx; |
332 | } | 336 | } |
337 | +.goodsPic image{ | ||
338 | + width: 100%; | ||
339 | +} | ||
333 | 340 | ||
334 | .goodsDel { | 341 | .goodsDel { |
335 | - margin-top: 16rpx; | ||
336 | - font-size: 28rpx; | ||
337 | - box-sizing: border-box; | ||
338 | - padding: 0 18rpx; | 342 | + margin-top: 16rpx; |
343 | + font-size: 28rpx; | ||
344 | + -webkit-box-sizing: border-box; | ||
345 | + box-sizing: border-box; | ||
346 | + padding: 0 18rpx; | ||
347 | + max-width: 300rpx; | ||
348 | + overflow: hidden; | ||
349 | + text-overflow: ellipsis; | ||
350 | + white-space: nowrap; | ||
339 | } | 351 | } |
340 | 352 | ||
341 | .goodsPrice { | 353 | .goodsPrice { |
@@ -414,12 +426,12 @@ | @@ -414,12 +426,12 @@ | ||
414 | } | 426 | } |
415 | 427 | ||
416 | .addressMask { | 428 | .addressMask { |
417 | - width: 250rpx; | 429 | + width:100%; |
418 | height: 44rpx; | 430 | height: 44rpx; |
419 | display: flex; | 431 | display: flex; |
420 | padding: 0 10rpx; | 432 | padding: 0 10rpx; |
421 | box-sizing: border-box; | 433 | box-sizing: border-box; |
422 | - opacity: 0.4; | 434 | + opacity: 0.8; |
423 | background: #323233; | 435 | background: #323233; |
424 | position: absolute; | 436 | position: absolute; |
425 | top: 240rpx; | 437 | top: 240rpx; |
@@ -428,7 +440,7 @@ | @@ -428,7 +440,7 @@ | ||
428 | } | 440 | } |
429 | 441 | ||
430 | .addressMask image { | 442 | .addressMask image { |
431 | - width: 40rpx; | 443 | + width: 30rpx; |
432 | height: 28rpx; | 444 | height: 28rpx; |
433 | margin-right: 6rpx; | 445 | margin-right: 6rpx; |
434 | } | 446 | } |
@@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
72 | <view class="sendBtn" v-if="inputText!==''" @click="send"> | 72 | <view class="sendBtn" v-if="inputText!==''" @click="send"> |
73 | 发送 | 73 | 发送 |
74 | </view> | 74 | </view> |
75 | - <view class="sendBtn1" v-if="inputText==''" > | 75 | + <view class="sendBtn1" v-if="inputText==''" style="margin-left: 20rpx;"> |
76 | 发送 | 76 | 发送 |
77 | </view> | 77 | </view> |
78 | </view> | 78 | </view> |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <view> | 2 | <view> |
3 | <view class=""> | 3 | <view class=""> |
4 | <scroll-view scroll-x="true" class="scroll"> | 4 | <scroll-view scroll-x="true" class="scroll"> |
5 | - <view class="scrollItem"> | 5 | + <view class="scrollItems"> |
6 | <view :class="indexs==index?'active Item':'Item'" v-for="(item,index) in list" :key="index" @click="selectItem(item.id,index)"> | 6 | <view :class="indexs==index?'active Item':'Item'" v-for="(item,index) in list" :key="index" @click="selectItem(item.id,index)"> |
7 | {{item.name}} | 7 | {{item.name}} |
8 | </view> | 8 | </view> |
@@ -161,9 +161,10 @@ | @@ -161,9 +161,10 @@ | ||
161 | display: flex; | 161 | display: flex; |
162 | } | 162 | } |
163 | 163 | ||
164 | - .scrollItem { | 164 | + .scrollItems { |
165 | display: flex; | 165 | display: flex; |
166 | flex-wrap: nowrap; | 166 | flex-wrap: nowrap; |
167 | + width: auto !important; | ||
167 | } | 168 | } |
168 | 169 | ||
169 | .Item { | 170 | .Item { |
1 | <template> | 1 | <template> |
2 | <view :class="shareBj||haibao?'minHeight':''" style="min-height: 100%;background-color: #F7F8FA;padding-top: 32rpx;box-sizing: border-box;"> | 2 | <view :class="shareBj||haibao?'minHeight':''" style="min-height: 100%;background-color: #F7F8FA;padding-top: 32rpx;box-sizing: border-box;"> |
3 | - <view class="goodDetailsBox" v-if="detailData"> | 3 | + <view class="goodDetailsBox" v-if="detailData.user.avatar"> |
4 | <view class="detailsLeftBox" @click="goUserPage"> | 4 | <view class="detailsLeftBox" @click="goUserPage"> |
5 | <image :src="detailData.user.avatar" mode="aspectFill"></image> | 5 | <image :src="detailData.user.avatar" mode="aspectFill"></image> |
6 | </view> | 6 | </view> |
@@ -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"> | ||
132 | - {{item.dis}}km | ||
133 | - </view> --> | 131 | + <view class="maskAddress"> |
132 | + {{item.dis.toFixed(1)}}km | ||
133 | + </view> | ||
134 | </view> | 134 | </view> |
135 | </view> | 135 | </view> |
136 | </view> | 136 | </view> |
@@ -155,8 +155,8 @@ | @@ -155,8 +155,8 @@ | ||
155 | </view> | 155 | </view> |
156 | </uni-popup> | 156 | </uni-popup> |
157 | <view class="btnBox" style=""> | 157 | <view class="btnBox" style=""> |
158 | - <view class="btnItem"> | ||
159 | - <view class="iconfont icon-fenxiang1" @click="open"></view> | 158 | + <view class="btnItem" @click="open"> |
159 | + <view class="iconfont icon-fenxiang1"></view> | ||
160 | 分享 | 160 | 分享 |
161 | </view> | 161 | </view> |
162 | <view class="btnItem" @click="collect"> | 162 | <view class="btnItem" @click="collect"> |
@@ -215,10 +215,13 @@ | @@ -215,10 +215,13 @@ | ||
215 | onLoad(options) { | 215 | onLoad(options) { |
216 | this.id = options.id | 216 | this.id = options.id |
217 | this.goods_id = options.goos_id | 217 | this.goods_id = options.goos_id |
218 | - if (options.id != undefined) { | ||
219 | - this.needsDetail() | 218 | + console.log(options,'optionss') |
219 | + if (options.id==="undefined" || !options.id) { | ||
220 | + console.log('111111111111111') | ||
221 | + this.goodsDetail() | ||
220 | } else { | 222 | } else { |
221 | - this.goodsDetail() | 223 | + console.log('2222222222222222') |
224 | + this.needsDetail() | ||
222 | } | 225 | } |
223 | }, | 226 | }, |
224 | 227 | ||
@@ -226,7 +229,7 @@ | @@ -226,7 +229,7 @@ | ||
226 | return { | 229 | return { |
227 | token: false, | 230 | token: false, |
228 | pageNum: 1, | 231 | pageNum: 1, |
229 | - id: '', | 232 | + id: -1, |
230 | goods_id: '', | 233 | goods_id: '', |
231 | index: '', //tabIndex | 234 | index: '', //tabIndex |
232 | classifyId: '', //商品一级分类 | 235 | classifyId: '', //商品一级分类 |
@@ -256,16 +259,17 @@ | @@ -256,16 +259,17 @@ | ||
256 | }, | 259 | }, |
257 | //分享 | 260 | //分享 |
258 | onShareAppMessage: function(e) { | 261 | onShareAppMessage: function(e) { |
259 | - let title = '快来和我一起体验吧!' | 262 | + let that =this |
263 | + let title = '最火社区闲置二手信息平台' | ||
260 | return { | 264 | return { |
261 | title: title, | 265 | title: title, |
262 | - path: '/pages/index/index?userId=' + uni.getStorageSync('userInfo').id | 266 | + path: '/pages/index/good-details?userId=' + uni.getStorageSync('userInfo').id+'&goos_id='+that.goods_id+'&id='+that.id |
263 | } | 267 | } |
264 | }, | 268 | }, |
265 | onShareTimeline() { | 269 | onShareTimeline() { |
266 | let that = this | 270 | let that = this |
267 | return { | 271 | return { |
268 | - title: '快来和我一起体验吧!', | 272 | + title: '最火社区闲置二手信息平台', |
269 | query: 'goods_id=' + that.goos_id + '&id=' + that.id, | 273 | query: 'goods_id=' + that.goos_id + '&id=' + that.id, |
270 | imageUrl: 'http://123.png', | 274 | imageUrl: 'http://123.png', |
271 | } | 275 | } |
@@ -411,8 +415,8 @@ | @@ -411,8 +415,8 @@ | ||
411 | //发布商品详情 | 415 | //发布商品详情 |
412 | goodsDetail() { | 416 | goodsDetail() { |
413 | request.get('/api/goods/maiDetail', { | 417 | request.get('/api/goods/maiDetail', { |
414 | - lat2: uni.getStorageSync('lat'), | ||
415 | - lng2: uni.getStorageSync('lot'), | 418 | + lat2: uni.getStorageSync('lat')? uni.getStorageSync('lat'):'', |
419 | + lng2: uni.getStorageSync('lot')? uni.getStorageSync('lot'):'', | ||
416 | goods_id: this.goods_id | 420 | goods_id: this.goods_id |
417 | }).then(res => { | 421 | }).then(res => { |
418 | this.detailData = res.data | 422 | this.detailData = res.data |
@@ -144,7 +144,7 @@ | @@ -144,7 +144,7 @@ | ||
144 | <view class="goodsBox" v-for="(item,index) in goodsList" :key="index" style="width: 330rpx; background: #fff; margin-bottom: 24rpx;padding-bottom: 18rpx;position: relative;border-radius: 16rpx 16rpx 0 0;" | 144 | <view class="goodsBox" v-for="(item,index) in goodsList" :key="index" style="width: 330rpx; background: #fff; margin-bottom: 24rpx;padding-bottom: 18rpx;position: relative;border-radius: 16rpx 16rpx 0 0;" |
145 | @click="goGoodDetailXz(item.goods_id)"> | 145 | @click="goGoodDetailXz(item.goods_id)"> |
146 | <view class="goodsPic"> | 146 | <view class="goodsPic"> |
147 | - <image :src="item.images[0]" mode="" class="goodImg"></image> | 147 | + <image :src="item.images[0]" class="goodImg" mode="aspectFill"></image> |
148 | </view> | 148 | </view> |
149 | <view class="goodsDel"> | 149 | <view class="goodsDel"> |
150 | {{item.goods_name}} | 150 | {{item.goods_name}} |
@@ -156,10 +156,10 @@ | @@ -156,10 +156,10 @@ | ||
156 | <view class="userInfo"> | 156 | <view class="userInfo"> |
157 | <view class="userLeft"> | 157 | <view class="userLeft"> |
158 | <view class="userHead"> | 158 | <view class="userHead"> |
159 | - <image :src="item.user.avatar" mode="" class="userHead"></image> | 159 | + <image :src="item.user.avatar" class="userHead"></image> |
160 | </view> | 160 | </view> |
161 | <view class="userName"> | 161 | <view class="userName"> |
162 | - {{item.user.nickname}} | 162 | + {{item.user.nickname||''}} |
163 | </view> | 163 | </view> |
164 | </view> | 164 | </view> |
165 | <view class="userRight" style="display: flex;align-items: center;"> | 165 | <view class="userRight" style="display: flex;align-items: center;"> |
@@ -172,12 +172,12 @@ | @@ -172,12 +172,12 @@ | ||
172 | </view> | 172 | </view> |
173 | <view class="addressMask"> | 173 | <view class="addressMask"> |
174 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> | 174 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> |
175 | - <view class="maskAddress" style="max-width: 204rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | 175 | + <view class="maskAddress" style="max-width: 192rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> |
176 | {{item.address}} | 176 | {{item.address}} |
177 | </view> | 177 | </view> |
178 | - <!-- <view class="maskAddress"> | ||
179 | - {{item.distance}}km | ||
180 | - </view> --> | 178 | + <view class="maskAddress"> |
179 | + {{item.distance.toFixed(1)}}km | ||
180 | + </view> | ||
181 | </view> | 181 | </view> |
182 | </view> | 182 | </view> |
183 | </view> | 183 | </view> |
@@ -188,7 +188,7 @@ | @@ -188,7 +188,7 @@ | ||
188 | <view class="goodsBox" v-for="(item,index) in goodsList1" :key="index" style="width: 330rpx; background: #fff; margin-bottom: 24rpx;padding-bottom: 18rpx;position: relative;border-radius: 16rpx 16rpx 0 0;" | 188 | <view class="goodsBox" v-for="(item,index) in goodsList1" :key="index" style="width: 330rpx; background: #fff; margin-bottom: 24rpx;padding-bottom: 18rpx;position: relative;border-radius: 16rpx 16rpx 0 0;" |
189 | @click="goGoodDetailFx(item.id)"> | 189 | @click="goGoodDetailFx(item.id)"> |
190 | <view class="goodsPic"> | 190 | <view class="goodsPic"> |
191 | - <image :src="item.images[0]" mode="" class="goodImg"></image> | 191 | + <image :src="item.images[0]" mode="" class="goodImg" mode="aspectFit"></image> |
192 | </view> | 192 | </view> |
193 | <view class="goodsDel"> | 193 | <view class="goodsDel"> |
194 | {{item.need_name}} | 194 | {{item.need_name}} |
@@ -217,12 +217,12 @@ | @@ -217,12 +217,12 @@ | ||
217 | </view> | 217 | </view> |
218 | <view class="addressMask"> | 218 | <view class="addressMask"> |
219 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> | 219 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> |
220 | - <view class="maskAddress" style="max-width: 204rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | 220 | + <view class="maskAddress" style="max-width: 192rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> |
221 | {{item.address}} | 221 | {{item.address}} |
222 | </view> | 222 | </view> |
223 | - <!-- <view class="maskAddress"> | ||
224 | - {{item.distance.toFixed(2)}}km | ||
225 | - </view> --> | 223 | + <view class="maskAddress"> |
224 | + {{item.distance.toFixed(1)}}km | ||
225 | + </view> | ||
226 | </view> | 226 | </view> |
227 | </view> | 227 | </view> |
228 | </view> | 228 | </view> |
@@ -115,12 +115,12 @@ | @@ -115,12 +115,12 @@ | ||
115 | </view> | 115 | </view> |
116 | <view class="addressMask"> | 116 | <view class="addressMask"> |
117 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> | 117 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> |
118 | - <view class="maskAddress" style="max-width: 104rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | 118 | + <view class="maskAddress" style="max-width: 192rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> |
119 | {{item.address}} | 119 | {{item.address}} |
120 | </view> | 120 | </view> |
121 | - <!-- <view class="maskAddress"> | ||
122 | - {{item.dis}}km | ||
123 | - </view> --> | 121 | + <view class="maskAddress"> |
122 | + {{item.dis.toFixed(1)}}km | ||
123 | + </view> | ||
124 | </view> | 124 | </view> |
125 | </view> | 125 | </view> |
126 | 126 | ||
@@ -154,12 +154,12 @@ | @@ -154,12 +154,12 @@ | ||
154 | </view> | 154 | </view> |
155 | <view class="addressMask"> | 155 | <view class="addressMask"> |
156 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> | 156 | <image src="/static/image/dingwei_icon_1@2x.png" mode=""></image> |
157 | - <view class="maskAddress" style="max-width: 104rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> | 157 | + <view class="maskAddress" style="max-width: 192rpx;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> |
158 | {{item.address}} | 158 | {{item.address}} |
159 | </view> | 159 | </view> |
160 | - <!-- <view class="maskAddress"> | ||
161 | - {{item.dis}}km | ||
162 | - </view> --> | 160 | + <view class="maskAddress"> |
161 | + {{item.dis.toFixed(1)}}km | ||
162 | + </view> | ||
163 | </view> | 163 | </view> |
164 | </view> | 164 | </view> |
165 | 165 | ||
@@ -278,7 +278,9 @@ | @@ -278,7 +278,9 @@ | ||
278 | url: '/pages/index/good-details?goos_id=' + id | 278 | url: '/pages/index/good-details?goos_id=' + id |
279 | }) | 279 | }) |
280 | } | 280 | } |
281 | - | 281 | + // uni.navigateTo({ |
282 | + // url: '/pages/index/good-details?goos_id=' + id | ||
283 | + // }) | ||
282 | }, | 284 | }, |
283 | // | 285 | // |
284 | tabchange(index) { | 286 | tabchange(index) { |
@@ -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" v-if="item.is_read==0"> | 28 | + <view class="redCircle" v-if="item.news.is_read==0"> |
29 | 29 | ||
30 | </view> | 30 | </view> |
31 | </view> | 31 | </view> |
-
请 注册 或 登录 后发表评论