--绑定手机号修改
This commit is contained in:
parent
811e93e628
commit
753906dbd5
@ -102,7 +102,7 @@ const AddressList = memo((props:Params)=>{
|
||||
{/* {item.address_detail} */}
|
||||
</View>
|
||||
{
|
||||
item.is_default&&<Text className="address-list-phone">{item.phone.replace(item.phone.substring(4,7), "****")}</Text>
|
||||
item.is_default&&<Text className="address-list-phone">{item.phone.replace(item.phone.substring(3,7), "****")}</Text>
|
||||
}
|
||||
</View>
|
||||
<Navigator onClick={e=>e.stopPropagation()} url={`/pages/addressAdd/index?type=edit&id=${item.id}`} hoverClass="none" className="address-edit">
|
||||
|
@ -31,7 +31,7 @@ export default ()=>{
|
||||
<View className="credit-used-list-top">
|
||||
<View className="credit-used-list-type">下单</View>
|
||||
<View className={`credit-used-list-price ${item.amount>0?'green':item.amount<0?'red':''}`}>
|
||||
{item.amount>0?"-":"+"}{toDecimal2(formatPriceDiv(item.amount)).toLocaleString()}
|
||||
{item.trans_type==2?"-":"+"}{toDecimal2(formatPriceDiv(item.amount)).toLocaleString()}
|
||||
</View>
|
||||
</View>
|
||||
<View className="credit-used-list-bottom">
|
||||
|
@ -3,22 +3,6 @@
|
||||
background-color: #f3f3f3;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.deposit-beforehand-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;
|
||||
color: #EE7500;
|
||||
margin: 0;
|
||||
}
|
||||
.deposit-beforehand-tips text{
|
||||
margin-right: 10px;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.deposit-beforehand-card{
|
||||
width: 702px;
|
||||
|
@ -6,6 +6,7 @@ import { depositInfoApi } from "@/api/deposit"
|
||||
import { useEffect } from "react";
|
||||
import { formatPriceDiv, toDecimal2 } from "@/common/fotmat";
|
||||
import { setClipboardData } from "@tarojs/taro";
|
||||
import Message from "@/components/Message";
|
||||
|
||||
export default ()=>{
|
||||
const {fetchData, state} = depositInfoApi();
|
||||
@ -23,9 +24,7 @@ export default ()=>{
|
||||
|
||||
return (
|
||||
<View className="deposit-beforehand">
|
||||
<View className="deposit-beforehand-tips">
|
||||
<Text className="iconfont icon-zhuyi"></Text> 汇款成功后,1-5分钟自动到账。
|
||||
</View>
|
||||
<Message text="汇款成功后,1-5分钟自动到账。"/>
|
||||
<View className="deposit-beforehand-card">
|
||||
<View className="deposit-beforehand-balance">
|
||||
<View className="deposit-beforehand-balance-title">余额 (元)</View>
|
||||
|
@ -3,26 +3,15 @@ import { memo, useEffect, useState } from "react"
|
||||
import styles from './index.module.scss'
|
||||
import classnames from "classnames";
|
||||
import { useSelector } from "@/reducers/hooks";
|
||||
import { GetAdminUserInfoApi } from "@/api/user";
|
||||
import { alert, goLink } from "@/common/common";
|
||||
import useLogin from '@/use/useLogin'
|
||||
|
||||
export default () => {
|
||||
// 用户信息
|
||||
const { fetchData, state } = GetAdminUserInfoApi();
|
||||
const { getSelfUserInfo } = useLogin();
|
||||
const {adminUserInfo, userInfo} = useSelector(state => state.userInfo);
|
||||
const [mUserInfo, setMUserInfo] = useState({
|
||||
phone: ""
|
||||
});
|
||||
const getData = ()=>{
|
||||
fetchData();
|
||||
}
|
||||
useEffect(()=>{
|
||||
setMUserInfo({
|
||||
...mUserInfo,
|
||||
// phone: userInfo?.phone?.replace(userInfo?.phone?.substring(3,7), "****") as string
|
||||
})
|
||||
getData();
|
||||
getSelfUserInfo();
|
||||
},[]);
|
||||
|
||||
return (
|
||||
@ -69,9 +58,9 @@ const Header = memo((props:any) => {
|
||||
{ text: "退款/售后", icon: "icon-a-tuikuanshouhou" }];
|
||||
const { getPhoneNumber } = useLogin();
|
||||
const mGetPhoneNumber = (ev)=>{
|
||||
try {
|
||||
if(ev.detail?.code){
|
||||
getPhoneNumber(ev.detail.code);
|
||||
} catch (error) {
|
||||
}else{
|
||||
alert.none("绑定失败!");
|
||||
}
|
||||
}
|
||||
@ -90,7 +79,7 @@ const Header = memo((props:any) => {
|
||||
{data?.user_name}
|
||||
</View>
|
||||
<View className={styles['arcd-info-left-phone']}>
|
||||
{userInfo?.phone?.replace(userInfo?.phone?.substring(3,7), "****")||<Button openType="getPhoneNumber" onGetPhoneNumber={mGetPhoneNumber}>绑定手机号码</Button>}
|
||||
{data?.phone?data?.phone?.replace(data?.phone?.substring(3,7), "****"):<Button openType="getPhoneNumber" onGetPhoneNumber={mGetPhoneNumber}>绑定手机号码</Button>}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
Loading…
x
Reference in New Issue
Block a user