Commit 028f4eed by zhangleyuan

feat:解决合并代码后的冲突

parents e50196d0 357a8af5
......@@ -14,9 +14,6 @@ class Authorize extends React.Component {
}
}
componentDidMount() {
// console.log("ticket",window.getParameterByName('ticket'))
// const searchParams = this.props.location.search;
// const {code,ticket} = queryString.parse(searchParams);
const code = window.getParameterByName('code');
const ticket = window.getParameterByName('ticket');
this.setState({
......@@ -29,6 +26,7 @@ class Authorize extends React.Component {
},()=>this.changeCodeState())
}else{
this.getWechatUserInfo();
}
}
changeCodeState = ()=>{
......@@ -48,18 +46,21 @@ class Authorize extends React.Component {
window.location.href = htmlUrl;
}
getWechatUserInfo = ()=>{
let {ticket,code} = this.state;
const code = window.getParameterByName('code');
const ticket = window.getParameterByName('ticket');
const params = {
appTermEnum: "XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN",
code,
storeId:"1192022572770412395",
ticket
}
Service.hades('/anon/hades/bindWeChat',params).then(
Service.hades('/anon/hades/bindWeChat',params).then((res)=>{
if(res.success){
this.setState({
hasBindWechat:true
})
)
}
})
}
render() {
const { hasBindWechat } = this.state
......
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