Compare commits

..

No commits in common. "3838ee75637e0b8324d53e45b403f505527c2407" and "ea1ca41c62ef77b733bb120c2369a134c7905b66" have entirely different histories.

5 changed files with 31 additions and 129 deletions

12
App.vue
View File

@ -63,18 +63,6 @@
text-align: right; text-align: right;
} }
.animation {
transition: all 0.2s ease;
}
//
.extra-space1 {
height: 400rpx;
}
//
.extra-space2 {
height: 200rpx;
}
.checkBox { .checkBox {
weight: 40rpx; weight: 40rpx;
height: 40rpx; height: 40rpx;

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="mealsBox rad8 flex column m-r-24 m-l-24 m-b-24 p-24 bg-w boxshadow"> <view class="mealsBox rad8 flex column m-r-24 m-l-24 m-t-24 p-24 bg-w boxshadow">
<view class="flex"> <view class="flex">
<view class="flex3 ofh"> <view class="flex3 ofh">
<view class="fz24 fcb m-t-12">订单号{{order.order_sn}}</view> <view class="fz24 fcb m-t-12">订单号{{order.order_sn}}</view>

View File

@ -10,7 +10,7 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"mqtt": "^2.18.9", "mqtt": "^2.18.9",
"uview-ui": "^2.0.38" "uview-ui": "^2.0.36"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -1,52 +1,6 @@
<template> <template>
<view> <view>
<!-- topbar --> <u-tabs-swiper ref="tabs" :list="list" :is-scroll="false"></u-tabs-swiper>
<u-navbar title="确认订单" bgColor="#d43030" :titleStyle="{ color: '#FFF'}" :autoBack="true" placeholder>
<view class="u-nav-slot" slot="left">
<u-icon name="arrow-left" color="#fff" size="19"></u-icon>
</view>
</u-navbar>
<!-- tab -->
<view class="tabListBox m-l-24 m-r-24 m-t-24 flex msb">
<view class="tabBox flex mac mc fz32" v-for="(tab,index) in tabList" :key="index" @click="handlerTab(index)"
:class="current===index?'fb':''">
{{tab}}
</view>
</view>
<!-- tabLine -->
<view class="tabLineBox flex mac mc z-top" :style="{ left: tabLineLeft + 'rpx' }">
<view class="tabLine rad8 bg-m"></view>
</view>
<!-- 订单页 swiper -->
<swiper class="swiperClass m-t-12" :current="current" @animationfinish="animationfinish">
<swiper-item class="swiperClass">
<scroll-view scroll-y class="swiperClass">
<view v-if="orderList_unpaid.length>0">
<orderItem v-for="order in orderList_unpaid" :order=order :key="order.id"></orderItem>
<u-divider class="m-r-24 m-l-24" text="没有更多了" :hairline="true"></u-divider>
<view class="extra-space2"></view>
</view>
</scroll-view>
</swiper-item>
<swiper-item>
<view v-if="orderList_paid.length>0">
<orderItem v-for="order in orderList_paid" :order=order :key="order.id"></orderItem>
<u-divider class="m-r-24 m-l-24" text="没有更多了" :hairline="true"></u-divider>
<view class="extra-space2"></view>
</view>
</swiper-item>
<swiper-item>
<view v-if="orderList_refund.length>0">
<orderItem v-for="order in orderList_refund" :order=order :key="order.id"></orderItem>
<u-divider class="m-r-24 m-l-24" text="没有更多了" :hairline="true"></u-divider>
<view class="extra-space2"></view>
</view>
</swiper-item>
</swiper>
<!-- tabbar -->
<view>
<tabbar></tabbar>
</view>
</view> </view>
</template> </template>
@ -54,73 +8,15 @@
export default { export default {
data() { data() {
return { return {
tabList: ['待支付', '已付款', '退款售后'], // tab list: [{
current: 0, // name: '待收货'
swiperCurrent: 0, // swipercurrentswiper-item }, {
tabLineLeft: 24 //tabLine left name: '待付款'
} }, {
}, name: '待评价',
computed: { count: 5
// }],
orderList_unpaid() {
return this.$store.state.orderList.filter(item => item.main_status === '未付款')
},
// 退
orderList_paid(){
return this.$store.state.orderList.filter(item => item.main_status === '已付款' && item.refund_status === '未申请')
},
//退
orderList_refund(){
return this.$store.state.orderList.filter(item => item.refund_status !== '未申请')
}
},
methods: {
//tab current
handlerTab(index) {
this.current = index
},
// swipercurrent
animationfinish(e) {
this.current = e.detail.current
}
},
watch: {
current: {
handler(val) {
// tabLine left
const tabWidth = 200
const spacing = (750 - tabWidth * this.tabList.length - 48) / (this.tabList.length -
1) // 75048
this.tabLineLeft = 24 + val * (tabWidth + spacing) // left
}
} }
} }
} }
</script> </script>
<style lang="scss" scoped>
.tabListBox {
height: 77rpx;
}
.tabBox {
width: 200rpx;
height: 77rpx;
}
.tabLineBox {
width: 200rpx;
height: 8rpx;
position: absolute;
transition: all .2s ease;
}
.tabLine {
width: 70rpx;
height: 8rpx;
}
.swiperClass {
height: calc(100vh - 297rpx);
}
</style>

View File

@ -127,6 +127,16 @@
this.$store.commit('setTabbarCurrent', 1) this.$store.commit('setTabbarCurrent', 1)
}, },
watch: { watch: {
// 'spuList': {
// handler(newVal, oldVal) {
// console.log("spuList ")
// console.log(":", newVal)
// console.log(":", oldVal)
// //
// // this.someOtherFunction()
// },
// deep: true // true
// }
}, },
computed: { computed: {
// //
@ -339,6 +349,14 @@
background-color: $uni-color-error; background-color: $uni-color-error;
} }
.extra-space1 {
height: 400rpx;
}
.extra-space2 {
height: 200rpx;
}
.cartBox { .cartBox {
z-index: 10071; z-index: 10071;
width: calc(100vw - 48rpx); width: calc(100vw - 48rpx);