22
This commit is contained in:
@@ -58,7 +58,7 @@ class AddressController extends BaseController{
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//captcha_verfiy('image','create_address');
|
||||
//captcha_verify('image','create_address');
|
||||
//* @Apidoc\Param("code", type="string", require=true, desc="图形验证码 event=create_address")
|
||||
//$trade_password = input('trade_password');
|
||||
//\support\Jwt::verify_trade_password($trade_password);
|
||||
@@ -90,7 +90,7 @@ class AddressController extends BaseController{
|
||||
*/
|
||||
public function update()
|
||||
{
|
||||
//captcha_verfiy('image','update_address');
|
||||
//captcha_verify('image','update_address');
|
||||
//$trade_password = input('trade_password');
|
||||
//\support\Jwt::verify_trade_password($trade_password);
|
||||
$data = [
|
||||
|
||||
@@ -2,168 +2,249 @@
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\model\Archives as ArchivesModel;
|
||||
use app\model\Content;
|
||||
use support\Request;
|
||||
use hg\apidoc\annotation as Apidoc;
|
||||
use support\Jwt\JwtToken;
|
||||
use support\think\Db;
|
||||
|
||||
/**
|
||||
* 文章模块
|
||||
*/
|
||||
class ArticleController extends BaseController{
|
||||
class ArticleController extends BaseController
|
||||
{
|
||||
public $noNeedLogin = ['*'];
|
||||
|
||||
private const CACHE_PREFIX_READ = 'article_read_';
|
||||
private const CACHE_TTL = 86400;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @Apidoc\Method("GET")
|
||||
* @Apidoc\Query("category_id", type="int", require=true, desc="分类ID",default=10)
|
||||
* @Apidoc\Query("page", type="int", require=true, desc="页码",default=1)
|
||||
* @Apidoc\Query("limit", type="int", require=true, desc="分页大小",default=10)
|
||||
* @Apidoc\Query("category_id", type="int", require=true, desc="分类ID", default=10)
|
||||
* @Apidoc\Query("page", type="int", require=true, desc="页码", default=1)
|
||||
* @Apidoc\Query("limit", type="int", require=true, desc="分页大小", default=10)
|
||||
*/
|
||||
public function list(){
|
||||
$limit = (int)input('limit',10);
|
||||
$category_id = (int)input('category_id',0);
|
||||
public function list()
|
||||
{
|
||||
$limit = (int)input('limit', 10);
|
||||
$category_id = (int)input('category_id', 0);
|
||||
|
||||
$model = ArchivesModel::where('status','normal')->where('type','article');
|
||||
if($category_id){
|
||||
$model = $model->where('category_id',$category_id);
|
||||
$model = ArchivesModel::where('status', 'normal')->where('type', 'article');
|
||||
if ($category_id) {
|
||||
$model = $model->where('category_id', $category_id);
|
||||
}
|
||||
$list = $model->order('id','desc')->paginate($limit);
|
||||
$user_id=0;
|
||||
try {
|
||||
$user_id = \support\Jwt\JwtToken::getCurrentId();
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
$list->each(function($item)use($user_id){
|
||||
if(!$user_id){
|
||||
$item->is_read = 0;
|
||||
}else{
|
||||
$item->is_read = cache('article_read_'.$item->id.'_'.$user_id)?:0;
|
||||
}
|
||||
$list = $model->order('id', 'desc')->paginate($limit);
|
||||
|
||||
$user_id = $this->getCurrentUserId();
|
||||
$list->each(function ($item) use ($user_id) {
|
||||
$item->is_read = $user_id ? $this->getReadStatus($item->id, $user_id) : 0;
|
||||
return $item;
|
||||
});
|
||||
return $this->success(__('successful'),$list->toArray());
|
||||
|
||||
|
||||
return $this->success(__('successful'), $list->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* faq
|
||||
* @Apidoc\method("GET")
|
||||
* @Apidoc\Query("page", type="int", require=true, desc="页码",default=1)
|
||||
* @Apidoc\Query("limit", type="int", require=true, desc="分页大小",default=10)
|
||||
* @Apidoc\Query("page", type="int", require=true, desc="页码", default=1)
|
||||
* @Apidoc\Query("limit", type="int", require=true, desc="分页大小", default=10)
|
||||
*/
|
||||
public function faq(){
|
||||
$limit = (int)input('limit',10);
|
||||
$model = ArchivesModel::alias('a')
|
||||
public function faq()
|
||||
{
|
||||
$limit = (int)input('limit', 10);
|
||||
$list = ArchivesModel::alias('a')
|
||||
->join('content c', 'a.id = c.id')
|
||||
->where('a.status','normal')
|
||||
->where('a.type','article')
|
||||
->where('a.category_id',9);
|
||||
$list = $model->Field('a.title,a.id,c.content')->order('a.id','desc')->paginate($limit);
|
||||
return $this->success(__('successful'),$list->toArray());
|
||||
|
||||
->where('a.status', 'normal')
|
||||
->where('a.type', 'article')
|
||||
->where('a.category_id', 9)
|
||||
->field('a.title, a.id, c.content')
|
||||
->order('a.id', 'desc')
|
||||
->paginate($limit);
|
||||
|
||||
return $this->success(__('successful'), $list->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @Apidoc\Method("GET")
|
||||
* @Apidoc\Query("id", type="int", require=true, desc="ID")
|
||||
*/
|
||||
public function detail(){
|
||||
$appid = input('id');
|
||||
/** @var ArchivesModel $vo */
|
||||
$vo = ArchivesModel::where('id',$appid)->find();
|
||||
if($vo) {
|
||||
$addon = \app\model\Content::where('id', $vo->id)->find()->toArray();
|
||||
if ($addon) {
|
||||
$vo->setAddonData($addon);
|
||||
}
|
||||
$user_id=0;
|
||||
try {
|
||||
$user_id = \support\Jwt\JwtToken::getCurrentId();
|
||||
} catch (\Throwable $th) {
|
||||
}
|
||||
if($user_id){
|
||||
cache('article_read_'.$vo->id.'_'.$user_id,1);
|
||||
}
|
||||
return $this->success(__('successful'),$vo->toArray());
|
||||
}else{
|
||||
public function detail()
|
||||
{
|
||||
$id = (int)input('id');
|
||||
if (!$id) {
|
||||
return $this->error(__("Invalid parameter"));
|
||||
}
|
||||
|
||||
$vo = ArchivesModel::where('id', $id)->find();
|
||||
if (!$vo) {
|
||||
return $this->error(__("Article does not exist"));
|
||||
}
|
||||
}
|
||||
|
||||
$this->appendContent($vo);
|
||||
|
||||
$user_id = $this->getCurrentUserId();
|
||||
if ($user_id) {
|
||||
$this->markAsRead($vo->id, $user_id);
|
||||
}
|
||||
|
||||
return $this->success(__('successful'), $vo->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取最新公告
|
||||
* @Apidoc\Method("GET")
|
||||
*/
|
||||
public function last_notie(){
|
||||
/** @var ArchivesModel $vo */
|
||||
$vo = ArchivesModel::where('type','article')->where('status','normal')->order('id','desc')->find();
|
||||
if($vo) {
|
||||
$addon = \app\model\Content::where('id', $vo->id)->find()->toArray();
|
||||
if ($addon) {
|
||||
$vo->setAddonData($addon);
|
||||
}
|
||||
try {
|
||||
$user_id = \support\Jwt\JwtToken::getCurrentId();
|
||||
cache('article_read_'.$vo->id.'_'.$user_id,1);
|
||||
} catch (\Throwable $th) {
|
||||
}
|
||||
return $this->success(__('successful'),$vo->toArray());
|
||||
}else{
|
||||
return $this->success(__("successful"),[]);
|
||||
public function last_notie()
|
||||
{
|
||||
$vo = ArchivesModel::where('type', 'article')
|
||||
->where('status', 'normal')
|
||||
->order('id', 'desc')
|
||||
->find();
|
||||
|
||||
if (!$vo) {
|
||||
return $this->success(__("successful"), []);
|
||||
}
|
||||
}
|
||||
|
||||
$this->appendContent($vo);
|
||||
|
||||
$user_id = $this->getCurrentUserId();
|
||||
if ($user_id) {
|
||||
$this->markAsRead($vo->id, $user_id);
|
||||
}
|
||||
|
||||
return $this->success(__('successful'), $vo->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 单页详情
|
||||
* @Apidoc\Method("GET")
|
||||
* @Apidoc\Query("id", type="int", require=true, desc="ID")
|
||||
* @Apidoc\Query("name", type="string", require=true, desc="二选1")
|
||||
*/
|
||||
public function singpage(){
|
||||
$appid = input('id');
|
||||
public function singpage()
|
||||
{
|
||||
$id = (int)input('id');
|
||||
$name = input('name');
|
||||
/** @var ArchivesModel $vo */
|
||||
if($name){
|
||||
$vo = ArchivesModel::where('name',$name)->find();
|
||||
}else{
|
||||
if($appid){
|
||||
$vo = ArchivesModel::where('id',$appid)->find();
|
||||
}
|
||||
|
||||
$vo = null;
|
||||
if ($name) {
|
||||
$vo = ArchivesModel::where('name', $name)->find();
|
||||
} elseif ($id) {
|
||||
$vo = ArchivesModel::where('id', $id)->find();
|
||||
}
|
||||
if($vo) {
|
||||
$addon = \app\model\Content::where('id', $vo->id)->find()->toArray();
|
||||
if ($addon) {
|
||||
$vo->setAddonData($addon);
|
||||
}
|
||||
return $this->success(__('successful'),$vo->toArray());
|
||||
}else{
|
||||
|
||||
if (!$vo) {
|
||||
return $this->error(__("Article does not exist"));
|
||||
}
|
||||
|
||||
$this->appendContent($vo);
|
||||
|
||||
return $this->success(__('successful'), $vo->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 幻灯片
|
||||
* @Apidoc\Query("id", type="int", require=true, desc="ID")
|
||||
*/
|
||||
public function slide(){
|
||||
public function slide()
|
||||
{
|
||||
$list = [
|
||||
['image'=>domain().'/storage/slide/1.jpg','title'=>''],
|
||||
['image'=>domain().'/storage/slide/2.webp','title'=>''],
|
||||
['image'=>domain().'/storage/slide/3.webp','title'=>''],
|
||||
['image'=>domain().'/storage/slide/4.jpg','title'=>''],
|
||||
['image' => domain() . '/storage/slide/1.jpg', 'title' => ''],
|
||||
['image' => domain() . '/storage/slide/2.webp', 'title' => ''],
|
||||
['image' => domain() . '/storage/slide/3.webp', 'title' => ''],
|
||||
['image' => domain() . '/storage/slide/4.jpg', 'title' => ''],
|
||||
];
|
||||
return $this->success(__('successful'),$list);
|
||||
return $this->success(__('successful'), $list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设为已读
|
||||
* @Apidoc\Query("id", type="int", require=true, desc="ID,多个逗号隔开")
|
||||
*/
|
||||
function mask_as_read(){
|
||||
public function mask_as_read()
|
||||
{
|
||||
$ids = input('id');
|
||||
$user_id = \support\Jwt\JwtToken::getCurrentId();
|
||||
if(!$user_id){
|
||||
$user_id = $this->getCurrentUserId();
|
||||
|
||||
if (!$user_id) {
|
||||
return $this->success(__('successful'));
|
||||
}
|
||||
$ids = explode(',',$ids);
|
||||
|
||||
$ids = array_filter(explode(',', $ids));
|
||||
foreach ($ids as $id) {
|
||||
$key = 'article_read_'.$id.'_'.$user_id;
|
||||
cache($key,1);
|
||||
$this->markAsRead((int)$id, $user_id);
|
||||
}
|
||||
|
||||
return $this->success(__('successful'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户ID
|
||||
*/
|
||||
protected function getCurrentUserId(): int
|
||||
{
|
||||
try {
|
||||
return (int)JwtToken::getCurrentId();
|
||||
} catch (\Throwable $e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取阅读状态
|
||||
*/
|
||||
protected function getReadStatus(int $articleId, int $userId): int
|
||||
{
|
||||
return (int)(cache_get($this->getCacheKey($articleId, $userId)) ?: 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标记为已读
|
||||
*/
|
||||
protected function markAsRead(int $articleId, int $userId = null): void
|
||||
{
|
||||
if (!$articleId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$userId) {
|
||||
$userId = $this->getCurrentUserId();
|
||||
}
|
||||
|
||||
if (!$userId) {
|
||||
return;
|
||||
}
|
||||
|
||||
$cacheKey = $this->getCacheKey($articleId, $userId);
|
||||
if (!cache_get($cacheKey)) {
|
||||
Db::name('archives_read')->insert([
|
||||
'user_id' => $userId,
|
||||
'source_id' => $articleId,
|
||||
'value' => 1
|
||||
]);
|
||||
cache($cacheKey, 1, self::CACHE_TTL);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 追加内容到文章
|
||||
*/
|
||||
protected function appendContent(ArchivesModel $article): void
|
||||
{
|
||||
$content = Content::where('id', $article->id)->find();
|
||||
if ($content) {
|
||||
$article->setAddonData($content->toArray());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成缓存键
|
||||
*/
|
||||
protected function getCacheKey(int $articleId, int $userId): string
|
||||
{
|
||||
return self::CACHE_PREFIX_READ . $articleId . '_' . $userId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ class CommonController extends BaseController{
|
||||
}
|
||||
$username = $email;
|
||||
unset($mobile);
|
||||
captcha_verfiy('email','register',$email,false);
|
||||
captcha_verify('email','register',$email,false);
|
||||
}
|
||||
if ($type == 'mobile') {
|
||||
if(!$mobile || !Validate::regex($mobile, "^1\d{10}$")){
|
||||
@@ -158,7 +158,7 @@ class CommonController extends BaseController{
|
||||
}
|
||||
$username = $mobile;
|
||||
unset($email);
|
||||
captcha_verfiy('mobile','register',$mobile,false);
|
||||
captcha_verify('mobile','register',$mobile,false);
|
||||
}
|
||||
if ($type == 'username') {
|
||||
if(!$username){
|
||||
@@ -226,11 +226,11 @@ class CommonController extends BaseController{
|
||||
}
|
||||
$data = ['userinfo' => $user];
|
||||
// if ($type == 'email') {
|
||||
// captcha_verfiy('email','register',$email,true);
|
||||
// captcha_verify('email','register',$email,true);
|
||||
// }else if ($type == 'mobile') {
|
||||
// captcha_verfiy('mobile','register',$mobile,true);
|
||||
// captcha_verify('mobile','register',$mobile,true);
|
||||
// }else{
|
||||
// captcha_verfiy('image','register',$mobile,true);
|
||||
// captcha_verify('image','register',$mobile,true);
|
||||
// }
|
||||
return $this->success(__('Sign up successful'), $data);
|
||||
} catch (\Exception $e) {
|
||||
@@ -326,16 +326,16 @@ class CommonController extends BaseController{
|
||||
$user = false;
|
||||
}
|
||||
if($user){
|
||||
captcha_verfiy('mobile','reset_pwd',$user->mobile);
|
||||
captcha_verify('mobile','reset_pwd',$user->mobile);
|
||||
}
|
||||
}else{
|
||||
if ($mobile && Validate::regex($mobile, "^1\d{10}$")) {
|
||||
captcha_verfiy('mobile','reset_pwd',$mobile);
|
||||
captcha_verify('mobile','reset_pwd',$mobile);
|
||||
$region = Input('region');
|
||||
$region = str_replace('+','',$region);
|
||||
$user = UserModel::where('region',$region)->where('mobile',$mobile)->find();
|
||||
}else if ($email && Validate::is($email, "email")) {
|
||||
captcha_verfiy('email','reset_pwd',$email);
|
||||
captcha_verify('email','reset_pwd',$email);
|
||||
$user = UserModel::getByEmail($email);
|
||||
}
|
||||
}
|
||||
@@ -385,19 +385,19 @@ class CommonController extends BaseController{
|
||||
if($user){
|
||||
|
||||
if($verify_type == 'email'){
|
||||
captcha_verfiy('email','reset_trade_pwd',$user->email);
|
||||
captcha_verify('email','reset_trade_pwd',$user->email);
|
||||
}else if($verify_type == 'mobile'){
|
||||
captcha_verfiy('mobile','reset_trade_pwd',$user->mobile);
|
||||
captcha_verify('mobile','reset_trade_pwd',$user->mobile);
|
||||
}else{
|
||||
return $this->error(__('Unknown verify type'));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if ($mobile && Validate::regex($mobile, "^1\d{10}$")) {
|
||||
captcha_verfiy('mobile','reset_trade_pwd',$mobile);
|
||||
captcha_verify('mobile','reset_trade_pwd',$mobile);
|
||||
$user = UserModel::getByMobile($mobile);
|
||||
}elseif ($email && Validate::is($email, "email")) {
|
||||
captcha_verfiy('email','reset_trade_pwd',$email);
|
||||
captcha_verify('email','reset_trade_pwd',$email);
|
||||
$user = UserModel::getByEmail($email);
|
||||
}
|
||||
}
|
||||
@@ -534,11 +534,11 @@ class CommonController extends BaseController{
|
||||
$event = $request->post('event');
|
||||
try {
|
||||
if($type == 'email'){
|
||||
$result = captcha_verfiy('email', $event , $email,false);
|
||||
$result = captcha_verify('email', $event , $email,false);
|
||||
}elseif($type == 'mobile'){
|
||||
$result = captcha_verfiy('mobile', $event , $mobile,false);
|
||||
$result = captcha_verify('mobile', $event , $mobile,false);
|
||||
}else{
|
||||
$result = captcha_verfiy('image', $event , '',false);
|
||||
$result = captcha_verify('image', $event , '',false);
|
||||
}
|
||||
if(!$result){
|
||||
return $this->fail(__('Captcha is incorrect'));
|
||||
|
||||
@@ -29,9 +29,9 @@ class PassportController extends BaseController{
|
||||
$user = \support\Jwt::getUser();
|
||||
$verify_type = input('verify_type');
|
||||
if($verify_type=='mobile'){
|
||||
captcha_verfiy('mobile', 'verify', $user->mobile);
|
||||
captcha_verify('mobile', 'verify', $user->mobile);
|
||||
}else if($verify_type == 'email'){
|
||||
captcha_verfiy('email', 'verify', $user->email);
|
||||
captcha_verify('email', 'verify', $user->email);
|
||||
}else{
|
||||
return $this->error(__('Invalid verify type'));
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class PassportController extends BaseController{
|
||||
}
|
||||
|
||||
// 验证验证码
|
||||
captcha_verfiy('mobile', 'bind_mobile', $mobile);
|
||||
captcha_verify('mobile', 'bind_mobile', $mobile);
|
||||
|
||||
// 更新用户信息
|
||||
$user->mobile = $mobile;
|
||||
@@ -91,7 +91,7 @@ class PassportController extends BaseController{
|
||||
if (UserModel::where('email', $email)->where('id', '<>', $user->id)->find()) {
|
||||
return $this->error(__('Email already exists'));
|
||||
}
|
||||
captcha_verfiy('email', 'bind_email', $email);
|
||||
captcha_verify('email', 'bind_email', $email);
|
||||
|
||||
|
||||
// 更新用户信息
|
||||
@@ -126,9 +126,9 @@ class PassportController extends BaseController{
|
||||
}
|
||||
|
||||
if($verify_type == 'mobile'){
|
||||
captcha_verfiy('mobile', 'bind_username', $user->mobile);
|
||||
captcha_verify('mobile', 'bind_username', $user->mobile);
|
||||
}else if($verify_type == 'email'){
|
||||
captcha_verfiy('email', 'bind_username', $user->email);
|
||||
captcha_verify('email', 'bind_username', $user->email);
|
||||
}
|
||||
|
||||
// 更新用户信息
|
||||
@@ -152,7 +152,7 @@ class PassportController extends BaseController{
|
||||
}
|
||||
|
||||
// 验证验证码
|
||||
captcha_verfiy('mobile', 'unbind_mobile', $user->mobile);
|
||||
captcha_verify('mobile', 'unbind_mobile', $user->mobile);
|
||||
|
||||
// 更新用户信息
|
||||
$user->mobile = '';
|
||||
@@ -176,7 +176,7 @@ class PassportController extends BaseController{
|
||||
}
|
||||
|
||||
// 验证验证码
|
||||
captcha_verfiy('email', 'unbind_email', $user->email);
|
||||
captcha_verify('email', 'unbind_email', $user->email);
|
||||
|
||||
// 更新用户信息
|
||||
$user->email = '';
|
||||
|
||||
@@ -108,7 +108,7 @@ class UserController extends BaseController{
|
||||
return $this->error(__('Invalid parameters'));
|
||||
}
|
||||
if($verify_type == 'email'){
|
||||
captcha_verfiy('email','reset_trade_pwd',$user->email);
|
||||
captcha_verify('email','reset_trade_pwd',$user->email);
|
||||
try{
|
||||
\support\Jwt::change_trade_pwd($newpassword,'',true);
|
||||
return $this->success(__('Reset trade password successful'));
|
||||
@@ -116,7 +116,7 @@ class UserController extends BaseController{
|
||||
return $this->error($e->getMessage());
|
||||
}
|
||||
}else if($verify_type == 'mobile'){
|
||||
captcha_verfiy('mobile','reset_trade_pwd',$user->mobile);
|
||||
captcha_verify('mobile','reset_trade_pwd',$user->mobile);
|
||||
try{
|
||||
\support\Jwt::change_trade_pwd($newpassword,'',true);
|
||||
return $this->success(__('Reset trade password successful'));
|
||||
|
||||
@@ -34,7 +34,7 @@ class WalletController extends BaseController{
|
||||
//return $this->error(__('The system is under maintenance, please wait...'));
|
||||
$user = \support\Jwt\JwtToken::getUser();
|
||||
// if(Config('site.trade_password_type') == 'email'){
|
||||
// captcha_verfiy('email','exchange',$user['username']);
|
||||
// captcha_verify('email','exchange',$user['username']);
|
||||
// }else{
|
||||
// $trade_password = input('trade_password');
|
||||
// \support\Jwt::verify_trade_password($trade_password);
|
||||
@@ -95,7 +95,7 @@ class WalletController extends BaseController{
|
||||
return $this->error(__('User is incorrect'));
|
||||
}
|
||||
if(Config('site.trade_password_type') == 'email'){
|
||||
//captcha_verfiy('email','transfer',$to_user['username']);
|
||||
//captcha_verify('email','transfer',$to_user['username']);
|
||||
}else{
|
||||
$trade_password = input('trade_password');
|
||||
\support\Jwt::verify_trade_password($trade_password);
|
||||
@@ -150,7 +150,7 @@ class WalletController extends BaseController{
|
||||
//return $this->error(__('The system is under maintenance, please wait...'));
|
||||
$user = \support\Jwt\JwtToken::getUser();
|
||||
// if(Config('site.trade_password_type') == 'email'){
|
||||
// captcha_verfiy('email','exchange',$user['username']);
|
||||
// captcha_verify('email','exchange',$user['username']);
|
||||
// }else{
|
||||
// $trade_password = input('trade_password');
|
||||
// \support\Jwt::verify_trade_password($trade_password);
|
||||
|
||||
@@ -70,7 +70,7 @@ class WithdrawlController extends BaseController{
|
||||
{
|
||||
//return $this->error(__('The system is under maintenance, please wait...'));
|
||||
//* @Apidoc\Param("code", type="string", require=true, desc="图形验证码(type=withdrawl)")
|
||||
//captcha_verfiy('image','withdrawl');
|
||||
//captcha_verify('image','withdrawl');
|
||||
$address_id = input('address_id');
|
||||
if(!$address_id){
|
||||
return $this->error(__('Address is incorrect'));
|
||||
@@ -85,7 +85,7 @@ class WithdrawlController extends BaseController{
|
||||
// }
|
||||
$user = \support\Jwt::getUser();
|
||||
if(Config('site.trade_password_type') == 'email'){
|
||||
captcha_verfiy('email','withdrawl',$user['username']);
|
||||
captcha_verify('email','withdrawl',$user['username']);
|
||||
}else{
|
||||
//验证交易密码
|
||||
$trade_password = input('trade_password');
|
||||
|
||||
Reference in New Issue
Block a user