细节优化

master
gongfuxiang 2021-12-01 13:54:58 +08:00
parent 82bd117934
commit 1f006c1b6c
5 changed files with 41 additions and 15 deletions

35
App.vue
View File

@ -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;
}
},

View File

@ -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;

View File

@ -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: {

View File

@ -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: {

View File

@ -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;