From 7500d060d2eff890a14b35c55e432870597b134c Mon Sep 17 00:00:00 2001 From: xuan Date: Tue, 25 Oct 2022 17:13:24 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=88=20style(=E9=A6=96=E9=A1=B5):=20?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=8A=A0=E5=85=A5=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E9=83=A8=E5=88=86=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/shoppingCart/index.module.scss | 260 ++++++++---------- src/components/shoppingCart/index.tsx | 136 +++++---- src/pages/index/index.module.scss | 4 +- src/pages/index/index.tsx | 4 +- 4 files changed, 205 insertions(+), 199 deletions(-) diff --git a/src/components/shoppingCart/index.module.scss b/src/components/shoppingCart/index.module.scss index 7d79b4c..6e5df67 100644 --- a/src/components/shoppingCart/index.module.scss +++ b/src/components/shoppingCart/index.module.scss @@ -1,157 +1,141 @@ .shopcartBox { - padding-left: 32px; + padding: 0 32px; - .topTitle { - font-size: 32px; - font-family: PingFangSC-Medium, PingFang SC; - font-weight: 500; - color: #000000; - margin-top: 24px; - margin-bottom: 8px; + .topTitle { + font-size: 32px; + font-weight: 500; + color: #000000; + margin-top: 24px; + margin-bottom: 8px; + } + + .selectFont { + font-size: 24px; + font-weight: 400; + color: #000000; + margin-bottom: 24px; + } + + .line { + margin-bottom: 24px; + height: 1px; + background: #000000; + opacity: 0.1; + } + + .typeFont { + font-size: 28px; + font-weight: 500; + color: #000000; + margin-bottom: 24px; + } + + .flexType { + display: flex; + align-items: center; + margin-bottom: 32px; + + .activemodeFont { + margin-right: 16px; + width: 160px; + height: 68px; + background: rgba(51, 127, 255, 0.1); + border-radius: 8px; + border: 1px solid #337fff; + box-sizing: border-box; + font-size: 28px; + font-weight: 400; + color: #337fff; + text-align: center; + line-height: 68px; } - .selectFont { - font-size: 24px; - font-family: PingFangSC-Regular, PingFang SC; - font-weight: 400; - color: #000000; - margin-bottom: 24px; + .modeFont { + margin-right: 16px; + width: 160px; + height: 68px; + background: #e9e9e9; + border-radius: 8px; + opacity: 0.4; + font-size: 28px; + font-weight: 400; + color: #000000; + box-sizing: border-box; + text-align: center; + line-height: 68px; + } + } + + .flexFonts { + display: flex; + justify-content: space-between; + margin-bottom: 24px; + align-items: center; + padding-bottom: 10px; + + .kingFont { + font-size: 28px; + font-weight: 500; + color: #000000; } - .line { - margin-bottom: 24px; - // width: 686px; - margin-right: 32px; - height: 1px; - background: #000000; - opacity: 0.1; + .danwei { + margin-left: 16px; + width: 148px; + height: 30px; + border-radius: 4px; + border: 1px solid #e42945; + font-size: 22px; + font-weight: 500; + color: #e42945; + text-align: center; + line-height: 30px; } + } - .typeFont { - font-size: 28px; - font-family: PingFangSC-Medium, PingFang SC; - font-weight: 500; - color: #000000; - margin-bottom: 24px; - } + .searchBox { + margin-bottom: 32px; + } - .flexType { - display: flex; - align-items: center; - margin-bottom: 32px; + .scrollviewBig { + .scrollview { + // height: 300px; - .activemodeFont { - margin-right: 16px; - width: 160px; - height: 68px; - background: rgba(51, 127, 255, 0.1); - border-radius: 8px; - border: 1px solid #337FFF; - box-sizing: border-box; - font-size: 28px; - font-family: PingFangSC-Regular, PingFang SC; - font-weight: 400; - color: #337FFF; - text-align: center; - line-height: 68px; - } - - .modeFont { - margin-right: 16px; - width: 160px; - height: 68px; - background: #E9E9E9; - border-radius: 8px; - opacity: 0.4; - font-size: 28px; - font-family: PingFangSC-Regular, PingFang SC; - font-weight: 400; - color: #000000; - box-sizing: border-box; - text-align: center; - line-height: 68px; - } - } - - .flexFonts { - display: flex; - margin-bottom: 24px; - align-items: center; - padding-bottom: 10px; - - .kingFont { - font-size: 28px; - font-family: PingFangSC-Medium, PingFang SC; - font-weight: 500; - color: #000000; - - } - - .danwei { - margin-left: 16px; - width: 148px; - height: 30px; - border-radius: 4px; - border: 1PX solid #E42945; - font-size: 22px; - font-family: PingFangSC-Medium, PingFang SC; - font-weight: 500; - color: #E42945; - text-align: center; - line-height: 30px; - } - } - - .searchBox { - // margin-left: 32px; - margin-right: 32px; - // width: 686px; - margin-bottom: 32px; - } - - .scrollviewBig { - .scrollview { - // height: 300px; - - .kongBox { - height: 181px; - width: 100%; - } - } - - - } - - .kongOne { - height: 200px; - } - - .loading_more { - height: 300px; - padding-bottom: 200px; - display: flex; - align-items: center; + .kongBox { + height: 181px; width: 100%; - justify-content: center; + } } + } - .posBox { - width: 100%; - position: fixed; - z-index: 999; - bottom: calc($customTabBarHeight + env(safe-area-inset-bottom)); - } + .kongOne { + height: 200px; + } - .noBottom { - width: 100%; - position: fixed; - z-index: 999; - bottom: env(safe-area-inset-bottom); - } + .loading_more { + height: 300px; + padding-bottom: 200px; + display: flex; + align-items: center; + width: 100%; + justify-content: center; + } + .posBox { + width: 100%; + position: fixed; + z-index: 999; + bottom: calc($customTabBarHeight + env(safe-area-inset-bottom)); + } + .noBottom { + width: 100%; + position: fixed; + z-index: 999; + bottom: env(safe-area-inset-bottom); + } } .scrllStyle { - height: 900px; -} \ No newline at end of file + height: 75vh; +} diff --git a/src/components/shoppingCart/index.tsx b/src/components/shoppingCart/index.tsx index 43d87b4..4d86af1 100644 --- a/src/components/shoppingCart/index.tsx +++ b/src/components/shoppingCart/index.tsx @@ -8,6 +8,7 @@ import Goods from "@/components/goodsItem" import BottomCustomer from "@/components/BottomCustomer" import VirtualList from '@tarojs/components/virtual-list' import DotLoading from "@/components/dotLoading" +import Divider from '../divider'; interface prosObj { showPopup?: false | true, closePopup?: () => void, @@ -119,64 +120,87 @@ export default memo(forwardRef((props: prosObj, ref) => { }) return ( - closePopup?.()}> - - - {obj?.code}# {obj?.name} - 已选 1 种面料,{selectTotal} 个颜色,共 {selectNums} {showModefont} - - 布料类型 - - { - typeList.map((item, index) => { - return ( - { handCheck?.(item) }} key={index} className={classnames(item.checked ? styles.activemodeFont : styles.modeFont)}>{item.name} - ) - }) - } - - - - 颜色分类({goodList?.length}) - {modeFont == 0 ? '大货' : modeFont == 1 ? '剪版' : '散剪'}单位:{showModefont} - - - - - { - goodList.length > 0 && <> - - - {rows} - - - - - - - } - { - goodList.length === 0 && <> - 加载中 - - } - { - !hasBottom && - } - - 0 && clientName !== '' ? false : true} handSure={() => { handSure() }}> - + closePopup?.()}> + + + + {obj?.code}# {obj?.name} + + + 已选 1 种面料,{selectTotal} 个颜色,共 {selectNums} {showModefont} + + + 布料类型 + + {typeList.map((item, index) => { + return ( + { + handCheck?.(item) + }} + key={index} + className={classnames(item.checked ? styles.activemodeFont : styles.modeFont)}> + {item.name} + + ) + })} + + + + 颜色分类({goodList?.length}) + + {modeFont == 0 ? '大货' : modeFont == 1 ? '剪版' : '散剪'}单位:{showModefont} + + + + + + {goodList.length > 0 && ( + <> + + + {rows} + - - + + + )} + {goodList.length === 0 && ( + <> + + 加载中 + + + + )} + {!hasBottom && } + + 0 && clientName !== '' ? false : true} + handSure={() => { + handSure() + }}> + + + + ) diff --git a/src/pages/index/index.module.scss b/src/pages/index/index.module.scss index 2d1bbd0..3fa31cb 100644 --- a/src/pages/index/index.module.scss +++ b/src/pages/index/index.module.scss @@ -8,7 +8,7 @@ width: 100%; display: flex; justify-content: space-between; - padding: 20px 20px 30px 20px; + padding: 20px; box-sizing: border-box; align-items: center; @@ -36,4 +36,4 @@ } -//246 \ No newline at end of file +//246 diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 06f04e1..bbd9ba0 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -2,7 +2,6 @@ import { View } from '@tarojs/components' import Search from '@/components/search' import SideBar from '@/components/sideBar' import Product from '@/components/product' -import MoveBtn from '@/components/moveBtn' import ShopCart from '@/components/shoppingCart' import { goLink } from '@/common/common' import styles from './index.module.scss' @@ -13,7 +12,6 @@ import { mpproductcolorlist, mpshoppingCartproductColorlist } from "@/api/order" import { dataLoadingStatus } from '@/common/util' import Taro, { useDidShow } from '@tarojs/taro' import { getFilterData } from '@/common/util' -import userInfo from '@/reducers/userInfo' export default () => { useEffect(() => { categoryList() @@ -318,7 +316,7 @@ export default () => { showCart(item)} /> - + {/* */} handSure()} clientName={clientObj?.clientName} clientId={clientObj?.clientId}