classify 8.4
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -65,14 +65,11 @@ export default {
|
||||
time: new Date(this.time)
|
||||
}).then((res)=>{
|
||||
if(res.errCode == 0) {
|
||||
uni.redirectTo({
|
||||
url: '/pageE/tool/Manicure'
|
||||
});
|
||||
// this.$refs.uToast.show({
|
||||
// title: res.message,
|
||||
// type: 'success',
|
||||
// url: '/pageE/tool/Manicure'
|
||||
// })
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'success',
|
||||
back: true,
|
||||
})
|
||||
} else {
|
||||
this.showToast(res.message, 'error');
|
||||
}
|
||||
|
||||
@@ -3,8 +3,16 @@
|
||||
<view class="title">
|
||||
<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-icon name="arrow-down-fill" :color="current == 0 ? '#FF780F' : '#333333'" size="17" class="order-icon" :style="{ left: list[0].name == '平台历史订单' ? '236rpx' : '252rpx' }"></u-icon>
|
||||
<view class="popup" v-if="showPopup" @click="onTap">
|
||||
<view class="popup_cont" @click="replaces(1)">
|
||||
实体店历史订单
|
||||
</view>
|
||||
<view class="popup_cont" @click="replaces(2)">
|
||||
平台历史订单
|
||||
</view>
|
||||
</view>
|
||||
</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="loadmore">
|
||||
<view v-for="(item, index) in orderList" :key="index" class="order-item">
|
||||
@@ -13,10 +21,10 @@
|
||||
<view class="order-status">{{ item.order_status | viewStatus }}</view>
|
||||
</view>
|
||||
<view class="order-info">
|
||||
<image src="../static/mine/23.png"></image>
|
||||
<image :src="item.goods_image"></image>
|
||||
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
|
||||
<view>骑手名字:{{ item.takeawayer_name || '' }}</view>
|
||||
<view>联系方式:{{ item.member_phone || '' }}</view>
|
||||
<view>联系方式:{{ item.takeawayer_mobile || '' }}</view>
|
||||
<view>所属公司:{{ item.company || '' }}</view>
|
||||
</view>
|
||||
<view v-if="item.order_status == 0">
|
||||
@@ -56,14 +64,6 @@
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="popup" v-if="showPopup" @click="onTap">
|
||||
<view class="popup_cont" @click="replaces(1)">
|
||||
实体店历史订单
|
||||
</view>
|
||||
<view class="popup_cont" @click="replaces(2)">
|
||||
平台历史订单
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@@ -86,6 +86,7 @@ export default {
|
||||
orderList: [],
|
||||
timer: true,
|
||||
commentList: [],
|
||||
swiperHeight: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -133,6 +134,9 @@ export default {
|
||||
this.sendLaundryOrderList();
|
||||
this.sendCommentList();
|
||||
},
|
||||
onLoad() {
|
||||
this.setViewHeight();
|
||||
},
|
||||
methods: {
|
||||
async sendLaundryOrderList({ load = 'reload' } = {}) {
|
||||
let type = this.list[0].name == '平台历史订单' ? 1 : 2;
|
||||
@@ -186,6 +190,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
setViewHeight() {
|
||||
const res = uni.getSystemInfoSync();
|
||||
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
||||
},
|
||||
toComment(id) {
|
||||
this.$u.route('/pageE/tool/washComment', {
|
||||
id: id
|
||||
@@ -235,6 +243,34 @@ export default {
|
||||
transform: translate(0, -50%);
|
||||
z-index: 9;
|
||||
}
|
||||
.popup{
|
||||
width: 100%;
|
||||
height: calc(calc(100vh - 88rpx) - var(--window-top));
|
||||
position: absolute;
|
||||
top: 88rpx;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: top;
|
||||
align-items: center;
|
||||
transition-duration: 0.3s;
|
||||
.popup_cont{
|
||||
border-top: 1px solid RGBA(239, 236, 240, 1);
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size:28rpx;
|
||||
font-family:PingFang SC;
|
||||
font-weight:400;
|
||||
color:rgba(102,102,102,1);
|
||||
padding-left: 41rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
}
|
||||
.swiper-item {
|
||||
padding-top: 20rpx;
|
||||
@@ -309,35 +345,5 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.popup{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
top: 88px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: top;
|
||||
align-items: center;
|
||||
transition-duration: 0.3s;
|
||||
.popup_cont{
|
||||
border-top: 1px solid RGBA(239, 236, 240, 1);
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size:28rpx;
|
||||
font-family:PingFang SC;
|
||||
font-weight:400;
|
||||
color:rgba(102,102,102,1);
|
||||
padding-left: 41rpx;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,7 +3,7 @@
|
||||
<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>
|
||||
</view>
|
||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ minHeight: swiperHeight }">
|
||||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y="true" style="height: 100%;">
|
||||
<view class="order-info">
|
||||
@@ -175,7 +175,7 @@
|
||||
<view class="checkd">
|
||||
<label class="radio-view" v-for="(item, index) in items.extend_order_goods" :key="index">
|
||||
<view class="radio">
|
||||
<u-radio color="#F0AD4E" :name="items.order_id + ' ' + item.goods_id" active-color="#FF780F" icon-size="34"></u-radio>
|
||||
<u-radio color="#F0AD4E" :name="items.order_id + ' ' + item.goods_id" active-color="#FF780F" icon-size="34" shape="circle"></u-radio>
|
||||
</view>
|
||||
<view class="store_info">
|
||||
<view class="info_img">
|
||||
@@ -375,8 +375,13 @@ export default {
|
||||
this.$u.api.sendLaundrySave(params).then(res => {
|
||||
this.$u.toast(res.message);
|
||||
if(res.errCode == 0) {
|
||||
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'success',
|
||||
back: true,
|
||||
})
|
||||
} else {
|
||||
this.$u.toast(res.message);
|
||||
this.debounce = true;
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user