123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <template>
- <view>
- <view class="content" v-if="list.length">
- <view class="list_box" v-for="(item,index) in list" :key="index">
- <!-- <view class="flex align-center justify-between" style="width: 100%;">
- <view class="data">{{item.createTime}}</view>
- </view> -->
- <view class="name flex align-center" @click="copyClick(item.title)" v-if="item.type==1">
- {{item.title}}
- <image src="../static/copy.png" style="width: 30upx;height: 30upx;"></image>
- </view>
- <view v-else>{{item.title}}</view>
- <view>{{item.content}}</view>
- <view class="data">{{item.createTime}}</view>
- <!-- <view class="list_left">
- <view class="flex align-center justify-between">
- <view class="name">{{item.title}}</view>
- <view class="data">{{item.createTime}}</view>
- </view>
- <view>{{item.content}}</view>
- </view>
- <view class="list_right" style="color: red;" v-if="item.type==2">- {{item.money}}</view>
- <view class="list_right" style="color: #33D442;" v-if="item.type==1">+ {{item.money}}</view> -->
- </view>
- </view>
- <empty v-else></empty>
- </view>
- </template>
- <script>
- import empty from '@/components/empty'
- export default {
- components: {
- empty
- },
- data() {
- return {
- list: [],
- page: 1,
- totalCount: 0
- }
- },
- onLoad() {
- this.taskData()
- },
- methods: {
- copyClick(copy) {
- uni.setClipboardData({
- data: copy,
- success: function(res) {
- uni.getClipboardData({
- success: function(res) {
- uni.showToast({
- title: "复制成功",
- icon: 'none',
- });
- },
- });
- },
- });
- },
- // 获取任务数据
- taskData() {
- this.$Request.getT('/app/userMoney/selectUserMoneyDetails?classify=4&page=' + this.page + '&limit=15&userType=2').then(res => {
- if (res.code == 0) {
- // this.list = res.data.list
- if (this.page == 1) {
- this.list = res.data.records
- } else {
- this.list = this.list.concat(res.data.records)
- }
- this.totalCount = res.data.pages
- }
- console.log('res', res)
- uni.stopPullDownRefresh();
- });
- },
- },
- // 上拉加载
- onReachBottom: function() {
- if (this.page < this.totalCount) {
- this.page += 1;
- this.taskData();
- } else {
- uni.showToast({
- title: '已经最后一页啦',
- icon: 'none'
- })
- }
- },
- onPullDownRefresh: function() {
- this.page = 1;
- this.taskData();
- },
- }
- </script>
- <style>
- body {
- background: #F5F5F5;
- }
- .content {
- width: 100%;
- background: #FFFFFF;
- /* margin-top: 20rpx; */
- padding-bottom: 50rpx;
- padding-top: 20rpx;
- }
- .list_box {
- width: 90%;
- margin: 0 auto;
- /* display: flex; */
- line-height: 45rpx;
- padding-top: 20rpx;
- padding-bottom: 20upx;
- border-bottom: 1rpx solid #f8f8f8;
- }
- .list_left {
- /* flex: 2; */
- }
- .name {
- width: 500rpx;
- font-size: 26rpx;
- color: #333333;
- font-weight: bold;
- letter-spacing: 2rpx;
- }
- .data {
- color: #999999;
- font-size: 24rpx;
- }
- .list_right {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- font-size: 31rpx;
- }
- </style>
|