返回值是Promise {<pending>}如何处理

//判断是否超过限定份数和奖励发送是否错误
            async numJudgment(formData){
                let uploadData={
                    type :formData.award_type,
                    count :formData.award_send_info_11 || formData.award_send_info_23 
                }
                 const res = await this.ajax({
                            methods: 'post',
                            url: '/PlatformOperation/EventConfig/MPCheck/verify',
                            data: {
                                data: JSON.stringify(uploadData)
                            },
                        })
                    if (res.status !== 2){
                        this.$Message.error(res.msg);
                        return false
                    } else{   
                        return true
                    }
            },

方法一:

 async  handleSubmit() {
                    let enter2=await this.numJudgment(this.formData)
                    if(enter2==false) return
                }

方法二

numJudgment(this.formData).then(data => {
        let enter2 = data
})

你可能感兴趣的:(js,vue,javascript,前端,es6)