🐳 chore(eslint): 修正所有文件的eslint 错误❌

This commit is contained in:
xuan
2022-11-28 11:06:15 +08:00
parent 99a920975f
commit cc99111b4f
149 changed files with 3270 additions and 3252 deletions
+12 -13
View File
@@ -17,15 +17,9 @@ interface Props {
showPopup: boolean
popupClose: () => void
}
export default memo((props: Props) => {
const RefundCodelist = (props: Props) => {
const { fetchData: payFetch } = GetReturnPayCode()
const [PicUrl, setPicUrl] = useState<string>('')
useEffect(() => {
// 判断进来的是否是空对象,减少性能问题
const length = Object.keys(props.obj)
if (length.length > 0) { getPic() }
}, [props.obj])
const getPic = async() => {
Taro.showLoading({
@@ -142,11 +136,12 @@ export default memo((props: Props) => {
// 检查是否开启保存图片权限
const { check } = useCheckAuthorize({ scope: 'scope.writePhotosAlbum', msg: '您没授权,无法保存图片' })
const saveImageCheck = async() => {
const res = await check()
res && saveImage()
}
useEffect(() => {
// 判断进来的是否是空对象,减少性能问题
const length = Object.keys(props.obj)
if (length.length > 0) { getPic() }
}, [props.obj])
// 保存图片
const saveImage = () => {
const time = new Date().valueOf()
@@ -171,7 +166,10 @@ export default memo((props: Props) => {
},
})
}
const saveImageCheck = async() => {
const res = await check()
res && saveImage()
}
return (
<Popup show={props.showPopup} title="退款码单" onClose={() => props.popupClose?.()}>
<View className={styles.popupBox}>
@@ -184,4 +182,5 @@ export default memo((props: Props) => {
</View>
</Popup>
)
})
}
export default memo(RefundCodelist)