Commit 1fb6838a by 姜雷

注册添加用户code

parent dc648dca
...@@ -35,7 +35,16 @@ export const changePwdByCellphone = (data: PwdParams) => ...@@ -35,7 +35,16 @@ export const changePwdByCellphone = (data: PwdParams) =>
data: data, data: data,
}); });
type RegisiterPramas = {}; type RegisiterPramas = {
code: string;
areaId: number;
areaName: string;
customerName: string;
customerPhone: string;
customerSex: string;
password: string;
verificationCode: string;
};
// type RegisiterReponseData = {}; // type RegisiterReponseData = {};
export const wxUserRegister = (entity: RegisiterPramas) => export const wxUserRegister = (entity: RegisiterPramas) =>
......
...@@ -160,7 +160,11 @@ class Register extends Component { ...@@ -160,7 +160,11 @@ class Register extends Component {
userinfo: { areaId, areaName }, userinfo: { areaId, areaName },
updateUserInfo, updateUserInfo,
} = this.props; } = this.props;
Taro.login()
.then(res => res.code)
.then(code => {
wxUserRegister({ wxUserRegister({
code: code,
areaId: areaId, areaId: areaId,
areaName: areaName, areaName: areaName,
customerName: name, customerName: name,
...@@ -191,6 +195,8 @@ class Register extends Component { ...@@ -191,6 +195,8 @@ class Register extends Component {
fetching: false, fetching: false,
}); });
}); });
})
.catch(console.log);
} }
} }
......
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