开发环境同步

This commit is contained in:
aixianling
2021-11-30 14:39:24 +08:00
parent b9c0d7ee9b
commit 7c9f067280
4 changed files with 52 additions and 2 deletions

43
src/pages/mainEntry.vue Normal file
View File

@@ -0,0 +1,43 @@
<template>
<section class="mainEntry">
<component ref="CurrentEntry" v-if="app" :is="app"/>
<div v-else>
<AiResult tips="应用建设中.." status="error" btn="返回主页" :btn-tap="back"/>
</div>
</section>
</template>
<script>
export default {
name: "mainEntry",
inject: {root: {}},
data() {
return {
app: ""
}
},
methods: {
back() {
// uni.reLaunch({url:""})
this.root.goto({path: "/pages/loading"})
}
},
onLoad(params) {
this.app = params.app || ""
},
onShow() {
this.app = this.$route.query.app || ""
this.$nextTick(() => {
this.$refs.CurrentEntry?.emitShow?.()
})
},
onReachBottom() {
this.$refs.CurrentEntry?.emitReachBottom?.()
}
}
</script>
<style lang="scss" scoped>
.mainEntry {
}
</style>