|
@@ -281,7 +281,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
+import { checkLogin } from "@/config/api";
|
|
|
import { getStar,dianzan } from "@/config/api";
|
|
|
|
|
|
let menuli = [
|
|
@@ -401,12 +401,18 @@ export default {
|
|
|
},
|
|
|
handleLike(){
|
|
|
if (this.isShowGood) return
|
|
|
- this.isShowGood = true
|
|
|
- dianzan(()=>{
|
|
|
- setTimeout(() => {
|
|
|
- this.isShowGood = false
|
|
|
- this.likeNum++
|
|
|
- }, 2500);
|
|
|
+ checkLogin(res => {
|
|
|
+ if (res.data) {
|
|
|
+ dianzan(()=>{
|
|
|
+ this.isShowGood = true
|
|
|
+ setTimeout(() => {
|
|
|
+ this.isShowGood = false
|
|
|
+ this.likeNum++
|
|
|
+ }, 2500);
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ alert('请登录后操作')
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
getStar(){
|