From 2b00271d714d589a52a90f52f8ce179a889944b3 Mon Sep 17 00:00:00 2001 From: Haiyi <1021441632@qq.com> Date: Mon, 17 Oct 2022 14:07:11 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:h5=E6=A0=B7=E5=BC=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/addCollection/index.module.scss | 6 +++-- src/pages/addCollection/index.tsx | 11 ++------- src/pages/applyGoods/index.module.scss | 3 +++ src/pages/applyGoods/index.tsx | 27 ++++++++++++++++++--- src/pages/applyMoney/index.module.scss | 3 +++ src/pages/applyMoney/index.tsx | 29 +++++++++++++++++++---- 6 files changed, 61 insertions(+), 18 deletions(-) diff --git a/src/pages/addCollection/index.module.scss b/src/pages/addCollection/index.module.scss index d38445a..a5d674c 100644 --- a/src/pages/addCollection/index.module.scss +++ b/src/pages/addCollection/index.module.scss @@ -1,4 +1,5 @@ .addBox { + height: 556px; margin: 24px; padding: 0px 32px 40px 32px; background: #FFFFFF; @@ -6,12 +7,13 @@ transition: 0.3s; } -.addBox:hover { +.activeBox { + transition: 0.3s; + height: 1000px; margin: 24px; padding: 0px 32px 40px 32px; background: #FFFFFF; border-radius: 16px 16px 0px 0px; - transition: 0.3s; } .textAreaBox { diff --git a/src/pages/addCollection/index.tsx b/src/pages/addCollection/index.tsx index 6a16d17..c1328a6 100644 --- a/src/pages/addCollection/index.tsx +++ b/src/pages/addCollection/index.tsx @@ -1,19 +1,12 @@ import { View, Input, Button, Textarea } from '@tarojs/components' import { useCallback, useEffect, useMemo, useRef, useState, } from 'react' -import Search from '@/components/search' -import { dataLoadingStatus, getFilterData } from '@/common/util' import styles from "./index.module.scss" import classnames from "classnames"; -import Popup from '@/components/popup' -import InfiniteScroll from '@/components/infiniteScroll' -import Taro, { faceVerifyForPay, useDidShow } from '@tarojs/taro' +import Taro, { useDidShow } from '@tarojs/taro' import Form from './components/form' -import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format' import { mpcashManagementOrderpost, mpshouldCollectOrderpurchaser } from "@/api/newCollection" -import TimePicker from "@/components/timePicker" -import dayjs from 'dayjs' import { alert } from "@/common/common" import smallToBig from '@/common/money' import IconFont from '@/components/iconfont/iconfont' @@ -193,7 +186,7 @@ export default () => { }, [IsOpen]) return ( <> - +
{ item.av_product_color.map(it => { if (it.sale_order_detail_id === val.sale_order_detail_id) { if (val.nums === 1) { - it.isTui = false + // it.isTui = false it.nums = 1 } else { it.nums-- @@ -95,6 +95,27 @@ export default () => { item.av_product_color.map(it => { if (it.sale_order_detail_id === val.sale_order_detail_id) { if (Number(e.detail.value) < 1) { + it.nums = '' + } else { + it.nums = Number(e.detail.value) + } + if (Number(e.detail.value) > it.roll) { + it.nums = 1 + } + } + return it + }) + }) + setListArr([...ListArr]) + } + + + const onBlur = (e, val) => { + ListArr.forEach(item => { + item.av_product_color.map(it => { + if (it.sale_order_detail_id === val.sale_order_detail_id) { + if (Number(e.detail.value) < 1 || e.detail.value == '') { + it.isTui = false it.nums = 1 } else { it.nums = Number(e.detail.value) @@ -439,7 +460,7 @@ export default () => { obj={infoObj} handTui={(item) => handTui(item)} handCancel={(item) => handCancel(item)} - // onBlur={(e, item) => onBlur(e, item)} + onBlur={(e, item) => onBlur(e, item)} handReduce={(item) => handReduce(item)} handAdd={(item) => handAdd(item)} onInputEven={(e, item) => onInputEven(e, item)} @@ -545,7 +566,7 @@ export default () => { } - + diff --git a/src/pages/applyMoney/index.module.scss b/src/pages/applyMoney/index.module.scss index 4629514..5a42953 100644 --- a/src/pages/applyMoney/index.module.scss +++ b/src/pages/applyMoney/index.module.scss @@ -553,4 +553,7 @@ // height: calc($customTabBarHeight + env(safe-area-inset-bottom)); // width: 100%; // } + .safeBoxs { + height: 100px; + } } \ No newline at end of file diff --git a/src/pages/applyMoney/index.tsx b/src/pages/applyMoney/index.tsx index 234a2f6..4b0ae3a 100644 --- a/src/pages/applyMoney/index.tsx +++ b/src/pages/applyMoney/index.tsx @@ -78,7 +78,7 @@ export default () => { item.av_product_color.map(it => { if (it.sale_order_detail_id === val.sale_order_detail_id) { if (val.nums === 1) { - it.isTui = false + // it.isTui = false it.nums = 1 } else { it.nums-- @@ -94,7 +94,28 @@ export default () => { ListArr.forEach(item => { item.av_product_color.map(it => { if (it.sale_order_detail_id === val.sale_order_detail_id) { - if (Number(e.detail.value) < 1) { + if (Number(e.detail.value) < 1 || e.detail.value == '') { + it.isTui = false + it.nums = 1 + } else { + it.nums = Number(e.detail.value) + } + if (Number(e.detail.value) > it.roll) { + it.nums = 1 + } + } + return it + }) + }) + setListArr([...ListArr]) + } + + const onBlur = (e, val) => { + ListArr.forEach(item => { + item.av_product_color.map(it => { + if (it.sale_order_detail_id === val.sale_order_detail_id) { + if (Number(e.detail.value) < 1 || e.detail.value == '') { + it.isTui = false it.nums = 1 } else { it.nums = Number(e.detail.value) @@ -334,7 +355,7 @@ export default () => { obj={infoObj} handTui={(item) => handTui(item)} handCancel={(item) => handCancel(item)} - // onBlur={(e, item) => onBlur(e, item)} + onBlur={(e, item) => onBlur(e, item)} handReduce={(item) => handReduce(item)} handAdd={(item) => handAdd(item)} onInputEven={(e, item) => onInputEven(e, item)} @@ -399,7 +420,7 @@ export default () => { } - +