fix:我的页,用户信息刷新接口

master
blak-kong 2 years ago
parent 7561e49be8
commit 4fa2b93067

@ -194,9 +194,6 @@ export default class PopupSiteSwiper extends Component<any, any> {
style="background-color: transparent;"
show={isShow}
closeOnClickOverlay={false}
// closeable={true}
// closeIcon="close"
// closeIconPosition="top-right"
round
overlayStyle="width: 100vw;padding: 0;"
onClick={this.onClickStop}

@ -115,7 +115,7 @@ class Index extends Component<any, any> {
if (mobile) {
this.GetNoReadMessageNum(); // 查询是否有消息
this.RefreshWxUserInfo();
// this.RefreshWxUserInfo();
// if (!this.state.isShowIndexFlag) {
// // 仅初次进入首页运行

@ -12,6 +12,8 @@ import { connect } from "react-redux";
import { userRefresh } from "../../store/features/userInfo";
/*** redux end ***/
import { RefreshWxUserInfo } from "../../utils/Interface";
import "taro-ui/dist/style/components/button.scss"; // 按需引入
import "./user.less";
@ -46,7 +48,9 @@ class User extends Component<any, any> {
}
async onLoad() {}
componentDidMount() {}
componentDidMount() {
this.initData();
}
componentWillUnmount() {}
@ -59,7 +63,17 @@ class User extends Component<any, any> {
componentDidHide() {}
async initData() {}
async initData() {
this.RefreshWxUserInfo();
}
// 刷新用户信息
RefreshWxUserInfo = async () => {
let res = await RefreshWxUserInfo();
if (res.data.code === 200) {
this.props.userRefresh(res.data.data);
}
};
postSaveMessage = async () => {
let { messageInfo } = this.state;

Loading…
Cancel
Save