弹窗底部距离优化

master
gongfuxiang 2025-02-06 14:21:37 +08:00
parent 302f5946f8
commit fb4264d4a2
10 changed files with 79 additions and 42 deletions

36
App.vue
View File

@ -210,7 +210,10 @@
cache_diy_page_data_key: 'cache_diy_page_data_key',
// apptabbar
cache_app_tabbar_height_key: 'cache_app_tabbar_height_key',
cache_app_system_tabbar_height_key: 'cache_app_system_tabbar_height_key',
// diy
cache_app_diy_tabbar_height_key: 'cache_app_diy_tabbar_height_key',
// apptabbar
cache_tabbar_badge_key: 'cache_tabbar_badge_key',
@ -943,20 +946,35 @@
}
return value;
},
/**
* 底部菜单高度数据存储
* diy底部菜单高度数据存储
* value 高度
*/
app_tabbar_height_save(value) {
uni.setStorageSync(this.data.cache_app_tabbar_height_key, value);
app_diy_tabbar_height_save(value) {
uni.setStorageSync(this.data.cache_app_diy_tabbar_height_key, value);
},
/**
* diy底部菜单高度数据读取
*/
app_diy_tabbar_height_value() {
return parseInt(uni.getStorageSync(this.data.cache_app_diy_tabbar_height_key) || 0);
},
/**
* 系统底部菜单高度数据存储
* value 高度
*/
app_system_tabbar_height_save(value) {
uni.setStorageSync(this.data.cache_app_system_tabbar_height_key, value);
},
/**
* 底部菜单高度数据读取
* 系统底部菜单高度数据读取
*/
app_tabbar_height_value() {
return parseInt(uni.getStorageSync(this.data.cache_app_tabbar_height_key) || 0);
app_system_tabbar_height_value() {
return parseInt(uni.getStorageSync(this.data.cache_app_system_tabbar_height_key) || 0);
},
/**
@ -3055,7 +3073,7 @@
if(temp !== undefined && this.is_tabbar_pages()) {
obj.$vm.setData(
{
bottom_fixed_style: 'bottom:'+(((this.app_tabbar_height_value()-8)*2)+20)+'rpx'
bottom_fixed_style: 'bottom:'+(((this.app_system_tabbar_height_value()-8)*2)+20)+'rpx'
});
}
}

View File

@ -188,7 +188,7 @@
this.$emit('onFooterHeight', value);
//
app.globalData.app_tabbar_height_save(value);
app.globalData.app_system_tabbar_height_save(value);
},
//

View File

@ -81,7 +81,7 @@
</view>
</view>
<!-- 当前diy页面底部菜单非公共底部菜单 -->
<block v-if="is_show_footer == 1">
<block v-if="is_show_footer">
<componentDiyFooter :propKey="footer_data.id" :propValue="footer_data.com_data" @onFooterHeight="footer_height_value_event"></componentDiyFooter>
<view v-if="footer_height_value > 0" :style="'height:' + footer_height_value + 'rpx;'"></view>
</block>
@ -219,7 +219,7 @@
diy_data: [],
page_style: '',
page_img_style: '',
is_show_footer: 0,
is_show_footer: false,
tabs_home_id: this.propDataId,
//
goods_list: [],
@ -287,6 +287,13 @@
this.setData({
is_show_footer: is_show_footer && !is_tabbar,
});
// diy0
if(!this.is_show_footer) {
// diy
if(app.globalData.current_page(false) == 'pages/diy/diy') {
app.globalData.app_diy_tabbar_height_save(0);
}
}
} else {
app.globalData.is_config(this, 'init_config');
}
@ -620,8 +627,13 @@
//
footer_height_value_event(value) {
this.setData({
footer_height_value: value * 2 + 20,
footer_height_value: (value*2)+20,
});
// diy
if(app.globalData.current_page(false) == 'pages/diy/diy') {
app.globalData.app_diy_tabbar_height_save(value);
}
},
//
goods_buy_event(index, goods = {}, params = {}, back_data = null) {

View File

@ -201,7 +201,7 @@
<style lang="scss" scoped>
.tabs-container {
z-index: 3;
z-index: 2;
.tabs-top {
position: fixed;
left: 0;

View File

@ -100,8 +100,13 @@
},
//
init_handle() {
//
var tabbar_height = app.globalData.data.is_use_native_tabbar != 1 && this.propPosition == 'bottom' && app.globalData.is_tabbar_pages() ? app.globalData.app_tabbar_height_value() * 2 + 20 : 0;
//
if(app.globalData.data.is_use_native_tabbar != 1 && this.propPosition == 'bottom' && app.globalData.is_tabbar_pages()) {
var tabbar_height = (app.globalData.app_system_tabbar_height_value()*2)+20;
} else {
var height = (app.globalData.current_page(false) == 'pages/diy/diy') ? app.globalData.app_diy_tabbar_height_value() : 0;
var tabbar_height = (height > 0) ? (height*2)+20 : 0;
}
//
var left = 0;

View File

@ -219,7 +219,7 @@
//
if(!this.propIsBaseMode) {
//
var tabbar_height = app.globalData.is_tabbar_pages() ? (app.globalData.app_tabbar_height_value()*2) : 0;
var tabbar_height = app.globalData.is_tabbar_pages() ? (app.globalData.app_system_tabbar_height_value()*2) : 0;
//
var info = params.info || null;
if(info != null && (params.source || null) != null) {

View File

@ -457,7 +457,7 @@
//
app.globalData.page_event_onload_handle(params);
//
//
// params.data urlencode(base64_encode(json))
// buy_type goods cart
// goods_data urlencode(base64_encode(json[{goods_id,stock,spec}]))
@ -465,17 +465,19 @@
// ids ids
if ((params.data || null) != null) {
params = JSON.parse(base64.decode(decodeURIComponent(params.data)));
this.setData({
params: params,
is_realstore_model: (params.realstore_id || null) != null,
plugins_points_status: app.globalData.get_config('plugins_base.points.data.is_default_use_points', null) == 1,
pay_url: app.globalData.get_request_url('pay', 'order'),
qrcode_url: app.globalData.get_request_url('paycheck', 'order'),
});
//
uni.removeStorageSync(app.globalData.data.cache_buy_user_address_select_key);
}
}
//
this.setData({
params: params,
is_realstore_model: (params.realstore_id || null) != null,
plugins_points_status: app.globalData.get_config('plugins_base.points.data.is_default_use_points', null) == 1,
pay_url: app.globalData.get_request_url('pay', 'order'),
qrcode_url: app.globalData.get_request_url('paycheck', 'order'),
});
//
uni.removeStorageSync(app.globalData.data.cache_buy_user_address_select_key);
},
onShow() {

View File

@ -12,13 +12,13 @@
<view class="item padding-vertical-main oh pr" :class="index > 0 ? 'br-t-f5' : ''" :data-index="index" @tap="item_event">
<view>
<text>{{item.name}}</text>
<block v-if="(item.gender_text || null) != null">
<block v-if="(item.gender_name || null) != null">
<text class="cr-grey-white padding-horizontal-sm">|</text>
<text>{{item.gender_text}}</text>
<text>{{item.gender_name}}</text>
</block>
<block v-if="(item.age_text || null) != null">
<block v-if="(item.age_name || null) != null">
<text class="cr-grey-white padding-horizontal-sm">|</text>
<text>{{item.age_text}}</text>
<text>{{item.age_name}}</text>
</block>
</view>
<view>{{item.idcard}}</view>
@ -100,7 +100,7 @@
//
onPullDownRefresh() {
this.init();
this.get_data();
},
methods: {

View File

@ -213,7 +213,7 @@
//
onPullDownRefresh() {
this.init();
this.get_data();
},
methods: {
@ -242,10 +242,10 @@
hospital_relation_tags_list: data.hospital_relation_tags_list || [],
});
//
var health = this.data.health || {};
var health = this.data.health || null;
this.setData({
health: health,
health_tips: health.map(function(v){return v.msg;}).join(';')
health: health || {},
health_tips: (health == null) ? '' : health.map(function(v){return v.msg;}).join(';')
});
//
if(temp_data !== null) {

View File

@ -28,13 +28,13 @@
<view v-if="(patient_data || null) != null" class="oh pr margin-top">
<view>
<text>{{patient_data.name}}</text>
<block v-if="(patient_data.gender_text || null) != null">
<block v-if="(patient_data.gender_name || null) != null">
<text class="cr-grey-white padding-horizontal-sm">|</text>
<text>{{patient_data.gender_text}}</text>
<text>{{patient_data.gender_name}}</text>
</block>
<block v-if="(patient_data.age_text || null) != null">
<block v-if="(patient_data.age_name || null) != null">
<text class="cr-grey-white padding-horizontal-sm">|</text>
<text>{{patient_data.age_text}}</text>
<text>{{patient_data.age_name}}</text>
</block>
</view>
<view>{{patient_data.idcard}}</view>