From eceb170ecefc68009283b4c71eb9b05a8fe66df3 Mon Sep 17 00:00:00 2001 From: li tong bao <2903733959@qq.com> Date: Thu, 9 Jun 2022 19:31:40 +0800 Subject: [PATCH] =?UTF-8?q?--=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.config.json | 2 +- src/app.config.ts | 6 + src/components/AddressList/index.scss | 3 +- src/components/FromList/index.scss | 5 + src/components/FromList/index.tsx | 14 +- .../FromListCertification/index.scss | 95 ++++++++++++ .../FromListCertification/index.tsx | 60 ++++++++ src/components/Message/index.scss | 16 +++ src/components/Message/index.tsx | 19 +++ src/pages/certification/index.config.ts | 4 + src/pages/certification/index.scss | 104 ++++++++++++++ src/pages/certification/index.tsx | 135 ++++++++++++++++++ src/pages/creditLine/index.tsx | 4 +- src/pages/user/index.module.scss | 42 +++--- src/pages/user/index.tsx | 84 ++++++----- src/pages/userEdit/index.scss | 15 +- src/pages/userEdit/index.tsx | 17 ++- 17 files changed, 556 insertions(+), 69 deletions(-) create mode 100644 src/components/FromListCertification/index.scss create mode 100644 src/components/FromListCertification/index.tsx create mode 100644 src/components/Message/index.scss create mode 100644 src/components/Message/index.tsx create mode 100644 src/pages/certification/index.config.ts create mode 100644 src/pages/certification/index.scss create mode 100644 src/pages/certification/index.tsx diff --git a/project.config.json b/project.config.json index d98974e..9f2fb2a 100644 --- a/project.config.json +++ b/project.config.json @@ -2,7 +2,7 @@ "miniprogramRoot": "./dist", "projectname": "EShop", "description": "电子商城", - "appid": "touristappid", + "appid": "wx68d92d7cbf0b6963", "setting": { "urlCheck": true, "es6": false, diff --git a/src/app.config.ts b/src/app.config.ts index 61bd39e..21286b2 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -158,6 +158,12 @@ export default { pages: [ "index", ] + }, + { + root: "pages/certification", + pages: [ + "index", + ] } ] } diff --git a/src/components/AddressList/index.scss b/src/components/AddressList/index.scss index 3495b3a..8c6198c 100644 --- a/src/components/AddressList/index.scss +++ b/src/components/AddressList/index.scss @@ -19,6 +19,7 @@ box-sizing: border-box; margin: 18px auto 0; border: 1px solid #ffffff; + border: 1px solid rgba(0,0,0,0.16); } .address-active{ border: 1px solid #68b4ff; @@ -88,7 +89,7 @@ font-weight: 400; color: #ffffff; display: flex;align-items: center;justify-content: center; - position: absolute;bottom: 8%;left: 50%; + position: absolute;bottom: 4%;left: 50%; transform: translateX(-50%); } .address-no-data{ diff --git a/src/components/FromList/index.scss b/src/components/FromList/index.scss index e820f47..969922e 100644 --- a/src/components/FromList/index.scss +++ b/src/components/FromList/index.scss @@ -9,6 +9,11 @@ color: #000000; margin-top: 20px; } + .form-list-label-required::before{ + content: "*"; + color: #FF0000; + font-size: 28px; + } .form-list-right{ width: 506px; font-size: 26px; diff --git a/src/components/FromList/index.tsx b/src/components/FromList/index.tsx index 8df1c6c..0af11d4 100644 --- a/src/components/FromList/index.tsx +++ b/src/components/FromList/index.tsx @@ -10,20 +10,24 @@ interface ListParams{ placeholder?:string, // 提示文本 children?: any, // 插槽 type?: string // 类型:1.input,2.textarea,3.select - value?: any + value?: any, + style?: object, //整行样式 + labelStyle?: object, // label样式 + contentStyle?: object, + required?: boolean } // 表单列表 const FromList = memo((props:ListParams)=>{ - const {type="input",value=""} = props; + const {type="input",value="",style={},labelStyle={},contentStyle={},required=false} = props; return ( - - {props.label} + + {props.label} { props.children?? - + { type=="input"? diff --git a/src/components/FromListCertification/index.scss b/src/components/FromListCertification/index.scss new file mode 100644 index 0000000..fc0ed5a --- /dev/null +++ b/src/components/FromListCertification/index.scss @@ -0,0 +1,95 @@ +.From-list-certification{ + display: flex; + justify-content: space-between; + margin: 0 30px; + border-bottom: 1px solid #F0F0F0; + padding: 15px 0; + + .From-list-certification-label{ + font-size: 28px; + font-weight: 400; + color: #000000; + margin-top: 20px; + width: 150px; + border-right: 1px solid #F0F0F0; + } + .From-list-certification-label-required::before{ + content: "*"; + color: #FF0000; + font-size: 28px; + } + .From-list-certification-right{ + width: 506px; + font-size: 26px; + font-weight: 400; + } + .From-list-certification-right-meet{ + width: 506px; + min-height: 45px; + border-radius: 20px; + box-sizing: border-box; + padding: 10px 20px; + display: flex;justify-content: space-between; + align-items: center; + } + .From-list-certification-input{ + width: 100%; + display: flex;align-items: center; + } + .From-list-certification-input view{ + height: 100%; + padding: 0 10px; + box-sizing: border-box; + } + .From-list-certification-input text{ + width: 30px; + min-width: 30px; + height: 30px; + background: rgba(0,0,0,0.3); + border-radius: 50%; + font-size: 18px; + display: flex;align-items: center; + justify-content: center; + flex: 1; + color: white; + } + .From-list-certification-right input,.From-list-certification-right textarea{ + // flex: 0 0 auto; + min-height: 100%; + width: 100%; + color: #000000; + } + .From-list-certification-right textarea{ + height: 186px; + border-radius: 10px; + padding: 10px 0; + } + .From-list-certification-right .phcolor{ + color: #ababab; + } + .From-list-certification-right-placeholder{ + color: #ababab; + } + .From-list-certification-right-enter .icon-a-moreback{ + font-size: 28px; + } + .add-address-default{ + display: flex;align-items: center;justify-content: space-between; + margin: 70px 30px 0; + font-size: 26px; + font-weight: 700; + color: #000000; + } + + .add-address-save{ + width: 668px; + height: 82px; + background: #007aff; + border-radius: 40px; + font-size: 32px; + font-weight: 400; + color: #ffffff; + display: flex;align-items: center;justify-content: center; + margin: 620px auto 0; + } +} \ No newline at end of file diff --git a/src/components/FromListCertification/index.tsx b/src/components/FromListCertification/index.tsx new file mode 100644 index 0000000..3017860 --- /dev/null +++ b/src/components/FromListCertification/index.tsx @@ -0,0 +1,60 @@ + +import { Input, Text, Textarea, View } from "@tarojs/components" +import { memo } from "react" +import "./index.scss" + +interface ListParams{ + label: string, //左边label + onInput?: (ev:Object)=>void, // 输入框输入 + onClick?:()=>any, //点击列表 + placeholder?:string, // 提示文本 + children?: any, // 插槽 + type?: string // 类型:1.input,2.textarea,3.select + value?: any, + style?: object, //整行样式 + labelStyle?: object, // label样式 + contentStyle?: object, + required?: boolean +} + +// 表单列表 +const FromList = memo((props:ListParams)=>{ + const {type="input",value="",style={},labelStyle={},contentStyle={},required=false} = props; + + return ( + + {props.label} + + { + props.children?? + + { + type=="input"? + + + {value&& + props.onInput&&props.onInput({detail: {value: ""}})} className="iconfont icon-qingkong"/> + } + : + type=="textarea"?