Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
quantum-blocks
Commits
780a1732
Commit
780a1732
authored
Jul 20, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 处理导航页面因上移下移导致index错误的问题
parent
de90b987
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
7 deletions
+38
-7
dev.config.ts
app/web/config/dev.config.ts
+6
-6
addOrEditNavigator.vue
...e/editor/view/navigator/components/addOrEditNavigator.vue
+31
-0
package.json
package.json
+1
-1
No files found.
app/web/config/dev.config.ts
View file @
780a1732
...
@@ -3,15 +3,15 @@ const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'http';
...
@@ -3,15 +3,15 @@ const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'http';
const
hostMap
=
{
const
hostMap
=
{
apiHost
:
`http://localhost:7002/`
,
apiHost
:
`http://localhost:7002/`
,
// apiHost: `http://192.168.28.199:7001/`,
// apiHost: `http://192.168.28.199:7001/`,
// apiHost: 'https://quantum-blocks-
test1
.liangkebang.net/',
// apiHost: 'https://quantum-blocks-
yxm
.liangkebang.net/',
h5Host
:
'
https://quantum-h5-
test1
.liangkebang.net
'
,
h5Host
:
'
https://quantum-h5-
yxm
.liangkebang.net
'
,
qiniuHost
:
`https://appsync.lkbang.net`
,
qiniuHost
:
`https://appsync.lkbang.net`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
opapiHost
:
`https://opapi-
test1
.liangkebang.net`
,
opapiHost
:
`https://opapi-
yxm
.liangkebang.net`
,
qiniuUpHost
:
`
${
protocol
}
//up-z0.qiniup.com`
,
qiniuUpHost
:
`
${
protocol
}
//up-z0.qiniup.com`
,
// kdspHost: 'https://kdsp-api-
test1
.liangkebang.net',
// kdspHost: 'https://kdsp-api-
yxm
.liangkebang.net',
talosHost
:
'
https://talos-
test1
.liangkebang.net
'
,
talosHost
:
'
https://talos-
yxm
.liangkebang.net
'
,
kdspHost
:
'
https://kdsp-api-
test1
.liangkebang.net
'
,
kdspHost
:
'
https://kdsp-api-
yxm
.liangkebang.net
'
,
yxmTenantId
:
560761
,
yxmTenantId
:
560761
,
appIdMap
:
{
appIdMap
:
{
560761
:
'
wxe16bf9293671506c
'
,
560761
:
'
wxe16bf9293671506c
'
,
...
...
app/web/page/editor/view/navigator/components/addOrEditNavigator.vue
View file @
780a1732
...
@@ -130,6 +130,28 @@ import featurePageTable from './featurePageTable.vue';
...
@@ -130,6 +130,28 @@ import featurePageTable from './featurePageTable.vue';
import
activityPageTable
from
'
./activityPageTable.vue
'
;
import
activityPageTable
from
'
./activityPageTable.vue
'
;
import
navigatorPageTable
from
'
./navigatorPageTable.vue
'
;
import
navigatorPageTable
from
'
./navigatorPageTable.vue
'
;
import
navigatorApi
from
'
@api/navigator.api
'
import
navigatorApi
from
'
@api/navigator.api
'
// 添加或修改url中的参数
function
addOrEditUrlParams
(
url
,
paramName
,
replaceWith
)
{
if
(
url
.
indexOf
(
paramName
)
>
-
1
)
{
// let re = /(' + paramName + '=)([^&]*)/gi;
// url = url.replace(re, paramName + '=' + replaceWith);
const
re
=
new
RegExp
(
paramName
+
'
=[^&]*
'
,
'
gi
'
)
url
=
url
.
replace
(
re
,
paramName
+
'
=
'
+
replaceWith
)
}
else
{
let
paraStr
=
paramName
+
'
=
'
+
replaceWith
;
let
idx
=
url
.
indexOf
(
'
?
'
);
if
(
idx
<
0
)
{
url
+=
'
?
'
;
}
else
if
(
idx
>=
0
&&
idx
!==
url
.
length
-
1
)
{
url
+=
'
&
'
;
}
url
=
url
+
paraStr
;
}
return
url
;
};
export
default
{
export
default
{
components
:
{
components
:
{
uploader
,
uploader
,
...
@@ -346,6 +368,15 @@ export default {
...
@@ -346,6 +368,15 @@ export default {
const
arr
=
this
.
navigatorData
.
concat
([]);
const
arr
=
this
.
navigatorData
.
concat
([]);
const
targetIndex
=
type
===
1
?
index
-
1
:
index
+
1
;
const
targetIndex
=
type
===
1
?
index
-
1
:
index
+
1
;
arr
[
index
]
=
arr
.
splice
(
targetIndex
,
1
,
arr
[
index
])[
0
];
arr
[
index
]
=
arr
.
splice
(
targetIndex
,
1
,
arr
[
index
])[
0
];
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
arr
[
i
].
pageType
==
2
)
{
console
.
log
(
i
);
// 活动页面的时候,因上下移动需要重新给index排序
arr
[
i
].
pageUrl
=
addOrEditUrlParams
(
arr
[
i
].
pageUrl
,
'
index
'
,
i
)
console
.
log
(
arr
[
i
].
pageUrl
,
i
)
}
}
console
.
log
(
arr
);
this
.
navigatorData
=
arr
;
this
.
navigatorData
=
arr
;
}
}
},
},
...
...
package.json
View file @
780a1732
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
"test"
:
"cross-env NODE_ENV=production EGG_SERVER_ENV=sit egg-scripts start --port 80 --workers 1"
,
"test"
:
"cross-env NODE_ENV=production EGG_SERVER_ENV=sit egg-scripts start --port 80 --workers 1"
,
"stop"
:
"egg-scripts stop"
,
"stop"
:
"egg-scripts stop"
,
"backend"
:
"nohup egg-scripts start --port 7001 --workers 4"
,
"backend"
:
"nohup egg-scripts start --port 7001 --workers 4"
,
"dev"
:
"cross-env NODE_ENV=test APOLLO_CLUSTER=k8s NAMESPACE=
test1
npm run apollo && egg-bin dev -r egg-ts-helper/register --port 7002"
,
"dev"
:
"cross-env NODE_ENV=test APOLLO_CLUSTER=k8s NAMESPACE=
yxm
npm run apollo && egg-bin dev -r egg-ts-helper/register --port 7002"
,
"debug"
:
"egg-bin debug -r egg-ts-helper/register"
,
"debug"
:
"egg-bin debug -r egg-ts-helper/register"
,
"apollo"
:
"node bin/apollo.js"
,
"apollo"
:
"node bin/apollo.js"
,
"build"
:
"npm run tsc && cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool"
,
"build"
:
"npm run tsc && cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment