update api abput mine

This commit is contained in:
cmxdd
2020-07-30 09:41:08 +08:00
parent dbffca53c8
commit 70e848cbbb
7 changed files with 221 additions and 94 deletions

View File

@@ -26,7 +26,9 @@
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;">
<view v-for="(item, index) in 5" :key="index"><OrderItem :cur="current"></OrderItem></view>
<view v-for="(item, index) in testlist" :key="index">
<testList :info="item"></testList>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
@@ -105,8 +107,13 @@
</template>
<script>
import OrderItem from '@/components/order-item/index';
export default {
import OrderItem from '@/components/order-item/index';
import testList from '@/components/order-item/testlist.vue';
export default {
components: {
OrderItem,
testList
},
data() {
return {
list: [
@@ -166,16 +173,15 @@ export default {
],
publishstate: false,
num: 0,
allorder:[],//所有订单
allorder:[],//所有订单
testlist:[],//试穿列表
};
},
components: {
OrderItem
},
onLoad() {
this.getswiper();
this.getallorder();
// 订单状态0:已取消 10:未付款 20:已付款 30:已发货 40:已收货
this.getallorder(0);
this.getshiftlist()
// 订单状态: 0:全部 1已付款未发货 2已发货 3已完成 4申请退款/退货 5已退款/退货
},
onReachBottom() {
this.num++
@@ -184,11 +190,30 @@ export default {
// 关闭发布弹窗
close() {
this.publishstate = false;
},
// 获取试穿列表
getshiftlist(){
let that = this;
this.$u.api.getshiftlist({
type:type,
page: that.num
}).then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
this.testlist = res.data.orderList
}
});
},
// 获取全部订单
getallorder() {
// 获取订单列表
getallorder(type) {
let that = this;
this.$u.api.getorderlist({
this.$u.api.getorderlist({
type:type,
page: that.num
}).then(res => {
console.log(res);