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
c06e7e7d
Commit
c06e7e7d
authored
Nov 21, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(tenant): tenantId字段校验
parent
e7d6e670
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
7 deletions
+24
-7
editor.api.ts
app/web/api/editor.api.ts
+1
-1
dev.config.ts
app/web/config/dev.config.ts
+4
-1
prod.config.ts
app/web/config/prod.config.ts
+4
-1
test.config.ts
app/web/config/test.config.ts
+4
-1
index.d.ts
app/web/index.d.ts
+1
-0
index.vue
app/web/page/activity/component/BackTop/index.vue
+5
-2
index.ts
app/web/page/activity/view/activity/index.ts
+4
-0
index.vue
app/web/page/activity/view/activity/index.vue
+1
-1
No files found.
app/web/api/editor.api.ts
View file @
c06e7e7d
...
@@ -3,7 +3,7 @@ import config from '../config';
...
@@ -3,7 +3,7 @@ import config from '../config';
export
default
{
export
default
{
getPageById
(
params
)
{
getPageById
(
params
)
{
return
http
.
get
(
`
${
config
.
apiHost
}
/editor/get/
${
params
.
pageId
}
?lite=1`
);
return
http
.
get
(
`
http://127.0.0.1:7002
/editor/get/
${
params
.
pageId
}
?lite=1`
);
},
},
getShopCartCount
()
{
getShopCartCount
()
{
return
http
.
get
(
`
${
config
.
kdspHost
}
/api/kdsp/shop-cart/count`
);
return
http
.
get
(
`
${
config
.
kdspHost
}
/api/kdsp/shop-cart/count`
);
...
...
app/web/config/dev.config.ts
View file @
c06e7e7d
...
@@ -7,7 +7,10 @@ const hostMap = {
...
@@ -7,7 +7,10 @@ const hostMap = {
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
mallHost
:
`
${
protocol
}
://mall-vcc3.liangkebang.net`
,
mallHost
:
`
${
protocol
}
://mall-vcc3.liangkebang.net`
,
test
:
true
,
test
:
true
,
yxmTenantId
:
560761
yxmTenantId
:
560761
,
appIdMap
:
{
560761
:
'
wxe16bf9293671506c
'
},
};
};
if
(
EASY_ENV_IS_BROWSER
)
{
if
(
EASY_ENV_IS_BROWSER
)
{
...
...
app/web/config/prod.config.ts
View file @
c06e7e7d
...
@@ -6,5 +6,8 @@ export default {
...
@@ -6,5 +6,8 @@ export default {
shenceUrl
:
`https://bn.xyqb.com/sa?project=production`
,
shenceUrl
:
`https://bn.xyqb.com/sa?project=production`
,
mallHost
:
`https://mall.q-gp.com`
,
mallHost
:
`https://mall.q-gp.com`
,
test
:
false
,
test
:
false
,
yxmTenantId
:
560761
yxmTenantId
:
560761
,
appIdMap
:
{
560761
:
'
wxb3e6270e1b1e0bc7
'
},
};
};
app/web/config/test.config.ts
View file @
c06e7e7d
...
@@ -7,7 +7,10 @@ const hostMap = {
...
@@ -7,7 +7,10 @@ const hostMap = {
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-test1.liangkebang.net`
,
test
:
true
,
test
:
true
,
yxmTenantId
:
560761
yxmTenantId
:
560761
,
appIdMap
:
{
560761
:
'
wxe16bf9293671506c
'
},
};
};
if
(
EASY_ENV_IS_BROWSER
)
{
if
(
EASY_ENV_IS_BROWSER
)
{
...
...
app/web/index.d.ts
View file @
c06e7e7d
...
@@ -6,3 +6,4 @@ interface Window {
...
@@ -6,3 +6,4 @@ interface Window {
xyqbNativeEvent
:
any
;
xyqbNativeEvent
:
any
;
}
}
declare
var
apollo
:
any
;
declare
var
apollo
:
any
;
declare
var
tenantId
:
any
;
app/web/page/activity/component/BackTop/index.vue
View file @
c06e7e7d
...
@@ -48,6 +48,7 @@ export default {
...
@@ -48,6 +48,7 @@ export default {
mpSchema
:
''
,
mpSchema
:
''
,
link
:
''
,
link
:
''
,
shareInfo
:
{},
shareInfo
:
{},
wxAppId
:
cfg
.
appIdMap
[
+
localStorage
.
get
(
'
tenantId
'
)],
showShareOverlay
:
((
isWechat
&&
!
isWxMp
)
||
isH5Normal
)
&&
!
localStorage
.
get
(
'
vccChannel
'
),
showShareOverlay
:
((
isWechat
&&
!
isWxMp
)
||
isH5Normal
)
&&
!
localStorage
.
get
(
'
vccChannel
'
),
isWechat
isWechat
};
};
...
@@ -105,9 +106,11 @@ export default {
...
@@ -105,9 +106,11 @@ export default {
methods
:
{
methods
:
{
async
getMpSchema
()
{
async
getMpSchema
()
{
if
(
isH5Normal
&&
EASY_ENV_IS_BROWSER
)
{
if
(
isH5Normal
&&
EASY_ENV_IS_BROWSER
&&
this
.
wxAppId
)
{
try
{
try
{
const
[
schema
]
=
await
api
.
getMpSchema
({
const
[
schema
]
=
await
api
.
getMpSchema
({
// TODO
miniAppId
:
this
.
wxAppId
,
miniUrl
:
WEAPP_PATH
,
miniUrl
:
WEAPP_PATH
,
params
:
`url=
${
encodeURIComponent
(
JSON
.
stringify
(
this
.
link
))}
`
params
:
`url=
${
encodeURIComponent
(
JSON
.
stringify
(
this
.
link
))}
`
});
});
...
@@ -181,7 +184,7 @@ export default {
...
@@ -181,7 +184,7 @@ export default {
this
.
jsBridge
.
showShareView
(
this
.
shareInfo
);
this
.
jsBridge
.
showShareView
(
this
.
shareInfo
);
},
},
postMpShareInfo
()
{
postMpShareInfo
()
{
if
(
EASY_ENV_IS_NODE
)
return
;
if
(
EASY_ENV_IS_NODE
||
!
this
.
wxAppId
)
return
;
const
wx
=
require
(
'
weixin-js-sdk
'
);
const
wx
=
require
(
'
weixin-js-sdk
'
);
const
{
shareInfo
}
=
this
;
const
{
shareInfo
}
=
this
;
wx
.
miniProgram
.
postMessage
({
data
:
shareInfo
});
wx
.
miniProgram
.
postMessage
({
data
:
shareInfo
});
...
...
app/web/page/activity/view/activity/index.ts
View file @
c06e7e7d
...
@@ -20,6 +20,7 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
...
@@ -20,6 +20,7 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
@
State
(
state
=>
state
.
activity
.
pageInfo
.
pageName
)
pageName
;
@
State
(
state
=>
state
.
activity
.
pageInfo
.
pageName
)
pageName
;
@
State
(
state
=>
state
.
activity
.
noPageData
)
noPageData
;
@
State
(
state
=>
state
.
activity
.
noPageData
)
noPageData
;
@
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
.
gridLayout
.
rowHeight
)
rowHeight
;
@
State
(
state
=>
state
.
activity
.
gridLayout
.
rowHeight
)
rowHeight
;
@
Mutation
(
'
SET_PAGE_ELEMENTS
'
)
setPageElement
;
@
Mutation
(
'
SET_PAGE_ELEMENTS
'
)
setPageElement
;
@
Mutation
(
'
UPDATE_APP_LOGIN_STATE
'
)
updateAppLoginState
;
@
Mutation
(
'
UPDATE_APP_LOGIN_STATE
'
)
updateAppLoginState
;
...
@@ -44,6 +45,9 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
...
@@ -44,6 +45,9 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
}
}
return
this
.
pageData
&&
this
.
pageData
.
elements
.
map
(
v
=>
v
.
point
)
||
[];
return
this
.
pageData
&&
this
.
pageData
.
elements
.
map
(
v
=>
v
.
point
)
||
[];
}
}
get
tenantIdCorrect
()
{
return
+
this
.
tenantId
===
+
localStorage
.
get
(
'
tenantId
'
);
}
@
Watch
(
'
pageData
'
,
{
deep
:
true
})
@
Watch
(
'
pageData
'
,
{
deep
:
true
})
onPageDataChange
(
val
)
{
onPageDataChange
(
val
)
{
...
...
app/web/page/activity/view/activity/index.vue
View file @
c06e7e7d
<
template
>
<
template
>
<div
class=
"activity"
:style=
"transformStyle(pageData.commonStyle)"
>
<div
class=
"activity"
:style=
"transformStyle(pageData.commonStyle)"
>
<template
v-if=
"!noPageData"
>
<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"
<div
:style=
"transformStyle(item.commonStyle, item.point, item.name)"
v-for=
"(item, index) in pageData.elements"
:key=
"fixGridKey(item)"
:key=
"fixGridKey(item)"
...
...
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