group.vue 763 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <nft-group-list @clickCallBack="clickHandler"></nft-group-list>
  3. </template>
  4. <script setup>
  5. import NftGroupList from '@/view/components/nft-group-list.vue';
  6. import { prePost } from '@/http/nft'
  7. const clickHandler = (item) => {
  8. prePost({
  9. params: {
  10. groupId: item.nftGroupId
  11. }
  12. }).then(res => {
  13. let { code, data = {} } = res
  14. if (code === 0) {
  15. chrome.tabs.getCurrent((tab) => {
  16. chrome.tabs.sendMessage(tab.id, { actionType: "IFRAME_NFT_GROUP_LIST_HIDE" });
  17. chrome.tabs.sendMessage(tab.id, {
  18. actionType: "IFRAME_NFT_GROUP_SET_CONTENT",
  19. publishRes: data
  20. });
  21. })
  22. }
  23. })
  24. }
  25. </script>