...
|
...
|
@@ -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 {
|
...
|
...
|
|