变更待收货状态

This commit is contained in:
tangping 2023-06-12 22:43:31 +08:00
parent b9331e98e0
commit 57e9bff831
4 changed files with 7 additions and 5 deletions

View File

@ -62,7 +62,6 @@ function Index() {
const data = re.items.filter(item => item.id == id)
if (data.length < 1) return
const addr = data[0]
console.log(addr)
setAddrId([addr.province_id, addr.city_id, addr.county_id])
setText(`${addr.province.name}${addr.city.name}${addr.county.name}`)
setAddrInfo(addr.address)
@ -80,6 +79,9 @@ function Index() {
setCountry(r.items)
})
}
if (addr.is_default) {
setIsDefault(addr.is_default)
}
})
}, [id])

View File

@ -101,7 +101,7 @@ const Index = () => {
<Text>待发货</Text>
</View>
<View className='flex-col my-order-tool-item' onClick={() => {
navigateTo('/pages/order/index?state=sent')
navigateTo('/pages/order/index?state=send')
}}>
<View className="relative my-order-tool-box">
<Image className='my-order-tool-icon' src={delivery} />

View File

@ -62,7 +62,7 @@ const Login = () => {
<View className="order-tabs flex-around">
<View className={'order-tab-pane ' + (tabKey == '0' ? 'order-tab-pane-active' : '')} onClick={() => changeTab('0')}>全部</View>
<View className={'order-tab-pane ' + (tabKey == 'paid' ? 'order-tab-pane-active' : '')} onClick={() => changeTab('paid')}>待发货</View>
<View className={'order-tab-pane ' + (tabKey == 'sent' ? 'order-tab-pane-active' : '')} onClick={() => changeTab('sent')}>已发货</View>
<View className={'order-tab-pane ' + (tabKey == 'send' ? 'order-tab-pane-active' : '')} onClick={() => changeTab('send')}>已发货</View>
<View className={'order-tab-pane ' + (tabKey == 'received' ? 'order-tab-pane-active' : '')} onClick={() => changeTab('received')}>已收货</View>
</View>
<View className="orderScroll" id="orderScroll">

View File

@ -2,13 +2,13 @@ import Taro from "@tarojs/taro"
export const orderState = new Map([
['paid', '待发货'],
['sent', '已发货'],
['send', '已发货'],
['received', '已收货'],
])
export const orderStateNotice = new Map([
['paid', '请耐心等待'],
['sent', '请耐心等待'],
['send', '请耐心等待'],
['received', ''],
])