diff --git a/src/components/popup/popup-site-swiper.tsx b/src/components/popup/popup-site-swiper.tsx index b0cdb19..fe63033 100644 --- a/src/components/popup/popup-site-swiper.tsx +++ b/src/components/popup/popup-site-swiper.tsx @@ -194,9 +194,6 @@ export default class PopupSiteSwiper extends Component { style="background-color: transparent;" show={isShow} closeOnClickOverlay={false} - // closeable={true} - // closeIcon="close" - // closeIconPosition="top-right" round overlayStyle="width: 100vw;padding: 0;" onClick={this.onClickStop} diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index c0b4bc2..e0215a8 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -115,7 +115,7 @@ class Index extends Component { if (mobile) { this.GetNoReadMessageNum(); // 查询是否有消息 - this.RefreshWxUserInfo(); + // this.RefreshWxUserInfo(); // if (!this.state.isShowIndexFlag) { // // 仅初次进入首页运行 diff --git a/src/pages/user/user.tsx b/src/pages/user/user.tsx index 8f03d85..b26ac7f 100644 --- a/src/pages/user/user.tsx +++ b/src/pages/user/user.tsx @@ -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 { } async onLoad() {} - componentDidMount() {} + componentDidMount() { + this.initData(); + } componentWillUnmount() {} @@ -59,7 +63,17 @@ class User extends Component { 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;