From ca4c8a6b0b41af70c88a887af46f34b90c8e0cbf Mon Sep 17 00:00:00 2001 From: czm <2192718639@qq.com> Date: Wed, 8 Jun 2022 19:12:13 +0800 Subject: [PATCH] 1 --- src/components/popup/index.tsx | 2 +- .../addressInfoDetail/index.module.scss | 7 ++++++- .../components/addressInfoDetail/index.tsx | 6 ++++-- .../applyAfterSales/index.module.scss | 5 +++-- .../components/applyAfterSales/index.tsx | 21 +++++++++++++++---- src/pages/order/index.tsx | 2 +- src/pages/searchList/searchList.tsx | 1 - 7 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/components/popup/index.tsx b/src/components/popup/index.tsx index 227f12e..75030cf 100644 --- a/src/components/popup/index.tsx +++ b/src/components/popup/index.tsx @@ -62,7 +62,7 @@ export default memo(( } - {children} + {show&&children} diff --git a/src/pages/order/components/addressInfoDetail/index.module.scss b/src/pages/order/components/addressInfoDetail/index.module.scss index 68e6171..2d6c306 100644 --- a/src/pages/order/components/addressInfoDetail/index.module.scss +++ b/src/pages/order/components/addressInfoDetail/index.module.scss @@ -101,12 +101,17 @@ } .order_address_list { - height: 900px; + height:80vh; .order_address_title{ font-size: $font_size; font-weight: 700; width: 100%; text-align: center; padding: 20px 0 30px 0; + height: 100px; + } + .addressList_con{ + padding-bottom: 20px; + height: calc(100% - 160px); } } \ No newline at end of file diff --git a/src/pages/order/components/addressInfoDetail/index.tsx b/src/pages/order/components/addressInfoDetail/index.tsx index d58b12b..d2b4251 100644 --- a/src/pages/order/components/addressInfoDetail/index.tsx +++ b/src/pages/order/components/addressInfoDetail/index.tsx @@ -114,9 +114,11 @@ export default memo(forwardRef(({onSelect, onChangeShipmentMode, defaultValue = setShowAddressList(false)}> 请选择收货地址 - + + + + - ) diff --git a/src/pages/order/components/applyAfterSales/index.module.scss b/src/pages/order/components/applyAfterSales/index.module.scss index 22a31e0..3cbb03b 100644 --- a/src/pages/order/components/applyAfterSales/index.module.scss +++ b/src/pages/order/components/applyAfterSales/index.module.scss @@ -24,7 +24,7 @@ .apply_after_sales_con{ height: 80vh; .scroll{ - height: calc(100% - 80px); + height: calc(100% - 170px); } .returnSaleInput{ margin: 0 20px; @@ -85,8 +85,9 @@ font-size: $font_size; font-weight: 700; } - .uploadImg{ + .textarea{ position: relative; + height: 165.4px; .descDataNum{ position: absolute; right: 10px; diff --git a/src/pages/order/components/applyAfterSales/index.tsx b/src/pages/order/components/applyAfterSales/index.tsx index 735e476..fb5c64a 100644 --- a/src/pages/order/components/applyAfterSales/index.tsx +++ b/src/pages/order/components/applyAfterSales/index.tsx @@ -1,5 +1,5 @@ import { Image, ScrollView, Text, Textarea, View } from "@tarojs/components"; -import { memo, useState } from "react"; +import { memo, useCallback, useState } from "react"; import classnames from "classnames"; import styles from './index.module.scss' import Popup from "@/components/popup"; @@ -8,6 +8,19 @@ import Counter from "@/components/counter"; export default memo(() => { const [showDesc, setShowDesc] = useState(true) + const [descData, setDescData] = useState({ + number: 0, + value: '', + count: 200 + }) + const getDesc = useCallback((e) => { + let value = e.detail.value + let res = value + if(value.length > descData.count) { + res = value.slice(0, descData.count) + } + setDescData({...descData, number:res.length, value: res}) + },[]) return ( setShowDesc(false)} > @@ -94,9 +107,9 @@ export default memo(() => { 其他说明 - - - 0/100 + + + {descData.number +'/'+ descData.count} diff --git a/src/pages/order/index.tsx b/src/pages/order/index.tsx index 3c0304f..060dc54 100644 --- a/src/pages/order/index.tsx +++ b/src/pages/order/index.tsx @@ -226,7 +226,7 @@ import styles from './index.module.scss' getRemark(e)}/> - {/* */} + ) diff --git a/src/pages/searchList/searchList.tsx b/src/pages/searchList/searchList.tsx index 7acb9fe..532c671 100644 --- a/src/pages/searchList/searchList.tsx +++ b/src/pages/searchList/searchList.tsx @@ -8,7 +8,6 @@ import SelectData, {ListProps} from "./components/selectData"; import { goLink } from "@/common/common"; import styles from './searchList.module.scss' import { useCallback, useEffect, useMemo, useRef, useState } from "react"; -import useManualPullDownRefresh from "@/use/useManualPullDownRefresh"; import {GetProductListApi} from "@/api/material" import Taro, { useDidShow, usePullDownRefresh, useRouter } from "@tarojs/taro"; import { formatHashTag, formatImgUrl } from "@/common/fotmat";