🐳 chore(eslint): 修正所有文件的eslint 错误❌
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user