作者 倪静楠

3/26/2

... ... @@ -166,13 +166,13 @@
//跳转商品页
GoGoodDetailss(id) {
uni.navigateTo({
url: '/pages/index/good-details?id=' + id
url: '/pages/index/good-details?id=' + id+'&index=2'
})
},
//跳转商品页
GoGoodDetail(id) {
uni.navigateTo({
url: '/pages/index/good-details?goos_id=' + id
url: '/pages/index/good-details?goos_id=' + id+'&index=1'
})
}
... ...
... ... @@ -99,7 +99,7 @@
page: this.pageNum,
rows: 10
}).then(res => {
let list = this.pageNum == 1 ? res.data.info.data : this.list.concat(res.data.info.data);
let list = this.pageNum == 1 ? res.data.info.data : this.dataList.concat(res.data.info.data);
this.dataList = list.reverse()
}).catch(err => {
... ... @@ -107,7 +107,7 @@
},
goGoodsDetail(id) {
uni.navigateTo({
url: '/pages/index/good-details?goos_id=' + id + '&&indexs=1'
url: '/pages/index/good-details?goos_id=' + id + '&&index=1'
})
},
//发布需求
... ... @@ -121,7 +121,7 @@
page: this.pageNum,
rows: 10
}).then(res => {
let list = this.pageNum == 1 ? res.data.info.data : this.list.concat(res.data.info.data);
let list = this.pageNum == 1 ? res.data.info.data : this.dataList1.concat(res.data.info.data);
this.dataList1 = list.reverse()
}).catch(err => {
... ... @@ -129,7 +129,7 @@
},
goNeedsDetail(id) {
uni.navigateTo({
url: '/pages/index/good-details?id=' + id + '&&indexs=2'
url: '/pages/index/good-details?id=' + id + '&&index=2'
})
},
//删除发布商品
... ...
<template>
<view class="merCon">
<view class="merImg">
<image src="https://s3.ax1x.com/2021/01/11/s8Prex.png" style="width: 686rpx;height: 292rpx;" mode=""></image>
<image src="http://muying.qiniu.broing.cn/uploads/20210326/05c76867525564e282d66a42ae2d2d21.png" style="width: 686rpx;height: 292rpx;" mode=""></image>
<view class="merPostion">
<view class="merPostionHY">
<text class="merHYText">会员等级</text>
... ...
... ... @@ -34,11 +34,11 @@
<view
:class="item.type==1&&item.datetime?'leftContent1':item.type==1&&!item.datetime?'leftContent':item.type==0&&item.datetime?'rightContent1':'rightContent'"
style="position: relative;">
<view class="" v-if="!item.image">
<view class="" v-if="item.flag==0">
{{item.content}}
</view>
<view class="" v-if="item.image">
<image :src="item.image" class="chatImage" @click="previewImg(item.image)"></image>
<view class="" v-else>
<image :src="item.content" class="chatImage" @click="previewImg(item.content)"></image>
</view>
<view class=""
style="width: 20rpx;height: 20rpx;background-color: #fff;transform: rotate(45deg);position: absolute;top: 36rpx;left: -10rpx;z-index: -1;"
... ... @@ -65,11 +65,11 @@
<image :src="item.avatar1" mode="" class="headImg" v-if="item.type==1"
@click="goUser(item.user_id)"></image>
<view :class="item.type==0?'leftContent':'rightContent'" style="position: relative;">
<view class="" v-if="!item.image">
<view class="" v-if="item.flag==0">
{{item.content}}
</view>
<view class="" v-if="item.image">
<image :src="item.image" class="chatImage" @click="previewImg(item.image)"></image>
<view class="" v-else>
<image :src="item.content" class="chatImage" @click="previewImg(item.content)"></image>
</view>
<view class=""
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 @@
setTimeout(() => {
this.scrollTop = 9999
}, 400)
list.forEach((item,index)=>{
if(item.content.indexOf('http://muying.qiniu')>-1){
item.flag=1
}else{
item.flag=0
}
})
this.list=list
}).catch(err => {
})
... ... @@ -220,6 +228,14 @@
}).then(res => {
let list = this.pageNum == 1 ? res.data.info : this.list.concat(res.data.info)
this.list = list
list.forEach((item,index)=>{
if(item.content.indexOf('http://muying.qiniu')>-1){
item.flag=1
}else{
item.flag=0
}
})
this.list=list
setTimeout(() => {
this.scrollTop = 9999
}, 400)
... ... @@ -232,7 +248,8 @@
let that = this
request.get('/api/goods/buyChat', {
goods_id: this.goodsId,
content: that.inputText
content: that.inputText,
type:that.inputText.indexOf('http://muying.qiniu'>-1)?'2':'1'
}).then(res => {
this.pageNum = 1
this.buyList()
... ... @@ -245,7 +262,8 @@
let that = this
request.get('/api/mation/replyChat', {
user_id: this.user_id,
content: that.inputText
content: that.inputText,
type:that.inputText.indexOf('http://muying.qiniu'>-1)?'2':'1'
}).then(res => {
this.pageNum = 1
this.sellList()
... ... @@ -318,8 +336,8 @@
let list = this.list
let imgs = []
list.forEach((item, index) => {
if (item.image !== undefined) {
imgs.push(item.image)
if (item.flag ==1) {
imgs.push(item.content)
}
})
this.imgs = imgs
... ... @@ -501,6 +519,7 @@
color: #fff;
border-radius: 16rpx;
margin-top: 72rpx;
overflow: hidden;
}
.inputBox {
... ...
... ... @@ -59,7 +59,7 @@
<view :class="index!==detailData.images.length-1?'styleMargin':''"
v-for="(item,index) in detailData.images" :key="index">
<image :src="item" mode="" @click="previewImg"
:class="detailData.images.length==1?'fristImage':''"></image>
:class="detailData.images.length==1?'fristImage':''" mode="aspectFill"></image>
</view>
</view>
<view class="wantBox">
... ... @@ -67,7 +67,7 @@
<text style="margin-left: 46rpx;">{{detailData.num}}次浏览</text>
</view>
<view class="wantBox">
发布时间:{{detailData.createtime}}
发布时间:{{detailData.createtime_text!==undefined?detailData.createtime_text:detailData.createtime}}
</view>
</view>
</view>
... ... @@ -193,7 +193,7 @@
发送给朋友
<button type="default" open-type="share"></button>
</view>
<view class="dialogs" @click="closes(1)">
<view class="dialogs" @click="closes(1)" v-if="pageIndex==1">
生成海报
</view>
<view class="dialogs" @click="Sharecloses">
... ... @@ -228,10 +228,6 @@
我想要
</view>
</view>
<!-- 分享朋友圈图片 -->
<!-- <view class="haibaoBj" v-if="shareBj" @click="cancelSave">
<image src="../../static/image/fxiang.png" mode="" style="position: absolute;top: 0;left: 67%;width: 130rpx;height: 200rpx;"></image>
</view> -->
<view
style=" position: fixed;top: 20rpx;left: 126rpx;width: 500rpx;text-align: center;background-color: #ff9d66;color:#fff;z-index: 9;border-radius: 4rpx;"
v-if="cricleShare">
... ... @@ -275,6 +271,7 @@
onLoad(options) {
this.id = options.id
this.goods_id = options.goos_id
this.pageIndex=options.index
uni.setStorageSync('pid', options.userId)
if (options.id === "undefined" || !options.id) {
if (options.lat) {
... ... @@ -306,6 +303,7 @@
data() {
return {
token: false,
pageIndex:'', //判断是闲置还是需求商品
pageNum: 1,
id: -1,
goods_id: '',
... ... @@ -477,7 +475,7 @@
goUserPage() {
uni.navigateTo({
url: '/pages/index/user-page?id=' + this.detailData.user.id + '&lat=' + this.lat + '&lot=' +
this.lot
this.lot+'&userId='+uni.getStorageSync('userInfo').id
})
},
//一级分类
... ...
... ... @@ -241,7 +241,15 @@
imageUrl: '',
}
},
onReachBottom() {
if(this.tabIndex==0){
this.pageNum++
this.buy()
} else{
thsis.pageNum++
this.buyNeed()
}
},
methods: {
goBack() {
uni.navigateBack({
... ... @@ -267,16 +275,16 @@
},
//全部评价
allMessage() {
if(uni.getStorageSync('token')){
if (uni.getStorageSync('token')) {
uni.navigateTo({
url: '/pages/index/all-evaluate?id=' + this.id
})
}else{
} else {
uni.navigateTo({
url: '/pages/index/login'
})
}
},
allPing() {
request.get('/api/other/allPing', {
... ... @@ -307,7 +315,8 @@
lat2: uni.getStorageSync('lat') ? uni.getStorageSync('lat') : this.lat2,
lng2: uni.getStorageSync('lot') ? uni.getStorageSync('lot') : this.lot2
}).then(res => {
this.goodsList = res.data.info.data
let list=this.pageNum===1?res.data.info.data:this.goodsList.concat(res.data.info.dat)
this.goodsList =list
}).catch(err => {
})
... ... @@ -321,7 +330,8 @@
lat2: uni.getStorageSync('lat') ? uni.getStorageSync('lat') : this.lat2,
lng2: uni.getStorageSync('lot') ? uni.getStorageSync('lot') : this.lot2,
}).then(res => {
this.buyList = res.data.info.data
let list=this.pageNum===1?res.data.info.data:this.buyList.concat(res.data.info.dat)
this.buyList =list
}).catch(err => {
})
... ... @@ -331,24 +341,28 @@
if (this.tabIndex == 1) {
if (uni.getStorageSync('lat')) {
uni.navigateTo({
url: '/pages/index/good-details?id=' + id + '&lat=' + uni.getStorageSync('lat') +
'&lot=' + uni.getStorageSync('lot')+'&userId=' + uni.getStorageSync('userInfo').id
url: '/pages/index/good-details?id=' + id + '&index=2' + '&lat=' + uni.getStorageSync(
'lat') +
'&lot=' + uni.getStorageSync('lot') + '&userId=' + uni.getStorageSync('userInfo')
.id
})
} else {
uni.navigateTo({
url: '/pages/index/good-details?id=' + id + '&lat=' + this.lat2 + '&lot=' + this.lot2+'&userId=' + uni.getStorageSync('userInfo').id
url: '/pages/index/good-details?id=' + id + '&lat=' + this.lat2 + '&lot=' + this.lot2 +
'&userId=' + uni.getStorageSync('userInfo').id + '&index=2'
})
}
} else {
if (uni.getStorageSync('lat')) {
uni.navigateTo({
url: '/pages/index/good-details?goos_id=' + id + '&lat=' + uni.getStorageSync('lat') +
'&lot=' + uni.getStorageSync('lot')+'&userId=' + uni.getStorageSync('userInfo').id
'&lot=' + uni.getStorageSync('lot') + '&userId=' + uni.getStorageSync('userInfo')
.id + '&index=1'
})
} else {
uni.navigateTo({
url: '/pages/index/good-details?goos_id=' + id + '&lat=' + this.lat2 + '&lot=' + this
.lot2+'&userId=' + uni.getStorageSync('userInfo').id
.lot2 + '&userId=' + uni.getStorageSync('userInfo').id + '&index=1'
})
}
... ... @@ -360,6 +374,7 @@
//
tabchange(index) {
this.tabIndex = index
this.pageNum=1
if (index == 0) {
this.buy()
} else {
... ...
... ... @@ -350,7 +350,7 @@
request.get('/api/push/xianZhi', {
lat: that.latitude,
lng: that.longitude,
address: that.address,
address: that.SelectAddress,
goods_name: that.inputVlaue,
images: that.urlImg.toString(),
content: that.areaValue,
... ...
... ... @@ -337,7 +337,7 @@
request.get('/api/push/xuQiu', {
lat: this.latitude,
lng: this.longitude,
address: this.address,
address: this.SelectAddress,
need_name: this.inputVlaue,
images: this.urlImg.toString(),
content: this.areaValue,
... ...