|
@@ -331,7 +331,8 @@ var _moment = _interopRequireDefault(__webpack_require__(/*! moment */ 42));func
|
|
},
|
|
},
|
|
// 下单
|
|
// 下单
|
|
toBuy: function toBuy() {var _this2 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3() {var that, type, obj, res;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:
|
|
toBuy: function toBuy() {var _this2 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3() {var that, type, obj, res;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:
|
|
- that = _this2;
|
|
|
|
|
|
+ that = _this2;if (!(
|
|
|
|
+ that.shopInfo.person && that.shopInfo.perMoney)) {_context3.next = 11;break;}
|
|
type = '0';
|
|
type = '0';
|
|
if (that.is_show == true) type = '0';else
|
|
if (that.is_show == true) type = '0';else
|
|
type = '1';
|
|
type = '1';
|
|
@@ -344,14 +345,20 @@ var _moment = _interopRequireDefault(__webpack_require__(/*! moment */ 42));func
|
|
num: that.shopInfo.person,
|
|
num: that.shopInfo.person,
|
|
cart: that.id,
|
|
cart: that.id,
|
|
type: type,
|
|
type: type,
|
|
- list: that.list };_context3.next = 6;return (
|
|
|
|
|
|
+ list: that.list };_context3.next = 7;return (
|
|
|
|
|
|
- that.$api("order", 'POST', obj));case 6:res = _context3.sent;
|
|
|
|
|
|
+ that.$api("order", 'POST', obj));case 7:res = _context3.sent;
|
|
if (res.errcode == '0') {
|
|
if (res.errcode == '0') {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: "/pagesHome/order/info?id=".concat(res.data._id) });
|
|
url: "/pagesHome/order/info?id=".concat(res.data._id) });
|
|
|
|
|
|
- }case 8:case "end":return _context3.stop();}}}, _callee3);}))();
|
|
|
|
|
|
+ }_context3.next = 12;break;case 11:
|
|
|
|
+
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请选择用餐人数',
|
|
|
|
+ icon: 'none' });case 12:case "end":return _context3.stop();}}}, _callee3);}))();
|
|
|
|
+
|
|
|
|
+
|
|
} } };exports.default = _default;
|
|
} } };exports.default = _default;
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
|
|
|
|
|