1.6
parent
d216bb8de0
commit
fac8a4b68e
|
|
@ -138,11 +138,11 @@ class User extends Common
|
|||
'key_name' => 'openid',
|
||||
'error_msg' => 'openid为空',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'userinfo',
|
||||
'error_msg' => '用户数据为空',
|
||||
],
|
||||
// [
|
||||
// 'checked_type' => 'empty',
|
||||
// 'key_name' => 'userinfo',
|
||||
// 'error_msg' => '用户数据为空',
|
||||
// ],
|
||||
];
|
||||
$ret = ParamsChecked($this->data_post, $p);
|
||||
if($ret !== true)
|
||||
|
|
|
|||
|
|
@ -311,10 +311,11 @@ App({
|
|||
get_user_login_info(object, method, openid, userinfo) {
|
||||
my.showLoading({ content: "授权中..." });
|
||||
var $this = this;
|
||||
userinfo['openid'] = openid;
|
||||
my.request({
|
||||
url: $this.get_request_url('alipayuserinfo', 'user'),
|
||||
method: 'POST',
|
||||
data: { userinfo: userinfo, openid: openid },
|
||||
data: userinfo,
|
||||
dataType: 'json',
|
||||
headers: { 'content-type': 'application/x-www-form-urlencoded' },
|
||||
success: (res) => {
|
||||
|
|
|
|||
|
|
@ -44,8 +44,14 @@ Page({
|
|||
// content: userinfo,
|
||||
// buttonText: '我知道了',
|
||||
// });
|
||||
console.log(userinfo)
|
||||
app.user_auth_login($this, 'user_auth_back_event', null);
|
||||
|
||||
// 字符串则转为json对象(兼容支付宝框架bug)
|
||||
// if(typeof(userinfo) == 'string')
|
||||
// {
|
||||
userinfo = JSON.parse(userinfo.response);
|
||||
//}
|
||||
console.log(userinfo.response)
|
||||
app.user_auth_login(this, 'user_auth_back_event', userinfo.response);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue