1、食堂招租的收藏和取消收藏
This commit is contained in:
parent
211d8853f6
commit
beae656b46
@ -229,17 +229,42 @@
|
|||||||
console.log('收藏',detailRent.value.is_collect);
|
console.log('收藏',detailRent.value.is_collect);
|
||||||
if(detailRent.value.is_collect == 1) {
|
if(detailRent.value.is_collect == 1) {
|
||||||
detailRent.value.is_collect = 0
|
detailRent.value.is_collect = 0
|
||||||
uni.showToast({
|
const data = {
|
||||||
title:'已取消收藏',
|
id: detailRent.value.id,
|
||||||
icon:'none'
|
is_collect: detailRent.value.is_collect
|
||||||
|
}
|
||||||
|
sheep.$api.rent.rentCollect(data).then((res) => {
|
||||||
|
if(res.code == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title:'已取消收藏',
|
||||||
|
icon:'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
getDetail()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
detailRent.value.is_collect = 1
|
detailRent.value.is_collect = 1
|
||||||
uni.showToast({
|
const data1 = {
|
||||||
title:'已收藏',
|
id: detailRent.value.id,
|
||||||
icon:'none'
|
is_collect: detailRent.value.is_collect
|
||||||
|
}
|
||||||
|
sheep.$api.rent.rentCollect(data1).then((res) => {
|
||||||
|
if(res.code == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title:'已收藏',
|
||||||
|
icon:'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
getDetail()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//是否拨打电话的次数
|
//是否拨打电话的次数
|
||||||
@ -501,8 +526,8 @@
|
|||||||
|
|
||||||
.footer-box {
|
.footer-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 98rpx;
|
height: 120rpx;
|
||||||
padding-bottom: 30rpx;
|
padding-bottom: 0rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 5rpx;
|
bottom: 5rpx;
|
||||||
|
@ -83,5 +83,12 @@ export default {
|
|||||||
request({
|
request({
|
||||||
url: 'meal.auth/info',
|
url: 'meal.auth/info',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
})
|
}),
|
||||||
|
//收藏
|
||||||
|
rentCollect: (data) =>
|
||||||
|
request({
|
||||||
|
url: 'meal.information/collect',
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
}),
|
||||||
};
|
};
|
Loading…
x
Reference in New Issue
Block a user