|
@@ -0,0 +1,146 @@
|
|
|
+<template>
|
|
|
+ <div class="bind-tips-wrapper">
|
|
|
+ <img src="" class="icon-close" @click="close">
|
|
|
+ <div class="top">
|
|
|
+ <img src="" class="icon-give-box">
|
|
|
+ <div class="text">
|
|
|
+ oops, you failed to send giveaway
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="button-wrapper">
|
|
|
+ <div class="re-send" @click="seSend">Resend</div>
|
|
|
+ <div class="terminate" @click="terminate">Terminate for a refund</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+/* eslint-disable */
|
|
|
+import { onMounted, ref } from "vue";
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
+import { getChromeStorage } from '@/uilts/chromeExtension.js'
|
|
|
+import { getQueryString } from '@/uilts/help.js'
|
|
|
+
|
|
|
+let submitData = ref({});
|
|
|
+
|
|
|
+const close = () => {
|
|
|
+ window.parent.postMessage({ actionType: "IFRAME_CLOSE_BIND_TWEET", data: {
|
|
|
+ }}, "*");
|
|
|
+}
|
|
|
+
|
|
|
+const seSend = async () => {
|
|
|
+ let publishData = await getChromeStorage('publishData');
|
|
|
+ callEventPageMethod(
|
|
|
+ "POPUP_PUBLISH_TWITTER_RED_PACK",
|
|
|
+ {
|
|
|
+ srcContent: publishData.srcContent,
|
|
|
+ postId: publishData.postId
|
|
|
+ },
|
|
|
+ function (response) {
|
|
|
+ console.log("res", response);
|
|
|
+ }
|
|
|
+ );
|
|
|
+}
|
|
|
+
|
|
|
+const terminate = () => {
|
|
|
+ terminatedLuckdrop({
|
|
|
+ params: {
|
|
|
+ luckdropId: submitData.id
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 0) {
|
|
|
+ close();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // window.parent.postMessage({ actionType: "IFRAME_RED_PACKET_REPLY_CLICK", data: {
|
|
|
+ // postId: state.postId,
|
|
|
+ // type: params.type,
|
|
|
+ // taskLuckdropId: state.detail.taskLuckdropId
|
|
|
+ // }}, "*");
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * sendMessage
|
|
|
+ */
|
|
|
+const callEventPageMethod = (actionType, data, callback) => {
|
|
|
+ chrome.runtime.sendMessage(
|
|
|
+ {
|
|
|
+ actionType: actionType,
|
|
|
+ data: data
|
|
|
+ },
|
|
|
+ function (response) {
|
|
|
+ if (typeof callback === "function") callback(response);
|
|
|
+ }
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ let params = getQueryString('params');
|
|
|
+ submitData.value = params;
|
|
|
+})
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.bind-tips-wrapper {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-radius: 20px;
|
|
|
+ padding: 15px;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .icon-close {
|
|
|
+ position: absolute;
|
|
|
+ left: 14px;
|
|
|
+ top: 14px;
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .top {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: column;
|
|
|
+ margin-top: 35px;
|
|
|
+
|
|
|
+ .icon-give-box {
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text {
|
|
|
+ font-weight: 590;
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .button-wrapper {
|
|
|
+ margin-top: 26px;
|
|
|
+
|
|
|
+ .re-send, .terminate {
|
|
|
+ width: 360px;
|
|
|
+ height: 43px;
|
|
|
+ border-radius: 100px;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 17px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .re-send {
|
|
|
+ background: #1D9BF0;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+
|
|
|
+ .terminate {
|
|
|
+ color: #1D9BF0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|