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
9e77b092
Commit
9e77b092
authored
Jul 25, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.quantgroup.cn/ui/quantum-block-h5
into feat/v1.6-0621
parents
d3667f46
d7b946f8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
18 deletions
+58
-18
editor.api.ts
app/web/api/editor.api.ts
+6
-0
dev.config.ts
app/web/config/dev.config.ts
+4
-4
index.ts
app/web/page/activity/component/FreedomContainer/index.ts
+24
-3
index.vue
app/web/page/activity/component/FreedomContainer/index.vue
+1
-1
index.ts
app/web/page/activity/view/activity/index.ts
+14
-4
index.vue
app/web/page/activity/view/activity/index.vue
+9
-6
No files found.
app/web/api/editor.api.ts
View file @
9e77b092
...
...
@@ -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/get-vcc-status`
,
{
areaType
:
6
});
}
};
\ No newline at end of file
app/web/config/dev.config.ts
View file @
9e77b092
...
...
@@ -3,11 +3,11 @@ const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https:';
const
hostMap
=
{
apiHost
:
`
${
protocol
}
//localhost:7002`
,
talosHost
:
`
${
protocol
}
//talos-
test1
.liangkebang.net`
,
kdspHost
:
`
${
protocol
}
//kdsp-api-
test1
.liangkebang.net`
,
talosHost
:
`
${
protocol
}
//talos-
sc
.liangkebang.net`
,
kdspHost
:
`
${
protocol
}
//kdsp-api-
sc
.liangkebang.net`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
mallHost
:
`
${
protocol
}
//mall-
test1
.liangkebang.net`
,
xyqbH5Host
:
`
${
protocol
}
//mapi-
test1
.liangkebang.net`
,
mallHost
:
`
${
protocol
}
//mall-
sc
.liangkebang.net`
,
xyqbH5Host
:
`
${
protocol
}
//mapi-
sc
.liangkebang.net`
,
test
:
true
,
yxmTenantId
:
560761
,
appIdMap
:
{
...
...
app/web/page/activity/component/FreedomContainer/index.ts
View file @
9e77b092
...
...
@@ -2,20 +2,41 @@ import { Component, Prop, Vue, Mixins } from 'vue-property-decorator';
import
{
Action
,
Mutation
,
State
,
Getter
}
from
'
vuex-class
'
;
import
TransformStyleMixin
from
'
@/page/mixins/transformStyle.mixin
'
;
import
SaMixin
from
'
@/page/mixins/sa.mixin
'
;
import
{
resizeDiv
}
from
'
@/service/utils.service
'
;
// import { resizeDiv } from '@/service/utils.service';
import
{
locationHrefPatchDelay
,
getTokenFromApp
}
from
'
@qg/citrus-ui/src/helper/service/utils
'
;
import
saTrackMixins
from
'
@qg/citrus-ui/src/helper/mixins/saTrack.mixins
'
;
@
Component
({
name
:
'
FreedomContainer
'
})
export
default
class
FreedomContainer
extends
Mixins
(
TransformStyleMixin
,
SaMixin
)
{
export
default
class
FreedomContainer
extends
Mixins
(
TransformStyleMixin
,
SaMixin
,
saTrackMixins
)
{
@
Getter
(
'
pageData
'
)
pageData
;
@
State
(
state
=>
state
.
activity
.
curChildIndex
)
curChildIndex
;
showVideo
=
false
;
@
Mutation
(
'
UPDATE_PAGE_INFO
'
)
updatePageInfo
;
@
Prop
({
type
:
Object
,
default
:
()
=>
({
child
:
[]
})})
childItem
;
@
Prop
({
type
:
Object
,
default
:
()
=>
({})})
saInfo
;
@
Prop
(
String
)
link
;
@
Prop
(
String
)
backgroundImage
;
clickEvent
()
{
console
.
log
(
this
.
childItem
);
let
needLogin
=
false
;
try
{
needLogin
=
this
.
childItem
.
props
.
needLogin
;
}
catch
(
err
)
{
console
.
log
(
err
);
}
if
(
needLogin
)
{
getTokenFromApp
().
then
(
hasLogin
=>
{
if
(
hasLogin
)
{
locationHrefPatchDelay
(
this
.
link
);
}
});
}
else
{
console
.
log
(
this
.
link
);
locationHrefPatchDelay
(
this
.
link
);
}
}
mounted
()
{
this
.
showVideo
=
true
;
// 根据背景图设置元素高度
...
...
app/web/page/activity/component/FreedomContainer/index.vue
View file @
9e77b092
<
template
>
<div
class=
"freedom"
v-track
=
"
{ link }
">
<div
class=
"freedom"
v-track
.banClick=
"
{link}" @click="clickEvent
">
<div
class=
"freedom-body"
>
<video
width=
"100%"
ref=
"videoBackground"
height=
"auto"
style=
"z-index: -10; osition: absolute; top: 0; left: 0"
v-if=
"showVideo && childItem.props.freedomVideo"
:src=
"childItem.props.freedomVideo"
playsinline
autoplay
loop
muted
/>
<component
:class=
"['freedom-body-item',
{ 'Fb-item_selected': curChildIndex === index }]" v-for="(item, index) in childItem.child" :style="transformStyle(item.commonStyle, 'container')" :is="item.name" :key="index" :sa-info="getSaInfo(item)" v-bind="item.props">
</component>
...
...
app/web/page/activity/view/activity/index.ts
View file @
9e77b092
...
...
@@ -19,6 +19,7 @@ import { isWxMp, isApp } from '@/service/utils.service';
import
Bridge
from
'
@qg/js-bridge
'
;
import
MpBridge
from
'
@qg/citrus-ui/src/helper/service/mp
'
;
import
navigatorApi
from
'
@/api/navigator.api
'
;
import
editorApi
from
'
@/api/editor.api
'
;
@
Component
({
components
:
{
FreedomContainer
,
GridLayout
,
GridItem
,
PageBottomTip
,
BackTop
,
EmptyState
},
name
:
'
Activity
'
})
export
default
class
Activity
extends
Mixins
(
TransformStyleMixin
,
BottomNavStyleMixin
,
SaMixin
,
DisableTouchMixin
)
{
...
...
@@ -28,6 +29,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
;
@
Mutation
(
'
SET_PAGE_ELEMENTS
'
)
setPageElement
;
@
Mutation
(
'
UPDATE_APP_LOGIN_STATE
'
)
updateAppLoginState
;
...
...
@@ -109,9 +111,6 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
}
}
mounted
()
{
// console.log(this.$route, 'navIndex');
// const { index } = this.$route.query();
// console.log(this.navigatorConfig, 999);
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
'
);
}
...
...
@@ -141,16 +140,27 @@ export default class Activity extends Mixins(TransformStyleMixin, BottomNavStyle
}
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
)
{
// 获取导航配置
const
[
res
]
=
await
navigatorApi
.
getDetailById
(
navId
);
this
.
navigatorConfig
=
res
;
this
.
navIndex
=
index
;
// console.log(res, 'a123');
}
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/activity/view/activity/index.vue
View file @
9e77b092
...
...
@@ -3,7 +3,8 @@
<div
class=
"activity"
:class=
"
{hasBottomNav: navigatorConfig}" :style="transformStyle(pageData.commonStyle)">
<template
v-if=
"!noPageData && tenantIdCorrect"
>
<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)"
:id=
"`item_$
{item.id}`"
@click="dot(item.title)"
...
...
@@ -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>
</div>
</
template
>
<div
v-if=
"pageData.props.showPageBottomTip"
:id=
"bottomInfo.i + pageData.elements.length"
...
...
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