From a10872f4c0eedb3768bc288c4770c1f39c26d133 Mon Sep 17 00:00:00 2001 From: Haiyi <1021441632@qq.com> Date: Tue, 13 Dec 2022 18:43:55 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(removeTag):removeTag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/shoppingCart/index.tsx | 3 ++- src/pages/refundDetail/index.tsx | 4 ++-- src/pages/refundMoneyDetail/index.tsx | 4 ++-- src/pages/searchPage/components/goods/index.tsx | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/shoppingCart/index.tsx b/src/components/shoppingCart/index.tsx index 0d3cc00..626007c 100644 --- a/src/components/shoppingCart/index.tsx +++ b/src/components/shoppingCart/index.tsx @@ -10,6 +10,7 @@ import Popup from '@/components/popup' import Goods from '@/components/goodsItem' import BottomCustomer from '@/components/BottomCustomer' import DotLoading from '@/components/dotLoading' +import { formatDateTime, formatHashTag, formatPriceDiv, formatRemoveHashTag, formatWeightDiv } from '@/common/format' interface prosObj { showPopup?: false | true @@ -128,7 +129,7 @@ const ShoppingCart = (props: prosObj, ref) => { - {obj?.code}# {obj?.name} + {formatHashTag(obj?.code, obj?.name)} 已选 1 种面料,{selectTotal} 个颜色,共 {selectNums} {showModefont} diff --git a/src/pages/refundDetail/index.tsx b/src/pages/refundDetail/index.tsx index 4dafa58..0d015e6 100644 --- a/src/pages/refundDetail/index.tsx +++ b/src/pages/refundDetail/index.tsx @@ -82,7 +82,7 @@ const GoodsItem = (porps: PropGoods) => { list.map((item, index) => { return ( - {item.code}# {item.name} + {formatHashTag(item.code, item.name)} { item.product_colors.map((it, inx) => { return ( @@ -100,7 +100,7 @@ const GoodsItem = (porps: PropGoods) => { - {it.code}{it.name} + {formatHashTag(it?.code, it?.name)} {/* x{obj?.sale_mode === 0 ? it.roll : it.length / 100}{obj?.sale_mode === 0 ? '条' : 'm'} */} { obj.sale_mode == 0 && x{obj.stage == 0 || obj.stage == 1 || obj.stage == 2 diff --git a/src/pages/refundMoneyDetail/index.tsx b/src/pages/refundMoneyDetail/index.tsx index 086b799..cc20254 100644 --- a/src/pages/refundMoneyDetail/index.tsx +++ b/src/pages/refundMoneyDetail/index.tsx @@ -77,7 +77,7 @@ const GoodsItem = (porps: PropGoods) => { list.map((item, index) => { return ( - {item.code}# {item.name} + {formatHashTag(item?.code, item?.name)} { item?.product_colors.map((it, inx) => { return ( @@ -96,7 +96,7 @@ const GoodsItem = (porps: PropGoods) => { - {it.code}# {it.name} + {formatHashTag(it?.code, it?.name)} {/* x{obj?.sale_mode === 0 ? it.roll : it.length / 100}{obj?.sale_mode === 0 ? '条' : 'm'} */} { obj.sale_mode == 0 && x{obj.stage == 0 || obj.stage == 1 || obj.stage == 2 diff --git a/src/pages/searchPage/components/goods/index.tsx b/src/pages/searchPage/components/goods/index.tsx index 18c9b16..7eee85c 100644 --- a/src/pages/searchPage/components/goods/index.tsx +++ b/src/pages/searchPage/components/goods/index.tsx @@ -2,6 +2,7 @@ import { Image, View } from '@tarojs/components' import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' import styles from '../goods/index.module.scss' import LabAndImg from '@/components/LabAndImg' +import { formatDateTime, formatHashTag, formatPriceDiv, formatRemoveHashTag, formatWeightDiv } from '@/common/format' const Goods = (props: any) => { const labAndImgObj = useCallback((item) => { @@ -29,7 +30,7 @@ const Goods = (props: any) => { } - {props.data?.code}#{props.data?.name} + {formatHashTag(props.data?.code, props.data?.name)} {props.data?.component} {props.data?.width}