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
4d90ee88
Commit
4d90ee88
authored
Jul 19, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 处理埋点,跳转等问题
parent
db3f0328
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
20 deletions
+42
-20
dev.config.ts
app/web/config/dev.config.ts
+4
-4
index.ts
app/web/page/activity/component/FreedomContainer/index.ts
+24
-2
index.vue
app/web/page/activity/component/FreedomContainer/index.vue
+1
-1
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/config/dev.config.ts
View file @
4d90ee88
...
@@ -3,11 +3,11 @@ const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https:';
...
@@ -3,11 +3,11 @@ const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https:';
const
hostMap
=
{
const
hostMap
=
{
apiHost
:
`
${
protocol
}
//localhost:7002`
,
apiHost
:
`
${
protocol
}
//localhost:7002`
,
talosHost
:
`
${
protocol
}
//talos-
test1
.liangkebang.net`
,
talosHost
:
`
${
protocol
}
//talos-
sc
.liangkebang.net`
,
kdspHost
:
`
${
protocol
}
//kdsp-api-
test1
.liangkebang.net`
,
kdspHost
:
`
${
protocol
}
//kdsp-api-
sc
.liangkebang.net`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
mallHost
:
`
${
protocol
}
//mall-
test1
.liangkebang.net`
,
mallHost
:
`
${
protocol
}
//mall-
sc
.liangkebang.net`
,
xyqbH5Host
:
`
${
protocol
}
//mapi-
test1
.liangkebang.net`
,
xyqbH5Host
:
`
${
protocol
}
//mapi-
sc
.liangkebang.net`
,
test
:
true
,
test
:
true
,
yxmTenantId
:
560761
,
yxmTenantId
:
560761
,
appIdMap
:
{
appIdMap
:
{
...
...
app/web/page/activity/component/FreedomContainer/index.ts
View file @
4d90ee88
...
@@ -2,10 +2,12 @@ import { Component, Prop, Vue, Mixins } from 'vue-property-decorator';
...
@@ -2,10 +2,12 @@ import { Component, Prop, Vue, Mixins } from 'vue-property-decorator';
import
{
Action
,
Mutation
,
State
,
Getter
}
from
'
vuex-class
'
;
import
{
Action
,
Mutation
,
State
,
Getter
}
from
'
vuex-class
'
;
import
TransformStyleMixin
from
'
@/page/mixins/transformStyle.mixin
'
;
import
TransformStyleMixin
from
'
@/page/mixins/transformStyle.mixin
'
;
import
SaMixin
from
'
@/page/mixins/sa.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
'
})
@
Component
({
name
:
'
FreedomContainer
'
})
export
default
class
FreedomContainer
extends
Mixins
(
TransformStyleMixin
,
SaMixin
)
{
export
default
class
FreedomContainer
extends
Mixins
(
TransformStyleMixin
,
SaMixin
,
saTrackMixins
)
{
@
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
;
...
@@ -15,6 +17,26 @@ export default class FreedomContainer extends Mixins(TransformStyleMixin, SaMixi
...
@@ -15,6 +17,26 @@ export default class FreedomContainer extends Mixins(TransformStyleMixin, SaMixi
@
Prop
(
String
)
link
;
@
Prop
(
String
)
link
;
@
Prop
(
String
)
backgroundImage
;
@
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
()
{
mounted
()
{
// 根据背景图设置元素高度
// 根据背景图设置元素高度
// const index = this.pageData?.elements?.findIndex(v => v.point?.responsive);
// const index = this.pageData?.elements?.findIndex(v => v.point?.responsive);
...
...
app/web/page/activity/component/FreedomContainer/index.vue
View file @
4d90ee88
<
template
>
<
template
>
<div
class=
"freedom"
v-track
=
"
{ link }
">
<div
class=
"freedom"
v-track
.banClick=
"
{link}" @click="clickEvent
">
<div
class=
"freedom-body"
>
<div
class=
"freedom-body"
>
<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>
<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>
</div>
</div>
...
...
config/apollo.json
View file @
4d90ee88
{
{
"api"
:
{
"api"
:
{
"apiHost"
:
"https://quantum-blocks-
yxm
.liangkebang.net"
,
"apiHost"
:
"https://quantum-blocks-
sc
.liangkebang.net"
,
"h5Host"
:
"https://quantum-h5-
yxm
.liangkebang.net"
,
"h5Host"
:
"https://quantum-h5-
sc
.liangkebang.net"
,
"opapiHost"
:
"https://opapi-
yxm
.liangkebang.net"
,
"opapiHost"
:
"https://opapi-
sc
.liangkebang.net"
,
"passportHost"
:
"https://passportapi-
yxm
.liangkebang.net"
,
"passportHost"
:
"https://passportapi-
sc
.liangkebang.net"
,
"talosHost"
:
"https://talos-
yxm
.liangkebang.net"
,
"talosHost"
:
"https://talos-
sc
.liangkebang.net"
,
"kdspHost"
:
"https://kdsp-api-
yxm
.liangkebang.net"
,
"kdspHost"
:
"https://kdsp-api-
sc
.liangkebang.net"
,
"loginUrl"
:
""
,
"loginUrl"
:
""
,
"newApolloFlag"
:
true
,
"newApolloFlag"
:
true
,
"h5ShopHost"
:
"https://tenet-
yxm
.liangkebang.net/#"
,
"h5ShopHost"
:
"https://tenet-
sc
.liangkebang.net/#"
,
"mallHost"
:
"https://mall-
yxm
.liangkebang.net"
,
"mallHost"
:
"https://mall-
sc
.liangkebang.net"
,
"xyqbH5Host"
:
"https://mapi-
yxm
.liangkebang.net"
,
"xyqbH5Host"
:
"https://mapi-
sc
.liangkebang.net"
,
"yxmTenantId"
:
560761
,
"yxmTenantId"
:
560761
,
"appIdMap"
:
{
"appIdMap"
:
{
"560761"
:
"wxe16bf9293671506c"
,
"560761"
:
"wxe16bf9293671506c"
,
...
@@ -18,8 +18,8 @@
...
@@ -18,8 +18,8 @@
}
}
},
},
"redis"
:
{
"redis"
:
{
"port"
:
"3
0835
"
,
"port"
:
"3
1513
"
,
"host"
:
"172.16.4.
6
"
,
"host"
:
"172.16.4.
7
"
,
"password"
:
""
,
"password"
:
""
,
"db"
:
0
"db"
:
0
},
},
...
...
config/apollo.ssr.json
View file @
4d90ee88
{
"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"
}
{
"apiHost"
:
"https://quantum-blocks-sc.liangkebang.net","h5Host"
:
"https://quantum-h5-sc.liangkebang.net","opapiHost"
:
"https://opapi-sc.liangkebang.net","passportHost"
:
"https://passportapi-sc.liangkebang.net","talosHost"
:
"https://talos-sc.liangkebang.net","kdspHost"
:
"https://kdsp-api-sc.liangkebang.net","loginUrl"
:
"","newApolloFlag"
:
true
,
"h5ShopHost"
:
"https://tenet-sc.liangkebang.net/#","mallHost"
:
"https://mall-sc.liangkebang.net","xyqbH5Host"
:
"https://mapi-sc.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
\ No newline at end of file
package.json
View file @
4d90ee88
...
@@ -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=
yxm
npm run apollo && egg-bin dev -r egg-ts-helper/register"
,
"dev"
:
"cross-env NODE_ENV=test APOLLO_CLUSTER=k8s NAMESPACE=
sc
npm run apollo && egg-bin dev -r egg-ts-helper/register"
,
"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"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool"
,
"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