Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks-h5
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-h5
Commits
f84e6103
Commit
f84e6103
authored
Jul 21, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 获取vcc开关状态改为异步
parent
932dd1f5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
31 deletions
+19
-31
index.ts
app/web/page/activity/component/FreedomContainer/index.ts
+0
-1
index.ts
app/web/page/activity/view/activity/index.ts
+9
-8
index.vue
app/web/page/activity/view/activity/index.vue
+9
-6
index.ts
app/web/page/store/modules/activity/index.ts
+1
-14
state.ts
app/web/page/store/modules/activity/state.ts
+0
-1
type.ts
app/web/page/store/modules/activity/type.ts
+0
-1
No files found.
app/web/page/activity/component/FreedomContainer/index.ts
View file @
f84e6103
...
@@ -11,7 +11,6 @@ export default class FreedomContainer extends Mixins(TransformStyleMixin, SaMixi
...
@@ -11,7 +11,6 @@ export default class FreedomContainer extends Mixins(TransformStyleMixin, SaMixi
@
Getter
(
'
pageData
'
)
pageData
;
@
Getter
(
'
pageData
'
)
pageData
;
@
State
(
state
=>
state
.
activity
.
curChildIndex
)
curChildIndex
;
@
State
(
state
=>
state
.
activity
.
curChildIndex
)
curChildIndex
;
@
Mutation
(
'
UPDATE_PAGE_INFO
'
)
updatePageInfo
;
@
Mutation
(
'
UPDATE_PAGE_INFO
'
)
updatePageInfo
;
@
Prop
({
type
:
Object
,
default
:
()
=>
({
child
:
[]
})})
childItem
;
@
Prop
({
type
:
Object
,
default
:
()
=>
({
child
:
[]
})})
childItem
;
@
Prop
({
type
:
Object
,
default
:
()
=>
({})})
saInfo
;
@
Prop
({
type
:
Object
,
default
:
()
=>
({})})
saInfo
;
@
Prop
(
String
)
link
;
@
Prop
(
String
)
link
;
...
...
app/web/page/activity/view/activity/index.ts
View file @
f84e6103
...
@@ -19,6 +19,7 @@ import { isWxMp, isApp } from '@/service/utils.service';
...
@@ -19,6 +19,7 @@ import { isWxMp, isApp } from '@/service/utils.service';
import
Bridge
from
'
@qg/js-bridge
'
;
import
Bridge
from
'
@qg/js-bridge
'
;
import
MpBridge
from
'
@qg/citrus-ui/src/helper/service/mp
'
;
import
MpBridge
from
'
@qg/citrus-ui/src/helper/service/mp
'
;
import
navigatorApi
from
'
@/api/navigator.api
'
;
import
navigatorApi
from
'
@/api/navigator.api
'
;
import
editorApi
from
'
@/api/editor.api
'
;
@
Component
({
components
:
{
FreedomContainer
,
GridLayout
,
GridItem
,
PageBottomTip
,
BackTop
,
EmptyState
},
name
:
'
Activity
'
})
@
Component
({
components
:
{
FreedomContainer
,
GridLayout
,
GridItem
,
PageBottomTip
,
BackTop
,
EmptyState
},
name
:
'
Activity
'
})
export
default
class
Activity
extends
Mixins
(
TransformStyleMixin
,
BottomNavStyleMixin
,
SaMixin
,
DisableTouchMixin
)
{
export
default
class
Activity
extends
Mixins
(
TransformStyleMixin
,
BottomNavStyleMixin
,
SaMixin
,
DisableTouchMixin
)
{
...
@@ -28,7 +29,7 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
...
@@ -28,7 +29,7 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
@
State
(
state
=>
state
.
activity
.
pageInfo
.
appLoginState
)
appLoginState
;
@
State
(
state
=>
state
.
activity
.
pageInfo
.
appLoginState
)
appLoginState
;
@
State
(
state
=>
state
.
activity
.
pageInfo
.
tenantId
)
tenantId
;
@
State
(
state
=>
state
.
activity
.
pageInfo
.
tenantId
)
tenantId
;
@
State
(
state
=>
state
.
activity
.
gridLayout
.
rowHeight
)
rowHeight
;
@
State
(
state
=>
state
.
activity
.
gridLayout
.
rowHeight
)
rowHeight
;
@
State
(
state
=>
state
.
activity
.
showFinanceComponents
)
showFinanceComponents
;
@
Mutation
(
'
SET_PAGE_ELEMENTS
'
)
setPageElement
;
@
Mutation
(
'
SET_PAGE_ELEMENTS
'
)
setPageElement
;
@
Mutation
(
'
UPDATE_APP_LOGIN_STATE
'
)
updateAppLoginState
;
@
Mutation
(
'
UPDATE_APP_LOGIN_STATE
'
)
updateAppLoginState
;
...
@@ -110,15 +111,9 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
...
@@ -110,15 +111,9 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
}
}
}
}
mounted
()
{
mounted
()
{
// console.log(this.$route, 'navIndex');
// const { index } = this.$route.query();
// console.log(this.navigatorConfig, 999);
if
(
!
isApp
&&
!
isWxMp
&&
!
EASY_ENV_IS_NODE
)
{
if
(
!
isApp
&&
!
isWxMp
&&
!
EASY_ENV_IS_NODE
)
{
this
.
pageData
.
elements
=
this
.
pageData
.
elements
.
filter
(
v
=>
v
.
name
!==
'
cs-search-bar
'
&&
v
.
name
!==
'
cs-snap-up
'
);
this
.
pageData
.
elements
=
this
.
pageData
.
elements
.
filter
(
v
=>
v
.
name
!==
'
cs-search-bar
'
&&
v
.
name
!==
'
cs-snap-up
'
);
}
}
if
(
this
.
showFinanceComponents
==
0
)
{
this
.
pageData
.
elements
=
this
.
pageData
.
elements
.
filter
(
v
=>
v
.
name
!==
'
freedom-container
'
||
!
v
.
props
.
isFinance
);
}
this
.
targetEle
=
document
.
querySelector
(
'
body
'
);
this
.
targetEle
=
document
.
querySelector
(
'
body
'
);
if
(
EASY_ENV_IS_BROWSER
)
{
this
.
showBackTop
=
true
;
}
if
(
EASY_ENV_IS_BROWSER
)
{
this
.
showBackTop
=
true
;
}
this
.
pageVisibilityChange
();
this
.
pageVisibilityChange
();
...
@@ -145,12 +140,18 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
...
@@ -145,12 +140,18 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
}
}
this
.
layoutReadyEvent
();
this
.
layoutReadyEvent
();
}
}
async
created
()
{
const
[
res
,
]
=
await
editorApi
.
getFinanceSetting
();
console
.
log
(
res
);
if
(
res
&&
res
.
showFlag
===
0
)
{
this
.
pageData
.
elements
=
this
.
pageData
.
elements
.
filter
(
v
=>
v
.
name
!==
'
freedom-container
'
||
!
v
.
props
.
isFinance
);
}
}
async
getNavigatorConfig
(
navId
,
index
)
{
async
getNavigatorConfig
(
navId
,
index
)
{
// 获取导航配置
// 获取导航配置
const
[
res
]
=
await
navigatorApi
.
getDetailById
(
navId
);
const
[
res
]
=
await
navigatorApi
.
getDetailById
(
navId
);
this
.
navigatorConfig
=
res
;
this
.
navigatorConfig
=
res
;
this
.
navIndex
=
index
;
this
.
navIndex
=
index
;
// console.log(res, 'a123');
}
}
async
fetchApi
(
options
)
{
async
fetchApi
(
options
)
{
const
{
store
,
route
}
=
options
;
const
{
store
,
route
}
=
options
;
...
...
app/web/page/activity/view/activity/index.vue
View file @
f84e6103
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
<div
class=
"activity"
:class=
"
{hasBottomNav: navigatorConfig}" :style="transformStyle(pageData.commonStyle)">
<div
class=
"activity"
:class=
"
{hasBottomNav: navigatorConfig}" :style="transformStyle(pageData.commonStyle)">
<template
v-if=
"!noPageData && tenantIdCorrect"
>
<template
v-if=
"!noPageData && tenantIdCorrect"
>
<div
class=
"layout"
>
<div
class=
"layout"
>
<div
:style=
"transformStyle(item.commonStyle, item.point, item.name)"
v-for=
"(item, index) in pageData.elements"
<template
v-for=
"(item, index) in pageData.elements"
>
<div
:style=
"transformStyle(item.commonStyle, item.point, item.name)"
:key=
"fixGridKey(item)"
:key=
"fixGridKey(item)"
:id=
"`item_$
{item.id}`"
:id=
"`item_$
{item.id}`"
@click="dot(item.title)"
@click="dot(item.title)"
...
@@ -11,6 +12,8 @@
...
@@ -11,6 +12,8 @@
>
>
<component
:data-index=
"index"
:id=
"item.id"
:containerIndex=
"index"
:component-data=
"item"
:childItem=
"item"
:is=
"item.name"
:sa-info=
"getSaInfo(item)"
v-bind=
"item.props"
></component>
<component
:data-index=
"index"
:id=
"item.id"
:containerIndex=
"index"
:component-data=
"item"
:childItem=
"item"
:is=
"item.name"
:sa-info=
"getSaInfo(item)"
v-bind=
"item.props"
></component>
</div>
</div>
</
template
>
<div
<div
v-if=
"pageData.props.showPageBottomTip"
v-if=
"pageData.props.showPageBottomTip"
:id=
"bottomInfo.i + pageData.elements.length"
:id=
"bottomInfo.i + pageData.elements.length"
...
...
app/web/page/store/modules/activity/index.ts
View file @
f84e6103
import
api
from
'
@/api/editor.api
'
;
import
api
from
'
@/api/editor.api
'
;
import
{
Module
,
GetterTree
,
ActionTree
,
MutationTree
}
from
'
vuex
'
;
import
{
Module
,
GetterTree
,
ActionTree
,
MutationTree
}
from
'
vuex
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
{
UPDATE_PAGE_INFO
,
SET_PAGE_INFO
,
SET_PAGE_DATA
,
SET_PAGE_ELEMENTS
,
SET_ELEMENT_POINT
,
UPDATE_APP_LOGIN_STATE
,
SET_EMPTY_PAGE
,
SET_SHOW_FINANCE
}
from
'
./type
'
;
import
{
UPDATE_PAGE_INFO
,
SET_PAGE_INFO
,
SET_PAGE_DATA
,
SET_PAGE_ELEMENTS
,
SET_ELEMENT_POINT
,
UPDATE_APP_LOGIN_STATE
,
SET_EMPTY_PAGE
}
from
'
./type
'
;
import
RootState
from
'
../../state
'
;
import
RootState
from
'
../../state
'
;
import
EditorState
,
{
PageInfo
,
defaultState
,
Page
,
PageElement
}
from
'
./state
'
;
import
EditorState
,
{
PageInfo
,
defaultState
,
Page
,
PageElement
}
from
'
./state
'
;
...
@@ -29,16 +29,6 @@ export default class EditorModule implements Module<EditorState, RootState> {
...
@@ -29,16 +29,6 @@ export default class EditorModule implements Module<EditorState, RootState> {
commit
(
SET_EMPTY_PAGE
,
true
);
commit
(
SET_EMPTY_PAGE
,
true
);
}
}
},
},
async
getFinanceSetting
({
commit
},
condition
)
{
const
[
res
]
=
await
api
.
getFinanceSetting
();
if
(
res
&&
res
.
showFlag
)
{
// const { page, ...rest } = res as PageInfo;
commit
(
SET_SHOW_FINANCE
,
res
.
showFlag
);
// commit(SET_EMPTY_PAGE, false);
}
else
{
commit
(
SET_SHOW_FINANCE
,
0
);
}
},
};
};
mutations
:
MutationTree
<
EditorState
>
=
{
mutations
:
MutationTree
<
EditorState
>
=
{
...
@@ -70,9 +60,6 @@ export default class EditorModule implements Module<EditorState, RootState> {
...
@@ -70,9 +60,6 @@ export default class EditorModule implements Module<EditorState, RootState> {
const
element
=
elements
.
find
(
ele
=>
ele
.
id
===
id
);
const
element
=
elements
.
find
(
ele
=>
ele
.
id
===
id
);
if
(
element
&&
data
)
{
element
.
point
=
data
;
}
if
(
element
&&
data
)
{
element
.
point
=
data
;
}
},
},
[
SET_SHOW_FINANCE
](
state
,
data
)
{
state
.
showFinanceComponents
=
data
;
},
};
};
constructor
(
initState
:
EditorState
=
JSON
.
parse
(
JSON
.
stringify
(
defaultState
)))
{
constructor
(
initState
:
EditorState
=
JSON
.
parse
(
JSON
.
stringify
(
defaultState
)))
{
...
...
app/web/page/store/modules/activity/state.ts
View file @
f84e6103
...
@@ -104,5 +104,4 @@ export default interface EditorState {
...
@@ -104,5 +104,4 @@ export default interface EditorState {
gridLayout
:
GridLayout
;
gridLayout
:
GridLayout
;
navigatorConfig
:
any
;
navigatorConfig
:
any
;
navIndex
:
any
;
navIndex
:
any
;
showFinanceComponents
:
number
;
}
}
\ No newline at end of file
app/web/page/store/modules/activity/type.ts
View file @
f84e6103
...
@@ -16,4 +16,3 @@ export const SET_PAGE_ELEMENTS = 'SET_PAGE_ELEMENTS';
...
@@ -16,4 +16,3 @@ export const SET_PAGE_ELEMENTS = 'SET_PAGE_ELEMENTS';
export
const
SET_ELEMENT_POINT
=
'
SET_ELEMENT_POINT
'
;
export
const
SET_ELEMENT_POINT
=
'
SET_ELEMENT_POINT
'
;
export
const
SET_EMPTY_PAGE
=
'
SET_EMPTY_PAGE
'
;
export
const
SET_EMPTY_PAGE
=
'
SET_EMPTY_PAGE
'
;
export
const
UPDATE_APP_LOGIN_STATE
=
'
UPDATE_APP_LOGIN_STATE
'
;
export
const
UPDATE_APP_LOGIN_STATE
=
'
UPDATE_APP_LOGIN_STATE
'
;
export
const
SET_SHOW_FINANCE
=
'
SET_SHOW_FINANCE
'
;
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