|
|
|
@ -1,11 +1,20 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="container" :style="appThemeStyle"> |
|
|
|
|
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" :down="{ native: true }" @down="downCallback" :up="upOption" |
|
|
|
|
@up="upCallback"> |
|
|
|
|
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" :down="{ native: true }" |
|
|
|
|
@down="downCallback" :up="upOption" @up="upCallback"> |
|
|
|
|
|
|
|
|
|
<!-- tab栏 --> |
|
|
|
|
<u-tabs :list="tabs" :is-scroll="false" :current="curTab" :active-color="appTheme.mainBg" :duration="0.2" @change="onChangeTab" /> |
|
|
|
|
|
|
|
|
|
<!-- <u-tabs :list="tabs" :is-scroll="false" :current="curTab" :active-color="appTheme.mainBg" :duration="0.2" |
|
|
|
|
@change="onChangeTab" /> --> |
|
|
|
|
<view class="container"> |
|
|
|
|
<view class="classify-list"> |
|
|
|
|
<view class="list" v-for="(item,index) in tabs" :class="{'action':curTab==index}" |
|
|
|
|
@click="onChangeTab(index)" :key="index"> |
|
|
|
|
<text>{{item.name}}</text> |
|
|
|
|
<text class="line" v-show="curTab==index"></text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 退款/售后单 --> |
|
|
|
|
<view class="widget-list"> |
|
|
|
|
<view class="widget-detail" v-if="list.data.length>0" v-for="(item, index) in list.data" :key="index"> |
|
|
|
@ -15,7 +24,8 @@ |
|
|
|
|
<text class="col-m">{{ item.state_text }}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="detail-goods row-block dis-flex" @click.stop="handleTargetDetail(item.order_refund_id)"> |
|
|
|
|
<view class="detail-goods row-block dis-flex" |
|
|
|
|
@click.stop="handleTargetDetail(item.order_refund_id)"> |
|
|
|
|
<view class="goods-image"> |
|
|
|
|
<image class="image" :src="item.orderGoods.goods_image" mode="aspectFit"></image> |
|
|
|
|
</view> |
|
|
|
@ -24,7 +34,8 @@ |
|
|
|
|
<text class="twoline-hide">{{ item.orderGoods.goods_name }}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="goods-props clearfix"> |
|
|
|
|
<view class="goods-props-item" v-for="(props, idx) in item.orderGoods.goods_props" :key="idx"> |
|
|
|
|
<view class="goods-props-item" v-for="(props, idx) in item.orderGoods.goods_props" |
|
|
|
|
:key="idx"> |
|
|
|
|
<text>{{ props.value.name }}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -40,7 +51,8 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="detail-operate row-block dis-flex flex-x-end flex-y-center"> |
|
|
|
|
<view class="detail-btn btn-detail" @click.stop="handleTargetDetail(item.order_refund_id)">查看详情</view> |
|
|
|
|
<view class="detail-btn btn-detail" @click.stop="handleTargetDetail(item.order_refund_id)">查看详情 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<u-empty text="暂无数据显示哦~" v-else mode="list"></u-empty> |
|
|
|
@ -53,7 +65,10 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins' |
|
|
|
|
import { getEmptyPaginateObj, getMoreListData } from '@/core/app' |
|
|
|
|
import { |
|
|
|
|
getEmptyPaginateObj, |
|
|
|
|
getMoreListData |
|
|
|
|
} from '@/core/app' |
|
|
|
|
import * as RefundApi from '@/api/refund' |
|
|
|
|
|
|
|
|
|
// 每页记录数量 |
|
|
|
@ -83,7 +98,9 @@ |
|
|
|
|
// 首次自动执行 |
|
|
|
|
auto: true, |
|
|
|
|
// 每页数据的数量; 默认10 |
|
|
|
|
page: { size: pageSize }, |
|
|
|
|
page: { |
|
|
|
|
size: pageSize |
|
|
|
|
}, |
|
|
|
|
// 数量要大于2条才显示无更多数据 |
|
|
|
|
noMoreSize: 2, |
|
|
|
|
// 空布局 |
|
|
|
@ -95,7 +112,11 @@ |
|
|
|
|
canReset: false, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onUnload() { |
|
|
|
|
uni.switchTab({ |
|
|
|
|
url: '/pages/user/index' // targetTab 为目标 tab 页的路径 |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
|
*/ |
|
|
|
@ -134,7 +155,12 @@ |
|
|
|
|
getRefundList(pageNo = 1) { |
|
|
|
|
const app = this |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
RefundApi.list({ state: app.getTabValue(), page: pageNo }, { load: false }) |
|
|
|
|
RefundApi.list({ |
|
|
|
|
state: app.getTabValue(), |
|
|
|
|
page: pageNo |
|
|
|
|
}, { |
|
|
|
|
load: false |
|
|
|
|
}) |
|
|
|
|
.then(result => { |
|
|
|
|
// 合并新数据 |
|
|
|
|
const newList = result.data.list |
|
|
|
@ -146,6 +172,7 @@ |
|
|
|
|
|
|
|
|
|
// 切换标签项 |
|
|
|
|
onChangeTab(index) { |
|
|
|
|
console.log(index) |
|
|
|
|
const app = this |
|
|
|
|
// 设置当前选中的标签 |
|
|
|
|
app.curTab = index |
|
|
|
@ -168,7 +195,9 @@ |
|
|
|
|
|
|
|
|
|
// 跳转到售后单详情页 |
|
|
|
|
handleTargetDetail(orderRefundId) { |
|
|
|
|
this.$navTo('pages/refund/detail', { orderRefundId }) |
|
|
|
|
this.$navTo('pages/refund/detail', { |
|
|
|
|
orderRefundId |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -179,6 +208,54 @@ |
|
|
|
|
::v-deep .u-empty { |
|
|
|
|
padding: 100rpx 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.classify-list { |
|
|
|
|
white-space: nowrap; |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100rpx; |
|
|
|
|
overflow-x: auto; |
|
|
|
|
overflow-y: hidden; |
|
|
|
|
|
|
|
|
|
.list { |
|
|
|
|
position: relative; |
|
|
|
|
display: inline-block; |
|
|
|
|
width: 50%; |
|
|
|
|
height: 100%; |
|
|
|
|
line-height: 100rpx; |
|
|
|
|
text-align: center; |
|
|
|
|
|
|
|
|
|
text { |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #3B3B3B; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.line { |
|
|
|
|
position: absolute; |
|
|
|
|
left: 50%; |
|
|
|
|
bottom: 10rpx; |
|
|
|
|
// width: 60%; |
|
|
|
|
// height: 8rpx; |
|
|
|
|
background: linear-gradient(to right, #f8f893, #fe9d00); |
|
|
|
|
// border-radius: 10rpx; |
|
|
|
|
transform: translate(-50%, 0); |
|
|
|
|
|
|
|
|
|
width: 60upx; |
|
|
|
|
height: 8upx; |
|
|
|
|
background: #FF6257; |
|
|
|
|
border-radius: 29px 29px 29px 29px; |
|
|
|
|
opacity: 1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.action { |
|
|
|
|
text { |
|
|
|
|
font-size: 32rpx; |
|
|
|
|
opacity: 1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.widget-detail { |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
background: #fff; |
|
|
|
|