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;" style="background-color: transparent;"
show={isShow} show={isShow}
closeOnClickOverlay={false} closeOnClickOverlay={false}
// closeable={true}
// closeIcon="close"
// closeIconPosition="top-right"
round round
overlayStyle="width: 100vw;padding: 0;" overlayStyle="width: 100vw;padding: 0;"
onClick={this.onClickStop} onClick={this.onClickStop}

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

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

Loading…
Cancel
Save