|
|
|
|
@ -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;
|
|
|
|
|
|