作者 倪静楠

3/26/2

@@ -166,13 +166,13 @@ @@ -166,13 +166,13 @@
166 //跳转商品页 166 //跳转商品页
167 GoGoodDetailss(id) { 167 GoGoodDetailss(id) {
168 uni.navigateTo({ 168 uni.navigateTo({
169 - url: '/pages/index/good-details?id=' + id 169 + url: '/pages/index/good-details?id=' + id+'&index=2'
170 }) 170 })
171 }, 171 },
172 //跳转商品页 172 //跳转商品页
173 GoGoodDetail(id) { 173 GoGoodDetail(id) {
174 uni.navigateTo({ 174 uni.navigateTo({
175 - url: '/pages/index/good-details?goos_id=' + id 175 + url: '/pages/index/good-details?goos_id=' + id+'&index=1'
176 }) 176 })
177 } 177 }
178 178
@@ -99,7 +99,7 @@ @@ -99,7 +99,7 @@
99 page: this.pageNum, 99 page: this.pageNum,
100 rows: 10 100 rows: 10
101 }).then(res => { 101 }).then(res => {
102 - let list = this.pageNum == 1 ? res.data.info.data : this.list.concat(res.data.info.data); 102 + let list = this.pageNum == 1 ? res.data.info.data : this.dataList.concat(res.data.info.data);
103 this.dataList = list.reverse() 103 this.dataList = list.reverse()
104 }).catch(err => { 104 }).catch(err => {
105 105
@@ -107,7 +107,7 @@ @@ -107,7 +107,7 @@
107 }, 107 },
108 goGoodsDetail(id) { 108 goGoodsDetail(id) {
109 uni.navigateTo({ 109 uni.navigateTo({
110 - url: '/pages/index/good-details?goos_id=' + id + '&&indexs=1' 110 + url: '/pages/index/good-details?goos_id=' + id + '&&index=1'
111 }) 111 })
112 }, 112 },
113 //发布需求 113 //发布需求
@@ -121,7 +121,7 @@ @@ -121,7 +121,7 @@
121 page: this.pageNum, 121 page: this.pageNum,
122 rows: 10 122 rows: 10
123 }).then(res => { 123 }).then(res => {
124 - let list = this.pageNum == 1 ? res.data.info.data : this.list.concat(res.data.info.data); 124 + let list = this.pageNum == 1 ? res.data.info.data : this.dataList1.concat(res.data.info.data);
125 this.dataList1 = list.reverse() 125 this.dataList1 = list.reverse()
126 }).catch(err => { 126 }).catch(err => {
127 127
@@ -129,7 +129,7 @@ @@ -129,7 +129,7 @@
129 }, 129 },
130 goNeedsDetail(id) { 130 goNeedsDetail(id) {
131 uni.navigateTo({ 131 uni.navigateTo({
132 - url: '/pages/index/good-details?id=' + id + '&&indexs=2' 132 + url: '/pages/index/good-details?id=' + id + '&&index=2'
133 }) 133 })
134 }, 134 },
135 //删除发布商品 135 //删除发布商品
1 <template> 1 <template>
2 <view class="merCon"> 2 <view class="merCon">
3 <view class="merImg"> 3 <view class="merImg">
4 - <image src="https://s3.ax1x.com/2021/01/11/s8Prex.png" style="width: 686rpx;height: 292rpx;" mode=""></image> 4 + <image src="http://muying.qiniu.broing.cn/uploads/20210326/05c76867525564e282d66a42ae2d2d21.png" style="width: 686rpx;height: 292rpx;" mode=""></image>
5 <view class="merPostion"> 5 <view class="merPostion">
6 <view class="merPostionHY"> 6 <view class="merPostionHY">
7 <text class="merHYText">会员等级</text> 7 <text class="merHYText">会员等级</text>
@@ -34,11 +34,11 @@ @@ -34,11 +34,11 @@
34 <view 34 <view
35 :class="item.type==1&&item.datetime?'leftContent1':item.type==1&&!item.datetime?'leftContent':item.type==0&&item.datetime?'rightContent1':'rightContent'" 35 :class="item.type==1&&item.datetime?'leftContent1':item.type==1&&!item.datetime?'leftContent':item.type==0&&item.datetime?'rightContent1':'rightContent'"
36 style="position: relative;"> 36 style="position: relative;">
37 - <view class="" v-if="!item.image"> 37 + <view class="" v-if="item.flag==0">
38 {{item.content}} 38 {{item.content}}
39 </view> 39 </view>
40 - <view class="" v-if="item.image">  
41 - <image :src="item.image" class="chatImage" @click="previewImg(item.image)"></image> 40 + <view class="" v-else>
  41 + <image :src="item.content" class="chatImage" @click="previewImg(item.content)"></image>
