Commit fb0267eb by 张辉

upddate

parent 35309dfc
...@@ -37,7 +37,7 @@ Vue.prototype.setPageNavState = function () { ...@@ -37,7 +37,7 @@ Vue.prototype.setPageNavState = function () {
isCloseLeft: false, isCloseLeft: false,
isShowTitle: false, isShowTitle: false,
isShowNav: false, isShowNav: false,
isCloseWebView: true isCloseWebView: false
}); });
bridge.getBarHeight().then(response => { bridge.getBarHeight().then(response => {
......
...@@ -574,7 +574,19 @@ export default { ...@@ -574,7 +574,19 @@ export default {
// const callJsBridge=callJsBridgeGenerator(); // const callJsBridge=callJsBridgeGenerator();
// this.callJsBridge.next(); // this.callJsBridge.next();
// this.callJsBridge.next(); // this.callJsBridge.next();
this.setPageNavState(); this.$bridge
.setPageNavState({
headerColor: "#fff",
isShowClose: true,
isShowBack: true,
isCloseLeft: true,
isShowTitle: true,
isShowNav: true,
isCloseWebView: true
})
.then(res => {
console.log("setPageNavState in bill index");
});
this.setBarHeightLowBee(); this.setBarHeightLowBee();
this.globalNavLeftArrowClick(this.navLeftArrowClick); this.globalNavLeftArrowClick(this.navLeftArrowClick);
await this.loadPeriodData(); await this.loadPeriodData();
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
<div class="list" v-for="(item, index) in dataList" :key="index"> <div class="list" v-for="(item, index) in dataList" :key="index">
<div class="title"> <div class="title">
<div class="title_info">{{ item.feeType }}</div> <div class="title_info">{{ item.feeType }}</div>
<i :class="item.amount>0?'orangeColor':''">{{ item.amount |moneyNum}}</i> <i :class="item.amount > 0 ? 'orangeColor' : ''">{{
item.amount | moneyNum
}}</i>
</div> </div>
<p> <p>
<span>{{ item.dateTime|MM-DD HH:mm }}</span> <span>{{ item.dateTime|MM-DD HH:mm }}</span>
...@@ -34,11 +36,11 @@ export default { ...@@ -34,11 +36,11 @@ export default {
components: { components: {
HeaderW, HeaderW,
[Icon.name]: Icon, [Icon.name]: Icon,
MescrollVue MescrollVue,
}, },
mixins: [MescrollMixins], mixins: [MescrollMixins],
computed: { computed: {
...mapGetters(["getBeginDate"]) ...mapGetters(["getBeginDate"]),
}, },
data() { data() {
return { return {
...@@ -48,23 +50,23 @@ export default { ...@@ -48,23 +50,23 @@ export default {
callback: this.upCallback, // 上拉回调,此处可简写; 相当于 callback: function (page, mescroll) { getListData(page); } callback: this.upCallback, // 上拉回调,此处可简写; 相当于 callback: function (page, mescroll) { getListData(page); }
page: { page: {
num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始 num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
size: 10 // 每页数据的数量 size: 10, // 每页数据的数量
}, },
noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看 noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
toTop: { toTop: {
src: "./static/mescroll/mescroll-totop.png" // 回到顶部按钮的图片路径,支持网络图 src: "./static/mescroll/mescroll-totop.png", // 回到顶部按钮的图片路径,支持网络图
}, },
empty: { empty: {
// 列表第一页无任何数据时,显示的空提示布局; 需配置warpId才生效; // 列表第一页无任何数据时,显示的空提示布局; 需配置warpId才生效;
warpId: "dataTable", // 父布局的id; warpId: "dataTable", // 父布局的id;
//icon: "../../assets/images/data-empty.png", // 图标,支持网络图 //icon: "../../assets/images/data-empty.png", // 图标,支持网络图
tip: "暂无相关数据~" // 提示 tip: "暂无相关数据~", // 提示
}, },
lazyLoad: { lazyLoad: {
use: true // 是否开启懒加载,默认false use: true, // 是否开启懒加载,默认false
} },
}, },
dataList: [] dataList: [],
}; };
}, },
methods: { methods: {
...@@ -77,9 +79,9 @@ export default { ...@@ -77,9 +79,9 @@ export default {
this.loadRecord({ this.loadRecord({
accountId: this.accountId, accountId: this.accountId,
page: page.num, page: page.num,
pageSize: "10" pageSize: "10",
}).then( }).then(
resdata => { (resdata) => {
let arr = resdata.list; let arr = resdata.list;
// 如果是第一页需手动制空列表 // 如果是第一页需手动制空列表
if (page.num === 1) this.dataList = []; if (page.num === 1) this.dataList = [];
...@@ -90,18 +92,40 @@ export default { ...@@ -90,18 +92,40 @@ export default {
mescroll.endSuccess(arr.length); mescroll.endSuccess(arr.length);
}); });
}, },
err => { (err) => {
mescroll.endErr(); mescroll.endErr();
} }
); );
}, },
setBarHeightLowBee() {
setTimeout(() => {
const barHeight = localStorage.getItem("barHeight");
let conHeight = 46 + parseInt(barHeight);
conHeight = conHeight ? conHeight : 0;
const dom = document.getElementsByClassName("iosStyle")[0];
if (dom) {
dom.setAttribute(
"style",
"padding-top:" + barHeight + "px !important"
);
}
const dom2 = document.getElementsByClassName("container")[0];
if (dom2) {
dom2.setAttribute(
"style",
"padding-top:" + conHeight + "px !important"
);
}
}, 100);
},
navLeftArrowClick() { navLeftArrowClick() {
this.$router.go(-1); this.$router.go(-1);
} },
}, },
mounted() { mounted() {
this.setPageNavState(); this.setPageNavState();
//this.setBarHeightLowBee(); this.setBarHeightLowBee();
this.globalNavLeftArrowClick(this.navLeftArrowClick); this.globalNavLeftArrowClick(this.navLeftArrowClick);
this.accountId = this.$route.query.accountId; this.accountId = this.$route.query.accountId;
const fromType = this.$route.query.fromType; const fromType = this.$route.query.fromType;
...@@ -112,11 +136,11 @@ export default { ...@@ -112,11 +136,11 @@ export default {
} }
} }
}, },
created(){ created() {
this.$bridge.setBarColor({ this.$bridge.setBarColor({
barColor:"#ffffff" barColor: "#ffffff",
}) });
} },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment