Merge branch 'develop' of gitee.com:karson/fastadmin into develop

# Conflicts:
#	composer.json
pull/423/MERGE
Karson 2023-06-09 14:50:14 +08:00
commit 563596fddc
5 changed files with 36 additions and 5 deletions

View File

@ -0,0 +1,22 @@
### 类型
类型(问题/建议/其他):?
### 现象
现象(请详细描述一下复现过程):?
### 期望结果
期望结果(请详细描述一下你说期望的结果):?
### 环境
(请详细说明一下你的运行环境)
- 操作系统Linux/Windows/Other
- Web ServerNGINX/Apache/Other
- PHP 版本7.2/7.3/7.4/8.0/8.1/8.2/Other
- MySQL 版本(5.6/5.7/8.0/Other)
- 服务器面板BT/phpStudy/XAMPP/其他/无):?
- FastAdmin 版本:?
- 浏览器Chrome/IE/Edge/其他):?
- 报错信息:?

View File

@ -957,6 +957,11 @@ class Crud extends Command
$attrArr['size'] = 50;
}
//字段默认值判断
if ('NULL' == $defaultValue || "''" == $defaultValue) {
$defaultValue = '';
}
$formAddElement = Form::input($inputType, $fieldName, $defaultValue, $attrArr);
$formEditElement = Form::input($inputType, $fieldName, $editValue, $attrArr);
if ($search && $replace) {

View File

@ -298,7 +298,7 @@ class User extends Api
*/
public function resetpwd()
{
$type = $this->request->post("type");
$type = $this->request->post("type", "mobile");
$mobile = $this->request->post("mobile");
$email = $this->request->post("email");
$newpassword = $this->request->post("newpassword");

View File

@ -284,7 +284,7 @@ class Backend extends Controller
$bind = [];
$name = '';
$aliasName = '';
if (!empty($this->model) && $this->relationSearch) {
if (!empty($this->model) && $relationSearch) {
$name = $this->model->getTable();
$alias[$name] = Loader::parseName(basename(str_replace('\\', '/', get_class($this->model))));
$aliasName = $alias[$name] . '.';

View File

@ -194,10 +194,14 @@ class Date
$time = $position ? $_timestamp : mktime(23, 59, 59, $month + $offset, self::days_in_month(date("m", $_timestamp), date("Y", $_timestamp)), $year);
break;
case 'quarter':
$_month = date("m", mktime(0, 0, 0, (ceil(date('n', mktime(0, 0, 0, $month, $day, $year)) / 3) + $offset) * 3, $day, $year));
$quarter = ceil(date('n', $baseTime) / 3) + $offset;
$month = $quarter * 3;
$offset_year = ceil($month/12) - 1;
$year = $year + $offset_year;
$month = $month - ($offset_year * 12);
$time = $position ?
mktime(0, 0, 0, 1 + ((ceil(date('n', $baseTime) / 3) + $offset) - 1) * 3, 1, $year) :
mktime(23, 59, 59, (ceil(date('n', $baseTime) / 3) + $offset) * 3, self::days_in_month((ceil(date('n', $baseTime) / 3) + $offset) * 3, $year), $year);
mktime(0, 0, 0, $month-2, 1, $year) :
mktime(23, 59, 59, $month, self::days_in_month($month, $year), $year);
break;
case 'year':
$time = $position ? mktime(0, 0, 0, 1, 1, $year + $offset) : mktime(23, 59, 59, 12, 31, $year + $offset);