1 line
5.7 KiB
Plaintext
1 line
5.7 KiB
Plaintext
|
{"version":3,"file":"commission-log.js","sources":["../../../../../../../src/modules/mall/commission/components/commission-log.vue","../../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9tb2R1bGVzL21hbGwvY29tbWlzc2lvbi9jb21wb25lbnRzL2NvbW1pc3Npb24tbG9nLnZ1ZQ"],"sourcesContent":["<!-- 分销首页:明细列表 -->\r\n<template>\r\n <view class=\"distribution-log-wrap\">\r\n <view class=\"header-box\">\r\n <image class=\"header-bg\" :src=\"sheep.$url.static('/static/img/shop/commission/title2.png')\" />\r\n <view class=\"ss-flex header-title\">\r\n <view class=\"title\">实时动态</view>\r\n <text class=\"cicon-forward\" />\r\n </view>\r\n </view>\r\n <scroll-view\r\n scroll-y=\"true\"\r\n @scrolltolower=\"loadmore\"\r\n class=\"scroll-box log-scroll\"\r\n scroll-with-animation=\"true\"\r\n >\r\n <view v-if=\"state.pagination.list\">\r\n <view\r\n class=\"log-item-box ss-flex ss-row-between\"\r\n v-for=\"item in state.pagination.list\"\r\n :key=\"item.id\"\r\n >\r\n <view class=\"log-item-wrap\">\r\n <view class=\"log-item ss-flex ss-ellipsis-1 ss-col-center\">\r\n <view class=\"ss-flex ss-col-center\">\r\n <image\r\n class=\"log-img\"\r\n :src=\"sheep.$url.static('/static/img/shop/avatar/notice.png')\"\r\n mode=\"aspectFill\"\r\n />\r\n </view>\r\n <view class=\"log-text ss-ellipsis-1\">\r\n {{ item.title }} {{ fen2yuan(item.price) }} 元\r\n </view>\r\n </view>\r\n </view>\r\n <text class=\"log-time\">{{ dayjs(item.createTime).fromNow() }}</text>\r\n </view>\r\n </view>\r\n\r\n <!-- 加载更多 -->\r\n <uni-load-more\r\n v-if=\"state.pagination.total > 0\"\r\n :status=\"state.loadStatus\"\r\n color=\"#333333\"\r\n @tap=\"loadmore\"\r\n />\r\n </scroll-view>\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\nimport sheep from '@/sheep'\r\nimport { reactive } from 'vue'\r\nimport _ from 'lodash-es'\r\nimport dayjs from 'dayjs'\r\nimport BrokerageApi from '@/sheep/api/trade/brokerage'\r\nimport { fen2yuan } from '@/sheep/hooks/useGoods'\r\n\r\nconst state = reactive({\r\n loadStatus: '',\r\n pagination: {\r\n list: [],\r\n total: 0,\r\n pageNo: 1,\r\n pageSize: 1,\r\n },\r\n})\r\n\r\nasync function getLog() {\r\n state.loadStatus = 'loading'\r\n const { code, data } = await BrokerageApi.getBrokerageRecordPage({\r\n pageNo: state.pagination.pageNo,\r\n pageSize: state.pagination.pageSize,\r\n })\r\n if (code !== 0) {\r\n return\r\n }\r\n state.pagination.list = _.concat(state.pagination.list, data.list)\r\n state.pagination.total = data.total\r\n state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore'\r\n}\r\n\r\ngetLog()\r\n\r\n// 加载更多\r\nfunction loadmore() {\r\n if (state.loadStatus === 'noMore') {\r\n return\r\n }\r\n state.pagination.pageNo++\r\n getLog()\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n.distribution-log-wrap {\r\n position: relative;\r\n z-index: 3;\r\n width: 690rpx;\r\n margin: 0 auto;\r\n margin-bottom: 20rpx;\r\n border-radius: 12rpx;\r\n\r\n .header-box {\r\n position: relative;\r\n width: 690rpx;\r\n height: 76rpx;\r\n\r\n .header-bg {\r\n width: 690rpx;\r\n height: 76rpx;\r\n }\r\n\r\n .header-title {\r\n position: absolute;\r\n top: 24rpx;\r\n left: 20rpx;\r\n }\r\n\r\n .title {\r\n font-size: 28rpx;\r\n font-weight: 500;\r\n line-height: 30rpx;\r\n color: #ffffff;\r\n }\r\n\r\n .cicon-forward {\r\n font-size: 30rpx;\r\n font-weight: 400;\r\n line-height: 30rpx;\r\n color: #ffffff;\r\n }\r\n }\r\n\r\n .log-scroll {\r\n box-sizing: border-box;\r\n height: 600rpx;\r\n padding: 10rpx 20rpx 0;\r\n back
|