classify 8.4

This commit is contained in:
2020-08-04 19:08:04 +08:00
parent 1e9f442b7b
commit 2fd62acb73
26 changed files with 563 additions and 186 deletions

View File

@@ -1,9 +1,9 @@
<template>
<view class="manicure">
<view>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
<swiper-item class="swiper-item">
<scroll-view scroll-y class="order-list" @scrolltolower="reachBottom">
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
@@ -14,7 +14,7 @@
<view class="order-status">{{ item.status }}</view>
</view>
<view class="order-name">美甲人姓名{{ item.manicure_name }}</view>
<view class="order-date">时间{{ item.manicure_time | dateFormat }}</view>
<view class="order-date">时间{{ item.manicure_time | date }}</view>
</view>
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="orderList.length>=pageSize"></u-loadmore>
</view>
@@ -44,26 +44,20 @@ export default {
orderList: [],
loadStatus: 'loadmore',
timer: true,
swiperHeight: '',
}
},
onPullDownRefresh() {
this.getManicureList({ load: 'reload' });
},
onLoad() {
this.setViewHeight();
},
onShow() {
this.current = 0;
this.swiperCurrent = 0;
this.getManicureList({ load: 'reload' });
},
filters: {
dateFormat(value) {
let date = new Date(value * 1000);
let year, month, day;
year = date.getFullYear();
month = date.getMonth() + 1;
day = date.getDate();
return year + "-" + month + "-" + day;
}
},
methods: {
async getManicureList({ load }) {
const res = await this.$u.api.getManicureList({
@@ -94,6 +88,10 @@ export default {
this.page--;
})
},
setViewHeight() {
const res = uni.getSystemInfoSync();
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
},
tabsChange(index) {
this.swiperCurrent = index;
// this.toApplyPage(index);