页面设计公共初始优化
parent
9029bee564
commit
ac383dcb45
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="(data || null) != null">
|
||||
<block v-if="(data || null) != null">
|
||||
<!-- 搜索 -->
|
||||
<block v-if="(data.is_header || 0) == 1">
|
||||
<!-- 搜索框 -->
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</block>
|
||||
</view>
|
||||
<view v-else>
|
||||
</block>
|
||||
<block v-else>
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
|
|
@ -74,10 +74,8 @@
|
|||
// 加载数据
|
||||
this.get_data();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
// 公共onshow事件
|
||||
this.init_common();
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
|
|
@ -85,7 +83,15 @@
|
|||
this.get_data();
|
||||
},
|
||||
|
||||
methods: {
|
||||
methods: {
|
||||
// 初始化公共
|
||||
init_common() {
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
get_data(params = {}) {
|
||||
// 还没有数据则读取缓存
|
||||
|
|
@ -98,7 +104,10 @@
|
|||
this.setData(upd_data);
|
||||
|
||||
// 已有本地缓存则直接取远程有效数据(默认首次取的是远程缓存数据)
|
||||
params['is_cache'] = 0;
|
||||
params['is_cache'] = 0;
|
||||
|
||||
// 公共onshow事件
|
||||
this.init_common();
|
||||
}
|
||||
} else {
|
||||
// 已有本地缓存则直接取远程有效数据(默认首次取的是远程缓存数据)
|
||||
|
|
@ -145,7 +154,10 @@
|
|||
// 标题名称
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.data.name
|
||||
});
|
||||
});
|
||||
|
||||
// 公共onshow事件
|
||||
this.init_common();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
|
|
|
|||
Loading…
Reference in New Issue