Commit f5ae55cd authored by 罗超's avatar 罗超

1

parent b470fda6
...@@ -336,11 +336,22 @@ export default { ...@@ -336,11 +336,22 @@ export default {
my.getAuthCode({ my.getAuthCode({
scopes: "auth_user", // 主动授权(弹框):auth_user,静默授权(不弹框):auth_base scopes: "auth_user", // 主动授权(弹框):auth_user,静默授权(不弹框):auth_base
success: (res) => { success: (res) => {
console.log(327, res);
if (res.authCode) { if (res.authCode) {
let obj = {
// Source: 1,
// OpenId: "",
// Name: info.userInfo.nickName,
// Photo: info.userInfo.avatarUrl,
// Gender: info.userInfo.gender,
// Moblie: "",
// SuperiorId: 0,
code: res.authCode,
};
// console.log(app.serverUrl + '/login/' + res.authCode); // console.log(app.serverUrl + '/login/' + res.authCode);
// 调用自己的服务端接口,让服务端进行后端的授权认证 // 调用自己的服务端接口,让服务端进行后端的授权认证
that.getBaseInfoAli(); // that.getBaseInfoAli();
console.log(327, res);
that.getCodeAli(obj);
} }
}, },
fail: () => { fail: () => {
...@@ -369,15 +380,16 @@ export default { ...@@ -369,15 +380,16 @@ export default {
var OpenId = ""; var OpenId = "";
that.request2( that.request2(
{ {
url: "/api/mall/GetWeChatOpenId", url: "/api/mall/GetAliCode",
data: { data: {
Code: obj.code, Code: obj.code,
}, },
}, },
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
obj.OpenId = res.data; console.log("390", res);
that.getLogin(obj); // obj.OpenId = res.data;
// that.getLogin(obj);
} }
} }
); );
......
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