Commit 5d3c5c0d authored by 郭志伟's avatar 郭志伟

fix(backtop): 获取分享地址判断调整

parent c1dc661f
...@@ -2,22 +2,18 @@ ...@@ -2,22 +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'); if (!this.$isServer) {
if (!loadingEle) { return; } const loadingEle = document.querySelector('.mainload');
loadingEle.style.display = 'none'; if (!loadingEle) { return; }
loadingEle.style.display = 'none';
}
} }
} }
</script> </script>
......
...@@ -50,15 +50,6 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab ...@@ -50,15 +50,6 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
get tenantIdCorrect() { get tenantIdCorrect() {
return +this.tenantId === +(localStorage.get('tenantId') || basicConfig.yxmTenantId); 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 })
onPageDataChange(val) { onPageDataChange(val) {
......
...@@ -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 :description="errorDesc" v-else /> <empty-state v-else />
</div> </div>
</template> </template>
<script lang="ts" src="./index.ts"></script> <script lang="ts" src="./index.ts"></script>
......
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