-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.vue
91 lines (85 loc) · 2.14 KB
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<script>
export default {
onLaunch: function() {
// 获取系统语言,并判断本地储存是否设置语言,若本地设置了就使用本地设置的语言
let sys = uni.getSystemInfoSync().language
console.log(sys);
let sysLanguage = 'zh-Hant'
if(sys.indexOf('en') != '-1') sysLanguage = 'en'
if(sys.indexOf('zh-Hans') != '-1' || sys.indexOf('zh-CN') != '-1') sysLanguage = 'zh-Hans'
if(sys.indexOf('zh-Hant') != '-1' || sys.indexOf('zh-HK') != '-1') sysLanguage = 'zh-Hans'
if(sys.indexOf('ko') != '-1') sysLanguage = 'ko'
let language = uni.getStorageSync('lang') ? uni.getStorageSync('lang') : sysLanguage
// 根据选择的语言配置
this.setTabLanguage(language)
// uni.showToast({
// title: sysLanguage,
// icon: 'none'
// })
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uni-scss/index.scss';
@import "@/uni_modules/uview-ui/index.scss";
@import '@/common/css/base.css';
/* #ifndef APP-NVUE */
@import '@/static/customicons.css';
// 设置整个项目的背景色
page {
background-color: #f9f9f9;
width: 100vw;
}
/* #endif */
.example-info {
font-size: 14px;
color: #333;
padding: 10px;
}
.u-form-item__body__right__message{
margin-left: 0 !important;
}
.home-search{
.u-search{
.u-search__content{
border-radius: 8px !important;
background-color: #fff !important;
input{
background-color: #fff !important;
&::placeholder, &::-webkit-input-placeholder{
color: #B8BBC3 !important;
}
}
}
}
}
.product-search{
.u-search{
.u-search__content{
border-radius: 32px !important;
background-color: #fff !important;
box-shadow: 0px 0px 5px 0px #E8E1D9 inset;
input{
background-color: transparent !important;
&::placeholder, &::-webkit-input-placeholder{
color: #B8BBC3 !important;
}
}
}
}
}
.common-close{
width: 40rpx;
height: 40rpx;
position: fixed;
top: 40rpx;
left: 40rpx;
}
</style>