造成的原因:Toast.hide() 实际是异步动画隐藏,还未隐藏就执行了弹窗导致

	 Toast.loading('加载中...')
     const record = await queryByUserConsumerRecord({
       tplId: tplId.current,
       telPhoneList: telPhoneList,
       archiveId: archiveId.current
     })
     Toast.hide()
     if(record?.data?.length === 0) {
       Dialog.show({
         ...dialogCommonProps,
         message: '当前会员近半年未购买过任何慢病商品不符合建档要求!',
         confirmText: '知道了',
         showCancel: false,
         onConfirm: () => {
           navigateBack()
         },
       })
     }

解决方案:延迟一会再调用 Dialog.show()

	 Toast.loading('加载中...')
     const record = await queryByUserConsumerRecord({
       tplId: tplId.current,
       telPhoneList: telPhoneList,
       archiveId: archiveId.current
     })
     Toast.hide()
     if(record?.data?.length === 0) {
       setTimeout(() => {
         Dialog.show({
           ...dialogCommonProps,
           message: '当前会员近半年未购买过任何慢病商品不符合建档要求!',
           confirmText: '知道了',
           showCancel: false,
           onConfirm: () => {
             navigateBack()
           },
         })
       }, 400)
     }
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