no message

This commit is contained in:
kuaifan 2021-07-01 12:54:52 +08:00
parent 9aabf541cd
commit e91f86a5da
8 changed files with 58 additions and 8 deletions

View File

@ -369,7 +369,7 @@ class UsersController extends AbstractController
$array[] = $userid;
}
if (count($array) > 50) {
return Base::retError(['一次最多只能获取%条数据', 50]);
return Base::retError('一次最多只能获取50条数据');
}
$retArray = [];
foreach ($array AS $id) {

View File

@ -61,4 +61,52 @@ class IndexController extends InvokeController
return "success";
}
/**
* 提取所有中文
* @return array|string
*/
public function allcn()
{
if (!Base::is_internal_ip()) {
// 限制内网访问
return "Forbidden Access";
}
$list = Base::readDir(resource_path());
$array = [];
foreach ($list as $item) {
$content = file_get_contents($item);
preg_match_all("/\\\$L\((.*?)\)/", $content, $matchs);
if ($matchs) {
foreach ($matchs[1] as $text) {
$array[trim(trim($text, '"'), "'")] = trim(trim($text, '"'), "'");
}
}
}
return array_values($array);
}
/**
* 提取所有中文
* @return array|string
*/
public function allcn__php()
{
if (!Base::is_internal_ip()) {
// 限制内网访问
return "Forbidden Access";
}
$list = Base::readDir(app_path());
$array = [];
foreach ($list as $item) {
$content = file_get_contents($item);
preg_match_all("/(retSuccess|retError|ApiException)\((.*?)[,|)]/", $content, $matchs);
if ($matchs) {
foreach ($matchs[2] as $text) {
$array[trim(trim($text, '"'), "'")] = trim(trim($text, '"'), "'");
}
}
}
return array_values($array);
}
}

View File

@ -2243,12 +2243,12 @@ class Base
}
$extension = strtolower($file->getClientOriginalExtension());
if ($type && is_array($type) && !in_array($extension, $type)) {
return Base::retError(['文件格式错误,限制类型:%', implode(",", $type)]);
return Base::retError('文件格式错误,限制类型:' . implode(",", $type));
}
try {
$fileSize = $file->getSize();
if ($param['size'] > 0 && $fileSize > $param['size'] * 1024) {
return Base::retError(['文件大小超限,最大限制:%KB', $param['size']]);
return Base::retError('文件大小超限,最大限制:' . $param['size'] . 'KB');
}
} catch (Exception $e) {
$fileSize = 0;

View File

@ -1,6 +1,6 @@
{
"name": "DooTask",
"version": "0.2.31",
"version": "0.2.32",
"description": "DooTask is task management system.",
"scripts": {
"dev": "npm run development",
@ -23,6 +23,7 @@
"jquery": "^3.5.1",
"jspdf": "^2.3.1",
"laravel-mix": "^6.0.6",
"less-loader": "^10.0.0",
"lodash": "^4.17.19",
"moment": "^2.29.1",
"nativefier": "^44.0.4",
@ -30,7 +31,7 @@
"postcss": "^8.1.14",
"resolve-url-loader": "^4.0.0",
"sass": "^1.34.1",
"sass-loader": "^7.1.0",
"sass-loader": "^8.0.2",
"stylus": "^0.54.8",
"stylus-loader": "^3.0.2",
"vue": "^2.6.12",

View File

@ -260,7 +260,7 @@
//
$A.noticeWarning({
title: this.$L('超出文件大小限制'),
desc: this.$L('文件 ' + file.name + ' 太大,不能超过' + $A.bytesToSize(this.maxSize * 1024))
desc: this.$L('文件 ' + file.name + ' 太大,不能超过' + $A.bytesToSize(this.maxSize * 1024))
});
},
handleBeforeUpload () {

View File

@ -288,7 +288,7 @@
//
$A.modalWarning({
title: '超出文件大小限制',
content: '文件 ' + file.name + ' 太大,不能超过' + $A.bytesToSize(this.maxSize * 1024) + '。'
content: '文件 ' + file.name + ' 太大,不能超过' + $A.bytesToSize(this.maxSize * 1024) + '。'
});
},

View File

@ -3,7 +3,7 @@
<Form ref="formDatum" :model="formDatum" :rules="ruleDatum" label-width="auto" @submit.native.prevent>
<FormItem :label="$L('头像')" prop="userimg">
<ImgUpload v-model="formDatum.userimg" :num="1"></ImgUpload>
<span class="form-tip">{{$L('建议尺寸:%', '200x200')}}</span>
<span class="form-tip">{{$L('建议尺寸:200x200')}}</span>
</FormItem>
<FormItem :label="$L('邮箱')">
<Input v-model="userInfo.email" disabled></Input>

View File

@ -323,6 +323,7 @@
line-height: 1.5;
white-space: pre-wrap;
word-wrap: break-word;
word-break: break-word;
}
}
.task-menu {