细节优化
parent
82bd117934
commit
1f006c1b6c
35
App.vue
35
App.vue
|
|
@ -70,14 +70,19 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* 获取设备信息
|
||||
* 获取设备信息
|
||||
* key 指定key
|
||||
* dv 默认数据(不存在则读取、默认null)
|
||||
* is_real 是否实时读取
|
||||
*/
|
||||
get_system_info(key) {
|
||||
var info = uni.getStorageSync(this.data.cache_system_info_key) || null;
|
||||
if (info == null) {
|
||||
info = this.set_system_info();
|
||||
get_system_info(key, dv, is_real) {
|
||||
var info = null;
|
||||
if((is_real || false) == true) {
|
||||
info = this.set_system_info();
|
||||
} else {
|
||||
info = uni.getStorageSync(this.data.cache_system_info_key) || null;
|
||||
}
|
||||
return (key|| null) == null ? info : (info[key] == undefined) ? null : info[key];
|
||||
return ((key|| null) == null) ? info : ((info[key] == undefined) ? (dv || null) : info[key]);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -1047,6 +1052,24 @@
|
|||
}
|
||||
// #endif
|
||||
return width;
|
||||
},
|
||||
|
||||
// 窗口高度处理
|
||||
window_height_handle(system) {
|
||||
var height = system.windowHeight;
|
||||
// 状态栏
|
||||
if(system.statusBarHeight > 0) {
|
||||
height += system.statusBarHeight;
|
||||
}
|
||||
// 导航栏
|
||||
if(system.windowTop > 0) {
|
||||
height += system.windowTop;
|
||||
}
|
||||
// 底部菜单
|
||||
if(system.windowBottom > 0) {
|
||||
height += system.windowBottom;
|
||||
}
|
||||
return height;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ iframe,
|
|||
.quick-movable-container,
|
||||
.online-service-movable-container,
|
||||
.bottom-fixed,
|
||||
.buy-nav {
|
||||
.buy-nav,
|
||||
.plugins-popupscreen .content {
|
||||
max-width: 800px !important;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
|
|
@ -52,7 +53,7 @@ uni-page-head {
|
|||
.uni-page-head-btn {
|
||||
position: fixed;
|
||||
left: auto;
|
||||
bottom: 60px;
|
||||
bottom: 70px;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
box-shadow: 0 0 10px rgb(0 0 0 / 30%);
|
||||
margin: 0 0 0 10px;
|
||||
|
|
|
|||
|
|
@ -92,13 +92,14 @@
|
|||
}
|
||||
|
||||
// 数据设置
|
||||
var system = app.globalData.get_system_info();
|
||||
var win_width = app.globalData.window_width_handle(system.windowWidth);
|
||||
var system = app.globalData.get_system_info(null, null, true);
|
||||
var width = app.globalData.window_width_handle(system.windowWidth);
|
||||
var height = app.globalData.window_height_handle(system);
|
||||
this.setData({
|
||||
is_first: 0,
|
||||
system: system,
|
||||
x: win_width-43,
|
||||
y: (system.windowHeight || 450) - 380
|
||||
x: width - 43,
|
||||
y: height - 380
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -99,12 +99,13 @@
|
|||
}
|
||||
|
||||
// 数据设置
|
||||
var system = app.globalData.get_system_info();
|
||||
var system = app.globalData.get_system_info(null, null, true);
|
||||
var height = app.globalData.window_height_handle(system);
|
||||
this.setData({
|
||||
is_first: 0,
|
||||
system: system,
|
||||
x: 12,
|
||||
y: (system.windowHeight || 450) - 260
|
||||
y: height - 180
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@
|
|||
top: 0;
|
||||
}
|
||||
.plugins-popupscreen .content {
|
||||
margin-top: calc(50vh - 200rpx);
|
||||
margin-top: calc(50vh - 200rpx) !important;
|
||||
}
|
||||
.plugins-popupscreen .content image {
|
||||
width: 600rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue