🐳 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
@@ -13,8 +13,7 @@ interface Props {
isPhone?: boolean
isBorder?: boolean
}
export default memo((props: Props) => {
const Form = (props: Props) => {
const {
isPhone = false,
isBorder = true,
@@ -35,4 +34,5 @@ export default memo((props: Props) => {
}
</View>
)
})
}
export default memo(Form)
@@ -7,7 +7,7 @@ interface Props {
list: any[]
handChose?: (any) => void
}
export default memo((props: Props) => {
const Tabs = (props: Props) => {
const { list = [], handChose } = props
return (
@@ -29,4 +29,5 @@ export default memo((props: Props) => {
}
</View >
)
})
}
export default memo(Tabs)
@@ -7,7 +7,7 @@ import { alert, goLink } from '@/common/common'
import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
import IconFont from '@/components/iconfont/iconfont'
import Popup from '@/components/popup'
import { mppurchaserlabeladd, mppurchaserlist } from '@/api/customer'
import { MpPurchaserLabelAdd, MpPurchaserList } from '@/api/customer'
interface Props {
showPopup: boolean
@@ -15,12 +15,12 @@ interface Props {
purchaser_id?: string | number
diseShow?: () => void
}
export default memo(forwardRef((props: Props, ref) => {
const TagPopup = (props: Props, ref) => {
const router = useRouter()
useEffect(() => {
getList()
}, [])
const { fetchData } = mppurchaserlist()
const { fetchData } = MpPurchaserList()
// 标签
const [modeList, setModeList] = useState<any[]>([])
const getList = async() => {
const res = await fetchData()
if (res.data) {
@@ -28,8 +28,6 @@ export default memo(forwardRef((props: Props, ref) => {
}
}
// 标签
const [modeList, setModeList] = useState<any[]>([])
// 选择标签
const handCheckMode = (item) => {
modeList.map((it) => {
@@ -48,7 +46,7 @@ export default memo(forwardRef((props: Props, ref) => {
})
setModeList([...modeList])
}
const { fetchData: addFetch } = mppurchaserlabeladd()
const { fetchData: addFetch } = MpPurchaserLabelAdd()
const handSure = async() => {
const arr: any[] = []
const fltArr = modeList.filter((item) => { return item.checked })
@@ -98,6 +96,9 @@ export default memo(forwardRef((props: Props, ref) => {
modeList,
setModeList,
}))
useEffect(() => {
getList()
}, [])
return (
<Popup title="选择标签" show={props.showPopup} onClose={() => { props.handClose() }}>
<ScrollView scrollY className={styles.scrollView}>
@@ -142,4 +143,5 @@ export default memo(forwardRef((props: Props, ref) => {
</View>
</Popup>
)
}))
}
export default memo(forwardRef(TagPopup))
+18 -17
View File
@@ -11,34 +11,21 @@ import { debounce } from '@/common/util'
import { alert, goLink } from '@/common/common'
import { formatDateTime, formatPriceDiv, formatWeightDiv } from '@/common/format'
import AddressList from '@/components/AddressList'
import { mppurchaser } from '@/api/customer'
import { MpPurchaser } from '@/api/customer'
export default () => {
const CustomerDetails = () => {
const router = useRouter()
const [status, setstatus] = useState<number>(1)
useDidShow(() => {
getInfo()
})
const [infoObj, setinfoObj] = useState<any>()
const { fetchData: getDesc } = mppurchaser()
const getInfo = async() => {
Taro.showLoading({
title: '请稍等...',
mask: true,
})
const res = await getDesc({ id: router.params.purchaser_id })
setinfoObj(res.data)
Taro.hideLoading()
setshowPopup(false)
}
const { fetchData: getDesc } = MpPurchaser()
// 顶部栏
const AddressListRef = useRef<any>()
const [TarBarList, setTarBarList] = useState<any[]>([{ id: 1, name: '基础信息', showBorder: true }, { id: 2, name: '收货地址', showBorder: false }])
const handChose = (item) => {
TarBarList.map((it) => {
TarBarList.forEach((it) => {
if (it.id === item.id) {
it.showBorder = true
}
@@ -72,6 +59,19 @@ export default () => {
TagPopupRef.current.setModeList([...TagPopupRef.current.modeList])
setshowPopup(true)
}
const getInfo = async() => {
Taro.showLoading({
title: '请稍等...',
mask: true,
})
const res = await getDesc({ id: router.params.purchaser_id })
setinfoObj(res.data)
Taro.hideLoading()
setshowPopup(false)
}
useDidShow(() => {
getInfo()
})
return (
<View className={styles.mainBox}>
<View className={styles.mainTop}>
@@ -133,3 +133,4 @@ export default () => {
</View>
)
}
export default CustomerDetails