Commit a3fd3b6a authored by 郭志伟's avatar 郭志伟

fix(tenantid): 问题修复

parent a15a0649
...@@ -2,12 +2,18 @@ ...@@ -2,12 +2,18 @@
<cr-empty <cr-empty
class="empty-state" class="empty-state"
image="error" image="error"
description="你访问的页面不存在" :description="description"
/> />
</template> </template>
<script> <script>
export default { export default {
name: 'EmptyState', name: 'EmptyState',
props: {
description: {
type: String,
default: "你访问的页面不存在"
}
},
mounted() { mounted() {
const loadingEle = document.querySelector('.mainload'); const loadingEle = document.querySelector('.mainload');
if (!loadingEle) { return; } if (!loadingEle) { return; }
......
...@@ -13,6 +13,8 @@ import DisableTouchMixin from '@/page/mixins/disableTouch.mixin'; ...@@ -13,6 +13,8 @@ import DisableTouchMixin from '@/page/mixins/disableTouch.mixin';
import { setAppTitleColor } from '@/service/color.service'; import { setAppTitleColor } from '@/service/color.service';
import { EventBus } from '@qg/citrus-ui/src/helper/service/eventBus'; import { EventBus } from '@qg/citrus-ui/src/helper/service/eventBus';
import localStorage from '@/service/localStorage.service'; import localStorage from '@/service/localStorage.service';
import basicConfig from '@/config';
@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, SaMixin, DisableTouchMixin) { export default class Activity extends Mixins(TransformStyleMixin, SaMixin, DisableTouchMixin) {
...@@ -46,7 +48,16 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab ...@@ -46,7 +48,16 @@ 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() { get tenantIdCorrect() {
return +this.tenantId === +localStorage.get('tenantId'); return +this.tenantId === +(localStorage.get('tenantId') || basicConfig.yxmTenantId);
}
get errorDesc() {
if (this.noPageData) {
return '你访问的页面不存在';
} else if (!this.tenantIdCorrect) {
return '当前页面禁止访问';
} else {
return '你访问的页面不存在';
}
} }
@Watch('pageData', { deep: true }) @Watch('pageData', { deep: true })
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
<back-top v-if="showBackTop" :show-back-top="showBackTop" ref="backTop" /> <back-top v-if="showBackTop" :show-back-top="showBackTop" ref="backTop" />
</template> </template>
<empty-state v-else /> <empty-state :description="errorDesc" v-else />
</div> </div>
</template> </template>
<script lang="ts" src="./index.ts"></script> <script lang="ts" src="./index.ts"></script>
......
{ {
"api": { "api": {
"apiHost": "https://quantum-blocks-tob.liangkebang.net", "apiHost": "https://quantum-blocks-vcc3.liangkebang.net",
"h5Host": "https://quantum-h5-tob.liangkebang.net", "h5Host": "https://quantum-h5-vcc3.liangkebang.net",
"opapiHost": "https://opapi-tob.liangkebang.net", "opapiHost": "https://opapi-vcc3.liangkebang.net",
"passportHost": "https://passportapi-tob.liangkebang.net", "passportHost": "https://passportapi-vcc3.liangkebang.net",
"kdspHost": "https://talos-tob.liangkebang.net", "kdspHost": "https://talos-vcc3.liangkebang.net",
"loginUrl": "", "loginUrl": "",
"mallHost": "https://mall-tob.liangkebang.net", "mallHost": "https://mall-vcc3.liangkebang.net",
"h5ShopHost": "https://tenet-tob.liangkebang.net/#", "h5ShopHost": "https://tenet-vcc3.liangkebang.net/#",
"yxmTenantId": 560761, "yxmTenantId": 560761,
"appIdMap": { "appIdMap": {
"560761": "wxe16bf9293671506c", "560761": "wxe16bf9293671506c",
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
}, },
"mysql": { "mysql": {
"low_code": { "low_code": {
"host": "172.17.5.36", "host": "172.17.5.48",
"port": "30983", "port": "31393",
"username": "qa", "username": "qa",
"password": "qatest", "password": "qatest",
"database": "low_code" "database": "low_code"
......
{ {
"apiHost": "https://quantum-blocks-tob.liangkebang.net", "apiHost": "https://quantum-blocks-vcc3.liangkebang.net",
"h5Host": "https://quantum-h5-tob.liangkebang.net", "h5Host": "https://quantum-h5-vcc3.liangkebang.net",
"opapiHost": "https://opapi-tob.liangkebang.net", "opapiHost": "https://opapi-vcc3.liangkebang.net",
"passportHost": "https://passportapi-tob.liangkebang.net", "passportHost": "https://passportapi-vcc3.liangkebang.net",
"kdspHost": "https://talos-tob.liangkebang.net", "kdspHost": "https://talos-vcc3.liangkebang.net",
"loginUrl": "", "loginUrl": "",
"mallHost": "https://mall-tob.liangkebang.net", "mallHost": "https://mall-vcc3.liangkebang.net",
"h5ShopHost": "https://tenet-tob.liangkebang.net/#", "h5ShopHost": "https://tenet-vcc3.liangkebang.net/#",
"qiniuUpHost": "https://up-z0.qiniup.com",
"qiniuHost": "https://appsync.lkbang.net",
"yxmTenantId": 560761, "yxmTenantId": 560761,
"appIdMap": { "appIdMap": {
"560761": "wxe16bf9293671506c", "560761": "wxe16bf9293671506c",
"560867": "wxccb8435d68e8c7d6" "560867": "wxccb8435d68e8c7d6"
} }
} }
\ No newline at end of file
...@@ -4,13 +4,15 @@ ...@@ -4,13 +4,15 @@
"description": "低代码平台", "description": "低代码平台",
"scripts": { "scripts": {
"start": "cross-env NODE_ENV=production APOLLO_CLUSTER=3C egg-scripts start --port 9050", "start": "cross-env NODE_ENV=production APOLLO_CLUSTER=3C egg-scripts start --port 9050",
"start:pre": "cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE egg-scripts start --port 9050",
"test": "cross-env NODE_ENV=production EGG_SERVER_ENV=sit DEBUG=apollo APOLLO_CLUSTER=k8s NAMESPACE=qa2 egg-scripts start --port 80 --workers 1", "test": "cross-env NODE_ENV=production EGG_SERVER_ENV=sit DEBUG=apollo APOLLO_CLUSTER=k8s NAMESPACE=qa2 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": "egg-bin dev -r egg-ts-helper/register", "dev": "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": "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",
"build:pre": "cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE npm run apollo && cross-env COS_ENV=production easy build --devtool",
"build:test": "cross-env COS_ENV=test easy build --devtool", "build:test": "cross-env COS_ENV=test easy build --devtool",
"tsc": "ets && tsc -p tsconfig.json", "tsc": "ets && tsc -p tsconfig.json",
"clean": "ets clean", "clean": "ets clean",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment