Merge branch 'dev' of ssh://git.online.zzfzyc.com:10022/mp/EShop into dev
This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.address-scroll-view-content{
|
||||
padding-bottom: 300px;
|
||||
}
|
||||
.address-list{
|
||||
width: 704px;
|
||||
height: 156px;
|
||||
@@ -17,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;
|
||||
@@ -25,7 +28,7 @@
|
||||
.address-list:first-child{
|
||||
margin-top: 0;
|
||||
}
|
||||
.address-list:last-child{
|
||||
.address-list-last{
|
||||
margin-bottom: 300px;
|
||||
}
|
||||
.address-user{
|
||||
@@ -54,6 +57,9 @@
|
||||
color: #ababab;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.address-edit{
|
||||
padding: 10px;
|
||||
}
|
||||
.address-edit .icon-bianji{
|
||||
font-size: 40px;
|
||||
}
|
||||
@@ -62,6 +68,13 @@
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
color: #3c3c3c;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
.address-list-info view{
|
||||
max-width: 60%;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;white-space: nowrap;
|
||||
}
|
||||
.address-list-bottom{
|
||||
display: flex;justify-content: space-between;
|
||||
@@ -76,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{
|
||||
|
||||
@@ -81,37 +81,40 @@ const AddressList = memo((props:Params)=>{
|
||||
return (
|
||||
<View className="address-scroll-view">
|
||||
<ScrollView scrollY refresherEnabled={props.refresherEnabled} enhanced refresherTriggered={refreshState} onRefresherRefresh={handleRefresh}>
|
||||
{
|
||||
state?.data?.list?.length>0?
|
||||
state?.data?.list?.map((item,index)=>{
|
||||
// data.length>0?
|
||||
// data.map((item,index)=>{
|
||||
return(
|
||||
<View onLongPress={()=>handleDelete(item)} onClick={()=>handleSelect(item,index)} className={`address-list ${focusId==item.id&&'address-active'}`}>
|
||||
<View className="address-user">
|
||||
{item.name}
|
||||
{
|
||||
item.is_default?<Text className="address-list-default">默认</Text>:
|
||||
<Text className="address-list-phone">{item.phone}</Text>
|
||||
}
|
||||
</View>
|
||||
<View className="address-list-bottom">
|
||||
<View className="address-list-info">
|
||||
{/* **省**市**区**街道****仓库 */}
|
||||
{item.province_name+item.city_name+item.district_name} {item.address_detail}
|
||||
<View className="address-scroll-view-content">
|
||||
{
|
||||
state?.data?.list?.length>0?
|
||||
state?.data?.list?.map((item,index)=>{
|
||||
// data.length>0?
|
||||
// data.map((item,index)=>{
|
||||
return(
|
||||
<View onLongPress={()=>handleDelete(item)} onClick={()=>handleSelect(item,index)} className={`address-list ${focusId==item.id&&'address-active'}`}>
|
||||
<View className="address-user">
|
||||
{item.name}
|
||||
{
|
||||
item.is_default&&<Text className="address-list-phone">{item.phone.replace(item.phone.substring(3,7), "****")}</Text>
|
||||
item.is_default?<Text className="address-list-default">默认</Text>:
|
||||
<Text className="address-list-phone">{item.phone.replace(item.phone.substring(4,7), "****")}</Text>
|
||||
}
|
||||
</View>
|
||||
<Navigator url={`/pages/addressAdd/index?type=edit&id=${item.id}`} hoverClass="none" className="address-edit">
|
||||
<Text className="iconfont icon-bianji"></Text>
|
||||
</Navigator>
|
||||
<View className="address-list-bottom">
|
||||
<View className="address-list-info">
|
||||
<View>{item.province_name+item.city_name+item.district_name}
|
||||
{/* {item.address_detail} */}
|
||||
</View>
|
||||
{
|
||||
item.is_default&&<Text className="address-list-phone">{item.phone.replace(item.phone.substring(4,7), "****")}</Text>
|
||||
}
|
||||
</View>
|
||||
<Navigator onClick={e=>e.stopPropagation()} url={`/pages/addressAdd/index?type=edit&id=${item.id}`} hoverClass="none" className="address-edit">
|
||||
<Text className="iconfont icon-bianji"></Text>
|
||||
</Navigator>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}):
|
||||
<View className="address-no-data">暂未添加地址</View>
|
||||
}
|
||||
);
|
||||
}):
|
||||
<View className="address-no-data">暂未添加地址</View>
|
||||
}
|
||||
</View>
|
||||
</ScrollView>
|
||||
{addButtonEnabled&&<Navigator url="/pages/addressAdd/index?type=add" hoverClass="none" className="add-address">添加收货地址</Navigator>}
|
||||
</View>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 (
|
||||
<View className="form-list">
|
||||
<View className="form-list-label">{props.label}</View>
|
||||
<View style={style} className="form-list">
|
||||
<View style={labelStyle} className={`form-list-label ${required&&"form-list-label-required"}`}>{props.label}</View>
|
||||
<View onClick={props?.onClick} className="form-list-right">
|
||||
{
|
||||
props.children??
|
||||
<View onClick={props?.onClick} className="form-list-right-meet">
|
||||
<View style={contentStyle} onClick={props?.onClick} className="form-list-right-meet">
|
||||
{
|
||||
type=="input"?
|
||||
<View className="form-list-input">
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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 (
|
||||
<View style={style} className="From-list-certification">
|
||||
<View style={labelStyle} className={`From-list-certification-label ${required&&"From-list-certification-label-required"}`}>{props.label}</View>
|
||||
<View onClick={props?.onClick} className="From-list-certification-right">
|
||||
{
|
||||
props.children??
|
||||
<View style={contentStyle} onClick={props?.onClick} className="From-list-certification-right-meet">
|
||||
{
|
||||
type=="input"?
|
||||
<View className="From-list-certification-input">
|
||||
<Input value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} />
|
||||
{value&&
|
||||
<View><Text onClick={()=>props.onInput&&props.onInput({detail: {value: ""}})} className="iconfont icon-qingkong"/></View>
|
||||
}
|
||||
</View>:
|
||||
type=="textarea"?<Textarea value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} />:
|
||||
<>
|
||||
{
|
||||
props.value?<View>{value}</View>:
|
||||
<View className="From-list-certification-right-placeholder">
|
||||
{props.placeholder}
|
||||
</View>
|
||||
}
|
||||
<View className="From-list-certification-right-enter"><Text className="iconfont icon-a-moreback"></Text></View>
|
||||
</>
|
||||
}
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
const A = ()=>{
|
||||
|
||||
}
|
||||
export default FromList;
|
||||
@@ -0,0 +1,16 @@
|
||||
.message-custom-tips{
|
||||
width: 100%;
|
||||
height: 66px;
|
||||
background: #FFE6CE;
|
||||
border: 2px solid #ffe6ce;
|
||||
padding: 0 30px;
|
||||
display: flex;align-items: center;
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
box-sizing: border-box;
|
||||
color: #EE7500;
|
||||
text{
|
||||
margin-right: 10px;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
import { Button, Navigator, ScrollView, Text, View } from "@tarojs/components"
|
||||
import { memo } from "react"
|
||||
import "./index.scss"
|
||||
|
||||
interface Params{
|
||||
text: String,//提示信息
|
||||
}
|
||||
|
||||
// 消息提示
|
||||
const Message = memo((props:Params)=>{
|
||||
return (
|
||||
<View className="message-custom-tips">
|
||||
<Text className="iconfont icon-zhuyi"></Text> {props.text}
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
export default Message;
|
||||
Reference in New Issue
Block a user