42 </view> 42 </view>
43 <view class="" 43 <view class=""
44 style="width: 20rpx;height: 20rpx;background-color: #fff;transform: rotate(45deg);position: absolute;top: 36rpx;left: -10rpx;z-index: -1;" 44 style="width: 20rpx;height: 20rpx;background-color: #fff;transform: rotate(45deg);position: absolute;top: 36rpx;left: -10rpx;z-index: -1;"
@@ -65,11 +65,11 @@ @@ -65,11 +65,11 @@
65 <image :src="item.avatar1" mode="" class="headImg" v-if="item.type==1" 65 <image :src="item.avatar1" mode="" class="headImg" v-if="item.type==1"
66 @click="goUser(item.user_id)"></image> 66 @click="goUser(item.user_id)"></image>
67 <view :class="item.type==0?'leftContent':'rightContent'" style="position: relative;"> 67 <view :class="item.type==0?'leftContent':'rightContent'" style="position: relative;">
68 - <view class="" v-if="!item.image"> 68 + <view class="" v-if="item.flag==0">
69 {{item.content}} 69 {{item.content}}
70 </view> 70 </view>
71 - <view class="" v-if="item.image">  
72 - <image :src="item.image" class="chatImage" @click="previewImg(item.image)"></image> 71 + <view class="" v-else>
  72 + <image :src="item.content" class="chatImage" @click="previewImg(item.content)"></image>
73 </view> 73 </view>
74 <view class="" 74 <view class=""
75 style="width: 20rpx;height: 20rpx;background-color: #fff;transform: rotate(45deg);position: absolute;top: 36rpx;left: -10rpx;z-index: -1;" v-if="item.type==0"> 75 style="width: 20rpx;height: 20rpx;background-color: #fff;transform: rotate(45deg);position: absolute;top: 36rpx;left: -10rpx;z-index: -1;" v-if="item.type==0">
@@ -196,6 +196,14 @@ @@ -196,6 +196,14 @@
196 setTimeout(() => { 196 setTimeout(() => {
197 this.scrollTop = 9999 197 this.scrollTop = 9999
198 }, 400) 198 }, 400)
  199 + list.forEach((item,index)=>{
  200 + if(item.content.indexOf('http://muying.qiniu')>-1){
  201 + item.flag=1
  202 + }else{
  203 + item.flag=0
  204 + }
  205 + })
  206 + this.list=list
