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
7009c27b
Commit
7009c27b
authored
Jan 25, 2022
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(pagedata): 保存时移除
parent
df48e092
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
24 deletions
+14
-24
dev.config.ts
app/web/config/dev.config.ts
+5
-5
index.ts
app/web/page/editor/view/dashboard/index.ts
+5
-2
index.ts
app/web/page/store/modules/editor/index.ts
+0
-13
scheme.ts
app/web/page/store/modules/editor/scheme.ts
+1
-1
package-lock.json
package-lock.json
+3
-3
No files found.
app/web/config/dev.config.ts
View file @
7009c27b
...
@@ -3,14 +3,14 @@ const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'http';
...
@@ -3,14 +3,14 @@ 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-
vcc2
.liangkebang.net/',
// apiHost: 'https://quantum-blocks-
test1
.liangkebang.net/',
h5Host
:
'
https://quantum-h5-
vcc2
.liangkebang.net
'
,
h5Host
:
'
https://quantum-h5-
test1
.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-
vcc2
.liangkebang.net`
,
opapiHost
:
`https://opapi-
test1
.liangkebang.net`
,
qiniuUpHost
:
`
${
protocol
}
//up-z0.qiniup.com`
,
qiniuUpHost
:
`
${
protocol
}
//up-z0.qiniup.com`
,
// kdspHost: 'https://kdsp-api-
vcc2
.liangkebang.net',
// kdspHost: 'https://kdsp-api-
test1
.liangkebang.net',
kdspHost
:
'
https://talos-
vcc2
.liangkebang.net
'
,
kdspHost
:
'
https://talos-
test1
.liangkebang.net
'
,
yxmTenantId
:
560761
,
yxmTenantId
:
560761
,
appIdMap
:
{
appIdMap
:
{
560761
:
'
wxe16bf9293671506c
'
,
560761
:
'
wxe16bf9293671506c
'
,
...
...
app/web/page/editor/view/dashboard/index.ts
View file @
7009c27b
...
@@ -16,7 +16,7 @@ import EventBus from '@service/eventBus.service';
...
@@ -16,7 +16,7 @@ import EventBus from '@service/eventBus.service';
import
{
getStyle
}
from
'
@service/utils.service
'
;
import
{
getStyle
}
from
'
@service/utils.service
'
;
import
OperationPanel
from
'
@editor/component/OperationPanel/index.vue
'
;
import
OperationPanel
from
'
@editor/component/OperationPanel/index.vue
'
;
import
type
{
PageInfo
,
Page
,
GridLayout
}
from
'
../../../store/modules/editor/state
'
;
import
type
{
PageInfo
,
Page
,
GridLayout
}
from
'
../../../store/modules/editor/state
'
;
import
{
pickAllScheme
}
from
'
../../../store/modules/editor/scheme
'
;
import
{
pickAllScheme
,
separateAllScheme
}
from
'
../../../store/modules/editor/scheme
'
;
@
Component
({
components
:
{
GridLayout
:
VueGridLayout
.
GridLayout
,
@
Component
({
components
:
{
GridLayout
:
VueGridLayout
.
GridLayout
,
GridItem
:
VueGridLayout
.
GridItem
,
BasicPageFormModal
,
RecordModal
,
MaterialMenu
,
DynamicFormTabs
,
OperationPanel
},
name
:
'
DashBoard
'
})
GridItem
:
VueGridLayout
.
GridItem
,
BasicPageFormModal
,
RecordModal
,
MaterialMenu
,
DynamicFormTabs
,
OperationPanel
},
name
:
'
DashBoard
'
})
...
@@ -94,7 +94,10 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
...
@@ -94,7 +94,10 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
pageData
.
props
.
diversion
=
diversion
;
pageData
.
props
.
diversion
=
diversion
;
pageData
.
props
.
shareCoverImage
=
shareCoverImage
;
pageData
.
props
.
shareCoverImage
=
shareCoverImage
;
pageData
.
props
.
shareOpenMethod
=
shareOpenMethod
;
pageData
.
props
.
shareOpenMethod
=
shareOpenMethod
;
pageData
.
scheme
=
pickAllScheme
(
pageData
.
elements
);
// pageData.scheme = pickAllScheme(pageData.elements);
// 移除页面中的sacheme
delete
pageData
.
scheme
;
separateAllScheme
(
pageData
.
elements
);
const
pageInfo
=
{
diversion
,
page
:
JSON
.
stringify
(
pageData
),
author
:
user
?.
account
,
isPublish
,
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isTemplate
,
shareCoverImage
,
shareOpenMethod
}
as
pageInfo
;
const
pageInfo
=
{
diversion
,
page
:
JSON
.
stringify
(
pageData
),
author
:
user
?.
account
,
isPublish
,
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isTemplate
,
shareCoverImage
,
shareOpenMethod
}
as
pageInfo
;
if
(
this
.
uuid
)
{
pageInfo
.
uuid
=
this
.
uuid
;
}
if
(
this
.
uuid
)
{
pageInfo
.
uuid
=
this
.
uuid
;
}
await
this
.
savePageData
({
pageInfo
,
pageData
:
this
.
pageData
});
await
this
.
savePageData
({
pageInfo
,
pageData
:
this
.
pageData
});
...
...
app/web/page/store/modules/editor/index.ts
View file @
7009c27b
...
@@ -21,7 +21,6 @@ import {
...
@@ -21,7 +21,6 @@ import {
import
{
v4
as
uuid
}
from
'
uuid
'
;
import
{
v4
as
uuid
}
from
'
uuid
'
;
import
RootState
from
'
../../state
'
;
import
RootState
from
'
../../state
'
;
import
EditorState
,
{
PageInfo
,
defaultState
,
Page
,
PageElement
}
from
'
./state
'
;
import
EditorState
,
{
PageInfo
,
defaultState
,
Page
,
PageElement
}
from
'
./state
'
;
import
{
separateAllScheme
,
pickAllScheme
}
from
'
./scheme
'
;
export
default
class
EditorModule
implements
Module
<
EditorState
,
RootState
>
{
export
default
class
EditorModule
implements
Module
<
EditorState
,
RootState
>
{
state
:
EditorState
;
state
:
EditorState
;
...
@@ -60,22 +59,10 @@ export default class EditorModule implements Module<EditorState, RootState> {
...
@@ -60,22 +59,10 @@ export default class EditorModule implements Module<EditorState, RootState> {
const
res
=
await
api
.
getPageById
(
condition
);
const
res
=
await
api
.
getPageById
(
condition
);
const
{
page
,
...
rest
}
=
res
as
PageInfo
;
const
{
page
,
...
rest
}
=
res
as
PageInfo
;
const
pageObj
=
JSON
.
parse
(
page
as
string
);
const
pageObj
=
JSON
.
parse
(
page
as
string
);
pickAllScheme
(
pageObj
.
elements
);
// separateAllScheme(pageObj.elements);
commit
(
SET_PAGE_INFO
,
{
...
rest
,
page
:
pageObj
});
commit
(
SET_PAGE_INFO
,
{
...
rest
,
page
:
pageObj
});
const
goodsTabs
=
{};
const
goodsTabs
=
{};
(
pageObj
as
Page
).
elements
.
forEach
((
element
,
idx
)
=>
{
(
pageObj
as
Page
).
elements
.
forEach
((
element
,
idx
)
=>
{
if
(
element
.
schame
)
{
delete
element
.
schame
;
}
if
(
element
?.
child
?.
length
)
{
element
.
child
.
forEach
(
childEle
=>
{
if
(
childEle
.
schame
)
{
delete
childEle
.
schame
;
}
});
}
if
(
element
.
name
===
'
cs-goods-tabs
'
&&
element
?.
child
?.
length
)
{
if
(
element
.
name
===
'
cs-goods-tabs
'
&&
element
?.
child
?.
length
)
{
goodsTabs
[
idx
]
=
cloneDeep
(
element
.
child
);
goodsTabs
[
idx
]
=
cloneDeep
(
element
.
child
);
// 逆向循环
// 逆向循环
...
...
app/web/page/store/modules/editor/scheme.ts
View file @
7009c27b
import
{
basicComponents
,
businessComponents
}
from
'
@lib/config
'
;
import
{
basicComponents
,
businessComponents
}
from
'
@lib/config
'
;
// 获取scheme
// 获取
所有
scheme
export
function
getAllScheme
()
{
export
function
getAllScheme
()
{
let
businessComponentsMap
=
[];
let
businessComponentsMap
=
[];
businessComponents
.
forEach
(
item
=>
{
businessComponents
.
forEach
(
item
=>
{
...
...
package-lock.json
View file @
7009c27b
...
@@ -2176,9 +2176,9 @@
...
@@ -2176,9 +2176,9 @@
}
}
},
},
"@qg/citrus-ui"
:
{
"@qg/citrus-ui"
:
{
"version"
:
"0.3.
29-beta3
"
,
"version"
:
"0.3.
31
"
,
"resolved"
:
"http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.3.
29-beta3
.tgz"
,
"resolved"
:
"http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.3.
31
.tgz"
,
"integrity"
:
"sha512-
Pwz8tlhTIwz79hDNChS77LSG7SHp+J+2WcB3BWzlEHik1077ooI/7x8iRnZaNGJ6ub1Y5Qb27EXlYEsaFxwjZ
A=="
,
"integrity"
:
"sha512-
CUNXdrUVPX2JYnxq4EbR/bsPegbnAFIqJpE1XF4AeTcZXbtcM+VHJx9PMKwC84xCI6m3g68J9/er8RVzv/b9v
A=="
,
"requires"
:
{
"requires"
:
{
"@better-scroll/core"
:
"^2.1.1"
,
"@better-scroll/core"
:
"^2.1.1"
,
"@qg/cherry-ui"
:
"^2.23.9"
,
"@qg/cherry-ui"
:
"^2.23.9"
,
...
...
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