|
@@ -1,71 +1,29 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <view class="order-content-wrap">
|
|
|
|
|
|
|
+ <view class="page">
|
|
|
|
|
+ <u-sticky>
|
|
|
|
|
+ <View class=" tabs">
|
|
|
|
|
+ <u-tabs :list="tabList" :scrollable="false"
|
|
|
|
|
+ lineWidth="30"
|
|
|
|
|
+ lineColor="#FFE05C"
|
|
|
|
|
+ :activeStyle="{
|
|
|
|
|
+ color: '#333333',
|
|
|
|
|
+ fontWeight: 'bold',
|
|
|
|
|
+ transform: 'scale(1.05)'
|
|
|
|
|
+ }"
|
|
|
|
|
+ :current="tabIndex" @click="clickTab"></u-tabs>
|
|
|
|
|
+ </View>
|
|
|
|
|
+ </u-sticky>
|
|
|
|
|
|
|
|
- <!-- 导航-->
|
|
|
|
|
- <view class="service-order-tab-bar">
|
|
|
|
|
- <view class="service-order-tab-item" :class="{ active: currentServiceTab === 'orderTab1' }"
|
|
|
|
|
- @click="changeServiceTab('orderTab1')">
|
|
|
|
|
- <text :class="{ underline: currentServiceTab === 'orderTab1' }">可使用</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="service-order-tab-item" :class="{ active: currentServiceTab === 'orderTab2' }"
|
|
|
|
|
- @click="changeServiceTab('orderTab2')">
|
|
|
|
|
- <text :class="{ underline: currentServiceTab === 'orderTab2' }">已使用</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="service-order-tab-item" :class="{ active: currentServiceTab === 'orderTab3' }"
|
|
|
|
|
- @click="changeServiceTab('orderTab3')">
|
|
|
|
|
- <text :class="{ underline: currentServiceTab === 'orderTab3' }">已过期</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="custom-line"></view>
|
|
|
|
|
- <!-- 当前订单-->
|
|
|
|
|
- <view class="service-order">
|
|
|
|
|
-
|
|
|
|
|
- <!-- 门店列表 -->
|
|
|
|
|
- <view v-if="countsList.length > 0" v-for="(item, index) in countsList"
|
|
|
|
|
- class="store-wrap bg-img">
|
|
|
|
|
- <view class="row-list">
|
|
|
|
|
- <view class="store-content">
|
|
|
|
|
- <view class="h-left-content">
|
|
|
|
|
- <view class="h-text">
|
|
|
|
|
- <view class="money">¥{{ item.discountsPrice }}</view>
|
|
|
|
|
- <view class="desc">{{ item.name }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="h-center-content">
|
|
|
|
|
- <view class="title">
|
|
|
|
|
- <text class="h-value">门店通用</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="title">
|
|
|
|
|
- 使用平台:<text v-if="item.strategyType == '0'">全平台</text>
|
|
|
|
|
- <text v-else-if="item.strategyType == '1'">个人优惠卷</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="title">
|
|
|
|
|
- 有效时间:{{ this.dateFormat(item.startTime) }}~{{ this.dateFormat(item.endTime) }}
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="h-right-content">
|
|
|
|
|
- <view class="h-btn">
|
|
|
|
|
- <view @click="gotoUseCoupon()" v-if="item.state == 0" class="h-btn-value-use">立即使用</view>
|
|
|
|
|
- <!-- <view @click="gotoReceiveCoupon()" v-else-if="index == 1" class="h-btn-value-receive">立即领取</view> -->
|
|
|
|
|
- <view v-else-if="item.state == 1" class="h-btn-img">
|
|
|
|
|
- <image src="../../static/coupon/u2109.png" mode=""></image>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-else class="h-btn-img">
|
|
|
|
|
- <image src="../../static/coupon/u2108.png" mode=""></image>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <!-- 订单列表 -->
|
|
|
|
|
+ <view :style="{'height':windowHeight}" >
|
|
|
|
|
+ <swiper :style="{'height':windowHeight}" :current="tabIndex" @change="swiperChange">
|
|
|
|
|
+ <swiper-item class="swiperItem" v-for="(item,index) in tabList" :key="index" >
|
|
|
|
|
+ <view>
|
|
|
|
|
+ <mescroll-item ref="MescrollItem" :i="index" :index="tabIndex" :tabs="tabList" :height="windowHeight">
|
|
|
|
|
+ </mescroll-item>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-else class="footer">
|
|
|
|
|
- <view class="">---暂无数据---</view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view v-if="countsList.length > 0" class="footer">
|
|
|
|
|
- <view class="">---到底了---</view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </swiper-item>
|
|
|
|
|
+ </swiper>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -73,38 +31,44 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
|
|
|
|
|
+ import MescrollItem from "./module/mescrollUni-item.vue";
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ components: {
|
|
|
|
|
+ MescrollItem
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- currentServiceTab: 'orderTab1', // 当前选中的 Tab
|
|
|
|
|
- reqParm: {
|
|
|
|
|
- auth: true,
|
|
|
|
|
- type: 0 // 我的优惠卷列表(0未使用, 1已使用, 2已过期 null查询全部)
|
|
|
|
|
- },
|
|
|
|
|
- countsList: []
|
|
|
|
|
|
|
+ windowHeight:'',
|
|
|
|
|
+ tabIndex:0,
|
|
|
|
|
+ tabList: [{
|
|
|
|
|
+ name: '可使用'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ name: '已使用'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ name: '已过期'
|
|
|
|
|
+ }],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
-
|
|
|
|
|
|
|
+ let sysInfo = uni.getSystemInfoSync()
|
|
|
|
|
+ this.windowHeight =sysInfo.windowHeight-44+'px'//除标题栏栏外的屏幕可用高度
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- // 切换菜单
|
|
|
|
|
- changeServiceTab(tab) {
|
|
|
|
|
- if (tab == 'orderTab1') { //全部
|
|
|
|
|
- this.reqParm.type = '0';
|
|
|
|
|
- } else if (tab == 'orderTab2') {
|
|
|
|
|
- this.reqParm.type = '1';
|
|
|
|
|
- } else if (tab == 'orderTab3') {
|
|
|
|
|
- this.reqParm.type = '2';
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
+ clickTab(e){
|
|
|
|
|
+ this.tabIndex = e.index
|
|
|
|
|
+ },
|
|
|
|
|
+ swiperChange(e){
|
|
|
|
|
+ this.tabIndex = e.detail.current
|
|
|
|
|
+ // if (this.$refs.MescrollItem[e.detail.current].orderList.length>0){
|
|
|
|
|
+ // this.$refs.MescrollItem[e.detail.current].downCallback()
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
-@import '/common/css/common.css';
|
|
|
|
|
|
|
+@import '../../common/css/common.css';
|
|
|
@import './index.rpx.scss';
|
|
@import './index.rpx.scss';
|
|
|
</style>
|
|
</style>
|