mirror of https://gitee.com/karson/fastadmin.git
parent
4bb4425d45
commit
e14008ca02
|
|
@ -9,6 +9,7 @@ use think\Cache;
|
||||||
use think\Config;
|
use think\Config;
|
||||||
use think\Db;
|
use think\Db;
|
||||||
use think\Lang;
|
use think\Lang;
|
||||||
|
use think\Validate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ajax异步请求接口
|
* Ajax异步请求接口
|
||||||
|
|
@ -155,6 +156,9 @@ class Ajax extends Backend
|
||||||
$field = $this->request->post("field");
|
$field = $this->request->post("field");
|
||||||
//操作的数据表
|
//操作的数据表
|
||||||
$table = $this->request->post("table");
|
$table = $this->request->post("table");
|
||||||
|
if (!Validate::is($table, "alphaDash")) {
|
||||||
|
$this->error();
|
||||||
|
}
|
||||||
//主键
|
//主键
|
||||||
$pk = $this->request->post("pk");
|
$pk = $this->request->post("pk");
|
||||||
//排序的方式
|
//排序的方式
|
||||||
|
|
@ -214,16 +218,19 @@ class Ajax extends Backend
|
||||||
case 'content':
|
case 'content':
|
||||||
rmdirs(CACHE_PATH, false);
|
rmdirs(CACHE_PATH, false);
|
||||||
Cache::clear();
|
Cache::clear();
|
||||||
if ($type == 'content')
|
if ($type == 'content') {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 'template':
|
case 'template':
|
||||||
rmdirs(TEMP_PATH, false);
|
rmdirs(TEMP_PATH, false);
|
||||||
if ($type == 'template')
|
if ($type == 'template') {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 'addons':
|
case 'addons':
|
||||||
Service::refresh();
|
Service::refresh();
|
||||||
if ($type == 'addons')
|
if ($type == 'addons') {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
\think\Hook::listen("wipecache_after");
|
\think\Hook::listen("wipecache_after");
|
||||||
|
|
|
||||||
|
|
@ -451,6 +451,7 @@ class Backend extends Controller
|
||||||
//如果有primaryvalue,说明当前是初始化传值
|
//如果有primaryvalue,说明当前是初始化传值
|
||||||
if ($primaryvalue !== null) {
|
if ($primaryvalue !== null) {
|
||||||
$where = [$primarykey => ['in', $primaryvalue]];
|
$where = [$primarykey => ['in', $primaryvalue]];
|
||||||
|
$pagesize = null;
|
||||||
} else {
|
} else {
|
||||||
$where = function ($query) use ($word, $andor, $field, $searchfield, $custom) {
|
$where = function ($query) use ($word, $andor, $field, $searchfield, $custom) {
|
||||||
$logic = $andor == 'AND' ? '&' : '|';
|
$logic = $andor == 'AND' ? '&' : '|';
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ class User extends Frontend
|
||||||
if ($captchaType == 'mobile') {
|
if ($captchaType == 'mobile') {
|
||||||
$captchaResult = Sms::check($mobile, $captcha, 'register');
|
$captchaResult = Sms::check($mobile, $captcha, 'register');
|
||||||
} elseif ($captchaType == 'email') {
|
} elseif ($captchaType == 'email') {
|
||||||
$captchaResult = Ems::check($mobile, $captcha, 'register');
|
$captchaResult = Ems::check($email, $captcha, 'register');
|
||||||
} elseif ($captchaType == 'wechat') {
|
} elseif ($captchaType == 'wechat') {
|
||||||
$captchaResult = WechatCaptcha::check($captcha, 'register');
|
$captchaResult = WechatCaptcha::check($captcha, 'register');
|
||||||
} elseif ($captchaType == 'text') {
|
} elseif ($captchaType == 'text') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue