🌈 style(eslint): 新增eslint规则

This commit is contained in:
xuan
2022-12-02 18:59:29 +08:00
parent c3cb46a5a7
commit d49314aa5b
217 changed files with 19491 additions and 19187 deletions
+8 -7
View File
@@ -1,11 +1,12 @@
import { useDispatch } from 'react-redux'
import { SET_SHOPCOUNT, CLEAR_SHOPCOUNT } from '@/constants/common'
import { DataParam } from '@/reducers/commonData'
import { useCallback, useState } from 'react'
import { CLEAR_SHOPCOUNT, SET_SHOPCOUNT } from '@/constants/common'
import { DataParam } from '@/reducers/commonData'
import { GetShoppingCartApi } from '@/api/shopCart'
import { useSelector } from '@/reducers/hooks'
import { useSelector } from '@/reducers/hooks'
export default () => {
const commonData = useSelector((state) => state.commonData)
const commonData = useSelector(state => state.commonData)
const dispatch = useDispatch()
const setShopCount = (shopCount: number) => {
@@ -17,10 +18,10 @@ export default () => {
}
const { fetchData: fetchDataShopCount } = GetShoppingCartApi()
const getShopCount = async () => {
//获取购物车数据数量
const getShopCount = async() => {
// 获取购物车数据数量
const { data } = await fetchDataShopCount()
let color_list = data.color_list || []
const color_list = data.color_list || []
setShopCount(color_list.length)
}