uni.showToast的信息提示更换为该商城封装的sheep.$helper.toast('已收藏');

收货时新增收货成功提示
This commit is contained in:
wangzimeng 2025-08-11 09:47:27 +08:00
parent a3e5b3be9f
commit fbd5c288c1
13 changed files with 845 additions and 845 deletions

View File

@ -296,10 +296,11 @@
} else { } else {
// Handle case where data is not in expected format // Handle case where data is not in expected format
searchRentList.value = []; searchRentList.value = [];
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'none' // title: res.msg,
}) // icon: 'none'
// })
} }
console.log('getList', searchRentList.value); console.log('getList', searchRentList.value);
} }
@ -319,10 +320,7 @@
} else { } else {
// Handle case where data is not in expected format // Handle case where data is not in expected format
searchClassesList.value = []; searchClassesList.value = [];
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg,
icon: 'none'
})
} }
console.log('平台课程收藏列表-222', searchClassesList.value); console.log('平台课程收藏列表-222', searchClassesList.value);
} }

View File

@ -157,10 +157,11 @@
couponCount.value = res.data.count; couponCount.value = res.data.count;
score.value = res.data.score score.value = res.data.score
} else { } else {
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'none' // title: res.msg,
}) // icon: 'none'
// })
} }
} }
// //
@ -204,19 +205,21 @@
id: couponSelectId.value id: couponSelectId.value
}); });
if (res.code === 1) { if (res.code === 1) {
uni.showToast({ sheep.$helper.toast('兑换成功');
title: '兑换成功', // uni.showToast({
icon: 'success' // title: '',
}) // icon: 'success'
// })
showCouponPro.value = false; showCouponPro.value = false;
listQuery.value.page = 1; listQuery.value.page = 1;
couponList.value = [] couponList.value = []
getCouponList(); getCouponList();
} else { } else {
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'error' // title: res.msg,
}) // icon: 'error'
// })
showCouponPro.value = false; showCouponPro.value = false;
} }
} }

View File

