开发环境同步
This commit is contained in:
		@@ -7,7 +7,7 @@
 | 
			
		||||
    <input v-if="!!$route.query.code" class="codeText" :value="$route.query.code"/>
 | 
			
		||||
    <div class="codeBtn" @click="handleLogin">去登录</div>
 | 
			
		||||
    <div flex class="appsPane wrap">
 | 
			
		||||
      <b v-for="app in apps" :key="app.key" @tap="redirectTo(app.path)">{{ app.name }}</b>
 | 
			
		||||
      <b v-for="app in apps" :key="app.key" @tap="handleGotoApp(app)">{{ app.name }}</b>
 | 
			
		||||
    </div>
 | 
			
		||||
  </section>
 | 
			
		||||
</template>0
 | 
			
		||||
@@ -46,6 +46,10 @@ export default {
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    handleGotoApp(app) {
 | 
			
		||||
      console.log(app)
 | 
			
		||||
      uni.navigateTo({url: `./mainEntry?app=${app.key}`})
 | 
			
		||||
    },
 | 
			
		||||
    handleLogin() {
 | 
			
		||||
      uni.navigateTo({url: "./login"})
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										43
									
								
								src/pages/mainEntry.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								src/pages/mainEntry.vue
									
									
									
									
									
										Normal 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>
 | 
			
		||||
		Reference in New Issue
	
	Block a user