浏览代码

[fix] bug

wenliming 2 年之前
父节点
当前提交
0d36b4bd87
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      src/view/iframe/publish/give-dialog.vue

+ 6 - 5
src/view/iframe/publish/give-dialog.vue

@@ -143,7 +143,7 @@
                                                         :src="require('@/assets/svg/icon-winner-v2.svg')"/>
                                                     Winner Count
                                                 </div>
-                                                <div class="msg">Recommend Winners 100~10000</div>
+                                                <div class="msg" v-show="selectModeInfo.type == 1">Recommend Winners 100~10000</div>
                                             </div>
                                             <input v-model="baseFormData.totalCount"
                                                 placeholder="0"
@@ -590,6 +590,8 @@ let publishModeList = reactive([
 let discordInviteInfo = ref({});
 let showDiscordInvitePop = ref(false);
 
+let lotteryMaxHourDuration = 168;
+
 const props = defineProps({
     dialogVisible: {
         type: Boolean,
@@ -1132,12 +1134,11 @@ const onCountInput = () => {
 
 const onValidityDurationInput = () => {
     let val = baseFormData.validityDuration;
-    const maxDuration = 168; // 24 * 7;
 
     if (val == 0) {
         val = "";
     } else if(val > maxDuration) {
-        val = maxDuration+'';
+        val = lotteryMaxHourDuration+'';
     }
     val = val.replace(/[^\d]/g, "");
     baseFormData.validityDuration = val;
@@ -1148,11 +1149,10 @@ const onValidityDurationInput = () => {
 
 const onValidityDurationBlur = () => {
     let val = baseFormData.validityDuration;
-    const maxDuration = 168; // 24 * 7;
     if (val == 0) {
         val = "";
     } else if(val > maxDuration) {
-        val = maxDuration+'';
+        val = lotteryMaxHourDuration+'';
     }
     val = val.replace(/[^\d]/g, "");
     baseFormData.validityDuration = val;
@@ -1531,6 +1531,7 @@ const setFrontConfig = () => {
     }).then((res) => {
         if (res.code == 0) {
             paypalHtml.value = res.data.paypalHtml;
+            lotteryMaxHourDuration = res.data.lotteryMaxHourDuration;
         }
     });
 };