<template>
  <div class="inline-16">
    <el-button type="text" size="mini" @click="releaseNotice">{{data.isontop === 0?'置顶':'取消置顶'}}</el-button>
  </div>
</template>

<script>
export default {
  props:['data'],
  data () {
    return {}
  },
  methods:{
    async releaseNotice () {
      const res = await this.$api.requested({
        "classname": "webmanage.saletool.notice.notice",
        "method": this.data.isontop === 0?"topping":"cancelTopping",
        "content": {
          "sat_noticeid":this.data.sat_noticeid
        }
      })
      this.tool.showMessage(res,()=>{
        this.$emit('onSuccess')
      })
    }
  }
}

</script>
<style>
</style>