Commit c19303f6 by zhanghaozhe

微信登录无痕验证

parent 0018a825
......@@ -8,8 +8,8 @@ import { Link } from "react-router-dom"
import { connect } from "react-redux"
import { HeaderBar } from "@/common"
import { http } from "@/utils"
import { getCourses } from './../detail/actions';
import { setCurrentUser, startFetchUser } from "@/store/userAction"
import {endFetchNoTrace} from '@/store/no-trace-validation/reducer'
const Item = List.Item;
......@@ -17,7 +17,7 @@ const Brief = Item.Brief;
@connect(state => ({
user: state.user,
}), {startFetchUser, setCurrentUser})
}), {startFetchUser, setCurrentUser, endFetchNoTrace})
class My extends PureComponent {
constructor(props) {
super(props)
......@@ -34,6 +34,7 @@ class My extends PureComponent {
getUser = () => {
this.props.startFetchUser()
http.get(`${API.home}/m/user_info_sample/1`).then(res => {
this.props.endFetchNoTrace()
this.props.setCurrentUser(this.transformUser(res))
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment