Has that boss ever done the function of giving likes on vue? when he interacts with the background, he sends me a dome.

< span class= "praise-style" @ click= "clickFabulous (item)" >

            <i v-if="item.essence" class="iconfont icon-xihuan iconr"></i>
            <i v-if="!item.essence" class="iconfont icon-like iconr"></i>
             {{item.likeCount}}
          </span>
          
          
             // 
  clickFabulous (item){
    // 
    if (!this.islogin) {
      this.$router.push({path: "/login"})
    }else{
      item.essence =false
    }
  },
  -sharp-sharp-sharp 

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Jul.29,2021

tell me what you do. Give the like button two classes (class)

.

get the data of the content asynchronously when entering the content details

there is a

in it.
{
    "id":"",
    "linkNumber":"10",
    "like":true/false
}

display the like button when like is true and the button to cancel likes is false

Button method in the page

linkDetail(){
// 
    this.$post('detail/'+ this+ id)
    .then((result)=>{
        // 
        if(result.status === 1){
        //
            this.detail.like = !this.detail.like;
        }else{
        }
    })
    .catch()
 
}

the backend is the same in both go and php

check whether the user likes the article. If there is, cancel it. If not, like it

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b361ac-2bffe.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b361ac-2bffe.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?