订单售后

This commit is contained in:
2022-06-08 14:40:07 +08:00
parent c76d6f6448
commit 2c5c3a8ae3
11 changed files with 263 additions and 84 deletions
@@ -27,15 +27,14 @@ type param = {
export default memo(({show = false, onClose, title = '', productId = 0}: param) => {
const {adminUserInfo} = useSelector(state => state.userInfo)
const [selectList, setSelectList] = useState([
{id: 0, step:1, digits:0, maxNum:100000, defaultNum:1, title:'大货', unit:'件', eunit:'kg', priceField:'bulk_price'},
const [selectList, _] = useState([
{id: 0, step:1, digits:0, maxNum:100000, defaultNum:1, title:'大货', unit:'条', eunit:'kg', priceField:'bulk_price'},
{id: 1, step:1, digits:2, maxNum:9.99, defaultNum:1, title:'剪板', unit:'米', eunit:'m', priceField:'length_cut_price'},
{id: 2, step:1, digits:2, minNum:10, maxNum:100000, defaultNum:10, title:'散剪', unit:'米', eunit:'kg', priceField:'weight_cut_price'},
])
const [selectIndex, setSelectIndex] = useState(0)
const selectProduct = (index:number) => {
setSelectIndex(() => index)
}
//重置数据
@@ -144,13 +143,13 @@ export default memo(({show = false, onClose, title = '', productId = 0}: param)
//添加购物车
const {getSelfUserInfo} = UseLogin()
const {fetchData:addFetchData} = AddShoppingCartApi()
const addShopCart = debounce( async () => {
const addShopCart = async () => {
try {
await getSelfUserInfo()
} catch(msg) {
Taro.showToast({
icon:'none',
title:msg
title:'授权失败,请求完善授权'
})
return false
}
@@ -178,7 +177,7 @@ export default memo(({show = false, onClose, title = '', productId = 0}: param)
})
}
}, 500)
}
//筛选数据
const searchInput = useCallback((e) => {
+1
View File
@@ -48,6 +48,7 @@ export default (props:Params) => {
useDidShow(() => {
checkLogin()
judgeParam()
setShowCart(false)
})
useEffect(() => {