From dc30fc43c47820aabfffe82f24f07c36366a49b2 Mon Sep 17 00:00:00 2001
From: li tong bao <2903733959@qq.com>
Date: Wed, 8 Jun 2022 19:11:28 +0800
Subject: [PATCH] =?UTF-8?q?--=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/AddressList/index.scss | 12 ++-
src/components/AddressList/index.tsx | 57 ++++++------
src/pages/addressAdd/index.scss | 4 +-
src/pages/addressAdd/index.tsx | 5 +-
src/pages/creditLine/index.tsx | 2 +-
src/pages/user/index.module.scss | 119 +++++++++++++++++++++++++-
src/pages/user/index.tsx | 41 ++++++++-
7 files changed, 204 insertions(+), 36 deletions(-)
diff --git a/src/components/AddressList/index.scss b/src/components/AddressList/index.scss
index 5f8cd5b..88fbb0a 100644
--- a/src/components/AddressList/index.scss
+++ b/src/components/AddressList/index.scss
@@ -6,6 +6,9 @@
height: 100%;
box-sizing: border-box;
}
+ scroll-view>view{
+ display: flex;flex-direction: column;
+ }
.address-list{
width: 704px;
@@ -25,7 +28,7 @@
.address-list:first-child{
margin-top: 0;
}
- .address-list:last-child{
+ .address-list-last{
margin-bottom: 300px;
}
.address-user{
@@ -62,6 +65,13 @@
font-size: 24px;
font-weight: 400;
color: #3c3c3c;
+ display: flex;
+ width: 100%;
+ }
+ .address-list-info view{
+ width: 50%;
+ text-overflow: ellipsis;
+ overflow: hidden;white-space: nowrap;
}
.address-list-bottom{
display: flex;justify-content: space-between;
diff --git a/src/components/AddressList/index.tsx b/src/components/AddressList/index.tsx
index e412e63..c3db685 100644
--- a/src/components/AddressList/index.tsx
+++ b/src/components/AddressList/index.tsx
@@ -81,37 +81,40 @@ const AddressList = memo((props:Params)=>{
return (
- {
- state?.data?.list?.length>0?
- state?.data?.list?.map((item,index)=>{
- // data.length>0?
- // data.map((item,index)=>{
- return(
- handleDelete(item)} onClick={()=>handleSelect(item,index)} className={`address-list ${focusId==item.id&&'address-active'}`}>
-
- {item.name}
- {
- item.is_default?默认:
- {item.phone}
- }
-
-
-
- {/* **省**市**区**街道****仓库 */}
- {item.province_name+item.city_name+item.district_name} {item.address_detail}
+
+ {
+ state?.data?.list?.length>0?
+ state?.data?.list?.map((item,index)=>{
+ // data.length>0?
+ // data.map((item,index)=>{
+ return(
+ handleDelete(item)} onClick={()=>handleSelect(item,index)} className={`address-list ${index+1==state?.data?.list?.length&&'address-list-last'} ${focusId==item.id&&'address-active'}`}>
+
+ {item.name}
{
- item.is_default&&{item.phone.replace(item.phone.substring(3,7), "****")}
+ item.is_default?默认:
+ {item.phone.replace(item.phone.substring(4,7), "****")}
}
-
-
-
+
+
+ {item.province_name+item.city_name+item.district_name}
+ {/* {item.address_detail} */}
+
+ {
+ item.is_default&&{item.phone.replace(item.phone.substring(4,7), "****")}
+ }
+
+
+
+
+
-
- );
- }):
- 暂未添加地址
- }
+ );
+ }):
+ 暂未添加地址
+ }
+
{addButtonEnabled&&添加收货地址}
diff --git a/src/pages/addressAdd/index.scss b/src/pages/addressAdd/index.scss
index b229c8b..8443556 100644
--- a/src/pages/addressAdd/index.scss
+++ b/src/pages/addressAdd/index.scss
@@ -40,6 +40,8 @@
font-weight: 400;
color: #ffffff;
display: flex;align-items: center;justify-content: center;
- margin: 620px auto 0;
+ // margin: 620px auto 0;
+ position: fixed;left: 50%;bottom: 50px;
+ transform: translateX(-50%);
}
}
\ No newline at end of file
diff --git a/src/pages/addressAdd/index.tsx b/src/pages/addressAdd/index.tsx
index 0399a4d..fbc2b16 100644
--- a/src/pages/addressAdd/index.tsx
+++ b/src/pages/addressAdd/index.tsx
@@ -54,7 +54,10 @@ export default ()=>{
})
const rules = {
name: [{
- message: "请输入收货人姓名"
+ message: "请输入正确收货人姓名",
+ validator: (value:any, rule:any)=>{ // 自定义验证,返回true表示匹配到了(错误)
+ return value.length>5;
+ }
}],
phone: [{
message: "请输入正确的电话号码", regex: /^1[3|5|6|9|2|8|7]\d{9}$/
diff --git a/src/pages/creditLine/index.tsx b/src/pages/creditLine/index.tsx
index e28f80b..505dcdc 100644
--- a/src/pages/creditLine/index.tsx
+++ b/src/pages/creditLine/index.tsx
@@ -41,7 +41,7 @@ export default ()=>{
const credit_quota_used_line = convertPrice(formatPriceDiv(result.data.credit_quota_used_line));
const credit_quota_line = convertPrice(formatPriceDiv(result.data.credit_quota_line));
const credit_quota_available_line = convertPrice(formatPriceDiv(result.data.credit_quota_available_line));
- const progress = (credit_quota_available_line[0] / credit_quota_line[0] * 100).toFixed(0);
+ const progress = ((credit_quota_available_line[0]??0) / (credit_quota_line[0]??0) * 100).toFixed(0);
switch(Number(result.data.quota_status)){
case 0://暂未开通
diff --git a/src/pages/user/index.module.scss b/src/pages/user/index.module.scss
index 693421b..5de5efa 100644
--- a/src/pages/user/index.module.scss
+++ b/src/pages/user/index.module.scss
@@ -7,7 +7,7 @@
height: 560px;
position: relative;
.card-main{
- margin-top: 33%;
+ margin-top: 10px;
}
}
.header-card{
@@ -137,9 +137,6 @@
position: absolute;top: -10px;right: 0;
}
- .assets{
-
- }
.assets-title{
font-size: 28px;
font-weight: 700;
@@ -195,4 +192,118 @@
.card-main-list-content-item-right text{
font-size: 30px;
}
+
+ .auth{
+ margin-top: 115px;
+ }
+ .auth-top{
+ display: flex;align-items: center;justify-content: space-between;
+ }
+ .auth-status{
+ padding: 0 10px;
+ height: 30px;
+ background: #dddddd;
+ border-radius: 10px 4px 0px 0px;
+ display: flex;align-items: center;justify-content: center;
+ font-size: 18px;
+ font-weight: 400;
+ color: #707070;
+ }
+ .auth-tips{
+ font-size: 18px;
+ font-weight: 400;
+ color: #007aff;
+ }
+ .auth-tips text{
+ font-size: 17px;
+ }
+ .auth-company{
+ height: 70px;
+ width: 100%;
+ background: #f6f6f6;
+ border: 2px solid #f0f0f0;
+ border-radius: 0px 10px 10px 10px;
+ font-size: 26px;
+ font-weight: 700;
+ color: #707070;
+ display: flex;align-items: center;justify-content: center;
+ }
+
+ .modal{
+ background: rgba(0,0,0,0.6);
+ position: fixed;inset: 0;
+ display: flex;justify-content: center;align-items: center;
+ }
+ .modal-content{
+ width: 598px;
+ background: #ffffff;
+ border-radius: 10px;
+ animation: enlargeK 0.2s linear;
+ overflow: hidden;
+ }
+ @keyframes enlargeK {
+ 0%{
+ transform: scale(0);
+ }
+ 100%{
+ transform: scale(1);
+ }
+ }
+ .modal-title{
+ font-size: 32px;
+ font-weight: 700;
+ text-align: center;
+ color: #000000;
+ margin-bottom: 58px;
+ padding-top: 48px;
+ }
+ .modal-letter{
+ font-size: 26px;
+ font-weight: 400;
+ color: #707070;
+ padding: 0 30px;
+ line-height: 50px;
+ }
+ .modal-letter-text{
+ text-indent: 60px;
+ }
+ .modal-letter-beginn{
+ font-size: 28px;
+ font-weight: 400;
+ color: #000000;
+ margin-bottom: 25px;
+ }
+ .modal-letter-end{
+ font-size: 26px;
+ font-weight: 400;
+ text-align: right;
+ margin-top: 61px;
+ }
+ .modal-button{
+ display: flex;
+ border-top: 1px solid #DDDDDD;
+ margin-top: 45px;
+ }
+ .modal-button button, .modal-button view{
+ display: flex;align-items: center;justify-content: center;
+ width: 50%;
+ height: 90px;
+ background-color: white;
+ }
+ .modal-button button{
+ font-size: 26px;
+ font-weight: 400;
+ color: #707070;
+ border-radius: 0;
+ border-right: 1px solid #DDDDDD;
+ }
+ .modal-button button::after{
+ border: 0;
+ border-radius: 0;
+ }
+ .modal-button view{
+ font-size: 26px;
+ font-weight: 400;
+ color: #007aff;
+ }
}
\ No newline at end of file
diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx
index 0be67c8..de7f33f 100644
--- a/src/pages/user/index.tsx
+++ b/src/pages/user/index.tsx
@@ -1,4 +1,4 @@
-import { View, Image, Text, Navigator } from "@tarojs/components"
+import { View, Image, Text, Navigator, Button } from "@tarojs/components"
import { memo, useEffect, useState } from "react"
import styles from './index.module.scss'
import classnames from "classnames";
@@ -12,6 +12,33 @@ export default () => {
+
+
+ )
+}
+const Modal = ()=>{
+ const handleContent = ()=>{
+ console.log(111);
+
+ }
+ const handleouter = ()=>{
+ console.log(222);
+
+ }
+ return(
+
+ e.stopPropagation()}>
+ 首次登录提醒
+
+ To: 万丰园纺织科技
+ 尊敬的老朋友,欢迎你使用小程序商城;由于您是我们长期合作的伙伴,你的组织已自动为你生成,关联后可查看历史订单哟。
+ 信息错误请联系客服
+
+
+
+ 我知道
+
+
)
}
@@ -68,6 +95,18 @@ const Header = memo(() => {
+
+
+
+ 1
+ 认证不通过
+
+ 重新认证
+
+
+ 佛山市带生纺织品有限公司
+
+
订单