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
5dd0cc01
Commit
5dd0cc01
authored
Jul 18, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 过滤金融组件
parent
2174cae3
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
14 deletions
+44
-14
editor.api.ts
app/web/api/editor.api.ts
+6
-0
index.ts
app/web/page/activity/view/activity/index.ts
+9
-0
index.ts
app/web/page/store/modules/activity/index.ts
+14
-1
state.ts
app/web/page/store/modules/activity/state.ts
+1
-0
type.ts
app/web/page/store/modules/activity/type.ts
+1
-0
apollo.json
config/apollo.json
+11
-11
apollo.ssr.json
config/apollo.ssr.json
+1
-1
package.json
package.json
+1
-1
No files found.
app/web/api/editor.api.ts
View file @
5dd0cc01
...
...
@@ -24,5 +24,11 @@ export default {
appId
:
'
wx2f44c7fe7b08458d
'
,
hideLoading
:
true
});
},
getFinanceSetting
()
{
// return http.post(`http://yapi.quantgroups.com/mock/351/api/kdsp/api/kdsp/vcc_switch`, {
return
http
.
post
(
`
${
config
.
kdspHost
}
/api/kdsp/vcc_switch`
,
{
areaType
:
11
});
}
};
\ No newline at end of file
app/web/page/activity/view/activity/index.ts
View file @
5dd0cc01
...
...
@@ -28,6 +28,7 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
@
State
(
state
=>
state
.
activity
.
pageInfo
.
appLoginState
)
appLoginState
;
@
State
(
state
=>
state
.
activity
.
pageInfo
.
tenantId
)
tenantId
;
@
State
(
state
=>
state
.
activity
.
gridLayout
.
rowHeight
)
rowHeight
;
@
State
(
state
=>
state
.
activity
.
showFinanceComponents
)
showFinanceComponents
;
@
Mutation
(
'
SET_PAGE_ELEMENTS
'
)
setPageElement
;
@
Mutation
(
'
UPDATE_APP_LOGIN_STATE
'
)
updateAppLoginState
;
...
...
@@ -115,6 +116,9 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
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
'
);
}
if
(
this
.
showFinanceComponents
==
0
)
{
this
.
pageData
.
elements
=
this
.
pageData
.
elements
.
filter
(
v
=>
v
.
name
!==
'
freedom-container
'
||
!
v
.
props
.
isFinance
);
}
this
.
targetEle
=
document
.
querySelector
(
'
body
'
);
if
(
EASY_ENV_IS_BROWSER
)
{
this
.
showBackTop
=
true
;
}
this
.
pageVisibilityChange
();
...
...
@@ -151,6 +155,11 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
async
fetchApi
(
options
)
{
const
{
store
,
route
}
=
options
;
const
{
pageId
}
=
route
.
params
;
try
{
await
store
.
dispatch
(
'
getFinanceSetting
'
);
}
catch
(
err
)
{
console
.
log
(
err
);
}
return
store
.
dispatch
(
'
getPageDate
'
,
{
pageId
});
}
updateShopCartCount
()
{
...
...
app/web/page/store/modules/activity/index.ts
View file @
5dd0cc01
import
api
from
'
@/api/editor.api
'
;
import
{
Module
,
GetterTree
,
ActionTree
,
MutationTree
}
from
'
vuex
'
;
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
}
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
,
SET_SHOW_FINANCE
}
from
'
./type
'
;
import
RootState
from
'
../../state
'
;
import
EditorState
,
{
PageInfo
,
defaultState
,
Page
,
PageElement
}
from
'
./state
'
;
...
...
@@ -29,6 +29,16 @@ export default class EditorModule implements Module<EditorState, RootState> {
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
>
=
{
...
...
@@ -60,6 +70,9 @@ export default class EditorModule implements Module<EditorState, RootState> {
const
element
=
elements
.
find
(
ele
=>
ele
.
id
===
id
);
if
(
element
&&
data
)
{
element
.
point
=
data
;
}
},
[
SET_SHOW_FINANCE
](
state
,
data
)
{
state
.
showFinanceComponents
=
data
;
},
};
constructor
(
initState
:
EditorState
=
JSON
.
parse
(
JSON
.
stringify
(
defaultState
)))
{
...
...
app/web/page/store/modules/activity/state.ts
View file @
5dd0cc01
...
...
@@ -104,4 +104,5 @@ export default interface EditorState {
gridLayout
:
GridLayout
;
navigatorConfig
:
any
;
navIndex
:
any
;
showFinanceComponents
:
number
;
}
\ No newline at end of file
app/web/page/store/modules/activity/type.ts
View file @
5dd0cc01
...
...
@@ -16,3 +16,4 @@ export const SET_PAGE_ELEMENTS = 'SET_PAGE_ELEMENTS';
export
const
SET_ELEMENT_POINT
=
'
SET_ELEMENT_POINT
'
;
export
const
SET_EMPTY_PAGE
=
'
SET_EMPTY_PAGE
'
;
export
const
UPDATE_APP_LOGIN_STATE
=
'
UPDATE_APP_LOGIN_STATE
'
;
export
const
SET_SHOW_FINANCE
=
'
SET_SHOW_FINANCE
'
;
config/apollo.json
View file @
5dd0cc01
{
"api"
:
{
"apiHost"
:
"https://quantum-blocks-
undefined
.liangkebang.net"
,
"h5Host"
:
"https://quantum-h5-
undefined
.liangkebang.net"
,
"opapiHost"
:
"https://opapi-
undefined
.liangkebang.net"
,
"passportHost"
:
"https://passportapi-
undefined
.liangkebang.net"
,
"talosHost"
:
"https://talos-
undefined
.liangkebang.net"
,
"kdspHost"
:
"https://kdsp-api-
undefined
.liangkebang.net"
,
"apiHost"
:
"https://quantum-blocks-
yxm
.liangkebang.net"
,
"h5Host"
:
"https://quantum-h5-
yxm
.liangkebang.net"
,
"opapiHost"
:
"https://opapi-
yxm
.liangkebang.net"
,
"passportHost"
:
"https://passportapi-
yxm
.liangkebang.net"
,
"talosHost"
:
"https://talos-
yxm
.liangkebang.net"
,
"kdspHost"
:
"https://kdsp-api-
yxm
.liangkebang.net"
,
"loginUrl"
:
""
,
"newApolloFlag"
:
true
,
"h5ShopHost"
:
"https://tenet-
undefined
.liangkebang.net/#"
,
"mallHost"
:
"https://mall-
undefined
.liangkebang.net"
,
"xyqbH5Host"
:
"https://mapi-
undefined
.liangkebang.net"
,
"h5ShopHost"
:
"https://tenet-
yxm
.liangkebang.net/#"
,
"mallHost"
:
"https://mall-
yxm
.liangkebang.net"
,
"xyqbH5Host"
:
"https://mapi-
yxm
.liangkebang.net"
,
"yxmTenantId"
:
560761
,
"appIdMap"
:
{
"560761"
:
"wxe16bf9293671506c"
,
...
...
@@ -18,8 +18,8 @@
}
},
"redis"
:
{
"port"
:
"
undefined
"
,
"host"
:
"
undefined
"
,
"port"
:
"
30835
"
,
"host"
:
"
172.16.4.6
"
,
"password"
:
""
,
"db"
:
0
},
...
...
config/apollo.ssr.json
View file @
5dd0cc01
{
"apiHost"
:
"https://quantum-blocks-undefined.liangkebang.net","h5Host"
:
"https://quantum-h5-undefined.liangkebang.net","opapiHost"
:
"https://opapi-undefined.liangkebang.net","passportHost"
:
"https://passportapi-undefined.liangkebang.net","talosHost"
:
"https://talos-undefined.liangkebang.net","kdspHost"
:
"https://kdsp-api-undefined.liangkebang.net","loginUrl"
:
"","newApolloFlag"
:
true
,
"h5ShopHost"
:
"https://tenet-undefined.liangkebang.net/#","mallHost"
:
"https://mall-undefined.liangkebang.net","xyqbH5Host"
:
"https://mapi-undefined.liangkebang.net","yxmTenantId"
:
560761
,
"appIdMap"
:{
"560761"
:
"wxe16bf9293671506c","560867"
:
"wxccb8435d68e8c7d6"},"qiniuUpHost"
:
"https://up-z0.qiniup.com","qiniuHost"
:
"https://appsync.lkbang.net"
}
\ No newline at end of file
{
"apiHost"
:
"https://quantum-blocks-yxm.liangkebang.net","h5Host"
:
"https://quantum-h5-yxm.liangkebang.net","opapiHost"
:
"https://opapi-yxm.liangkebang.net","passportHost"
:
"https://passportapi-yxm.liangkebang.net","talosHost"
:
"https://talos-yxm.liangkebang.net","kdspHost"
:
"https://kdsp-api-yxm.liangkebang.net","loginUrl"
:
"","newApolloFlag"
:
true
,
"h5ShopHost"
:
"https://tenet-yxm.liangkebang.net/#","mallHost"
:
"https://mall-yxm.liangkebang.net","xyqbH5Host"
:
"https://mapi-yxm.liangkebang.net","yxmTenantId"
:
560761
,
"appIdMap"
:{
"560761"
:
"wxe16bf9293671506c","560867"
:
"wxccb8435d68e8c7d6"},"qiniuUpHost"
:
"https://up-z0.qiniup.com","qiniuHost"
:
"https://appsync.lkbang.net"
}
\ No newline at end of file
package.json
View file @
5dd0cc01
...
...
@@ -8,7 +8,7 @@
"test"
:
"cross-env NODE_ENV=production EGG_SERVER_ENV=sit egg-scripts start --port 80 --workers 1"
,
"stop"
:
"egg-scripts stop"
,
"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"
,
"dev"
:
"cross-env NODE_ENV=test APOLLO_CLUSTER=k8s NAMESPACE=
yxm
npm run apollo && egg-bin dev -r egg-ts-helper/register"
,
"debug"
:
"egg-bin debug -r egg-ts-helper/register"
,
"apollo"
:
"node bin/apollo.js"
,
"build"
:
"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