| | |
| | | try { |
| | | components = { |
| | | uIcon: function () { |
| | | return Promise.all(/*! import() | node-modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-icon/u-icon.vue */ 334)) |
| | | return Promise.all(/*! import() | node-modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-icon/u-icon.vue */ 388)) |
| | | }, |
| | | authLogin: function () { |
| | | return __webpack_require__.e(/*! import() | components/auth-login/auth-login */ "components/auth-login/auth-login").then(__webpack_require__.bind(null, /*! @/components/auth-login/auth-login.vue */ 397)) |
| | | }, |
| | | customTabbar: function () { |
| | | return __webpack_require__.e(/*! import() | components/custom-tabbar/custom-tabbar */ "components/custom-tabbar/custom-tabbar").then(__webpack_require__.bind(null, /*! @/components/custom-tabbar/custom-tabbar.vue */ 404)) |
| | | }, |
| | | } |
| | | } catch (e) { |
| | |
| | | g0: g0, |
| | | } |
| | | }) |
| | | if (!_vm._isMounted) { |
| | | _vm.e0 = function ($event) { |
| | | _vm.showAuthLogin = false |
| | | } |
| | | } |
| | | _vm.$mp.data = Object.assign( |
| | | {}, |
| | | { |
| | |
| | | var _vuex = __webpack_require__(/*! vuex */ 37); |
| | | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } |
| | | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } |
| | | var CustomTabbar = function CustomTabbar() { |
| | | __webpack_require__.e(/*! require.ensure | components/custom-tabbar/custom-tabbar */ "components/custom-tabbar/custom-tabbar").then((function () { |
| | | return resolve(__webpack_require__(/*! @/components/custom-tabbar/custom-tabbar.vue */ 404)); |
| | | }).bind(null, __webpack_require__)).catch(__webpack_require__.oe); |
| | | }; |
| | | var _default = { |
| | | computed: _objectSpread({}, (0, _vuex.mapState)(['navHeight', 'statusbarHeight', 'openid', 'userInfo'])), |
| | | components: { |
| | | CustomTabbar: CustomTabbar |
| | | }, |
| | | computed: _objectSpread({}, (0, _vuex.mapState)(['navHeight', 'statusbarHeight', 'openid', 'userInfo', 'token'])), |
| | | data: function data() { |
| | | return { |
| | | showAuthLogin: false, |
| | | agreeChecked: true, |
| | | userName: '', |
| | | orderMenus: [{ |
| | | label: '待支付', |
| | |
| | | _context.next = 2; |
| | | return _this.$onLaunched; |
| | | case 2: |
| | | if (_this.token) { |
| | | _this.getOrderNum(); |
| | | } |
| | | if (_this.userInfo) { |
| | | if (_this.userInfo.shopAuditStatus === 3) { |
| | | _this.menuList[0].label = '门店信息'; |
| | | } |
| | | _this.getOrderNum(); |
| | | } else { |
| | | _this.orderMenus = [{ |
| | | label: '待支付', |
| | | url: '/static/icon/mine_ic_daifukuan@2x.png', |
| | | badge: 0 |
| | | }, { |
| | | label: '待收货', |
| | | url: '/static/icon/mine_ic_daishouhuo@2x.png', |
| | | badge: 0 |
| | | }, { |
| | | label: '退款/售后', |
| | | url: '/static/icon/mine_ic_tuikuan@2x.png', |
| | | badge: 0 |
| | | }]; |
| | | } |
| | | case 3: |
| | | case 4: |
| | | case "end": |
| | | return _context.stop(); |
| | | } |
| | |
| | | }))(); |
| | | }, |
| | | methods: { |
| | | handleProfileClick: function handleProfileClick() { |
| | | if (this.token) { |
| | | return; |
| | | } |
| | | this.showAuthLogin = true; |
| | | }, |
| | | toAllOrders: function toAllOrders() { |
| | | uni.navigateTo({ |
| | | url: '/pages/orders/orders' |
| | |
| | | handleMenuClick: function handleMenuClick(item) { |
| | | var urlMap = { |
| | | '门店入驻': '/pages/store-apply/store-apply', |
| | | '我的门店': '/pages/store-home/store-home', |
| | | '我的门店': '/shop/pages/login/login', |
| | | '规范须知': '/pages/rich-text/rich-text?type=serverIntroduce', |
| | | '关于我们': '/pages/rich-text/rich-text?type=about' |
| | | }; |
| | |
| | | url: '/pages/settings/settings' |
| | | }); |
| | | }, |
| | | goService: function goService() { |
| | | uni.navigateTo({ |
| | | url: '/pages/rich-text/rich-text?type=userAgreement' |
| | | }); |
| | | }, |
| | | goPrivacy: function goPrivacy() { |
| | | uni.navigateTo({ |
| | | url: '/pages/rich-text/rich-text?type=privacyPolicy' |
| | | }); |
| | | }, |
| | | getOrderNum: function getOrderNum() { |
| | | var _this2 = this; |
| | | this.$u.api.getMemberInfo({}).then(function (res) { |
| | |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // 授权手机号 |
| | | getphonenumber: function getphonenumber(e) { |
| | | var that = this; |
| | | if (e.detail.errMsg === 'getPhoneNumber:ok') { |
| | | uni.login({ |
| | | provider: 'weixin', |
| | | success: function () { |
| | | var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(loginRes) { |
| | | var code, res; |
| | | return _regenerator.default.wrap(function _callee2$(_context2) { |
| | | while (1) { |
| | | switch (_context2.prev = _context2.next) { |
| | | case 0: |
| | | code = loginRes.code; |
| | | _context2.next = 3; |
| | | return that.$u.api.wxLogin({ |
| | | code: code |
| | | }); |
| | | case 3: |
| | | res = _context2.sent; |
| | | if (res.code === 200) { |
| | | that.$u.api.wxAuthPhone({ |
| | | code: e.detail.code, |
| | | openid: res.data.openid |
| | | }).then(function (res) { |
| | | if (res.code === 200) { |
| | | that.$store.commit('setUserInfo', res.data.member); |
| | | that.$store.commit('setToken', res.data.token); |
| | | } |
| | | }); |
| | | } |
| | | case 5: |
| | | case "end": |
| | | return _context2.stop(); |
| | | } |
| | | } |
| | | }, _callee2); |
| | | })); |
| | | function success(_x) { |
| | | return _success.apply(this, arguments); |
| | | } |
| | | return success; |
| | | }() |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |