🐳 chore(eslint): 修正所有文件的eslint 错误❌
This commit is contained in:
@@ -12,25 +12,23 @@ interface params {
|
||||
swiperOnClick?: (val: item) => void
|
||||
style?: Object
|
||||
}
|
||||
export default (props: params) => {
|
||||
const Banner = (props: params) => {
|
||||
const { swiperOnClick, style = {} } = props
|
||||
|
||||
const [list, setList] = useState<any[]>([])
|
||||
const { fetchData, state } = GetBannerList()
|
||||
|
||||
useEffect(() => {
|
||||
getData()
|
||||
}, [])
|
||||
|
||||
const getData = async() => {
|
||||
const res = await fetchData()
|
||||
setList(res.data?.list)
|
||||
}
|
||||
useEffect(() => {
|
||||
getData()
|
||||
}, [])
|
||||
|
||||
const skipTo = (item) => {
|
||||
if (item.jump_type == 2 || item.jump_type == 0) {
|
||||
goLink(`${item.link}&title=${item.title}`)
|
||||
}
|
||||
}
|
||||
else {
|
||||
goLink(item.link)
|
||||
}
|
||||
@@ -52,3 +50,5 @@ export default (props: params) => {
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default Banner
|
||||
|
||||
Reference in New Issue
Block a user