acdr-ui/dist/dev/mp-weixin/modules/mall/activity/groupon/order.js.map

1 line
7.8 KiB
Plaintext
Raw Normal View History

2024-09-19 07:20:14 +08:00
{"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.li