199 }).catch(err => { 207 }).catch(err => {
200 208
201 }) 209 })
@@ -220,6 +228,14 @@ @@ -220,6 +228,14 @@
220 }).then(res => { 228 }).then(res => {
221 let list = this.pageNum == 1 ? res.data.info : this.list.concat(res.data.info) 229 let list = this.pageNum == 1 ? res.data.info : this.list.concat(res.data.info)
222 this.list = list 230 this.list = list
  231 + list.forEach((item,index)=>{
  232 + if(item.content.indexOf('http://muying.qiniu')>-1){
  233 + item.flag=1
  234 + }else{
  235 + item.flag=0
  236 + }
  237 + })
  238 + this.list=list
223 setTimeout(() => { 239 setTimeout(() => {
224 this.scrollTop = 9999 240 this.scrollTop = 9999
225 }, 400) 241 }, 400)
@@ -232,7 +248,8 @@ @@ -232,7 +248,8 @@
232 let that = this 248 let that = this
233 request.get('/api/goods/buyChat', { 249 request.get('/api/goods/buyChat', {
234 goods_id: this.goodsId, 250 goods_id: this.goodsId,
235 - content: that.inputText 251 + content: that.inputText,
  252 + type:that.inputText.indexOf('http://muying.qiniu'>-1)?'2':'1'
236 }).then(res => { 253 }).then(res => {
237 this.pageNum = 1 254 this.pageNum = 1
238 this.buyList() 255 this.buyList()
@@ -245,7 +262,8 @@ @@ -245,7 +262,8 @@
245 let that = this 262 let that = this
246 request.get('/api/mation/replyChat', { 263 request.get('/api/mation/replyChat', {
247 user_id: this.user_id, 264 user_id: this.user_id,
248 - content: that.inputText 265 + content: that.inputText,
  266 + type:that.inputText.indexOf('http://muying.qiniu'>-1)?'2':'1'
249 }).then(res => { 267 }).then(res => {
250 this.pageNum = 1 268 this.pageNum = 1
251 this.sellList() 269 this.sellList()
@@ -318,8 +336,8 @@ @@ -318,8 +336,8 @@
318 let list = this.list 336 let list = this.list
319 let imgs = [] 337 let imgs = []
320 list.forEach((item, index) => { 338 list.forEach((item, index) => {
321 - if (item.image !== undefined) {  
322 - imgs.push(item.image) 339 + if (item.flag ==1) {
  340 + imgs.push(item.content)
323 } 341 }
324 }) 342 })
325 this.imgs = imgs 343 this.imgs = imgs
@@ -501,6 +519,7 @@ @@ -501,6 +519,7 @@
501 color: #fff; 519 color: #fff;
502 border-radius: 16rpx; 520 border-radius: 16rpx;
503 margin-top: 72rpx; 521 margin-top: 72rpx;
  522 + overflow: hidden;
504 } 523 }
505 524
506 .inputBox { 525 .inputBox {
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 <view :class="index!==detailData.images.length-1?'styleMargin':''" 59 <view :class="index!==detailData.images.length-1?'styleMargin':''"
60 v-for="(item,index) in detailData.images" :key="index"> 60 v-for="(item,index) in detailData.images" :key="index">
61 <image :src="item" mode="" @click="previewImg" 61 <image :src="item" mode="" @click="previewImg"
62 - :class="detailData.images.length==1?'fristImage':''"></image> 62 + :class="detailData.images.length==1?'fristImage':''" mode="aspectFill"></image>
63 </view> 63 </view>
64 </view> 64 </view>
65 <view class="wantBox"> 65 <view class="wantBox">
@@ -67,7 +67,7 @@ @@ -67,7 +67,7 @@
67 <text style="margin-left: 46rpx;">{{detailData.num}}次浏览</text> 67 <text style="margin-left: 46rpx;">{{detailData.num}}次浏览</text>
68 </view> 68 </view>
69 <view class="wantBox"> 69 <view class="wantBox">
70 - 发布时间:{{detailData.createtime}} 70 + 发布时间:{{detailData.createtime_text!==undefined?detailData.createtime_text:detailData.createtime}}
71 </view> 71 </view>
72 </view> 72 </view>
73 </view> 73 </view>
@@ -193,7 +193,7 @@ @@ -193,7 +193,7 @@
193 发送给朋友 193 发送给朋友
194 <button type="default" open-type="share"></button> 194 <button type="default" open-type="share"></button>
195 </view> 195 </view>
196 - <view class="dialogs" @click="closes(1)"> 196 + <view class="dialogs" @click="closes(1)" v-if="pageIndex==1">
197 生成海报 197 生成海报
198 </view> 198 </view>
199 <view class="dialogs" @click="Sharecloses"> 199 <view class="dialogs" @click="Sharecloses">
@@ -228,10 +228,6 @@ @@ -228,10 +228,6 @@
228 我想要 228 我想要
229 </view> 229 </view>
230 </view> 230 </view>
231 - <!-- 分享朋友圈图片 -->  
232 - <!-- <view class="haibaoBj" v-if="shareBj" @click="cancelSave">  
233 - <image src="../../static/image/fxiang.png" mode="" style="position: absolute;top: 0;left: 67%;width: 130rpx;height: 200rpx;"></image>  
234 - </view> -->  
235 <view 231 <view
236 style=" position: fixed;top: 20rpx;left: 126rpx;width: 500rpx;text-align: center;background-color: #ff9d66;color:#fff;z-index: 9;border-radius: 4rpx;" 232 style=" position: fixed;top: 20rpx;left: 126rpx;width: 500rpx;text-align: center;background-color: #ff9d66;color:#fff;z-index: 9;border-radius: 4rpx;"
237 v-if="cricleShare"> 233 v-if="cricleShare">
@@ -275,6 +271,7 @@ @@ -275,6 +271,7 @@
275 onLoad(options) { 271 onLoad(options) {
276 this.id = options.id 272 this.id = options.id
277 this.goods_id = options.goos_id 273 this.goods_id = options.goos_id
  274 + this.pageIndex=options.index
278 uni.setStorageSync('pid', options.userId) 275 uni.setStorageSync('pid', options.userId)
279 if (options.id === "undefined" || !options.id) { 276 if (options.id === "undefined" || !options.id) {
280 if (options.lat) { 277 if (options.lat) {
@@ -306,6 +303,7 @@ @@ -306,6 +303,7 @@
306 data() { 303 data() {
307 return { 304 return {
308 token: false, 305 token: false,
  306 + pageIndex:'', //判断是闲置还是需求商品
309 pageNum: 1, 307 pageNum: 1,
310 id: -1, 308 id: -1,
311 goods_id: '', 309 goods_id: '',
@@ -477,7 +475,7 @@ @@ -477,7 +475,7 @@
477 goUserPage() { 475 goUserPage() {
478 uni.navigateTo({ 476 uni.navigateTo({
479 url: '/pages/index/user-page?id=' + this.detailData.user.id + '&lat=' + this.lat + '&lot=' + 477 url: '/pages/index/user-page?id=' + this.detailData.user.id + '&lat=' + this.lat + '&lot=' +
480 - this.lot 478 + this.lot+'&userId='+uni.getStorageSync('userInfo').id
481 }) 479 })
482 }, 480 },
483 //一级分类 481 //一级分类
@@ -241,7 +241,15 @@ @@ -241,7 +241,15 @@
241 imageUrl: '', 241 imageUrl: '',
242 } 242 }
243 }, 243 },
244 - 244 + onReachBottom() {
  245 + if(this.tabIndex==0){
  246 + this.pageNum++
  247 + this.buy()
  248 + } else{
  249 + thsis.pageNum++
  250 + this.buyNeed()
  251 + }
  252 + },
245 methods: { 253 methods: {
246 goBack() { 254 goBack() {
247 uni.navigateBack({ 255 uni.navigateBack({
@@ -267,16 +275,16 @@ @@ -267,16 +275,16 @@
267 }, 275 },
268 //全部评价 276 //全部评价
269 allMessage() { 277 allMessage() {
270 - if(uni.getStorageSync('token')){ 278 + if (uni.getStorageSync('token')) {
271 uni.navigateTo({ 279 uni.navigateTo({
272 url: '/pages/index/all-evaluate?id=' + this.id 280 url: '/pages/index/all-evaluate?id=' + this.id
273 }) 281 })
274 - }else{ 282 + } else {
275 uni.navigateTo({ 283 uni.navigateTo({
276 url: '/pages/index/login' 284 url: '/pages/index/login'
277 }) 285 })
278 } 286 }
279 - 287 +
280 }, 288 },
281 allPing() { 289 allPing() {
282 request.get('/api/other/allPing', { 290 request.get('/api/other/allPing', {
@@ -307,7 +315,8 @@ @@ -307,7 +315,8 @@
307 lat2: uni.getStorageSync('lat') ? uni.getStorageSync('lat') : this.lat2, 315 lat2: uni.getStorageSync('lat') ? uni.getStorageSync('lat') : this.lat2,
308 lng2: uni.getStorageSync('lot') ? uni.getStorageSync('lot') : this.lot2 316 lng2: uni.getStorageSync('lot') ? uni.getStorageSync('lot') : this.lot2
309 }).then(res => { 317 }).then(res => {
310 - this.goodsList = res.data.info.data 318 + let list=this.pageNum===1?res.data.info.data:this.goodsList.concat(res.data.info.dat)
  319 + this.goodsList =list
311 }).catch(err => { 320 }).catch(err => {
312 321
313 }) 322 })
@@ -321,7 +330,8 @@ @@ -321,7 +330,8 @@
321 lat2: uni.getStorageSync('lat') ? uni.getStorageSync('lat') : this.lat2, 330 lat2: uni.getStorageSync('lat') ? uni.getStorageSync('lat') : this.lat2,
322 lng2: uni.getStorageSync('lot') ? uni.getStorageSync('lot') : this.lot2, 331 lng2: uni.getStorageSync('lot') ? uni.getStorageSync('lot') : this.lot2,
323 }).then(res => { 332 }).then(res => {
324 - this.buyList = res.data.info.data 333 + let list=this.pageNum===1?res.data.info.data:this.buyList.concat(res.data.info.dat)
  334 + this.buyList =list
325 }).catch(err => { 335 }).catch(err => {
326 336
327 }) 337 })
@@ -331,24 +341,28 @@ @@ -331,24 +341,28 @@
331 if (this.tabIndex == 1) { 341 if (this.tabIndex == 1) {
332 if (uni.getStorageSync('lat')) { 342 if (uni.getStorageSync('lat')) {
333 uni.navigateTo({ 343 uni.navigateTo({
334 - url: '/pages/index/good-details?id=' + id + '&lat=' + uni.getStorageSync('lat') +  
335 - '&lot=' + uni.getStorageSync('lot')+'&userId=' + uni.getStorageSync('userInfo').id 344 + url: '/pages/index/good-details?id=' + id + '&index=2' + '&lat=' + uni.getStorageSync(
  345 + 'lat') +
  346 + '&lot=' + uni.getStorageSync('lot') + '&userId=' + uni.getStorageSync('userInfo')
  347 + .id
336 }) 348 })
337 } else { 349 } else {
338 uni.navigateTo({ 350 uni.navigateTo({
339 - url: '/pages/index/good-details?id=' + id + '&lat=' + this.lat2 + '&lot=' + this.lot2+'&userId=' + uni.getStorageSync('userInfo').id 351 + url: '/pages/index/good-details?id=' + id + '&lat=' + this.lat2 + '&lot=' + this.lot2 +
  352 + '&userId=' + uni.getStorageSync('userInfo').id + '&index=2'
340 }) 353 })
341 } 354 }
342 } else { 355 } else {
343 if (uni.getStorageSync('lat')) { 356 if (uni.getStorageSync('lat')) {
344 uni.navigateTo({ 357 uni.navigateTo({
345 url: '/pages/index/good-details?goos_id=' + id + '&lat=' + uni.getStorageSync('lat') + 358 url: '/pages/index/good-details?goos_id=' + id + '&lat=' + uni.getStorageSync('lat') +
346 - '&lot=' + uni.getStorageSync('lot')+'&userId=' + uni.getStorageSync('userInfo').id 359 + '&lot=' + uni.getStorageSync('lot') + '&userId=' + uni.getStorageSync('userInfo')
  360 + .id + '&index=1'
347 }) 361 })
348 } else { 362 } else {
349 uni.navigateTo({ 363 uni.navigateTo({
350 url: '/pages/index/good-details?goos_id=' + id + '&lat=' + this.lat2 + '&lot=' + this 364 url: '/pages/index/good-details?goos_id=' + id + '&lat=' + this.lat2 + '&lot=' + this
351 - .lot2+'&userId=' + uni.getStorageSync('userInfo').id 365 + .lot2 + '&userId=' + uni.getStorageSync('userInfo').id + '&index=1'
352 }) 366 })
353 } 367 }
354 368
@@ -360,6 +374,7 @@ @@ -360,6 +374,7 @@
360 // 374 //
361 tabchange(index) { 375 tabchange(index) {
362 this.tabIndex = index 376 this.tabIndex = index
  377 + this.pageNum=1
363 if (index == 0) { 378 if (index == 0) {
364 this.buy() 379 this.buy()
365 } else { 380 } else {
@@ -350,7 +350,7 @@ @@ -350,7 +350,7 @@
350 request.get('/api/push/xianZhi', { 350 request.get('/api/push/xianZhi', {
351 lat: that.latitude, 351 lat: that.latitude,
352 lng: that.longitude, 352 lng: that.longitude,
353 - address: that.address, 353 + address: that.SelectAddress,
354 goods_name: that.inputVlaue, 354 goods_name: that.inputVlaue,
355 images: that.urlImg.toString(), 355 images: that.urlImg.toString(),
356 content: that.areaValue, 356 content: that.areaValue,
@@ -337,7 +337,7 @@ @@ -337,7 +337,7 @@
337 request.get('/api/push/xuQiu', { 337 request.get('/api/push/xuQiu', {
338 lat: this.latitude, 338 lat: this.latitude,
339 lng: this.longitude, 339 lng: this.longitude,
340 - address: this.address, 340 + address: this.SelectAddress,
341 need_name: this.inputVlaue, 341 need_name: this.inputVlaue,
342 images: this.urlImg.toString(), 342 images: this.urlImg.toString(),
343 content: this.areaValue, 343 content: this.areaValue,