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