修复搜索环境变量urlencode

This commit is contained in:
whyour
2021-12-05 23:04:26 +08:00
parent a9f8b23a7a
commit b773def012
12 changed files with 53 additions and 10 deletions
+3 -1
View File
@@ -159,7 +159,9 @@ export default class CronService {
public async crontabs(searchText?: string): Promise<Crontab[]> {
let query = {};
if (searchText) {
const reg = new RegExp(searchText, 'i');
const encodeText = encodeURIComponent(searchText);
const reg = new RegExp(`${searchText}|${encodeText}`, 'i');
query = {
$or: [
{
+3 -1
View File
@@ -113,7 +113,9 @@ export default class EnvService {
): Promise<Env[]> {
let condition = { ...query };
if (searchText) {
const reg = new RegExp(searchText);
const encodeText = encodeURIComponent(searchText);
const reg = new RegExp(`${searchText}|${encodeText}`, 'i');
condition = {
$or: [
{
+3 -1
View File
@@ -97,7 +97,9 @@ export default class OpenService {
): Promise<App[]> {
let condition = { ...query };
if (searchText) {
const reg = new RegExp(searchText);
const encodeText = encodeURIComponent(searchText);
const reg = new RegExp(`${searchText}|${encodeText}`, 'i');
condition = {
$or: [
{