|
@@ -249,40 +249,48 @@ var _default = {
|
|
|
searchOpenid: function searchOpenid() {
|
|
|
var _this2 = this;
|
|
|
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
|
- var that;
|
|
|
+ var that, res, aee;
|
|
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
|
while (1) {
|
|
|
switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
- that = _this2; // try {
|
|
|
- // const res = uni.getStorageSync('openid');
|
|
|
- // const aee = await that.$api(`/login/wxapp/${res}`, 'POST', {})
|
|
|
- // if (aee.errcode == '0') {
|
|
|
- // uni.reLaunch({
|
|
|
- // url: `/pages/home/index`
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // uni.showToast({
|
|
|
- // title: aee.errmsg,
|
|
|
- // icon: 'none'
|
|
|
- // })
|
|
|
- // }
|
|
|
- // } catch (e) {
|
|
|
- // uni.showToast({
|
|
|
- // title: err.errmsg,
|
|
|
- // icon: 'error',
|
|
|
- // duration: 2000
|
|
|
- // });
|
|
|
- // }
|
|
|
+ that = _this2;
|
|
|
+ _context3.prev = 1;
|
|
|
+ res = uni.getStorageSync('openid');
|
|
|
+ _context3.next = 5;
|
|
|
+ return that.$api("/login/app/".concat(res), 'POST', {});
|
|
|
+ case 5:
|
|
|
+ aee = _context3.sent;
|
|
|
+ if (aee.errcode == '0') {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pages/home/index"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: aee.errmsg,
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ _context3.next = 12;
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ _context3.prev = 9;
|
|
|
+ _context3.t0 = _context3["catch"](1);
|
|
|
+ uni.showToast({
|
|
|
+ title: err.errmsg,
|
|
|
+ icon: 'error',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ case 12:
|
|
|
uni.reLaunch({
|
|
|
url: "/pages/home/index"
|
|
|
});
|
|
|
- case 2:
|
|
|
+ case 13:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}
|
|
|
- }, _callee3);
|
|
|
+ }, _callee3, null, [[1, 9]]);
|
|
|
}))();
|
|
|
}
|
|
|
}
|