9.24
This commit is contained in:
parent
d6b86ab8e4
commit
f2d74fa386
97
gasStation-uni/pagesMy/invite/details.vue
Normal file
97
gasStation-uni/pagesMy/invite/details.vue
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="container">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '../../utils/request';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
List: [],
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: '',
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.resetting() //重置方法
|
||||||
|
this.getList() //调用请求
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
//下拉刷新
|
||||||
|
this.resetting() //重置方法
|
||||||
|
this.getList() //调用请求
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
// 触底加载
|
||||||
|
if (this.pageNo >= this.totalPage) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '没有下一页数据',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.pageNo++
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//滞空方法
|
||||||
|
resetting() {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.pageSize = 10
|
||||||
|
this.totalPage = ''
|
||||||
|
this.List = []
|
||||||
|
},
|
||||||
|
// 分页——网络请求
|
||||||
|
async getList() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
let res = await request({
|
||||||
|
url: '网络请求',
|
||||||
|
method: 'get',
|
||||||
|
data: {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.hideLoading(); //交互反馈
|
||||||
|
if (this.pageNo != 1) {
|
||||||
|
this.List = this.ruleList.concat(res.result.records)
|
||||||
|
} else {
|
||||||
|
this.List = res.result.records
|
||||||
|
}
|
||||||
|
this.totalPage = res.result.pages
|
||||||
|
}
|
||||||
|
},
|
||||||
|
goback() {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.content {
|
||||||
|
background: #f4f5f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
96
gasStation-uni/pagesMy/invite/list.vue
Normal file
96
gasStation-uni/pagesMy/invite/list.vue
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<view class="container">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '../../utils/request';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
List: [],
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: '',
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
//下拉刷新
|
||||||
|
this.resetting() //重置方法
|
||||||
|
this.getList() //调用请求
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
// 触底加载
|
||||||
|
if (this.pageNo >= this.totalPage) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '没有下一页数据',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.pageNo++
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//滞空方法
|
||||||
|
resetting() {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.pageSize = 10
|
||||||
|
this.totalPage = ''
|
||||||
|
this.List = []
|
||||||
|
},
|
||||||
|
// 分页——网络请求
|
||||||
|
async getList() {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中'
|
||||||
|
});
|
||||||
|
let res = await request({
|
||||||
|
url: '网络请求',
|
||||||
|
method: 'get',
|
||||||
|
data: {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.hideLoading(); //交互反馈
|
||||||
|
if (this.pageNo != 1) {
|
||||||
|
this.List = this.ruleList.concat(res.result.records)
|
||||||
|
} else {
|
||||||
|
this.List = res.result.records
|
||||||
|
}
|
||||||
|
this.totalPage = res.result.pages
|
||||||
|
}
|
||||||
|
},
|
||||||
|
goback() {
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.content {
|
||||||
|
background: #f4f5f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user