@@ -10,7 +10,7 @@ import { defineComponent, h, onMounted, ref, VNode } from "vue"
1010
1111/**
1212 * Judge wether verification is required
13- *
13+ *
1414 * @returns T/F
1515 */
1616export async function judgeVerificationRequired ( item : timer . limit . Item ) : Promise < boolean > {
@@ -26,15 +26,13 @@ export async function judgeVerificationRequired(item: timer.limit.Item): Promise
2626 }
2727 // Visit
2828 if ( visitTime ) {
29- console . log ( "visiTime" , visitTime )
3029 const hitVisit = await sendMsg2Runtime ( "askHitVisit" , item )
31- console . log ( "visiTimeHit" , hitVisit )
3230 if ( hitVisit ) return true
3331 }
3432 return false
3533}
3634
37- const PROMT_TXT_CSS : Partial < CSSStyleDeclaration > = {
35+ const PROMPT_TXT_CSS : Partial < CSSStyleDeclaration > = {
3836 userSelect : 'none' ,
3937}
4038
@@ -79,23 +77,23 @@ const AnswerCanvas = defineComponent({
7977} )
8078
8179/**
82- * @returns null if verification not required,
83- * or promise with resolve invocked only if verification code or password correct
80+ * @returns null if verification not required,
81+ * or promise with resolve invoked only if verification code or password correct
8482 */
8583export async function processVerification ( option : timer . option . DailyLimitOption ) : Promise < void > {
8684 const { limitLevel, limitPassword, limitVerifyDifficulty } = option
8785 let answerValue : string
8886 let messageNodes : ( VNode | string ) [ ]
89- let incrorectMessage : string
87+ let incorrectMessage : string
9088 if ( limitLevel === 'password' && limitPassword ) {
9189 answerValue = limitPassword
9290 messageNodes = [ t ( msg => msg . limit . verification . pswInputTip ) ]
93- incrorectMessage = t ( msg => msg . limit . verification . incorrectPsw )
91+ incorrectMessage = t ( msg => msg . limit . verification . incorrectPsw )
9492 } else if ( limitLevel === 'verification' ) {
9593 const pair : VerificationPair = verificationProcessor . generate ( limitVerifyDifficulty , locale )
9694 const { prompt, promptParam, answer } = pair || { }
9795 answerValue = typeof answer === 'function' ? t ( msg => answer ( msg . limit . verification ) ) : answer
98- incrorectMessage = t ( msg => msg . limit . verification . incorrectAnswer )
96+ incorrectMessage = t ( msg => msg . limit . verification . incorrectAnswer )
9997 if ( prompt ) {
10098 const promptTxt = typeof prompt === 'function'
10199 ? t ( msg => prompt ( msg . limit . verification ) , { ...promptParam , answer : answerValue } )
@@ -114,7 +112,7 @@ export async function processVerification(option: timer.option.DailyLimitOption)
114112 boxType : 'prompt' ,
115113 type : 'warning' ,
116114 title : '' ,
117- message : h ( 'div' , { style : PROMT_TXT_CSS } , messageNodes ) ,
115+ message : h ( 'div' , { style : PROMPT_TXT_CSS } , messageNodes ) ,
118116 showInput : true ,
119117 showCancelButton : true ,
120118 showClose : true ,
@@ -123,7 +121,7 @@ export async function processVerification(option: timer.option.DailyLimitOption)
123121 if ( value === answerValue ) {
124122 return resolve ( )
125123 }
126- ElMessage . error ( incrorectMessage )
124+ ElMessage . error ( incorrectMessage )
127125 } ) . catch ( ( ) => { } )
128126 )
129127 : null
0 commit comments