弹窗底部距离优化
parent
302f5946f8
commit
fb4264d4a2
36
App.vue
36
App.vue
|
|
@ -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'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@
|
|||
this.$emit('onFooterHeight', value);
|
||||
|
||||
// 存储底部菜单高度
|
||||
app.globalData.app_tabbar_height_save(value);
|
||||
app.globalData.app_system_tabbar_height_save(value);
|
||||
},
|
||||
|
||||
// 协议事件
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
// diy页面不显示底部菜单则设置底部菜单高度为0
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.tabs-container {
|
||||
z-index: 3;
|
||||
z-index: 2;
|
||||
.tabs-top {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue