You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

45 lines
869 B

<script>
export default {
onLaunch: function() {
console.log('App Launch')
// window.$messageMap = {
// '500' : this.$t('message.500'),
// '512' : this.$t('message.512'),
// '511' : this.$t('message.511'),
// }
if(!uni.getStorageSync('language')){
this.$i18n.locale = 'en'
//#ifdef H5
this.$router.go(0);
//#endif
//#ifdef APP-PLUS
// uni.navigateTo({
// url: '/pages/home/home' // 要刷新的页面路径
// });
//#endif
uni.setStorage({
key: 'language',
data: 'en'
})
uni.setLocale('en')
}
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uview-ui/theme.scss';
body{
background-color: #f3f3f3;
}
</style>