Browse Source

[edit] report

wenliming 2 năm trước cách đây
mục cha
commit
e2e3a42817

+ 21 - 2
src/log-center/logEnum.js

@@ -1,3 +1,5 @@
+import { PlayType } from '@/types';
+
 export const logType = {
     'denet': '150',//denet-event-log
 }
@@ -18,7 +20,7 @@ export const objectType = {
     withdrawButton: "withdraw-button",
     topupButton: "topup-button",
 
-    //discord 
+    //discord
     getDiscordGuildNoData: 'get-discord-guild-no-data',
     getDiscordGuildCatch: 'get-discord-guild-catch',
     getDiscordGuildOpenApiNoData: 'get-discord-guild-openapi-no-data',
@@ -95,4 +97,21 @@ export const pageSource = {
 export const extParams = {
     success: 'success',
     failure: 'failure'
-}
+}
+
+export const bizType = {
+    Treasure: 0,
+    Lottery: 1,
+    RedPacket: 2,
+    ToolBox: 3,
+}
+
+export const getCurrentBizType = (type) => {
+  let obj = {};
+  obj[PlayType.common] = bizType.RedPacket;
+  obj[PlayType.lottery] = bizType.Lottery;
+  obj[PlayType.treasure] = bizType.Treasure;
+  obj[PlayType.postEditor] = bizType.ToolBox;
+
+  return obj[type];
+}

+ 2 - 1
src/types/global.js

@@ -11,7 +11,8 @@
 export const PlayType = {
   common: 1,
   lottery: 2,
-  treasure: 3
+  treasure: 3,
+  postEditor: 4,
 };
 
 /**

+ 18 - 18
src/view/components/custom-card-cover.vue

@@ -65,7 +65,7 @@
             </div>
             <div class="time-area" v-if="data.type == PlayType.lottery">
                 <img class="icon-clock" :src="require('@/assets/svg/icon-time.svg')" />
-                {{data.countDown || formatSecondsAsDaysOrTime(data.validityDuration * 3600)}} 
+                {{data.countDown || formatSecondsAsDaysOrTime(data.validityDuration * 3600)}}
             </div>
             <div class="people" v-else-if="data.type == PlayType.common">
                 {{ data.totalCount }} WINNERS TO SHARE
@@ -80,7 +80,7 @@
             </div>
 
             <div class="treasure-row-2">
-                Your Gain Up to $ <div class="amount">{{data.upGainAmountUsdValue}}</div>
+                Your Gain Up to $ <div class="amount">{{data.upGainAmountUsdValue || 0}}</div>
             </div>
 
             <div class="treasure-row-3" :style="{'visibility': data.currencyCode? 'visible' : 'hidden'}">
@@ -103,8 +103,8 @@
     <!-- 改版之后的卡片 -->
     <div class="custom-card" v-else>
         <img class="cover" v-if="isLottaryCpd" :src="require('@/assets/subject/img-custom-lottary-bg.svg')"  />
-        <img class="cover" v-else :src="require('@/assets/subject/img-custom-common-bg.svg')"  />        
-        <img class="gift" :src="require('@/assets/subject/icon-gift.gif')" />        
+        <img class="cover" v-else :src="require('@/assets/subject/img-custom-common-bg.svg')"  />
+        <img class="gift" :src="require('@/assets/subject/icon-gift.gif')" />
         <div class="prize">
             <component-zoom width="300" fontSize="22">
                 <img class="icon" :src="require('@/assets/subject/icon-gift-inline.svg')"/>
@@ -113,7 +113,7 @@
                     <span class="total" >X{{data.totalCount}}</span>
                 </span>
             </component-zoom>
-            
+
         </div>
         <!-- 底部公共模块 -->
         <div class="common-bottom">
@@ -127,7 +127,7 @@
                     <span class="count">{{data.totalCount}}Winners</span>
                     <span>to Share </span>
                     <span class="prize-name">{{isMoneyRewardCpd ? data.amountValue + ' ' + data.tokenSymbol : data.customizedReward}}</span>
-                
+
                 </component-zoom>
             </div>
             <div class="open-btn" @click="open">
@@ -284,14 +284,14 @@ onMounted(() => {
     }
 
     .treasure-card-info {
-        color: #fff; 
-        position: absolute; 
+        color: #fff;
+        position: absolute;
         top: 86px;
         width: 100%;
         text-align: center;
 
         .treasure-row-1 {
-            display: flex; 
+            display: flex;
             align-items: center;
             justify-content: center;
             font-weight: 900;
@@ -309,11 +309,11 @@ onMounted(() => {
         }
 
         .treasure-row-2 {
-            margin: 6px 0; 
-            background: rgba(255, 255, 255, .1); 
-            width: 100%; 
+            margin: 6px 0;
+            background: rgba(255, 255, 255, .1);
+            width: 100%;
             height: 27px;
-            display: flex; 
+            display: flex;
             align-items: center;
             justify-content: center;
             font-weight: 500;
@@ -327,12 +327,12 @@ onMounted(() => {
         }
 
         .treasure-row-3 {
-            display: flex; 
+            display: flex;
             align-items: center;
             justify-content: center;
 
             .img {
-                width: 13px; 
+                width: 13px;
                 margin-right: 3px;
             }
 
@@ -371,8 +371,8 @@ onMounted(() => {
             font-weight: 800;
             font-size: 15px;
             margin-top: 12px;
-            position: relative; 
-            left: 50%; 
+            position: relative;
+            left: 50%;
             transform: translateX(-50%);
 
             img {
@@ -407,7 +407,7 @@ onMounted(() => {
         }
 
         .treasure-info {
-            color: #fff; 
+            color: #fff;
             opacity: 0.7;
             font-weight: 300;
         }

+ 3 - 7
src/view/components/popup-transactions.vue

@@ -20,17 +20,13 @@
                     <div class="img-wrapper">
                         <!-- 收入- 任务红包领取 -->
                         <template v-if="item.bizType == 1 || item.bizType == 5 || item.bizType == 10 || item.bizType == 11 || item.bizType == 12">
-                            <img class="icon-avatar" v-if="item.bizType != 12" :src="item.bizData.avatarUrl" />
-                            <img class="icon-avatar" v-else :src="require('@/assets/svg/icon-treasure-return.svg')" />
-                            <img class="icon-give" v-if="item.bizType == 10 || item.bizType == 11" :src="require('@/assets/svg/icon-small-treasure.svg')" />
-                            <img class="icon-give" v-else :src="
-                                require('@/assets/svg/icon-get-giveaways-s.svg')
-                            " />
+                            <img class="icon-avatar" style="margin-right: 0" :src="item.bizType != 12 ? item.bizData.avatarUrl : require('@/assets/svg/icon-treasure-return.svg')" />
+                            <img class="icon-give" style="right: -4px" :src="item.bizType == 10 || item.bizType == 11 ? require('@/assets/svg/icon-small-treasure.svg') : require('@/assets/svg/icon-get-giveaways-s.svg')" />
                         </template>
 
                         <!-- 收入- 任务红包结余退款, -->
                         <template v-else-if="item.bizType == 2 || item.bizType == 6">
-                            <img style="margin-left:-4px" :src="
+                            <img style="margin-left:-4px; width: 38px" :src="
                                 require('@/assets/svg/icon-give-refund-list.svg')
                             " />
                         </template>

+ 15 - 9
src/view/iframe/publish/components/pay-button.vue

@@ -5,7 +5,7 @@
         <div class="pay-btn">
             <div class="iframe-pay"
                 v-show="currentCurrencyInfo.currencyCode == 'USD'">
-                <div class="token-pay" 
+                <div class="token-pay"
                     @click="clickPayUSD">
                     Pay ${{finalAmountData.rechargeAmountValue > 0 && USDepositStatus != 'SUCCESS' ? finalAmountData.rechargeAmountValue : finalAmountData.orderAmountValue}}
                 </div>
@@ -15,7 +15,7 @@
                     ref="iframe"
                     :src="`${payConfig.paypalHtml}?paypalClientId=${payConfig.paypalClientId}&amount=${props.finalAmountData.finalAmountValue}`"></iframe> -->
             </div>
-            <div class="token-pay" 
+            <div class="token-pay"
                 :class="{ disabled: Number(currentCurrencyInfo.balance) < Number(payConfig.amount) }"
                 v-if="currentCurrencyInfo.currencyCode != 'USD'"
                 @click="balancePay">
@@ -28,6 +28,8 @@
 <script setup>
 import { onMounted, ref, defineProps, defineEmits, watch, defineExpose } from "vue";
 
+import { PlayType } from '@/types';
+
 import {payTaskLuckdropWithBalance} from "@/http/publishApi"
 import Report from "@/log-center/log"
 import {setChromeStorage, getChromeStorage} from "@/uilts/chromeExtension"
@@ -55,7 +57,7 @@ const props = defineProps({
         }
     },
     currentCurrencyInfo: {
-        type: Object, 
+        type: Object,
         default: () => {
 
         }
@@ -63,6 +65,10 @@ const props = defineProps({
     USDepositStatus: {
         type: String,
         default: 'DEFAULT'
+    },
+    bizType: {
+        type: String,
+        default: PlayType.treasure
     }
 });
 
@@ -72,7 +78,7 @@ let payIng = false;
 watch(
     () => props.finalAmountData.finalAmountValue,
     (newVal) => {
-        // iframe.value.contentWindow.postMessage({ 
+        // iframe.value.contentWindow.postMessage({
         //     actionType: "setAmount", amount: newVal
         // },
         //     "*"
@@ -85,14 +91,14 @@ watch(
 
 const emits = defineEmits(["payFinish"]);
 
-const balancePay = () => {  
+const balancePay = () => {
     Report.reportLog({
         pageSource: Report.pageSource.previewPage,
         businessType: Report.businessType.buttonClick,
         objectType: Report.objectType.confirmButton
     }, {
-        type: 'confirm'
-    });  
+        type: Report.getCurrentBizType(props.bizType)
+    });
     if(payIng) {
         return;
     }
@@ -188,7 +194,7 @@ defineExpose({
             align-items: center;
             justify-content: flex-end;
             margin-bottom: 6px;
-            
+
             span {
                 display: inline-block;
                 color: #000000;
@@ -199,7 +205,7 @@ defineExpose({
                 width: 14px;
                 margin-left:6px;
             }
-            
+
             .desc {
                 margin-right:6px
             }

+ 83 - 61
src/view/iframe/publish/give-dialog.vue

@@ -9,11 +9,11 @@
                 v-show="showCurrencyPop || showCurrencySelect"
                 @click.stop="showCurrencyPop = false; showCurrencySelect=false">
             </div>
-            
+
             <!-- head -->
-            <give-dialog-head  
+            <give-dialog-head
                 :title="publishType == 'REDPACKET' ? currentComData[showComType]['title'] : 'Tool Box'"
-                :publishType="publishType" 
+                :publishType="publishType"
                 :showComType="showComType"
                 :toolBoxPageData="toolBoxPageData"
                 @close="close"></give-dialog-head>
@@ -22,7 +22,7 @@
             <div class="body">
                 <!-- 充值组件 -->
                 <top-up
-                    v-if="showComType == 'topUp'" 
+                    v-if="showComType == 'topUp'"
                     :currentCurrencyInfo="tempCurrentCurrencyInfo"
                     @topUpDone="topUpDone">
                 </top-up>
@@ -42,7 +42,7 @@
 
                     <!-- 货币列表  -->
                     <div class="currency-pop" v-show="showCurrencyPop">
-                        <currency-list 
+                        <currency-list
                             ref="currencyListDom"
                             :showGeneralLottery="showGeneralLottery"
                             @selectCurrency="selectCurrency"
@@ -60,16 +60,16 @@
                             @submitReward="submitReward"></customized-reward-edit-popup>
                     </div>
                     <div class="currency-pop-select" v-show="showCurrencySelect">
-                        <currency-select 
+                        <currency-select
                             ref="currencySelectDom"
                             :list="tempCurrentCurrencyList"
                             @selectCurrency="selectCurrencyAfter"></currency-select>
                     </div>
 
                     <div class="left" v-if="showComType != 'preview' && toolBoxPageData.activePage != 'PREVIEW'">
-                        <div class="tab-item" 
+                        <div class="tab-item"
                             :class="{'active-tab': item.type == publishType}"
-                            v-for="(item, index) in leftTabList" 
+                            v-for="(item, index) in leftTabList"
                             :key="index"
                             @click="clickLeftTab(item, index)"
                             >
@@ -77,12 +77,12 @@
                         </div>
                     </div>
 
-                    <div class="right"  
+                    <div class="right"
                         :class="{'fill-right': showComType == 'preview' || toolBoxPageData.activePage == 'PREVIEW'}">
                         <global-tip :type="'2'"></global-tip>
-                        
+
                         <template v-if="publishType == 'TOOL_BOX'">
-                            <tool-box 
+                            <tool-box
                                 :pageData="{
                                     'linkInputDescImage': toolBoxPageData.postEditorLinkInputDescImage,
                                     'defaultLinkTitle': toolBoxPageData.postEditorDefaultLinkTitle
@@ -97,7 +97,7 @@
                                     <div class="form-cell-content">
                                         <div class="select-mode-ele">
                                             <template v-for="(item, index) in publishModeList" :key="index">
-                                                <img class="img" 
+                                                <img class="img"
                                                     :src="selectModeInfo.index == index ? item.imgActive : item.imgInActive"
                                                     @click="selectPublishMode(item, index)">
 
@@ -162,13 +162,13 @@
                                                             :src="require('@/assets/svg/icon-form-refresh.svg')"
                                                             @click="updateCurrencyBanlce"/>
                                                     </div>
-                                                    <div v-if="currentCurrencyInfo.currencyCode != 'USD'" 
-                                                        class="top-up" 
+                                                    <div v-if="currentCurrencyInfo.currencyCode != 'USD'"
+                                                        class="top-up"
                                                         @click="goTopUp">Deposit</div>
                                                 </div>
                                                 <div class="usd-min-message" v-show="isShowUsdMinMessage" v-html="selectModeInfo.type != PlayType.treasure ? checkUsdMinNumber('inTemplate') : checkTreasureAmountRange('inTemplate')"></div>
                                             </div>
-                                            
+
                                             <!-- 人数 -->
                                             <div class="form-cell">
                                                 <div class="cell-title">
@@ -221,8 +221,8 @@
                                                     Follow
                                                 </div>
                                                 <div class="cell-content">
-                                                    <follow-input style="padding: 0"  
-                                                        padding="10px 12px"  
+                                                    <follow-input style="padding: 0"
+                                                        padding="10px 12px"
                                                         :isAddSelf="!isBack"
                                                         :atUserList="atUserList"
                                                         @addUser="addFollowUser"
@@ -241,7 +241,7 @@
                                                     <!-- 转推、like、关注 -->
                                                     <div v-for="(item, index) in formList"
                                                         :key="index">
-                                                        <div v-if="item.show"  class="form-item"    
+                                                        <div v-if="item.show"  class="form-item"
                                                             :class="{ 'border-hide': formList.length - 1 == index }">
                                                             <div class="item-left">
                                                                 <div class="label">
@@ -251,7 +251,7 @@
                                                                 <div class="control"
                                                                     v-if="item.nodeType == 'textarea'">
                                                                     <follow-input
-                                                                        padding="4px 12px"  
+                                                                        padding="4px 12px"
                                                                         :isAddSelf="!isBack"
                                                                         :atUserList="atUserList"
                                                                         @addUser="addFollowUser"
@@ -260,20 +260,20 @@
                                                                 </div>
                                                                 <div class="control"
                                                                     v-if="item.nodeType == 'input'">
-                                                                    <div v-if="showDiscordInvitePop" 
+                                                                    <div v-if="showDiscordInvitePop"
                                                                         class="discord-invite-info"
                                                                         @click="showDiscordInvitePop = false">
                                                                         <img class="icon" :src="discordInviteInfo.icon || require('@/assets/svg/icon-discord-mini.svg')" />
                                                                         <span class="name">{{discordInviteInfo.name}}</span>
                                                                     </div>
-                                                                    <input v-model="item.text" 
+                                                                    <input v-model="item.text"
                                                                         placeholder="Enter discord invite link"
-                                                                        class="discord-address" 
+                                                                        class="discord-address"
                                                                         @input="onIptDiscordAddress($event, index)"
                                                                         @blur="onBlurDiscordAddress($event, index)" />
                                                                 </div>
                                                             </div>
-                                                            
+
                                                             <div>
                                                                 <a-switch
                                                                     v-if="item.type > 3"
@@ -288,7 +288,7 @@
                                         <!--  提示 -->
                                         <ul class="tips-wrapper" v-if="selectModeInfo.type != PlayType.treasure">
                                             <li class="row" style="white-space:nowrap;">
-                                                Rewards can only be claimed after the target user completes all tasks you set. 
+                                                Rewards can only be claimed after the target user completes all tasks you set.
                                             </li>
                                             <li class="row">
                                                 Each user can only receive a reward once per task.
@@ -297,9 +297,9 @@
                                                 The reward will expire in 7 days once issued. Please promote it as much as possible within this period. After the experiment, the remaining rewards will be returned to your DeNet Wallet.
                                             </li>
                                         </ul>
-                                    </div> 
+                                    </div>
                                 </div>
-                            </div> 
+                            </div>
                             <div class="form-right-sheet">
                                 <!-- 自定义封面事件 -->
                                 <div style="width: 375px;height: 500px; zoom: .74;margin-left: 80px">
@@ -316,7 +316,7 @@
                                         },
                                     }"></custom-card-cover>
                                 </div>
-                                <div class="custom-cover-btn" 
+                                <div class="custom-cover-btn"
                                     v-if="selectModeInfo.type != PlayType.treasure"
                                     @click="customCoverImg">
                                     <img :src="require('@/assets/svg/icon-custom-cover-btn.svg')" />
@@ -337,7 +337,7 @@
 
                         <!-- 预览 -->
                         <template v-else-if="showComType == 'preview'">
-                            <preview-sheet 
+                            <preview-sheet
                                 :baseFormData="baseFormData"
                                 :upGainAmountUsdValue="treasureFormData.upGainAmountUsdValue"
                                 :currentCurrencyInfo="currentCurrencyInfo"
@@ -359,10 +359,11 @@
                                 :payConfig="{
                                     feeDesc: payConfig.feeDesc,
                                     amount: baseFormData.amountValue,
-                                    postId
+                                    postId,
                                 }"
                                 :currentCurrencyInfo="currentCurrencyInfo"
                                 :USDepositStatus = "USDepositStatus"
+                                :bizType="selectModeInfo.type"
                                 @showDepositMask="showDepositMessageBox = true"
                                 @payFinish="payFinish">
                                 <template v-slot:balance>
@@ -374,7 +375,7 @@
                                                 <template v-if="currentCurrencyInfo.currencyCode == 'USD'">
                                                     $
                                                 </template>
-                                                {{currentCurrencyInfo.balance}} 
+                                                {{currentCurrencyInfo.balance}}
                                                 <template v-if="currentCurrencyInfo.currencyCode != 'USD'">
                                                     {{currentCurrencyInfo.tokenSymbol}}
                                                 </template>
@@ -394,7 +395,7 @@
                 </div>
             </div>
         </div>
-        
+
         <!-- 提示 -->
         <message-box
             :dialogVisible="showMessageBox"
@@ -537,7 +538,7 @@ let customShowNewImage = ref(false)
 let refCropper = ref('')
 
 // 当前展示组件内容 default(表单)  preview(预览)  topUp(充值)
-let showComType = ref("default"); 
+let showComType = ref("default");
 let currentComData = {
     default: {
         title: "Giveaway",
@@ -571,7 +572,7 @@ let isShowUsdMinMessage = ref(false);
 // 是否返回
 let isBack = ref(false);
 
-// 展示消息提示 
+// 展示消息提示
 let showMessageBox = ref(false);
 
 let showDepositMessageBox = ref(false);
@@ -645,7 +646,7 @@ let currentCurrencyInfo = ref(defaultCurrentCurrencyInfo);
 const discordIptErrTxt = 'Discord invite link is wrong';
 const discordIptEmptyErrTxt = 'Enter discord invite link';
 const discordIptNerverExpiresErrTxt = 'Make sure the Discord link never expires'
-const requireFollowTxt = '添加 follow 任务'
+const requireFollowTxt = '添加 follow task'
 let iptErrType = ''; //discord
 
 let formList = reactive([
@@ -772,7 +773,7 @@ let currentIconCpd = computed(() => {
         return require("@/assets/svg/icon-gift.svg");
     } else {
         return currentCurrencyInfo.value.iconPath;
-    } 
+    }
 })
 
 // selected prize cpd
@@ -812,6 +813,8 @@ watch(
             Report.reportLog({
                 pageSource: Report.pageSource.publisherDialog,
                 businessType: Report.businessType.pageView,
+            }, {
+              type: newVal.type == 'REDPACKET' ? Report.bizType.Treasure : Report.bizType.ToolBox
             });
             getLocalCurrencyInfoByCode();
             setTimeout(() => {
@@ -894,6 +897,8 @@ const selectCurrencyPopHandle = () => {
     Report.reportLog({
         pageSource: Report.pageSource.currencySelectorPage,
         businessType: Report.businessType.pageView,
+    }, {
+      type: Report.getCurrentBizType(selectModeInfo.type)
     });
     if(baseFormData.rewardType === RewardType.custom) {
         showCustomizedRewardEditPopup.value = true
@@ -909,7 +914,7 @@ const selectCurrencyPopHandle = () => {
 
 const saveDiscordGuildInfo = () => {
     let {guildId, inviteCode, inviteUrl} = discordInviteInfo.value;
-    //保存服务器信息 
+    //保存服务器信息
     Report.reportLog({
         pageSource: Report.pageSource.publisherDialog,
         businessType: Report.businessType.buttonClick,
@@ -1001,11 +1006,11 @@ const resetFormIpt = (clearMode = true) => {
 }
 
 const setLocalSelectCurrencyInfo = (params = {}) => {
-    setChromeStorage({ selectCurrencyInfo : JSON.stringify(params)})    
+    setChromeStorage({ selectCurrencyInfo : JSON.stringify(params)})
 }
 
 const setCurrentCurrencyListInfo = (params = {}) => {
-    setChromeStorage({ selectCurrencyList : JSON.stringify(params)})    
+    setChromeStorage({ selectCurrencyList : JSON.stringify(params)})
 }
 
 /**
@@ -1050,6 +1055,8 @@ const goTopUp = () => {
     Report.reportLog({
         pageSource: Report.pageSource.rechargePage,
         businessType: Report.businessType.pageView,
+    }, {
+      type: Report.getCurrentBizType(selectModeInfo.type)
     });
     showComType.value = 'topUp';
 }
@@ -1145,17 +1152,17 @@ const asyncTokenRechRecord = (cb) => {
  * 提交表单请求
  */
 const submitRequest = async () => {
-    let {   
+    let {
             amountValue = 0,
             totalCount = 0,
             rewardType = RewardType.money,
-            customizedReward = "" 
+            customizedReward = ""
         } = baseFormData;
     baseFormData.amountCurrencyCode = currentCurrencyInfo.value.currencyCode;
     // 组装提交参数
 
     let finishConditions = selectModeInfo.type != PlayType.treasure ? getFinishCondition() : getTreasureFinishCondition();
- 
+
     let receiveConditions = openAntiBot.value ? "" : [];
 
     let validityDuration = '';
@@ -1201,7 +1208,7 @@ const submitRequest = async () => {
     }
 
     // 法币支付需要计算费率
-    if(formData.amountCurrencyCode == "USD") { 
+    if(formData.amountCurrencyCode == "USD") {
         // 获取充值金额
         await calcRechPayAmount({
             currencyCode: currentCurrencyInfo.value.currencyCode,
@@ -1224,6 +1231,8 @@ const submitRequest = async () => {
             Report.reportLog({
                 pageSource: Report.pageSource.previewPage,
                 businessType: Report.businessType.pageView,
+            }, {
+              type: Report.getCurrentBizType(selectModeInfo.type)
             });
             showComType.value = "preview";
             previewFontSize.value = calcFontSize(baseFormData.amountValue, 238, 56);
@@ -1276,7 +1285,7 @@ const getTreasureFinishCondition = () => {
             relatedUsers,
             type: TaskType.twitterFollow
         });
-    } 
+    }
     return finishConditions;
 };
 
@@ -1421,7 +1430,7 @@ const calcTokenEstimate = (params) => {
     let {type} = params;
 
     let calcData = {amount: 0, usdPrice: currentCurrencyInfo.value.usdPrice};
-    
+
     switch (type) {
         case 'ORDER_AMOUNT':
             calcData.amount = treasureFormData.usdEstimateOrderAmount;
@@ -1528,7 +1537,7 @@ const onAmountInput = () => {
 
     if (baseFormData.rewardType === RewardType.custom) {
         val = val.replace(/^(0)*/, '').replace(/\./, ''); // 通用奖品类型 过滤掉起始位的0和小数点符号
-        if (val > maxCount) { 
+        if (val > maxCount) {
             val = maxCount
         }
         baseFormData.totalCount = val;
@@ -1558,7 +1567,7 @@ const onCountInput = () => {
 
     if(val > maxCount) {
         val = maxCount
-    } 
+    }
 
     baseFormData.totalCount = val;
 
@@ -1650,8 +1659,8 @@ const checkUsdMinNumber = (isInTemplate) => {
         } else {
             const isAmountForbidden = currentLuckDropConfig?.minTotalUsdAmount ? math.format(math.evaluate(amountValue * usdPrice)) < currentLuckDropConfig.minTotalUsdAmount : false;
             const isAvgForbidden = currentLuckDropConfig?.minAvgUsdAmount ? math.format(math.evaluate(amountValue / totalCount * usdPrice)) < currentLuckDropConfig.minAvgUsdAmount : false;
-            forbiddenText = isAmountForbidden && isAvgForbidden ? 
-                            `The prize pool must be above ${isInTemplate ? ('<span class="font-color-1D9BF0">$' + currentLuckDropConfig.minTotalUsdAmount + '</span>') : ('$' + currentLuckDropConfig.minTotalUsdAmount)} 
+            forbiddenText = isAmountForbidden && isAvgForbidden ?
+                            `The prize pool must be above ${isInTemplate ? ('<span class="font-color-1D9BF0">$' + currentLuckDropConfig.minTotalUsdAmount + '</span>') : ('$' + currentLuckDropConfig.minTotalUsdAmount)}
                             or the average prize must be above
                             ${isInTemplate ? ('<span class="font-color-1D9BF0">$' + currentLuckDropConfig.minAvgUsdAmount +' per person.</span>' ): ('$' + currentLuckDropConfig.minAvgUsdAmount + ' per person.') }`
                             : '';
@@ -1672,12 +1681,12 @@ const checkTreasureAmountRange = (isInTemplate) => {
             return forbiddenText;
         } else {
 
-            let txt =  `The prize pool must be above ${isInTemplate ? ('<span class="font-color-1D9BF0">$' + currentLuckDropConfig.minTotalUsdAmount + '</span>') : ('$' + currentLuckDropConfig.minTotalUsdAmount)} 
+            let txt =  `The prize pool must be above ${isInTemplate ? ('<span class="font-color-1D9BF0">$' + currentLuckDropConfig.minTotalUsdAmount + '</span>') : ('$' + currentLuckDropConfig.minTotalUsdAmount)}
                             or the average prize must be above
                             ${isInTemplate ? ('<span class="font-color-1D9BF0">$' + currentLuckDropConfig.minAvgUsdAmount +' per person.</span>' ): ('$' + currentLuckDropConfig.minAvgUsdAmount + ' per person.') }`
 
             const isAmountForbidden = currentLuckDropConfig?.minTotalUsdAmount ? +math.format(math.evaluate(baseFormData.amountValue * usdPrice)) < currentLuckDropConfig?.minTotalUsdAmount : false;
-            
+
             const isAvgForbidden = treasureFormData.fansUnitAmount !== '' && currentLuckDropConfig?.minAvgUsdAmount ? treasureFormData.fansUnitAmount < minAmount || treasureFormData.fansUnitAmount < currentLuckDropConfig?.minAvgUsdAmount : false;
 
             forbiddenText = isAmountForbidden || isAvgForbidden ? txt : '';
@@ -1699,7 +1708,7 @@ const treasureFormValidata = () => {
         //amount 是否大于 最小总金额
         isShowUsdMinMessage.value = true;
     } else if (!baseFormData.totalCount || baseFormData.totalCount == '0') {
-        // 输入Follower 
+        // 输入Follower
         iptErrMsgTxt.value = "Enter the number of new follower";
     } else if(iptErrMsgTxt.value  = checkTreasureAmountRange()) {
         // 粉丝单价是否 小于总金额规则 大于最小粉丝单价 、大于币种最小精度
@@ -1755,7 +1764,7 @@ const onIptSetErrorTxt = (params = {}) => {
                 iptErrMsgTxt.value = '';
             });
         }
-    } 
+    }
 }
 
 /**
@@ -1863,7 +1872,7 @@ const setDiscordErrTxt = (params = {showPop: false}, cb) => {
 
 const onIptDiscordDebounce = debounce(function() {
     setDiscordErrTxt({fromType: 'discord', showPop: true});
-}, 800) 
+}, 800)
 
 /**
  * 校验 discord邀请url
@@ -1893,7 +1902,7 @@ const checkInviteUrl = (inviteUrl) => {
             }
             flag = isPass;
         }
-    } 
+    }
 
     return flag;
 }
@@ -1927,7 +1936,7 @@ const getDiscordInviteInfo = ({inviteUrl, getDuildId}, cb) => {
             getGuildInfoByOpenApi({inviteCode}, cb);
         }
     }).catch((err) => {
-        //DISCORD 接口 catch 
+        //DISCORD 接口 catch
         Report.reportLog({
             pageSource: Report.pageSource.publisherDialog,
             businessType: Report.businessType.buttonClick,
@@ -2116,11 +2125,24 @@ const selectPublishMode = (params, index) => {
         showGeneralLottery.value = true;
     }
 
+    Report.reportLog({
+      pageSource: Report.pageSource.publisherDialog,
+      businessType: Report.businessType.pageView,
+    }, {
+      type: Report.getCurrentBizType(selectModeInfo.type)
+    });
+
     onIptSetErrorTxt();
 }
 
 const clickLeftTab = (params, index) => {
     publishType.value = params.type;
+    Report.reportLog({
+      pageSource: Report.pageSource.publisherDialog,
+      businessType: Report.businessType.pageView,
+    }, {
+      type: params.type == 'REDPACKET' ? Report.bizType.Treasure : Report.bizType.ToolBox
+    });
 }
 
 const onToolBoxPageChange = (params) => {
@@ -2158,7 +2180,7 @@ const selectImage = (option) => {
 const confirmImage = () => {
     let contentType = 'image/png';
     cropperLoading.value = true;
-    
+
     if (refCropper.value) {
         refCropper.value.getCropBlob(imgData => {
             uploadSignature({
@@ -2371,7 +2393,7 @@ onMounted(() => {
 
         .pop-mask {
             width: 100%;
-            height:100%;    
+            height:100%;
             position: absolute;
             z-index:900;
         }
@@ -2399,7 +2421,7 @@ onMounted(() => {
                 border-radius: 20px;
                 overflow-y: auto;
             }
-            
+
             .currency-pop-select {
                 position: absolute;
                 width: 375px;
@@ -2692,7 +2714,7 @@ onMounted(() => {
                             border-bottom: 1px solid #ececec;
                             padding: 8px 0;
                             box-sizing: border-box;
-                            
+
                             .item-left {
                                 display: flex;
                             }
@@ -2830,7 +2852,7 @@ onMounted(() => {
                     }
 
                     .disabled-submit {
-                        background-color: #D9D9D9; 
+                        background-color: #D9D9D9;
                     }
                 }
             }
@@ -2903,7 +2925,7 @@ onMounted(() => {
             cursor: pointer;
         }
     }
-    
+
 }
 
 .dialog {

+ 1 - 1
src/view/iframe/publish/tool-box/child/editor.vue

@@ -175,7 +175,7 @@ const getTitleByHtmlStr = (str = '') => {
   let index1 = str.indexOf(tag_start) + tag_start.length;
   let index2 = str.indexOf(tag_end);
 
-  if (index1 < tag_start.length || index2 < 0) {
+  if (index1 < tag_start.length || index2 < 0 || index2 < index1) {
     return '';
   }
 

+ 14 - 3
src/view/iframe/publish/tool-box/child/preview.vue

@@ -73,6 +73,7 @@ import installCard from '@/view/content/tool-box/index.vue'
 import { postPublish } from "@/http/publishApi";
 import { getChromeStorage, setChromeStorage } from "@/uilts/chromeExtension"
 import { getUser } from "@/http/publishApi"
+import Report from "@/log-center/log"
 
 let installStatus = ref(false);
 
@@ -173,12 +174,12 @@ const calcPreviewCanvasParams = () => {
         if (domHeight < canvasHeight) {
             //比例: 高 / 宽
             let hWRatio = canvasHeight / canvasWidth;
-            //缩小宽度 = 高度 / 比例  
+            //缩小宽度 = 高度 / 比例
             let width = domHeight / hWRatio;
             if (width > canvasWidth) {
                 width = canvasWidth;
             }
-            //缩小比例 
+            //缩小比例
             let zoom = width / canvasWidth;
             if (zoom > 1) {
                 zoom = 1;
@@ -215,7 +216,7 @@ const submitPublish = () => {
 
     setHistoryData(currentApp);
 
-    let linkTitle = currentApp.defaultTit ? '' : currentApp.name;
+    let linkTitle = currentApp.name ? currentApp.name : currentApp.defaultTit;
 
     let postBizData = {
         convertUrl,
@@ -234,6 +235,15 @@ const submitPublish = () => {
 
     submitIng.value = true;
 
+    Report.reportLog({
+        pageSource: Report.pageSource.previewPage,
+        businessType: Report.businessType.pageView,
+        objectType: Report.objectType.confirmButton
+    }, {
+      'type': Report.bizType.ToolBox,
+      'post-editor-url': convertUrl
+    })
+
     postPublish(data).then((res) => {
         submitIng.value = false;
         if (res.code == 0) {
@@ -242,6 +252,7 @@ const submitPublish = () => {
         } else {
         }
     }).catch((err) => {
+      submitIng.value = false;
         console.log(err);
     });
 }

+ 14 - 4
src/view/iframe/publish/tool-box/index.vue

@@ -1,8 +1,8 @@
 <template>
     <div class="page-wrapper">
-        <editor v-show="showCom == 'EDITOR'" :linkInputDescImage="pageData.linkInputDescImage" @changeShowCom="changeShowCom" />  
-        <preview v-show="showCom == 'PREVIEW'" 
-            :previewData="previewData" 
+        <editor v-show="showCom == 'EDITOR'" :linkInputDescImage="pageData.linkInputDescImage" @changeShowCom="changeShowCom" />
+        <preview v-show="showCom == 'PREVIEW'"
+            :previewData="previewData"
             :screenshotWebsiteData="screenshotWebsiteData"
             :showCom="showCom"
             :defaultLinkTitle="pageData.defaultLinkTitle"
@@ -16,6 +16,7 @@ import { ref, reactive, watch, defineProps, defineEmits } from "vue";
 import { screenshotWebsite } from "@/http/toolBoxApi";
 import editor from '@/view/iframe/publish/tool-box/child/editor.vue'
 import preview from '@/view/iframe/publish/tool-box/child/preview.vue'
+import Report from "@/log-center/log"
 
 const props = defineProps({
     pageData: {
@@ -37,13 +38,22 @@ watch(
     () => props.activePage,
     (newVal) => {
         showCom.value = newVal;
+        if(newVal == 'PREVIEW') {
+          Report.reportLog({
+              pageSource: Report.pageSource.previewPage,
+              businessType: Report.businessType.pageView,
+          }, {
+            'type': Report.bizType.ToolBox,
+            'post-editor-url': previewData.convertUrl
+          })
+        }
     },
     {
         deep: true
     }
 );
 
-let showCom = ref('EDITOR'); 
+let showCom = ref('EDITOR');
 let previewData = reactive({
     convertUrl: '',
     originUrl: '',