|
@@ -74,7 +74,7 @@
|
|
|
<script setup>
|
|
|
import { getChromeStorage, setChromeStorage, defineProps, sendChromeTabMessage } from "@/uilts/chromeExtension";
|
|
|
import { getPostDetail } from '@/http/redPacket.js'
|
|
|
-import { getPostEditorNftCertInfo } from '@/http/toolBoxApi'
|
|
|
+import { getPostEditorNftCertInfo, unlockNftCert } from '@/http/toolBoxApi'
|
|
|
import { guid, getQueryString } from "@/uilts/help";
|
|
|
import { onMounted, reactive, ref, onBeforeUnmount } from "vue";
|
|
|
import { ElMessage } from 'element-plus'
|
|
@@ -182,13 +182,6 @@ const getDetail = () => {
|
|
|
iframe.onerror = () => {
|
|
|
state.status = '网页错误'
|
|
|
}
|
|
|
- // iframe.onload = () => {
|
|
|
- // alert(123)
|
|
|
- // if (state.status == '加载' || state.status == 'iframe') {
|
|
|
- // state.show_btn = true
|
|
|
- // state.status = 'iframe'
|
|
|
- // }
|
|
|
- // }
|
|
|
|
|
|
getPostDetail({
|
|
|
params: {
|
|
@@ -221,8 +214,15 @@ const getDetail = () => {
|
|
|
state.status = 'iframe'
|
|
|
// 蒙层
|
|
|
if (state.detail && state.detail.certNftProjectId) {
|
|
|
- state.showMask = true;
|
|
|
- // 确权
|
|
|
+ if (state.detail?.certNftUnlockStatus == 0) {
|
|
|
+ state.showMask = true;
|
|
|
+ // report
|
|
|
+ reportFail()
|
|
|
+ } else {
|
|
|
+ // report
|
|
|
+ reportSucc()
|
|
|
+ }
|
|
|
+ // 确权信息
|
|
|
getChromeStorage('userInfo', (_userInfo) => {
|
|
|
if (_userInfo) {
|
|
|
getNftInfoStatus()
|
|
@@ -254,17 +254,6 @@ const getNftInfoStatus = () => {
|
|
|
let { code, data } = res;
|
|
|
if ( code === 0 ) {
|
|
|
nftAuthINfo.value = data;
|
|
|
- // checkMask
|
|
|
- getChromeStorage('post_id_list', (list) => {
|
|
|
- if (list && list.indexOf(state.postId) !== -1 && nftAuthINfo.value?.certStatus === 1) {
|
|
|
- state.showMask = false;
|
|
|
- // report
|
|
|
- reportSucc()
|
|
|
- } else {
|
|
|
- // report
|
|
|
- reportFail()
|
|
|
- }
|
|
|
- })
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -349,12 +338,10 @@ const succBack = () => {
|
|
|
type: 'success'
|
|
|
})
|
|
|
state.showMask = false;
|
|
|
- // 记录解锁
|
|
|
- getChromeStorage('post_id_list', (list) => {
|
|
|
- let originList = list ? list : [];
|
|
|
- if (originList.indexOf(state.postId) === -1) {
|
|
|
- originList.push(state.postId)
|
|
|
- setChromeStorage({ post_id_list: JSON.stringify(originList) })
|
|
|
+ // 解锁
|
|
|
+ unlockNftCert({
|
|
|
+ params: {
|
|
|
+ postId: state.postId,
|
|
|
}
|
|
|
})
|
|
|
}
|