12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <template>
- <view class="content" >
- <view v-for="(item, index) in messageInfo" :key="index" >
- <view class="cu-timeline">
- <view class="cu-time">{{item.gmtUpdate1}}</view>
- <view class="cu-item cur cuIcon-noticefill">
- <view class="content bg-green shadow-blur">
- <view >{{item.gmtUpdate}}</view>
- <view>{{item.customer + item.operation}}</view>
- <view>{{item.result}}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
-
- data() {
- return {
- messageInfo:[]
- };
-
- },
- onShow() {
- },
- onLoad(options) {
- console.log("buy onload")
- this.loadData();
- },
- onPageScroll(e) {
- },
- //下拉刷新
- onPullDownRefresh() {
- this.isLoadMore = false
- this.loadStatus = 'loading'
- this.loadData()
- },
-
- methods: {
- async loadData() {
- const that = this
- uni.showLoading({
- title: '正在加载',
- mask:true
- })
- that.$api.request('user', 'getMessage',failres => {
- that.$api.msg(failres.errmsg)
- that.isLoadMore=false
- that.loadStatus = 'nomore'
- if(that.pages>1){that.pages-=1}
- uni.hideLoading()
- uni.stopPullDownRefresh()
- }).then(res => {
- let data = res.data
- if(data.length > 0){
- that.messageInfo = data
- that.isLoadMore=false
- }
- else{
- that.isLoadMore=true
- that.loadStatus = 'nomore'
- }
- uni.hideLoading()
- uni.stopPullDownRefresh()
-
- })
- },
-
- }
- };
- </script>
- <style scoped>
- .content {
- color:#ffffff;
- }
- </style>
|