🎈 perf(样品对比): 添加loading状态
This commit is contained in:
parent
b5de3a031b
commit
215e180003
@ -8,6 +8,7 @@ import { toRgb } from '@/common/bluetooth/color/colorSpace'
|
|||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import { productabsorbcontrast } from '@/api/index'
|
import { productabsorbcontrast } from '@/api/index'
|
||||||
import { isObject } from '@tarojs/shared'
|
import { isObject } from '@tarojs/shared'
|
||||||
|
import { alert } from '@/common/common'
|
||||||
export default () => {
|
export default () => {
|
||||||
//搜索参数
|
//搜索参数
|
||||||
const [searchField, setSearchField] = useState({
|
const [searchField, setSearchField] = useState({
|
||||||
@ -102,6 +103,7 @@ export default () => {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
alert.showLoading('分析中')
|
||||||
const query = {
|
const query = {
|
||||||
...searchField,
|
...searchField,
|
||||||
}
|
}
|
||||||
@ -119,6 +121,7 @@ export default () => {
|
|||||||
let resCont = diffarray.filter(item => item).join(',')
|
let resCont = diffarray.filter(item => item).join(',')
|
||||||
setResult(resCont)
|
setResult(resCont)
|
||||||
}
|
}
|
||||||
|
alert.hideLoading()
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<View className={styles.body}>
|
<View className={styles.body}>
|
||||||
|
@ -94,7 +94,7 @@ const ShoppingCartContainer: FC<InternalContainer> = () => {
|
|||||||
const status = dataLoadingStatus({
|
const status = dataLoadingStatus({
|
||||||
list: shoppingCartData.list,
|
list: shoppingCartData.list,
|
||||||
total: shoppingCartData.total,
|
total: shoppingCartData.total,
|
||||||
status: state.loading,
|
status: state.loading || true,
|
||||||
})
|
})
|
||||||
console.log('status==>', status)
|
console.log('status==>', status)
|
||||||
return status
|
return status
|
||||||
|
Loading…
x
Reference in New Issue
Block a user