|
@@ -1,8 +1,27 @@
|
|
|
<script>
|
|
|
export default {
|
|
|
- // onLaunch: function() {
|
|
|
- // console.log('App Launch');
|
|
|
- // },
|
|
|
+ onLaunch: function() {
|
|
|
+ console.log('App Launch');
|
|
|
+ var lan = 'zh'
|
|
|
+ try {
|
|
|
+ const res = uni.getSystemInfoSync();
|
|
|
+ lan = res.language
|
|
|
+ } catch (e) {
|
|
|
+ console.log('error='+e)
|
|
|
+ }
|
|
|
+ console.log('lan='+lan);
|
|
|
+ if(lan == 'en') {
|
|
|
+ this._i18n.locale = 'en-US'
|
|
|
+ }
|
|
|
+ if(lan == 'zh-Hans-CN' || lan=='zh') {
|
|
|
+ this._i18n.locale = 'zh-CN'
|
|
|
+ }
|
|
|
+ uni.setTabBarItem({ index: 0,text: this.$t('tabs.tab1')});
|
|
|
+ uni.setTabBarItem({ index: 1,text: this.$t('tabs.tab2')});
|
|
|
+ uni.setTabBarItem({ index: 2,text: this.$t('tabs.tab3')});
|
|
|
+ uni.setTabBarItem({ index: 3,text: this.$t('tabs.tab4')});
|
|
|
+ uni.setTabBarItem({ index: 4,text: this.$t('tabs.tab5')});
|
|
|
+ },
|
|
|
// onShow: function() {
|
|
|
// console.log('App Show');
|
|
|
// },
|
|
@@ -11,7 +30,6 @@
|
|
|
// }
|
|
|
}
|
|
|
</script>
|
|
|
-
|
|
|
<style>
|
|
|
/*每个页面公共css */
|
|
|
/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
|