...
|
...
|
@@ -6,6 +6,7 @@ use Plugin\Cache; |
|
|
use Configs\CacheConfig;
|
|
|
use Api\Yohobuy;
|
|
|
use Plugin\Images;
|
|
|
use Plugin\Helpers;
|
|
|
|
|
|
class CommonController extends WebAction
|
|
|
{
|
...
|
...
|
@@ -118,4 +119,24 @@ class CommonController extends WebAction |
|
|
}
|
|
|
return $this->helpJsonCallbackResult($callback, $data['code'], $data['message'], $banner);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取邮件订阅
|
|
|
*
|
|
|
* @return jsonp
|
|
|
*/
|
|
|
public function emailsubscriberAction()
|
|
|
{
|
|
|
$callback = $this->get('callback', '');
|
|
|
$email = $this->get('email', '');
|
|
|
$uid = intval($this->get('uid', '0'));
|
|
|
$data = array();
|
|
|
//验证邮件
|
|
|
if(Helpers::verifyEmail($email)) {
|
|
|
$data = IndexData::emailSubscriber($email, $uid);
|
|
|
return $this->helpJsonCallbackResult($callback, $data['code'], $data['message'], $data['data']);
|
|
|
} else {
|
|
|
return $this->helpJsonCallbackResult($callback, 403, '订阅失败', '');
|
|
|
}
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|