1 line
7.8 KiB
Plaintext
1 line
7.8 KiB
Plaintext
{"version":3,"file":"order.js","sources":["../../../../../../../src/modules/mall/activity/groupon/order.vue","../../../../../../../uniPage:/bW9kdWxlc1xtYWxsXGFjdGl2aXR5XGdyb3Vwb25cb3JkZXIudnVl"],"sourcesContent":["<!-- 我的拼团订单列表 -->\r\n<template>\r\n <s-layout title=\"我的拼团\">\r\n <su-sticky bgColor=\"#fff\">\r\n <su-tabs\r\n :list=\"tabMaps\"\r\n :scrollable=\"false\"\r\n @change=\"onTabsChange\"\r\n :current=\"state.currentTab\"\r\n ></su-tabs>\r\n </su-sticky>\r\n <s-empty v-if=\"state.pagination.total === 0\" icon=\"/static/goods-empty.png\" />\r\n <view v-if=\"state.pagination.total > 0\">\r\n <view\r\n class=\"order-list-card-box bg-white ss-r-10 ss-m-t-14 ss-m-20\"\r\n v-for=\"record in state.pagination.list\"\r\n :key=\"record.id\"\r\n >\r\n <view class=\"order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20\">\r\n <view class=\"order-no\">拼团编号:{{ record.id }}</view>\r\n <view class=\"ss-font-26\" :class=\"formatOrderColor(record)\">\r\n {{ tabMaps.find((item) => item.value === record.status).name }}\r\n </view>\r\n </view>\r\n <view class=\"border-bottom\">\r\n <s-goods-item\r\n :img=\"record.picUrl\"\r\n :title=\"record.spuName\"\r\n :price=\"record.combinationPrice\"\r\n >\r\n <template #groupon>\r\n <view class=\"ss-flex\">\r\n <view class=\"sales-title\">{{ record.userSize }} 人团</view>\r\n </view>\r\n </template>\r\n </s-goods-item>\r\n </view>\r\n <view class=\"order-card-footer ss-flex ss-row-right ss-p-x-20\">\r\n <button\r\n class=\"detail-btn ss-reset-button\"\r\n @tap=\"sheep.$router.go('/modules/mall/order/detail', { id: record.orderId })\"\r\n >\r\n 订单详情\r\n </button>\r\n <button\r\n class=\"tool-btn ss-reset-button\"\r\n :class=\"{ 'ui-BG-Main-Gradient': record.status === 0 }\"\r\n @tap=\"sheep.$router.go('/modules/mall/activity/groupon/detail', { id: record.id })\"\r\n >\r\n {{ record.status === 0 ? '邀请拼团' : '拼团详情' }}\r\n </button>\r\n </view>\r\n </view>\r\n </view>\r\n <uni-load-more\r\n v-if=\"state.pagination.total > 0\"\r\n :status=\"state.loadStatus\"\r\n :content-text=\"{\r\n contentdown: '上拉加载更多',\r\n }\"\r\n @tap=\"loadMore\"\r\n />\r\n </s-layout>\r\n</template>\r\n\r\n<script setup>\r\nimport { reactive } from 'vue'\r\nimport { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'\r\nimport sheep from '@/sheep'\r\nimport _ from 'lodash-es'\r\nimport { formatOrderColor } from '@/sheep/hooks/useGoods'\r\nimport { resetPagination } from '@/sheep/util'\r\nimport CombinationApi from '@/sheep/api/promotion/combination'\r\n\r\n// 数据\r\nconst state = reactive({\r\n currentTab: 0,\r\n pagination: {\r\n list: [],\r\n total: 0,\r\n pageNo: 1,\r\n pageSize: 5,\r\n },\r\n loadStatus: '',\r\n deleteOrderId: 0,\r\n})\r\n\r\nconst tabMaps = [\r\n {\r\n name: '全部',\r\n },\r\n {\r\n name: '进行中',\r\n value: 0,\r\n },\r\n {\r\n name: '拼团成功',\r\n value: 1,\r\n },\r\n {\r\n name: '拼团失败',\r\n value: 2,\r\n },\r\n]\r\n\r\n// 切换选项卡\r\nfunction onTabsChange(e) {\r\n resetPagination(state.pagination)\r\n state.currentTab = e.index\r\n getGrouponList()\r\n}\r\n\r\n// 获取订单列表\r\nasync function getGrouponList() {\r\n state.loadStatus = 'loading'\r\n const { code, data } = await CombinationApi.getCombinationRecordPage({\r\n pageNo: state.pagination.pageNo,\r\n pageSize: state.pagination.pageSize,\r\n status: tabMaps[state.currentTab].value,\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\nonLoad((options) => {\r\n if (options.type) {\r\n state.currentTab = options.type\r\n }\r\n getGrouponList()\r\n})\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 getGrouponList()\r\n}\r\n\r\n// 上拉加载更多\r\nonReachBottom(() => {\r\n loadMore()\r\n})\r\n\r\n// 下拉刷新\r\nonPullDownRefresh(() => {\r\n getGrouponList()\r\n setTimeout(function () {\r\n uni.stopPullDownRefresh()\r\n }, 800)\r\n})\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n.swiper-box {\r\n flex: 1;\r\n\r\n .swiper-item {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n}\r\n\r\n.order-list-card-box {\r\n .order-card-header {\r\n height: 80rpx;\r\n\r\n .order-no {\r\n font-size: 26rpx;\r\n font-weight: 500;\r\n }\r\n }\r\n\r\n .order-card-footer {\r\n height: 100rpx;\r\n\r\n .detail-btn {\r\n width: 210rpx;\r\n height: 66rpx;\r\n margin-right: 20rpx;\r\n font-size: 26rpx;\r\n font-weight: 400;\r\n color: #999999;\r\n border: 2rpx solid #dfdfdf;\r\n border-radius: 33rpx;\r\n }\r\n .tool-btn {\r\n width: 210rpx;\r\n height: 66rpx;\r\n margin-right: 20rpx;\r\n font-size: 26rpx;\r\n font-weight: 400;\r\n background: #f6f6f6;\r\n border-radius: 33rpx;\r\n }\r\n\r\n .invite-btn {\r\n width: 210rpx;\r\n height: 66rpx;\r\n font-size: 26rpx;\r\n font-weight: 500;\r\n color: #fff;\r\n background: linear-gradient(90deg, #fe832a, #ff6600);\r\n border-radius: 33rpx;\r\n box-shadow: 0px 8rpx 6rpx 0px rgba(255, 104, 4, 0.22);\r\n }\r\n }\r\n}\r\n\r\n.sales-title {\r\n height: 32rpx;\r\n padding: 6rpx 20rpx;\r\n font-size: 24rpx;\r\n font-weight: 400;\r\n color: #f7979c;\r\n background: rgba(#ffe0e2, 0.29);\r\n border-radius: 16rpx;\r\n}\r\n\r\n.num-title {\r\n font-size: 24rpx;\r\n font-weight: 400;\r\n color: #999999;\r\n}\r\n.warning-color {\r\n color: #faad14;\r\n}\r\n.danger-color {\r\n color: #ff3000;\r\n}\r\n.success-color {\r\n color: #52c41a;\r\n}\r\n</style>\r\n","import MiniProgramPage from 'D:/App/Work/addr/acdr-ui/src/modules/mall/activity/groupon/order.vue'\nwx.createPage(MiniProgramPage)"],"names":["reactive","resetPagination","CombinationApi","_","onLoad","onReachBottom","onPullDownRefresh","uni"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2EA,UAAA,QAAAA,cAAAA,SAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,QACA,MAAA,CAAA;AAAA,QACA,OAAA;AAAA,QACA,QAAA;AAAA,QACA,UAAA;AAAA,MACA;AAAA,MACA,YAAA;AAAA,MACA,eAAA;AAAA,IACA,CAAA;AAEA,UAAA,UAAA;AAAA,MACA;AAAA,QACA,MAAA;AAAA,MACA;AAAA,MACA;AAAA,QACA,MAAA;AAAA,QACA,OAAA;AAAA,MACA;AAAA,MACA;AAAA,QACA,MAAA;AAAA,QACA,OAAA;AAAA,MACA;AAAA,MACA;AAAA,QACA,MAAA;AAAA,QACA,OAAA;AAAA,MACA;AAAA,IACA;AAGA,aAAA,aAAA,GAAA;AACAC,uBAAA,gBAAA,MAAA,UAAA;AACA,YAAA,aAAA,EAAA;AACA,qBAAA;AAAA,IACA;AAGA,aAAA,iBAAA;AAAA;AACA,cAAA,aAAA;AACA,cAAA,EAAA,MAAA,KAAA,IAAA,MAAAC,gCAAAA,eAAA,yBAAA;AAAA,UACA,QAAA,MAAA,WAAA;AAAA,UACA,UAAA,MAAA,WAAA;AAAA,UACA,QAAA,QAAA,MAAA,UAAA,EAAA;AAAA,QACA,CAAA;AACA,YAAA,SAAA,GAAA;AACA;AAAA,QACA;AACA,cAAA,WAAA,OAAAC,qBAAA,OAAA,MAAA,WAAA,MAA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