73 lines
1.2 KiB
Vue
73 lines
1.2 KiB
Vue
<template>
|
|
<view class="card">
|
|
<u-tag :text="item.remark" type="success" plain v-for="item,index in orderList" :key='index' class="li"></u-tag>
|
|
<u-loadmore :status="status" />
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
account_log,
|
|
} from "@/api/newTask.js"
|
|
export default {
|
|
data() {
|
|
return {
|
|
orderList: [],
|
|
flag: false,
|
|
status: "loadmore",
|
|
page_no: 2,
|
|
page_size: 20,
|
|
}
|
|
},
|
|
methods: {
|
|
async getFirstOrderLogList() {
|
|
let res = await account_log({
|
|
page_no: 1,
|
|
page_size: 20
|
|
})
|
|
this.orderList = res.data.lists
|
|
}
|
|
},
|
|
mounted() {
|
|
this.getFirstOrderLogList()
|
|
},
|
|
onReachBottom() {
|
|
if (this.flag) return
|
|
let {
|
|
page_no,
|
|
page_size
|
|
} = this
|
|
let that = this
|
|
this.status = "loading"
|
|
this.page_no += 1
|
|
this.flag = true
|
|
account_log({
|
|
page_no,
|
|
page_size
|
|
}).then(res => {
|
|
that.orderList = that.orderList.concat(res.data.lists)
|
|
this.flag = false
|
|
if (!res.data.lists.length) {
|
|
this.status = "nomore"
|
|
this.flag = true
|
|
}
|
|
})
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.card {
|
|
width: 690rpx;
|
|
margin: 30rpx auto;
|
|
background-color: #fff;
|
|
padding: 20rpx;
|
|
border-radius: 29rpx;
|
|
|
|
.li {
|
|
margin: 20rpx;
|
|
font-size: 28rpx;
|
|
|
|
}
|
|
}
|
|
</style> |