提交 af7022a0 编写于 作者: J jianbo

修复登录的bug

上级 42a9e886
......@@ -223,8 +223,8 @@ class RAM_REST_Weixin_Controller extends WP_REST_Controller{
return new WP_Error( 'error', 'API错误:' . json_encode($access_result), array( 'status' => 501 ) );
}
$api_result = json_decode($access_result,true);
if( empty( $api_result['openid'] ) || empty( $api_result['session_key'] ) || ! empty( $api_result['error'] ) ) {
return new WP_Error( $api_result['error'], 'API错误:' . json_encode( $api_result ), array( 'status' => 502 ) );
if( empty( $api_result['openid'] ) || empty( $api_result['session_key'] )) {
return new WP_Error('error', 'API错误:' . json_encode( $api_result ), array( 'status' => 502 ) );
}
$openId = $api_result['openid'];
$sessionKey = $api_result['session_key'];
......
......@@ -155,9 +155,9 @@ if (version_compare(PHP_VERSION, '5.6.0', '<=') )
<script>
jQuery(document).ready(function($) {
RESPONSIVEUI.responsiveTabs();
if($("input[name=post_meta]").attr('checked')) {
$("#section_meta_list").addClass("hide");
}
// if($("input[name=post_meta]").attr('checked')) {
// $("#section_meta_list").addClass("hide");
// }
});
</script>
</div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册