--增加判断对象为空方法
--增加表单检索方法 --增加公司资料编辑页面 --增加码单管理页面 --增加码单添加页面 --编辑个人资料、地址管理、码单管理引入图标
This commit is contained in:
@@ -50,6 +50,9 @@
|
||||
.user-edit-list-right-placeholder{
|
||||
color: #cccccc;
|
||||
}
|
||||
.user-edit-list-right .icon-a-moreback{
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.user-edit-logout{
|
||||
width: 668px;
|
||||
@@ -67,6 +70,7 @@
|
||||
.user-edit-popup-content{
|
||||
margin: 0 auto;
|
||||
width: 658px;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
.user-edit-popup-input{
|
||||
width: 658px;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
import { goLink } from "@/common/common";
|
||||
import Popup from "@/components/popup";
|
||||
import { Button, Image, Text, Textarea, View } from "@tarojs/components"
|
||||
import Taro, { chooseMedia } from "@tarojs/taro";
|
||||
import { memo, useCallback, useState } from "react"
|
||||
import "./index.scss"
|
||||
|
||||
@@ -20,24 +22,40 @@ export default ()=>{
|
||||
const handleTextareaSave = ()=>{
|
||||
|
||||
}
|
||||
Taro.eventCenter.on('message:detail', (message) => console.log(message))
|
||||
// 面面跳转
|
||||
const onNavigate = (url:string)=>{
|
||||
goLink(url);
|
||||
}
|
||||
// 肖像编辑
|
||||
const handleSelectRortrait = ()=>{
|
||||
chooseMedia({
|
||||
count: 1,
|
||||
mediaType: ["image"],
|
||||
success(ev){
|
||||
console.log(ev);
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<View className="user-edit">
|
||||
<View className="user-edit-portrait">
|
||||
<View onClick={handleSelectRortrait} className="user-edit-portrait">
|
||||
<Image src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F1113%2F052420110515%2F200524110515-2-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1652840455&t=6d2fd53931578ef6e213a929a77d059c"/>
|
||||
<View>点击编辑头像</View>
|
||||
</View>
|
||||
<View className="user-edit-content">
|
||||
<UserEditList onClick={()=>triggerList('nickname')} data={formData} label="昵称" placeholder="请输入" icon=""/>
|
||||
<UserEditList label="公司/组织" placeholder="请输入" icon=""/>
|
||||
<UserEditList label="地址管理" placeholder="添加 / 修改收货地址" icon=""/>
|
||||
<UserEditList label="码单管理" placeholder="修改码单抬头 / 客户 / 电话等显示信息" icon=""/>
|
||||
<UserEditList onClick={()=>onNavigate("/pages/company/index")} label="公司/组织" placeholder="请输入" icon=""/>
|
||||
<UserEditList onClick={()=>onNavigate("/pages/addressManager/index")} label="地址管理" placeholder="添加 / 修改收货地址" icon=""/>
|
||||
<UserEditList onClick={()=>onNavigate("/pages/weightList/index")} label="码单管理" placeholder="修改码单抬头 / 客户 / 电话等显示信息" icon=""/>
|
||||
<UserEditList label="完善资料" placeholder="完善资料加入会员,申请更多优惠" icon=""/>
|
||||
<UserEditList label="账号解绑" placeholder="解除账号与所属公司/组织的绑定关系" icon=""/>
|
||||
</View>
|
||||
<Button hoverClass="none" className="user-edit-logout">退出当前账号</Button>
|
||||
|
||||
<PopupContent show={popupShow} setPopupShow={setPopupShow} save={handleTextareaSave}/>
|
||||
<PopupContent value="123" show={popupShow} setPopupShow={setPopupShow} save={handleTextareaSave}/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
@@ -54,7 +72,7 @@ const UserEditList = memo((props:any)=>{
|
||||
<View className="user-edit-list-right-placeholder">{props.placeholder}</View>
|
||||
{/* 请输入 */}
|
||||
</View>
|
||||
<Text>1</Text>
|
||||
<Text className="iconfont icon-a-moreback"></Text>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
@@ -63,9 +81,7 @@ const UserEditList = memo((props:any)=>{
|
||||
// popup内容
|
||||
const PopupContent = memo((props:any)=>{
|
||||
// popup输入长度
|
||||
const [inputLength, setInputLength] = useState(0);
|
||||
const handleTextareaInput = (ev:any)=>{
|
||||
setInputLength(ev.detail.value.length);
|
||||
}
|
||||
// 重置
|
||||
const handleTextareaReset = ()=>{
|
||||
@@ -75,8 +91,8 @@ const PopupContent = memo((props:any)=>{
|
||||
<Popup onClose={()=>props.setPopupShow(false)} title="修改昵称" show={props.show}>
|
||||
<View className="user-edit-popup-content">
|
||||
<View className="user-edit-popup-input">
|
||||
<Textarea onInput={handleTextareaInput} maxlength={20}/>
|
||||
<Text>{inputLength}/20</Text>
|
||||
<Textarea value={props.value} onInput={handleTextareaInput} maxlength={20}/>
|
||||
<Text>{props.value.length}/20</Text>
|
||||
</View>
|
||||
<Text className="user-edit-popup-tips">请设置2-20个字符,由中文、英文、数字、-和_组成</Text>
|
||||
<View className="user-edit-popup-operation">
|
||||
|
||||
Reference in New Issue
Block a user