This commit is contained in:
aozhiwei 2023-06-07 15:07:31 +08:00
parent e90035915b
commit 293b30cb65
2 changed files with 9 additions and 3 deletions

View File

@ -165,10 +165,17 @@ class BaseAuthedController extends BaseController {
return phpcommon\extractChannel($this->_getAccountId()); return phpcommon\extractChannel($this->_getAccountId());
} }
public function _getAddress(){ public function _getAddress()
{
return $this->_getOpenId(); return $this->_getOpenId();
} }
public function _isValidAddress()
{
$address = $this->_getAddress();
return !empty($address);
}
public function _getSessionId() public function _getSessionId()
{ {
return $this->sessionId; return $this->sessionId;

View File

@ -36,8 +36,7 @@ class BlockChainController extends BaseAuthedController {
public function _handlePre() public function _handlePre()
{ {
parent::_handlePre(); parent::_handlePre();
if (getReqVal('a', '') != 'getTransactionList' && if (getReqVal('a', '') != 'getTransactionList' && !myself()->_isValidAddress()) {
myself()->_getChannel() != BC_CHANNEL) {
die(json_encode(array( die(json_encode(array(
'errcode' => 501, 'errcode' => 501,
'errmsg' => 'you are not a wallet user' 'errmsg' => 'you are not a wallet user'