自动初始化整体调试完成

This commit is contained in:
pixel
2021-03-04 19:38:07 +08:00
parent 4a995a1c56
commit 184b1a903f
14 changed files with 273 additions and 32 deletions

View File

@@ -5,9 +5,20 @@
</template>
<script>
import { checkDB } from "@/api/initdb"
export default {
name: 'app',
components: {}
async created(){
const res = await checkDB()
if(res.code == 0 && res.data.needInit){
this.$message({
type:"info",
message:"您是第一次使用,请初始化"
})
this.$store.commit("user/NeedInit")
this.$router.push({name:"init"})
}
}
}
</script>