diff --git a/src/pages/address-create/index.jsx b/src/pages/address-create/index.jsx index 089d818..ca34e4c 100644 --- a/src/pages/address-create/index.jsx +++ b/src/pages/address-create/index.jsx @@ -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]) diff --git a/src/pages/home/index.jsx b/src/pages/home/index.jsx index b275eb1..27dcde4 100644 --- a/src/pages/home/index.jsx +++ b/src/pages/home/index.jsx @@ -101,7 +101,7 @@ const Index = () => { 待发货 { - navigateTo('/pages/order/index?state=sent') + navigateTo('/pages/order/index?state=send') }}> diff --git a/src/pages/order/index.jsx b/src/pages/order/index.jsx index 7f89300..ff7cb36 100644 --- a/src/pages/order/index.jsx +++ b/src/pages/order/index.jsx @@ -62,7 +62,7 @@ const Login = () => { changeTab('0')}>全部 changeTab('paid')}>待发货 - changeTab('sent')}>已发货 + changeTab('send')}>已发货 changeTab('received')}>已收货 diff --git a/src/utils/utils.js b/src/utils/utils.js index c1ddc3c..49125e4 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -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', ''], ])