2023-12-20 15:15:23 +08:00
|
|
|
<script>
|
2024-08-27 16:09:01 +08:00
|
|
|
import store from "./store/user";
|
|
|
|
|
export default {
|
|
|
|
|
onLaunch: function () {
|
|
|
|
|
// app内禁止横屏
|
|
|
|
|
plus.screen.lockOrientation("portrait-primary");
|
|
|
|
|
console.log("App Launch");
|
|
|
|
|
},
|
|
|
|
|
onShow: async function () {
|
|
|
|
|
console.log("App Show");
|
|
|
|
|
const { data: res } = await this.$api.index.getUserInfo();
|
|
|
|
|
store.commit("SET_PERMISSIONS", res.permissions);
|
|
|
|
|
},
|
|
|
|
|
onHide: function () {
|
|
|
|
|
console.log("App Hide");
|
|
|
|
|
},
|
|
|
|
|
};
|
2023-12-20 15:15:23 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2024-08-27 16:09:01 +08:00
|
|
|
/*每个页面公共css */
|
|
|
|
|
@import "@/uni_modules/uview-ui/index.scss";
|
2023-12-20 15:15:23 +08:00
|
|
|
</style>
|