@ -4,13 +4,12 @@
<!-- 顶部banner --> <!-- 顶部banner -->
<view class="swiper-box"> <view class="swiper-box">
<view class="swiper_s"> <view class="swiper_s">
<swiper class="swiper_s" :circular="true" :autoplay="true" :indicator-dots="false" :current="currentImgIndex" <swiper class="swiper_s" :circular="true" :autoplay="true" :indicator-dots="false"
@change="swiperChange" @animationfinish="animationfinish"> :current="currentImgIndex" @change="swiperChange" @animationfinish="animationfinish">
<!-- v-for="(item, index) in swiperList" :key="index" @click="openSwiper(item)"--> <!-- v-for="(item, index) in swiperList" :key="index" @click="openSwiper(item)"-->
<swiper-item style="margin: 0 auto;" v-for="(item,index) in imageList" :key="index"> <swiper-item style="margin: 0 auto;" v-for="(item,index) in imageList" :key="index">
<view style="position: relative;width: 100%;height: 100%;" <view style="position: relative;width: 100%;height: 100%;">
> <image class="swiper-image" :src="item" mode="widthFix" />
<image class="swiper-image" :src="item" mode="widthFix"/>
</view> </view>
</swiper-item> </swiper-item>
@ -209,16 +208,17 @@
imagesNum.value = imageList.value.length imagesNum.value = imageList.value.length
console.log('imagesNum:', imagesNum.value); console.log('imagesNum:', imagesNum.value);
} else { } else {
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'none' // title: res.msg,
}) // icon: 'none'
// })
} }
} }
function swiperChange(e) { function swiperChange(e) {
console.log('切换轮播图',e.detail.current); console.log('切换轮播图', e.detail.current);
if(e.detail.current<imagesNum.value) { if (e.detail.current < imagesNum.value) {
// if(e.detail.current == 0){ // if(e.detail.current == 0){
// currentImgIndex.value = imagesNum.value // currentImgIndex.value = imagesNum.value
// }else { // }else {
@ -235,7 +235,7 @@
} }
function animationfinish(e) { function animationfinish(e) {
console.log('animationfinish',e); console.log('animationfinish', e);
}; };
// //
@ -263,14 +263,10 @@
} }
sheep.$api.rent.rentCollect(data).then((res) => { sheep.$api.rent.rentCollect(data).then((res) => {
if (res.code == 1) { if (res.code == 1) {
uni.showToast({ sheep.$helper.toast('已取消收藏');
title: '已取消收藏',
icon: 'none',
duration: 2000
})
setTimeout(() => { setTimeout(() => {
getDetail() getDetail()
}, 1000) }, 2000)
// getDetail() // getDetail()
} }
}) })
@ -284,14 +280,10 @@
} }
sheep.$api.rent.rentCollect(data1).then((res) => { sheep.$api.rent.rentCollect(data1).then((res) => {
if (res.code == 1) { if (res.code == 1) {
uni.showToast({ sheep.$helper.toast('已收藏');
title: '已收藏',
icon: 'none',
duration: 2000
})
setTimeout(() => { setTimeout(() => {
getDetail() getDetail()
}, 1000) }, 2000)
// getDetail() // getDetail()
} }
}) })
@ -342,7 +334,7 @@
// //
function handleService() { function handleService() {
console.log('联系平台客服',detailRent.value.platform_contact_number); console.log('联系平台客服', detailRent.value.platform_contact_number);
wx.makePhoneCall({ wx.makePhoneCall({
phoneNumber: detailRent.value.platform_contact_number, phoneNumber: detailRent.value.platform_contact_number,
success: function() { success: function() {
@ -455,7 +447,7 @@
.swiper_s { .swiper_s {
width: 100%; width: 100%;
height: 750rpx; height: 750rpx;
// height: 100%; // height: 100%;
// display: grid; // display: grid;
// justify-content: center; // justify-content: center;
@ -567,6 +559,7 @@
font-weight: 400; font-weight: 400;
line-height: 42rpx; line-height: 42rpx;
font-size: 28rpx; font-size: 28rpx;
white-space: pre-line;
} }
} }
@ -577,8 +570,10 @@
box-sizing: border-box; box-sizing: border-box;
position: fixed; position: fixed;
bottom: 0rpx; bottom: 0rpx;
padding-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 - 11.1 */ padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); /* iOS 11.2+ */ /* iOS 11.0 - 11.1 */
padding-bottom: env(safe-area-inset-bottom);
/* iOS 11.2+ */
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
justify-content: space-between; justify-content: space-between;
@ -613,9 +608,9 @@
/* 对于没有安全区域的设备,设置默认值 */ /* 对于没有安全区域的设备,设置默认值 */
@supports not (padding-bottom: env(safe-area-inset-bottom)) { @supports not (padding-bottom: env(safe-area-inset-bottom)) {
.footer-box { .footer-box {
padding-bottom: 0; padding-bottom: 0;
} }
} }
} }

View File

@ -382,12 +382,12 @@
url: e url: e
}) })
} else { } else {
sheep.$helper.toast('请先登录');
uni.showToast({ // uni.showToast({
title: '请先登录', // title: '',
icon: 'none', // icon: 'none',
duration: 2000 // duration: 2000
}) // })
setTimeout(function() { setTimeout(function() {
uni.switchTab({ uni.switchTab({
@ -469,20 +469,23 @@
tagSelectedNum.value += 1; tagSelectedNum.value += 1;
tagShowList.value[index].isSelect = true; tagShowList.value[index].isSelect = true;
} else { } else {
uni.showToast({ sheep.$helper.toast('最多选择三个标签');
title: '最多选择三个标签', // uni.showToast({
icon: 'none' // title: '',
}) // icon: 'none'
// })
} }
} else { } else {
if (tagSelectedNum.value > 0) { if (tagSelectedNum.value > 0) {
tagSelectedNum.value -= 1; tagSelectedNum.value -= 1;
tagShowList.value[index].isSelect = false; tagShowList.value[index].isSelect = false;
} else { } else {
uni.showToast({ sheep.$helper.toast('至少选择一个');
title: '至少选择一个', // uni.showToast({
icon: 'none' // title: '',
}) // icon: 'none'
// })
} }
} }
console.log('选择标签', tagSelectedNum.value); console.log('选择标签', tagSelectedNum.value);
@ -582,10 +585,11 @@
async function apply() { async function apply() {
if (agreeAdd.value == false) { if (agreeAdd.value == false) {
uni.showToast({ sheep.$helper.toast('请先同意发布须知');
title: '请先同意发布须知', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
form.value.cate_ids = selectTagslist.value.map((item) => item.id).join(',') form.value.cate_ids = selectTagslist.value.map((item) => item.id).join(',')
@ -596,74 +600,84 @@
console.log('images', form.value.images); console.log('images', form.value.images);
if (form.value.title == '') { if (form.value.title == '') {
uni.showToast({ sheep.$helper.toast('请输入标题');
title: '请输入标题', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.province == '' && form.value.city == '') { if (form.value.province == '' && form.value.city == '') {
uni.showToast({ sheep.$helper.toast('请选择地区');
title: '请选择地区', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.address_detail == '') { if (form.value.address_detail == '') {
uni.showToast({ sheep.$helper.toast('请输入详细地址');
title: '请输入详细地址', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.contacts == '') { if (form.value.contacts == '') {
uni.showToast({ sheep.$helper.toast('请输入联系人');
title: '请输入联系人', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.contact_number == '') { if (form.value.contact_number == '') {
uni.showToast({ sheep.$helper.toast('请输入联系人电话');
title: '请输入联系人电话', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (!/^1[3-9]\d{9}$/.test(form.value.contact_number)) { if (!/^1[3-9]\d{9}$/.test(form.value.contact_number)) {
uni.showToast({ sheep.$helper.toast('请输入正确的手机号');
title: '请输入正确的手机号', // uni.showToast({
icon: 'none', // title: '',
duration: 2000 // icon: 'none',
}) // duration: 2000
// })
return; return;
} }
if (form.value.content == '') { if (form.value.content == '') {
uni.showToast({ sheep.$helper.toast('请输入详细信息');
title: '请输入详细信息', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.images == '') { if (form.value.images == '') {
uni.showToast({ sheep.$helper.toast('请上传图片');
title: '请上传图片', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.type == '') { if (form.value.type == '') {
uni.showToast({ sheep.$helper.toast('请选择项目类型');
title: '请选择项目类型', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.cate_ids == '') { if (form.value.cate_ids == '') {
uni.showToast({ sheep.$helper.toast('请选择标签');
title: '请选择标签', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
console.log('apply——form:', form.value); console.log('apply——form:', form.value);
@ -700,19 +714,21 @@
state.currentCityIndex = [0, 0] state.currentCityIndex = [0, 0]
console.log('currentCityIndex', state.currentCityIndex); console.log('currentCityIndex', state.currentCityIndex);
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'success', // title: res.msg,
}) // icon: 'success',
// })
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 2000) }, 2000)
} else { } else {
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'error' // title: res.msg,
}) // icon: 'error'
// })
} }
} }

View File

@ -148,10 +148,11 @@
couponFullCount.value = res.data.total; couponFullCount.value = res.data.total;
console.log('满减券', couponFullList.value, couponFullList.value[0]); console.log('满减券', couponFullList.value, couponFullList.value[0]);
} else { } else {
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'none' // title: res.msg,
}) // icon: 'none'
// })
} }
} }
/* 次数券 */ /* 次数券 */
@ -170,10 +171,11 @@
console.log('couponTimesList', couponTimesList.value); console.log('couponTimesList', couponTimesList.value);
// score.value = res.data.score // score.value = res.data.score
} else { } else {
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'none' // title: res.msg,
}) // icon: 'none'
// })
} }
} }
@ -192,21 +194,23 @@
const res = await sheep.$api.coupon.useTimes(data) const res = await sheep.$api.coupon.useTimes(data)
console.log('使用次数券_res:', res); console.log('使用次数券_res:', res);
if (res.code == 1) { if (res.code == 1) {
uni.showToast({ sheep.$helper.toast('已增加您的拨打号码次数');
title: '已增加您的拨打号码次数', // uni.showToast({
icon: 'success', // title: '',
duration: 2000, // icon: 'success',
}) // duration: 2000,
// })
setTimeout(() => { setTimeout(() => {
couponTimesList.value = []; couponTimesList.value = [];
getCouponTimesList(); getCouponTimesList();
},1500) },1500)
} else { } else {
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'error' // title: res.msg,
}) // icon: 'error'
// })
} }
} }

View File

@ -384,11 +384,12 @@
} }
}) })
} else { } else {
uni.showToast({ sheep.$helper.toast('请先登录');
title: '请先登录', // uni.showToast({
icon: 'none', // title: '',
duration: 2000 // icon: 'none',
}) // duration: 2000
// })
cardShow.value = false cardShow.value = false
setTimeout(function() { setTimeout(function() {
uni.switchTab({ uni.switchTab({
@ -407,11 +408,11 @@
url: '/pages/user/authentication' url: '/pages/user/authentication'
}) })
} else { } else {
sheep.$helper.toast('请先登录');
uni.showToast({ // uni.showToast({
title: '请先登录', // title: '',
icon: 'none', // icon: 'none',
}) // })
cardShow.value = false cardShow.value = false
setTimeout(function() { setTimeout(function() {
uni.switchTab({ uni.switchTab({
@ -435,10 +436,7 @@
}) })
} else { } else {
setTimeout(() => { setTimeout(() => {
uni.showToast({ sheep.$helper.toast('请先登录');
title: '请先登录',
icon: 'none',
})
}, 500); }, 500);
setTimeout(() => { setTimeout(() => {
@ -530,20 +528,22 @@
tagSelectedNum.value += 1; tagSelectedNum.value += 1;
tagShowList.value[index].isSelect = true; tagShowList.value[index].isSelect = true;
} else { } else {
uni.showToast({ sheep.$helper.toast('最多选择三个标签');
title: '最多选择三个标签', // uni.showToast({
icon: 'none' // title: '',
}) // icon: 'none'
// })
} }
} else { } else {
if (tagSelectedNum.value > 0) { if (tagSelectedNum.value > 0) {
tagSelectedNum.value -= 1; tagSelectedNum.value -= 1;
tagShowList.value[index].isSelect = false; tagShowList.value[index].isSelect = false;
} else { } else {
uni.showToast({ sheep.$helper.toast('至少选择一个');
title: '至少选择一个', // uni.showToast({
icon: 'none' // title: '',
}) // icon: 'none'
// })
} }
} }
console.log('选择标签', tagSelectedNum.value); console.log('选择标签', tagSelectedNum.value);
@ -604,10 +604,11 @@
async function apply() { async function apply() {
console.log('state', state.formData.images); console.log('state', state.formData.images);
if (agreeAdd.value == false) { if (agreeAdd.value == false) {
uni.showToast({ sheep.$helper.toast('请先同意发布须知');
title: '请先同意发布须知', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
form.value.cate_ids = selectTagslist.value.map((item) => item.id).join(',') form.value.cate_ids = selectTagslist.value.map((item) => item.id).join(',')
@ -617,74 +618,84 @@
console.log('images', form.value.images); console.log('images', form.value.images);
if (form.value.title == '') { if (form.value.title == '') {
uni.showToast({ sheep.$helper.toast('请输入标题');
title: '请输入标题', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.province == '' && form.value.city == '') { if (form.value.province == '' && form.value.city == '') {
uni.showToast({ sheep.$helper.toast('请选择地区');
title: '请选择地区', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.address_detail == '') { if (form.value.address_detail == '') {
uni.showToast({ sheep.$helper.toast('请输入详细地址');
title: '请输入详细地址', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.contacts == '') { if (form.value.contacts == '') {
uni.showToast({ sheep.$helper.toast('请输入联系人');
title: '请输入联系人', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.contact_number == '') { if (form.value.contact_number == '') {
uni.showToast({ sheep.$helper.toast('请输入联系人电话');
title: '请输入联系人电话', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (!/^1[3-9]\d{9}$/.test(form.value.contact_number)) { if (!/^1[3-9]\d{9}$/.test(form.value.contact_number)) {
uni.showToast({ sheep.$helper.toast('请输入正确的手机号');
title: '请输入正确的手机号', // uni.showToast({
icon: 'none', // title: '',
duration: 2000 // icon: 'none',
}) // duration: 2000
// })
return; return;
} }
if (form.value.content == '') { if (form.value.content == '') {
uni.showToast({ sheep.$helper.toast('请输入详细信息');
title: '请输入详细信息', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.images == '') { if (form.value.images == '') {
uni.showToast({ sheep.$helper.toast('请上传图片');
title: '请上传图片', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.type == '') { if (form.value.type == '') {
uni.showToast({ sheep.$helper.toast('请选择项目类型');
title: '请选择项目类型', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
if (form.value.cate_ids == '') { if (form.value.cate_ids == '') {
uni.showToast({ sheep.$helper.toast('请选择标签');
title: '请选择标签', // uni.showToast({
icon: 'none', // title: '',
}) // icon: 'none',
// })
return return
} }
console.log('apply——form:', form.value); console.log('apply——form:', form.value);
@ -726,10 +737,11 @@
url: '/pages/index/user' url: '/pages/index/user'
}) })
}else { }else {
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'error' // title: res.msg,
}) // icon: 'error'
// })
} }
} }

View File

@ -351,12 +351,12 @@
url: e url: e
}) })
} else { } else {
sheep.$helper.toast('请先登录');
uni.showToast({ // uni.showToast({
title: '请先登录', // title: '',
icon: 'none', // icon: 'none',
duration: 2000 // duration: 2000
}) // })
setTimeout(function() { setTimeout(function() {
uni.switchTab({ uni.switchTab({

View File

@ -363,10 +363,11 @@
url: '/pages/user/info' url: '/pages/user/info'
}) })
} else { } else {
uni.showToast({ sheep.$helper.toast('请先登录');
title: '请先登录', // uni.showToast({
icon: 'none' // title: '',
}) // icon: 'none'
// })
} }
} }
@ -377,11 +378,12 @@
url: e url: e
}) })
} else { } else {
uni.showToast({ sheep.$helper.toast('请先登录');
title: '请先登录', // uni.showToast({
icon: 'none', // title: '',
duration: 2000 // icon: 'none',
}) // duration: 2000
// })
// setTimeout(function() { // setTimeout(function() {
// uni.switchTab({ // uni.switchTab({

File diff suppressed because it is too large Load Diff

View File

@ -138,10 +138,11 @@
// //
detailClass.value.content = formatRichText(detailClass.value.content); detailClass.value.content = formatRichText(detailClass.value.content);
} else { } else {
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'none' // title: res.msg,
}) // icon: 'none'
// })
} }
} }
const newContent = ref('') const newContent = ref('')
@ -196,11 +197,12 @@
} }
sheep.$api.school.classesCollect(data).then((res) => { sheep.$api.school.classesCollect(data).then((res) => {
if(res.code == 1) { if(res.code == 1) {
uni.showToast({ sheep.$helper.toast('已取消收藏');
title:'已取消收藏', // uni.showToast({
icon:'none', // title:'',
duration: 2000, // icon:'none',
}) // duration: 2000,
// })
setTimeout(() =>{ setTimeout(() =>{
getDetail() getDetail()
},1000) },1000)
@ -214,11 +216,12 @@
} }
sheep.$api.school.classesCollect(data1).then((res) => { sheep.$api.school.classesCollect(data1).then((res) => {
if(res.code == 1) { if(res.code == 1) {
uni.showToast({ sheep.$helper.toast('已收藏');
title:'已收藏', // uni.showToast({
icon:'none', // title:'',
duration: 2000, // icon:'none',
}) // duration: 2000,
// })
setTimeout(() =>{ setTimeout(() =>{
getDetail() getDetail()
},1000) },1000)

View File

@ -113,10 +113,11 @@
sheep.$api.user.authPhoto(data).then((res) => { sheep.$api.user.authPhoto(data).then((res) => {
if(res.code == 1) { if(res.code == 1) {
console.log('提交认证成功'); console.log('提交认证成功');
uni.showToast({ sheep.$helper.toast('提交认证成功');
title:'提交认证成功', // uni.showToast({
icon: 'success', // title:'',
}) // icon: 'success',
// })
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()

View File

@ -189,10 +189,11 @@
} else { } else {
// Handle case where data is not in expected format // Handle case where data is not in expected format
collectRentList.value = []; collectRentList.value = [];
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'none' // title: res.msg,
}) // icon: 'none'
// })
} }
console.log('getList', collectRentList.value); console.log('getList', collectRentList.value);
} }
@ -214,10 +215,11 @@
} else { } else {
// Handle case where data is not in expected format // Handle case where data is not in expected format
collectSchoolList.value = []; collectSchoolList.value = [];
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'none' // title: res.msg,
}) // icon: 'none'
// })
} }
console.log('平台课程收藏列表-222', collectSchoolList.value); console.log('平台课程收藏列表-222', collectSchoolList.value);
} }
@ -281,11 +283,12 @@
} }
sheep.$api.rent.rentCollect(data).then((res) => { sheep.$api.rent.rentCollect(data).then((res) => {
if (res.code == 1) { if (res.code == 1) {
uni.showToast({ sheep.$helper.toast('已取消收藏');
title: '已取消收藏', // uni.showToast({
icon: 'none', // title: '',
duration: 2000 // icon: 'none',
}) // duration: 2000
// })
} }
}) })
} else { } else {
@ -296,11 +299,12 @@
} }
sheep.$api.rent.rentCollect(data1).then((res) => { sheep.$api.rent.rentCollect(data1).then((res) => {
if (res.code == 1) { if (res.code == 1) {
uni.showToast({ sheep.$helper.toast('已收藏');
title: '已收藏', // uni.showToast({
icon: 'none', // title: '',
duration: 2000 // icon: 'none',
}) // duration: 2000
// })
} }
}) })
} }
@ -317,11 +321,12 @@
} }
sheep.$api.school.classesCollect(data).then((res) => { sheep.$api.school.classesCollect(data).then((res) => {
if (res.code == 1) { if (res.code == 1) {
uni.showToast({ sheep.$helper.toast('已取消收藏');
title: '已取消收藏', // uni.showToast({
icon: 'none', // title: '',
duration: 2000, // icon: 'none',
}) // duration: 2000,
// })
} }
}) })
} else { } else {
@ -332,11 +337,12 @@
} }
sheep.$api.school.classesCollect(data1).then((res) => { sheep.$api.school.classesCollect(data1).then((res) => {
if (res.code == 1) { if (res.code == 1) {
uni.showToast({ sheep.$helper.toast('已收藏');
title: '已收藏', // uni.showToast({
icon: 'none', // title: '',
duration: 2000, // icon: 'none',
}) // duration: 2000,
// })
} }
}) })
} }

View File

@ -281,9 +281,11 @@
// //
function toDetail(e) { function toDetail(e) {
console.log('跳转详情', e); console.log('跳转详情', e);
uni.navigateTo({ if(e.status == 1) {
url: '/pages/canteenRent/rentDetail?id=' + e.id uni.navigateTo({
}) url: '/pages/canteenRent/rentDetail?id=' + e.id
})
}
} }
// //
function rentEdit(item) { function rentEdit(item) {
@ -300,17 +302,19 @@
sheep.$api.rent.delRent({ids:item.id}).then((res) => { sheep.$api.rent.delRent({ids:item.id}).then((res) => {
if(res.code === 1) { if(res.code === 1) {
console.log('delete:',res); console.log('delete:',res);
uni.showToast({ sheep.$helper.toast('取消成功');
title: '取消成功', // uni.showToast({
icon: 'none' // title: '',
}) // icon: 'none'
// })
rentList.value = [] rentList.value = []
getList() getList()
}else { }else {
uni.showToast({ sheep.$helper.toast(res.msg);
title: res.msg, // uni.showToast({
icon: 'error' // title: res.msg,
}) // icon: 'error'
// })
} }
}) })
} }