相同的代码可以提抽到一个函数中
methods:{
//相同的代码可以提抽到一个函数中
theName(){
if(!this.loginStatus){
uni.showToast({
title:'请先登录',
icon:'none'
})
return
}
},
// 我的订单
myOrder(){
this.theName();
},
//我的学习
myStudy(){
this.theName();
},
//我的收藏
myCollect(){
this.theName();
},
// 联系客服
customService(){
this.theName();
}
}