|  | @@ -98,33 +98,19 @@ __webpack_require__.r(__webpack_exports__);
 | 
											
												
													
														|  |  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
 |  |  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
 | 
											
												
													
														|  |  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
 |  |  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
 | 
											
												
													
														|  |  var components
 |  |  var components
 | 
											
												
													
														|  | -try {
 |  | 
 | 
											
												
													
														|  | -  components = {
 |  | 
 | 
											
												
													
														|  | -    axBody: function () {
 |  | 
 | 
											
												
													
														|  | -      return __webpack_require__.e(/*! import() | components/ax-body/ax-body */ "components/ax-body/ax-body").then(__webpack_require__.bind(null, /*! @/components/ax-body/ax-body.vue */ 200))
 |  | 
 | 
											
												
													
														|  | -    },
 |  | 
 | 
											
												
													
														|  | -  }
 |  | 
 | 
											
												
													
														|  | -} catch (e) {
 |  | 
 | 
											
												
													
														|  | -  if (
 |  | 
 | 
											
												
													
														|  | -    e.message.indexOf("Cannot find module") !== -1 &&
 |  | 
 | 
											
												
													
														|  | -    e.message.indexOf(".vue") !== -1
 |  | 
 | 
											
												
													
														|  | -  ) {
 |  | 
 | 
											
												
													
														|  | -    console.error(e.message)
 |  | 
 | 
											
												
													
														|  | -    console.error("1. 排查组件名称拼写是否正确")
 |  | 
 | 
											
												
													
														|  | -    console.error(
 |  | 
 | 
											
												
													
														|  | -      "2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
 |  | 
 | 
											
												
													
														|  | -    )
 |  | 
 | 
											
												
													
														|  | -    console.error(
 |  | 
 | 
											
												
													
														|  | -      "3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
 |  | 
 | 
											
												
													
														|  | -    )
 |  | 
 | 
											
												
													
														|  | -  } else {
 |  | 
 | 
											
												
													
														|  | -    throw e
 |  | 
 | 
											
												
													
														|  | -  }
 |  | 
 | 
											
												
													
														|  | -}
 |  | 
 | 
											
												
													
														|  |  var render = function () {
 |  |  var render = function () {
 | 
											
												
													
														|  |    var _vm = this
 |  |    var _vm = this
 | 
											
												
													
														|  |    var _h = _vm.$createElement
 |  |    var _h = _vm.$createElement
 | 
											
												
													
														|  |    var _c = _vm._self._c || _h
 |  |    var _c = _vm._self._c || _h
 | 
											
												
													
														|  | 
 |  | +  var g0 = _vm.toBeclaimedCoupons.length
 | 
											
												
													
														|  | 
 |  | +  _vm.$mp.data = Object.assign(
 | 
											
												
													
														|  | 
 |  | +    {},
 | 
											
												
													
														|  | 
 |  | +    {
 | 
											
												
													
														|  | 
 |  | +      $root: {
 | 
											
												
													
														|  | 
 |  | +        g0: g0,
 | 
											
												
													
														|  | 
 |  | +      },
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +  )
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  var recyclableRender = false
 |  |  var recyclableRender = false
 | 
											
												
													
														|  |  var staticRenderFns = []
 |  |  var staticRenderFns = []
 | 
											
										
											
												
													
														|  | @@ -160,10 +146,20 @@ __webpack_require__.r(__webpack_exports__);
 | 
											
												
													
														|  |  "use strict";
 |  |  "use strict";
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
 | 
											
												
													
														|  |  Object.defineProperty(exports, "__esModule", {
 |  |  Object.defineProperty(exports, "__esModule", {
 | 
											
												
													
														|  |    value: true
 |  |    value: true
 | 
											
												
													
														|  |  });
 |  |  });
 | 
											
												
													
														|  |  exports.default = void 0;
 |  |  exports.default = void 0;
 | 
											
												
													
														|  | 
 |  | +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
 | 
											
												
													
														|  | 
 |  | +//
 | 
											
												
													
														|  | 
 |  | +//
 | 
											
												
													
														|  | 
 |  | +//
 | 
											
												
													
														|  | 
 |  | +//
 | 
											
												
													
														|  | 
 |  | +//
 | 
											
												
													
														|  | 
 |  | +//
 | 
											
												
													
														|  | 
 |  | +//
 | 
											
												
													
														|  | 
 |  | +//
 | 
											
												
													
														|  |  //
 |  |  //
 | 
											
												
													
														|  |  //
 |  |  //
 | 
											
												
													
														|  |  //
 |  |  //
 | 
											
										
											
												
													
														|  | @@ -200,6 +196,7 @@ exports.default = void 0;
 | 
											
												
													
														|  |  var _default = {
 |  |  var _default = {
 | 
											
												
													
														|  |    data: function data() {
 |  |    data: function data() {
 | 
											
												
													
														|  |      return {
 |  |      return {
 | 
											
												
													
														|  | 
 |  | +      coupons_card: 'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/bNfT8BQFvtcead404bdf22856fe1306af8fbb672a74c.png/1.png',
 | 
											
												
													
														|  |        currentIndex: 0,
 |  |        currentIndex: 0,
 | 
											
												
													
														|  |        // 默认选中第一个选项卡
 |  |        // 默认选中第一个选项卡
 | 
											
												
													
														|  |        tabsList: [{
 |  |        tabsList: [{
 | 
											
										
											
												
													
														|  | @@ -214,13 +211,76 @@ var _default = {
 | 
											
												
													
														|  |        }, {
 |  |        }, {
 | 
											
												
													
														|  |          text: '已过期',
 |  |          text: '已过期',
 | 
											
												
													
														|  |          id: 3
 |  |          id: 3
 | 
											
												
													
														|  | -      }]
 |  | 
 | 
											
												
													
														|  | 
 |  | +      }],
 | 
											
												
													
														|  | 
 |  | +      toBeclaimedCoupons: [],
 | 
											
												
													
														|  | 
 |  | +      totalStatistics: {},
 | 
											
												
													
														|  | 
 |  | +      form_submit: {
 | 
											
												
													
														|  | 
 |  | +        pageNum: 1,
 | 
											
												
													
														|  | 
 |  | +        pageSize: 10,
 | 
											
												
													
														|  | 
 |  | +        status: 1
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  |      };
 |  |      };
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  | 
 |  | +  onLoad: function onLoad() {
 | 
											
												
													
														|  | 
 |  | +    this.get_statistical();
 | 
											
												
													
														|  | 
 |  | +  },
 | 
											
												
													
														|  | 
 |  | +  onReachBottom: function onReachBottom(e) {
 | 
											
												
													
														|  | 
 |  | +    this.form_submit.pageNum++;
 | 
											
												
													
														|  | 
 |  | +    this.get_TobeclaimedCoupons();
 | 
											
												
													
														|  | 
 |  | +  },
 | 
											
												
													
														|  | 
 |  | +  mounted: function mounted() {
 | 
											
												
													
														|  | 
 |  | +    this.get_TobeclaimedCoupons();
 | 
											
												
													
														|  | 
 |  | +  },
 | 
											
												
													
														|  |    methods: {
 |  |    methods: {
 | 
											
												
													
														|  | -    // 处理选项卡点击
 |  | 
 | 
											
												
													
														|  | 
 |  | +    //选项卡点击
 | 
											
												
													
														|  |      handleTabClick: function handleTabClick(e) {
 |  |      handleTabClick: function handleTabClick(e) {
 | 
											
												
													
														|  |        this.currentIndex = e.id;
 |  |        this.currentIndex = e.id;
 | 
											
												
													
														|  | 
 |  | +      this.form_submit.status = e.id;
 | 
											
												
													
														|  | 
 |  | +      this.get_TobeclaimedCoupons();
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    get_TobeclaimedCoupons: function get_TobeclaimedCoupons() {
 | 
											
												
													
														|  | 
 |  | +      var _this = this;
 | 
											
												
													
														|  | 
 |  | +      if (this.currentIndex == 0) {
 | 
											
												
													
														|  | 
 |  | +        this.$api.base("post", "/couponApi/list-pending", {}, {}).then(function (res) {
 | 
											
												
													
														|  | 
 |  | +          _this.toBeclaimedCoupons = res.list;
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  | 
 |  | +      } else {
 | 
											
												
													
														|  | 
 |  | +        this.$api.base("post", "/couponApi/list-user", this.form_submit, {}).then(function (res) {
 | 
											
												
													
														|  | 
 |  | +          if (_this.form_submit.pageNum == 1) {
 | 
											
												
													
														|  | 
 |  | +            _this.toBeclaimedCoupons = res.rows;
 | 
											
												
													
														|  | 
 |  | +          } else {
 | 
											
												
													
														|  | 
 |  | +            _this.toBeclaimedCoupons = [].concat((0, _toConsumableArray2.default)(_this.toBeclaimedCoupons), (0, _toConsumableArray2.default)(res.rows));
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    get_statistical: function get_statistical() {
 | 
											
												
													
														|  | 
 |  | +      var _this2 = this;
 | 
											
												
													
														|  | 
 |  | +      // 数据映射
 | 
											
												
													
														|  | 
 |  | +      var idToKeyMap = {
 | 
											
												
													
														|  | 
 |  | +        0: 'list-pending',
 | 
											
												
													
														|  | 
 |  | +        1: 'list-unused',
 | 
											
												
													
														|  | 
 |  | +        2: 'list-used',
 | 
											
												
													
														|  | 
 |  | +        3: 'list-overdue'
 | 
											
												
													
														|  | 
 |  | +      };
 | 
											
												
													
														|  | 
 |  | +      this.$api.base("post", "/couponApi/statistical", {}, {}).then(function (res) {
 | 
											
												
													
														|  | 
 |  | +        _this2.tabsList.forEach(function (tab) {
 | 
											
												
													
														|  | 
 |  | +          var key = idToKeyMap[tab.id];
 | 
											
												
													
														|  | 
 |  | +          tab.count = res.data[key] || 0;
 | 
											
												
													
														|  | 
 |  | +        });
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +    },
 | 
											
												
													
														|  | 
 |  | +    get_coupons: function get_coupons(e) {
 | 
											
												
													
														|  | 
 |  | +      var _this3 = this;
 | 
											
												
													
														|  | 
 |  | +      this.$api.base("post", "/couponApi/receive", {
 | 
											
												
													
														|  | 
 |  | +        templateId: e.id
 | 
											
												
													
														|  | 
 |  | +      }, {}).then(function (res) {
 | 
											
												
													
														|  | 
 |  | +        if (res.code == 0) {
 | 
											
												
													
														|  | 
 |  | +          _this3.get_statistical();
 | 
											
												
													
														|  | 
 |  | +          _this3.get_TobeclaimedCoupons();
 | 
											
												
													
														|  | 
 |  | +          _this3.$app.popup.toast('领取成功');
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  };
 |  |  };
 |