mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 01:39:52 +08:00
修复搜索环境变量urlencode
This commit is contained in:
1 parent
0318f03283
commit
dfb159c4ad
12 files changed
+53
-10
No files matched your search
@@ -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: [
|
||||
{
|
||||
|
||||
@@ -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: [
|
||||
{
|
||||
|
||||
@@ -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: [
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user