1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| const isFocus = () => { console.log("isFocus") // 判断是否关注 if (user.uid == undefined) { return; } isFollow(user.uid, toutiao.value.uid).then(res => { if (res == true) { followLable.value = "已关注" } }); } const focus = () => { console.log("focus") if (user.uid == undefined) { Toast("您未登录!") return; } if (followLable.value == "已关注"){ disFollow(user.uid, toutiao.value.uid) followLable.value = "关注" }else { follow(user.uid, toutiao.value.uid) followLable.value = "已关注" } // isFollow(user.uid, toutiao.value.uid).then(res => { // if (res == true) { // disFollow(user.uid, toutiao.value.uid) // followLable.value = "关注" // } else { // follow(user.uid, toutiao.value.uid) // followLable.value = "已关注" // } // }); }
|