|
@@ -109,6 +109,9 @@ try {
|
|
|
uniCollapseItem: function () {
|
|
|
return __webpack_require__.e(/*! import() | uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item */ "uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue */ 556))
|
|
|
},
|
|
|
+ uniPopup: function () {
|
|
|
+ return __webpack_require__.e(/*! import() | uni_modules/uni-popup/components/uni-popup/uni-popup */ "uni_modules/uni-popup/components/uni-popup/uni-popup").then(__webpack_require__.bind(null, /*! @/uni_modules/uni-popup/components/uni-popup/uni-popup.vue */ 470))
|
|
|
+ },
|
|
|
}
|
|
|
} catch (e) {
|
|
|
if (
|
|
@@ -132,15 +135,16 @@ var render = function () {
|
|
|
var _h = _vm.$createElement
|
|
|
var _c = _vm._self._c || _h
|
|
|
var g0 = _vm.info.file.length
|
|
|
+ var g1 = _vm.couponList.length
|
|
|
var m0 = _vm.info.prompt ? _vm.formatRichText(_vm.info.prompt) : null
|
|
|
var m1 = _vm.info.children ? _vm.formatRichText(_vm.info.children) : null
|
|
|
var m2 = _vm.formatRichText(_vm.info.brief)
|
|
|
var l0 = _vm.__map(_vm.list, function (item, index) {
|
|
|
var $orig = _vm.__get_orig(item)
|
|
|
- var g1 = item.file && item.file.length > 0
|
|
|
+ var g2 = item.file && item.file.length > 0
|
|
|
return {
|
|
|
$orig: $orig,
|
|
|
- g1: g1,
|
|
|
+ g2: g2,
|
|
|
}
|
|
|
})
|
|
|
_vm.$mp.data = Object.assign(
|
|
@@ -148,6 +152,7 @@ var render = function () {
|
|
|
{
|
|
|
$root: {
|
|
|
g0: g0,
|
|
|
+ g1: g1,
|
|
|
m0: m0,
|
|
|
m1: m1,
|
|
|
m2: m2,
|
|
@@ -216,6 +221,10 @@ var _default = {
|
|
|
skip: 0,
|
|
|
limit: 10,
|
|
|
page: 0,
|
|
|
+ // 优惠卷
|
|
|
+ couponList: [],
|
|
|
+ // 优惠券全部
|
|
|
+ discountList: [],
|
|
|
// 数据是否触底
|
|
|
is_bottom: false,
|
|
|
scrollTop: 0
|
|
@@ -230,8 +239,7 @@ var _default = {
|
|
|
case 0:
|
|
|
that = this;
|
|
|
that.$set(that, "id", e && e.id || '');
|
|
|
- that.searchConfig();
|
|
|
- case 3:
|
|
|
+ case 2:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
@@ -252,14 +260,20 @@ var _default = {
|
|
|
case 0:
|
|
|
that = this;
|
|
|
_context2.next = 3;
|
|
|
- return that.searchToken();
|
|
|
+ return that.searchOther();
|
|
|
case 3:
|
|
|
_context2.next = 5;
|
|
|
- return that.clearPage();
|
|
|
+ return that.searchConfig();
|
|
|
case 5:
|
|
|
_context2.next = 7;
|
|
|
- return that.search();
|
|
|
+ return that.searchToken();
|
|
|
case 7:
|
|
|
+ _context2.next = 9;
|
|
|
+ return that.clearPage();
|
|
|
+ case 9:
|
|
|
+ _context2.next = 11;
|
|
|
+ return that.search();
|
|
|
+ case 11:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
@@ -351,6 +365,67 @@ var _default = {
|
|
|
}, _callee3);
|
|
|
}))();
|
|
|
},
|
|
|
+ // 领卷
|
|
|
+ toCoupon: function toCoupon() {
|
|
|
+ var _this2 = this;
|
|
|
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
|
+ var that, res;
|
|
|
+ return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
|
+ while (1) {
|
|
|
+ switch (_context4.prev = _context4.next) {
|
|
|
+ case 0:
|
|
|
+ that = _this2; // 优惠券
|
|
|
+ _context4.next = 3;
|
|
|
+ return that.$api("/coupon/specialQuery", 'GET', {
|
|
|
+ is_use: '0',
|
|
|
+ type: '0'
|
|
|
+ });
|
|
|
+ case 3:
|
|
|
+ res = _context4.sent;
|
|
|
+ if (res.errcode == '0') that.$set(that, "discountList", res.data);
|
|
|
+ that.$refs.coupon.open();
|
|
|
+ case 6:
|
|
|
+ case "end":
|
|
|
+ return _context4.stop();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, _callee4);
|
|
|
+ }))();
|
|
|
+ },
|
|
|
+ // 领取优惠券
|
|
|
+ toReceive: function toReceive() {},
|
|
|
+ // 关闭弹框
|
|
|
+ toCouponClose: function toCouponClose() {
|
|
|
+ var that = this;
|
|
|
+ that.$refs.coupon.close();
|
|
|
+ },
|
|
|
+ // 查询其他信息
|
|
|
+ searchOther: function searchOther() {
|
|
|
+ var _this3 = this;
|
|
|
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
|
+ var that, res;
|
|
|
+ return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
|
+ while (1) {
|
|
|
+ switch (_context5.prev = _context5.next) {
|
|
|
+ case 0:
|
|
|
+ that = _this3;
|
|
|
+ _context5.next = 3;
|
|
|
+ return that.$api("/coupon/specialQuery", 'GET', {
|
|
|
+ is_use: '0',
|
|
|
+ discount_type: 'min',
|
|
|
+ type: '0'
|
|
|
+ });
|
|
|
+ case 3:
|
|
|
+ res = _context5.sent;
|
|
|
+ if (res.errcode == '0') that.$set(that, "couponList", res.data.slice(0, 3));
|
|
|
+ case 5:
|
|
|
+ case "end":
|
|
|
+ return _context5.stop();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, _callee5);
|
|
|
+ }))();
|
|
|
+ },
|
|
|
// 处理富文本
|
|
|
formatRichText: function formatRichText(html) {
|
|
|
if (html) {
|
|
@@ -381,20 +456,20 @@ var _default = {
|
|
|
},
|
|
|
// 收藏
|
|
|
onClick: function onClick(item) {
|
|
|
- var _this2 = this;
|
|
|
- return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
|
+ var _this4 = this;
|
|
|
+ return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
|
var that, res, form;
|
|
|
- return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
|
+ return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
|
while (1) {
|
|
|
- switch (_context4.prev = _context4.next) {
|
|
|
+ switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
- that = _this2;
|
|
|
+ that = _this4;
|
|
|
if (!(that.user && that.user._id)) {
|
|
|
- _context4.next = 15;
|
|
|
+ _context6.next = 15;
|
|
|
break;
|
|
|
}
|
|
|
if (!(item.is_collect == false)) {
|
|
|
- _context4.next = 9;
|
|
|
+ _context6.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
form = {
|
|
@@ -404,20 +479,20 @@ var _default = {
|
|
|
type: '1',
|
|
|
create_time: (0, _moment.default)().format('YYYY-MM-DD HH:mm:ss')
|
|
|
};
|
|
|
- _context4.next = 6;
|
|
|
+ _context6.next = 6;
|
|
|
return that.$api("/like", 'POST', form);
|
|
|
case 6:
|
|
|
- res = _context4.sent;
|
|
|
- _context4.next = 12;
|
|
|
+ res = _context6.sent;
|
|
|
+ _context6.next = 12;
|
|
|
break;
|
|
|
case 9:
|
|
|
- _context4.next = 11;
|
|
|
+ _context6.next = 11;
|
|
|
return that.$api("/like/".concat(item.collect), 'DELETE', {});
|
|
|
case 11:
|
|
|
- res = _context4.sent;
|
|
|
+ res = _context6.sent;
|
|
|
case 12:
|
|
|
if (res.errcode == '0') that.search();
|
|
|
- _context4.next = 16;
|
|
|
+ _context6.next = 16;
|
|
|
break;
|
|
|
case 15:
|
|
|
uni.navigateTo({
|
|
@@ -425,10 +500,10 @@ var _default = {
|
|
|
});
|
|
|
case 16:
|
|
|
case "end":
|
|
|
- return _context4.stop();
|
|
|
+ return _context6.stop();
|
|
|
}
|
|
|
}
|
|
|
- }, _callee4);
|
|
|
+ }, _callee6);
|
|
|
}))();
|
|
|
},
|
|
|
// 分页
|