|
@@ -213,32 +213,31 @@ var _default =
|
|
|
scrollTop: 0 };
|
|
|
|
|
|
},
|
|
|
- onLoad: function onLoad() {
|
|
|
-
|
|
|
+ onLoad: function onLoad() {return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return (
|
|
|
+ that.searchToken());case 2:
|
|
|
+ that.searchConfig();case 3:case "end":return _context.stop();}}}, _callee);}))();
|
|
|
},
|
|
|
- onShow: function onShow() {var _this = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var that;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:
|
|
|
+ onShow: function onShow() {var _this = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2() {var that;return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:
|
|
|
that = _this;
|
|
|
- that.clearPage();_context.next = 4;return (
|
|
|
- that.searchToken());case 4:
|
|
|
- that.searchConfig();_context.next = 7;return (
|
|
|
- that.search());case 7:case "end":return _context.stop();}}}, _callee);}))();
|
|
|
+ that.clearPage();_context2.next = 4;return (
|
|
|
+ that.search());case 4:case "end":return _context2.stop();}}}, _callee2);}))();
|
|
|
},
|
|
|
- onPullDownRefresh: function () {var _onPullDownRefresh = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2() {var that;return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:
|
|
|
+ onPullDownRefresh: function () {var _onPullDownRefresh = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3() {var that;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:
|
|
|
that = this;
|
|
|
- that.clearPage();_context2.next = 4;return (
|
|
|
+ that.clearPage();_context3.next = 4;return (
|
|
|
that.search());case 4:
|
|
|
- uni.stopPullDownRefresh();case 5:case "end":return _context2.stop();}}}, _callee2, this);}));function onPullDownRefresh() {return _onPullDownRefresh.apply(this, arguments);}return onPullDownRefresh;}(),
|
|
|
+ uni.stopPullDownRefresh();case 5:case "end":return _context3.stop();}}}, _callee3, this);}));function onPullDownRefresh() {return _onPullDownRefresh.apply(this, arguments);}return onPullDownRefresh;}(),
|
|
|
|
|
|
methods: {
|
|
|
- searchToken: function searchToken() {var _this2 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4() {var that;return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:
|
|
|
+ searchToken: function searchToken() {var _this2 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee5() {var that;return _regenerator.default.wrap(function _callee5$(_context5) {while (1) {switch (_context5.prev = _context5.next) {case 0:
|
|
|
that = _this2;
|
|
|
uni.getStorage({
|
|
|
key: 'token',
|
|
|
- success: function () {var _success = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3(res) {var aee, _iterator, _step, val;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:_context3.next = 2;return (
|
|
|
+ success: function () {var _success = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4(res) {var aee, _iterator, _step, val;return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:_context4.next = 2;return (
|
|
|
|
|
|
that.$api("/Role/menu", 'GET', {
|
|
|
is_use: '0',
|
|
|
- code: res.data.role }));case 2:aee = _context3.sent;
|
|
|
+ code: res.data.role }));case 2:aee = _context4.sent;
|
|
|
|
|
|
if (aee.errcode == '0') {
|
|
|
if (aee.data.menu && aee.data.menu.length > 0) {_iterator = _createForOfIteratorHelper(
|
|
@@ -252,7 +251,7 @@ var _default =
|
|
|
|
|
|
}} catch (err) {_iterator.e(err);} finally {_iterator.f();}
|
|
|
}
|
|
|
- }case 4:case "end":return _context3.stop();}}}, _callee3);}));function success(_x) {return _success.apply(this, arguments);}return success;}(),
|
|
|
+ }case 4:case "end":return _context4.stop();}}}, _callee4);}));function success(_x) {return _success.apply(this, arguments);}return success;}(),
|
|
|
|
|
|
fail: function fail(err) {
|
|
|
uni.showToast({
|
|
@@ -260,7 +259,7 @@ var _default =
|
|
|
icon: 'error',
|
|
|
duration: 2000 });
|
|
|
|
|
|
- } });case 2:case "end":return _context4.stop();}}}, _callee4);}))();
|
|
|
+ } });case 2:case "end":return _context5.stop();}}}, _callee5);}))();
|
|
|
|
|
|
},
|
|
|
searchConfig: function searchConfig() {
|
|
@@ -276,21 +275,21 @@ var _default =
|
|
|
|
|
|
}
|
|
|
},
|
|
|
- search: function search() {var _this3 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee5() {var that, res, info, list;return _regenerator.default.wrap(function _callee5$(_context5) {while (1) {switch (_context5.prev = _context5.next) {case 0:
|
|
|
- that = _this3;_context5.next = 3;return (
|
|
|
+ search: function search() {var _this3 = this;return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee6() {var that, res, info, list;return _regenerator.default.wrap(function _callee6$(_context6) {while (1) {switch (_context6.prev = _context6.next) {case 0:
|
|
|
+ that = _this3;_context6.next = 3;return (
|
|
|
|
|
|
that.$api("/Module", 'GET', {
|
|
|
- is_use: '0' }));case 3:res = _context5.sent;
|
|
|
+ is_use: '0' }));case 3:res = _context6.sent;
|
|
|
|
|
|
if (res.errcode == '0') that.$set(that, "moduleList", res.data);
|
|
|
info = {
|
|
|
skip: that.skip,
|
|
|
limit: that.limit,
|
|
|
- is_use: '0' };_context5.next = 8;return (
|
|
|
+ is_use: '0' };_context6.next = 8;return (
|
|
|
|
|
|
that.$api("/Good", 'GET', _objectSpread(_objectSpread({},
|
|
|
info),
|
|
|
- that.searchInfo)));case 8:res = _context5.sent;
|
|
|
+ that.searchInfo)));case 8:res = _context6.sent;
|
|
|
|
|
|
if (res.errcode == '0') {
|
|
|
list = [].concat(_toConsumableArray(that.list), _toConsumableArray(res.data));
|
|
@@ -300,16 +299,16 @@ var _default =
|
|
|
uni.showToast({
|
|
|
title: res.errmsg });
|
|
|
|
|
|
- }case 10:case "end":return _context5.stop();}}}, _callee5);}))();
|
|
|
+ }case 10:case "end":return _context6.stop();}}}, _callee6);}))();
|
|
|
},
|
|
|
- toSearch: function toSearch(res) {return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee6() {return _regenerator.default.wrap(function _callee6$(_context6) {while (1) {switch (_context6.prev = _context6.next) {case 0:
|
|
|
- console.log(res);case 1:case "end":return _context6.stop();}}}, _callee6);}))();
|
|
|
- },
|
|
|
- input: function input(res) {return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee7() {return _regenerator.default.wrap(function _callee7$(_context7) {while (1) {switch (_context7.prev = _context7.next) {case 0:
|
|
|
+ toSearch: function toSearch(res) {return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee7() {return _regenerator.default.wrap(function _callee7$(_context7) {while (1) {switch (_context7.prev = _context7.next) {case 0:
|
|
|
console.log(res);case 1:case "end":return _context7.stop();}}}, _callee7);}))();
|
|
|
},
|
|
|
- change: function change(e) {return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee8() {return _regenerator.default.wrap(function _callee8$(_context8) {while (1) {switch (_context8.prev = _context8.next) {case 0:
|
|
|
- console.log(e);case 1:case "end":return _context8.stop();}}}, _callee8);}))();
|
|
|
+ input: function input(res) {return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee8() {return _regenerator.default.wrap(function _callee8$(_context8) {while (1) {switch (_context8.prev = _context8.next) {case 0:
|
|
|
+ console.log(res);case 1:case "end":return _context8.stop();}}}, _callee8);}))();
|
|
|
+ },
|
|
|
+ change: function change(e) {return _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee9() {return _regenerator.default.wrap(function _callee9$(_context9) {while (1) {switch (_context9.prev = _context9.next) {case 0:
|
|
|
+ console.log(e);case 1:case "end":return _context9.stop();}}}, _callee9);}))();
|
|
|
},
|
|
|
// 购买
|
|
|
toBuy: function toBuy(e) {
|