From 57e9bff831a3fdecf1fdedd2ed45eadf2b98b2f2 Mon Sep 17 00:00:00 2001 From: tangping Date: Mon, 12 Jun 2023 22:43:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4=E5=BE=85=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/address-create/index.jsx | 4 +++- src/pages/home/index.jsx | 2 +- src/pages/order/index.jsx | 2 +- src/utils/utils.js | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) 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', ''], ])