From eff90b0be5952c98bf8918c9f546295d8c86f0bf Mon Sep 17 00:00:00 2001 From: czm <2192718639@qq.com> Date: Tue, 20 Dec 2022 10:11:15 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(=E7=A0=81=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=BC=80=E5=8F=91=E4=B8=AD):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.ts | 1 + src/common/constant.ts | 6 +-- .../codeList/codeColorList/index.config.ts | 3 ++ .../codeList/codeColorList/index.module.scss | 35 +++++++++++++++ src/pages/codeList/codeColorList/index.tsx | 17 ++++++++ .../colorItemSetting/index.module.scss | 40 +++++++++++++++++ .../components/colorItemSetting/index.tsx | 24 +++++++++++ .../components/colorSetting/index.module.scss | 43 +++++++++++++++++++ .../components/colorSetting/index.tsx | 27 ++++++++++++ .../components/payeeHead/selectList/index.tsx | 26 +++++------ .../codeList/components/productItem/index.tsx | 1 + .../wholeOrderSetting/index.module.scss | 11 ++++- .../components/wholeOrderSetting/index.tsx | 6 ++- 13 files changed, 223 insertions(+), 17 deletions(-) create mode 100644 src/pages/codeList/codeColorList/index.config.ts create mode 100644 src/pages/codeList/codeColorList/index.module.scss create mode 100644 src/pages/codeList/codeColorList/index.tsx create mode 100644 src/pages/codeList/components/colorItemSetting/index.module.scss create mode 100644 src/pages/codeList/components/colorItemSetting/index.tsx create mode 100644 src/pages/codeList/components/colorSetting/index.module.scss create mode 100644 src/pages/codeList/components/colorSetting/index.tsx diff --git a/src/app.config.ts b/src/app.config.ts index e83d6ce..9fc3bd2 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -195,6 +195,7 @@ export default { root: 'pages/codeList', pages: [ 'index', + 'codeColorList/index', ], }, ], diff --git a/src/common/constant.ts b/src/common/constant.ts index 00eaf2a..670a626 100644 --- a/src/common/constant.ts +++ b/src/common/constant.ts @@ -4,15 +4,15 @@ // export const BASE_URL = `http://10.0.0.5:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:40001/lymarket` // export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞 -// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境 +// export const BASE_URL = 'https://test.zzfzyc.com/lymarket' // 测试环境 // export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布 // export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发 // export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发 // export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发 // export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境 -// export const BASE_URL = 'https://www.zzfzyc.com/lymarket' // 正式环境 +export const BASE_URL = 'https://www.zzfzyc.com/lymarket' // 正式环境 // export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞 -export const BASE_URL = 'http://192.168.1.7:50002/lymarket' // 添 +// export const BASE_URL = 'http://192.168.1.7:50002/lymarket' // 添 // export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷 // export const BASE_URL = 'http://192.168.1.42:50001/lymarket' // 杰 diff --git a/src/pages/codeList/codeColorList/index.config.ts b/src/pages/codeList/codeColorList/index.config.ts new file mode 100644 index 0000000..127552b --- /dev/null +++ b/src/pages/codeList/codeColorList/index.config.ts @@ -0,0 +1,3 @@ +export default { + navigationBarTitleText: '颜色详情', +} diff --git a/src/pages/codeList/codeColorList/index.module.scss b/src/pages/codeList/codeColorList/index.module.scss new file mode 100644 index 0000000..b9b6d54 --- /dev/null +++ b/src/pages/codeList/codeColorList/index.module.scss @@ -0,0 +1,35 @@ +.main { + padding: 24px; + background-color: #f7f7f7ff; + padding-bottom: 200px; + .bottom_btn { + display: flex; + justify-content: space-between; + padding: 16px 48px; + position: fixed; + width: 100%; + bottom: 0; + left: 0; + box-sizing: border-box; + background-color: #fff; + height: 160px; + z-index: 999; + text { + display: block; + width: 311px; + height: 80px; + border-radius: 44px; + text-align: center; + line-height: 80px; + &:nth-child(2) { + background: #337fff; + color: #fff; + } + &:nth-child(1) { + border: 1px solid #087eff; + color: #337fffff; + box-sizing: border-box; + } + } + } +} diff --git a/src/pages/codeList/codeColorList/index.tsx b/src/pages/codeList/codeColorList/index.tsx new file mode 100644 index 0000000..d6f188b --- /dev/null +++ b/src/pages/codeList/codeColorList/index.tsx @@ -0,0 +1,17 @@ +import { CoverView, Text, View } from '@tarojs/components' +import ColorItemSetting from '../components/colorItemSetting' +import styles from './index.module.scss' + +export default () => { + return + + + + 取消 + 确认 + + + + + +} diff --git a/src/pages/codeList/components/colorItemSetting/index.module.scss b/src/pages/codeList/components/colorItemSetting/index.module.scss new file mode 100644 index 0000000..868ce86 --- /dev/null +++ b/src/pages/codeList/components/colorItemSetting/index.module.scss @@ -0,0 +1,40 @@ +.product_list { + width: 702px; + border-radius: 16px; + margin-top: 24px; + box-sizing: border-box; + .product_list__item { + .product_list__item--title { + height: 82px; + font-size: 28px; + display: flex; + color: #000000; + align-items: center; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + background-color: #fff; + padding: 0 32px; + box-sizing: border-box; + border-radius: 16px 16px 0 0; + .product_title { + margin-right: 8px; + } + .mode_status { + width: 60px; + height: 30px; + font-size: 20px; + background: #337fff; + border-radius: 8px; + text-align: center; + line-height: 30px; + color: #fff; + margin-left: 8px; + } + } + .product_list__item--con { + background-color: #fff; + padding: 24px 32px 18px 32px; + box-sizing: border-box; + margin-bottom: 8px; + } + } +} diff --git a/src/pages/codeList/components/colorItemSetting/index.tsx b/src/pages/codeList/components/colorItemSetting/index.tsx new file mode 100644 index 0000000..85a7f91 --- /dev/null +++ b/src/pages/codeList/components/colorItemSetting/index.tsx @@ -0,0 +1,24 @@ +import { Text, View } from '@tarojs/components' +import SettingNumber from '../settingNumber' +import ProductItem from '../productItem' +import styles from './index.module.scss' +import IconFont from '@/components/iconfont/iconfont' +import LabAndImg from '@/components/LabAndImg' + +export default () => { + return <> + + + + 5215# 26S双纱亲水滑爽棉 + + 大货 + + {new Array(5).fill('').map((item, index) => + + + )} + + + +} diff --git a/src/pages/codeList/components/colorSetting/index.module.scss b/src/pages/codeList/components/colorSetting/index.module.scss new file mode 100644 index 0000000..a66a67f --- /dev/null +++ b/src/pages/codeList/components/colorSetting/index.module.scss @@ -0,0 +1,43 @@ +.product_list { + width: 702px; + background: #ffffff; + border-radius: 16px; + margin-top: 24px; + padding: 0 32px 32px 32px; + box-sizing: border-box; + .product_list__item { + .product_list__item--title { + height: 82px; + font-size: 28px; + display: flex; + justify-content: space-between; + color: #000000; + align-items: center; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + .product_title { + margin-right: 8px; + } + .mode_status { + width: 60px; + height: 30px; + font-size: 20px; + background: #337fff; + border-radius: 8px; + text-align: center; + line-height: 30px; + color: #fff; + margin-left: 8px; + } + .con { + display: flex; + align-items: center; + } + .update { + display: flex; + align-items: center; + color: #337fffff; + font-size: 28px; + } + } + } +} diff --git a/src/pages/codeList/components/colorSetting/index.tsx b/src/pages/codeList/components/colorSetting/index.tsx new file mode 100644 index 0000000..1391562 --- /dev/null +++ b/src/pages/codeList/components/colorSetting/index.tsx @@ -0,0 +1,27 @@ +import { Text, View } from '@tarojs/components' +import ProductItem from '../productItem' +import styles from './index.module.scss' +import IconFont from '@/components/iconfont/iconfont' +import LabAndImg from '@/components/LabAndImg' +import { goLink } from '@/common/common' + +export default () => { + return <> + + + + + 5215# 26S双纱亲水滑爽棉 + + 大货 + + goLink('/pages/codeList/codeColorList/index')}> + 编辑 + + + + {new Array(5).fill('').map((item, index) => )} + + + +} diff --git a/src/pages/codeList/components/payeeHead/selectList/index.tsx b/src/pages/codeList/components/payeeHead/selectList/index.tsx index 1fdd857..16f08ef 100644 --- a/src/pages/codeList/components/payeeHead/selectList/index.tsx +++ b/src/pages/codeList/components/payeeHead/selectList/index.tsx @@ -3,22 +3,24 @@ import classNames from 'classnames' import { memo, useCallback, useEffect, useState } from 'react' import styles from './index.module.scss' +export type SelectStatus = 1|2|3 interface Param { - selectIndex: 1|2|3 + defaultIndex?: SelectStatus onSelect?: (val: number) => void } export default memo((props: Param) => { - const { selectIndex = 1 } = props - const [index, setIndex] = useState(1) + const { defaultIndex = 1, onSelect } = props + const [selectIndex, setSelectIndex] = useState(1) useEffect(() => { - if (selectIndex != index) { setIndex(() => props.selectIndex) } - }, [selectIndex]) - const getSelect = (index) => { - setIndex(() => index) - } - return - getSelect(1)} className={classNames(styles.select_list_item, index === 1 && styles.select_list_ed)}>按整单 - getSelect(2)} className={classNames(styles.select_list_item, index === 2 && styles.select_list_ed)}>按面料 - getSelect(3)} className={classNames(styles.select_list_item, index === 3 && styles.select_list_ed)}>按颜色 + if (defaultIndex != selectIndex) { setSelectIndex(() => defaultIndex) } + }, [defaultIndex]) + const getSelect = useCallback((index) => { + setSelectIndex(() => index) + onSelect?.(index) + }, []) + return + getSelect(1)} className={classNames(styles.select_list_item, selectIndex == 1 && styles.select_list_ed)}>按整单 + getSelect(2)} className={classNames(styles.select_list_item, selectIndex == 2 && styles.select_list_ed)}>按面料 + getSelect(3)} className={classNames(styles.select_list_item, selectIndex == 3 && styles.select_list_ed)}>按颜色 }) diff --git a/src/pages/codeList/components/productItem/index.tsx b/src/pages/codeList/components/productItem/index.tsx index 207d3b5..204c329 100644 --- a/src/pages/codeList/components/productItem/index.tsx +++ b/src/pages/codeList/components/productItem/index.tsx @@ -19,5 +19,6 @@ export default () => { 重量:400.5kg|空差: 50.5k|单价:¥100.0/kg 重量:400.5kg|空差: 50.5k|单价:¥100.0/kg + } diff --git a/src/pages/codeList/components/wholeOrderSetting/index.module.scss b/src/pages/codeList/components/wholeOrderSetting/index.module.scss index 8514034..01985ea 100644 --- a/src/pages/codeList/components/wholeOrderSetting/index.module.scss +++ b/src/pages/codeList/components/wholeOrderSetting/index.module.scss @@ -3,7 +3,7 @@ background: #ffffff; border-radius: 16px; margin-top: 24px; - padding: 0 32px 32px 32px; + padding: 0 32px 0 32px; box-sizing: border-box; .product_list__item { .product_list__item--title { @@ -28,5 +28,14 @@ margin-left: 8px; } } + .up_btn { + width: 100%; + height: 72px; + display: flex; + justify-content: center; + align-items: center; + font-size: 28px; + color: rgba(0, 0, 0, 0.4); + } } } diff --git a/src/pages/codeList/components/wholeOrderSetting/index.tsx b/src/pages/codeList/components/wholeOrderSetting/index.tsx index 35b0443..271c7d6 100644 --- a/src/pages/codeList/components/wholeOrderSetting/index.tsx +++ b/src/pages/codeList/components/wholeOrderSetting/index.tsx @@ -15,8 +15,12 @@ export default () => { 大货 - {new Array(5).fill('').map((item, index) => )} + + {new Array(5).fill('').map((item, index) => )} + + 收起 + }