Browse Source

修改

master
453530270@qq.com 2 years ago
parent
commit
239463bd77
  1. 43
      pages/order/index.vue

43
pages/order/index.vue

@ -135,27 +135,19 @@
import { getEmptyPaginateObj, getMoreListData } from '@/core/app'
import * as OrderApi from '@/api/order'
import { wxPayment } from '@/core/app'
import { list } from '../../api/goods'
//
const pageSize = 15
// tab
const tabs = [{
name: `全部`,
value: 'all'
}, {
name: `待付款`,
value: 'payment'
}, {
name: `待交付`,
value: 'delivery'
}, {
name: `已中止`,
value: 'hasabort'
}, {
name: `已关闭`,
value: 'hasclosed'
}]
const tabs = [
{name: `全部`,value: 'all'},
{name: `待付款`,value: 'payment'},
{name: `待交付`,value: 'delivery'},
{name: `已中止`,value: 'hasabort'},
{name: `已关闭`,value: 'hasclosed'},
]
export default {
components: {
@ -233,11 +225,12 @@
//
initCurTab(options) {
const app = this
if (options.dataType) {
const index = app.tabs.findIndex(item => item.value == options.dataType)
app.curTab = index > -1 ? index : 0
}
console.log("tlist",this.list)
// const app = this
// if (options.dataType) {
// const index = app.tabs.findIndex(item => item.value == options.dataType)
// app.curTab = index > -1 ? index : 0
// }
},
/**
@ -250,6 +243,7 @@
//
app.getOrderList(page.num)
.then(list => {
console.log("od list",list)
const curPageLen = list.data.length
const totalSize = list.data.total
app.mescroll.endBySize(curPageLen, totalSize)
@ -261,12 +255,14 @@
getOrderList(pageNo = 1) {
const app = this
return new Promise((resolve, reject) => {
let data = {page:pageNo,limit:pageSize}
let data = {pagination:true,sidePagination:"server",queryParamsType:"limit",pageNumber:pageNo,pageSize:pageSize}
OrderApi.ordquery(data)
//OrderApi.list({ dataType: app.getTabValue(), page: pageNo }, { load: false })
.then(result => {
console.log("quod",result)
let nlist = {data:result.data}
//
const newList = app.initList(result.data.list)
const newList = app.initList(nlist)
app.list.data = getMoreListData(newList, app.list, pageNo)
resolve(newList)
})
@ -301,6 +297,7 @@
//
onRefreshList() {
this.list = getEmptyPaginateObj()
setTimeout(() => {
this.mescroll.resetUpScroll()
}, 120)

Loading…
Cancel
Save