修改了api集中化 搞定了vuex
This commit is contained in:
12
src/App.vue
12
src/App.vue
@@ -5,6 +5,18 @@
|
||||
</div> -->
|
||||
<router-view/>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import store from './store';
|
||||
|
||||
export default defineComponent({
|
||||
setup(){
|
||||
if(store.state.islogin){
|
||||
store.dispatch("setUserInfo");
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.one-line-hide {
|
||||
|
||||
Reference in New Issue
Block a user