(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/redirect/redirect" ], { 325: function(e, t, n) { (function(e) { function t(e) { return e && e.__esModule ? e : { default: e }; } n(4), t(n(2)), e(t(n(326)).default); }).call(this, n(1).createPage); }, 326: function(e, t, n) { n.r(t); var r = n(327), o = n(329); for (var c in o) "default" !== c && function(e) { n.d(t, e, function() { return o[e]; }); }(c); var a = n(13), i = Object(a.default)(o.default, r.render, r.staticRenderFns, !1, null, null, null, !1, r.components, void 0); i.options.__file = "pages/redirect/redirect.vue", t.default = i.exports; }, 327: function(e, t, n) { n.r(t); var r = n(328); n.d(t, "render", function() { return r.render; }), n.d(t, "staticRenderFns", function() { return r.staticRenderFns; }), n.d(t, "recyclableRender", function() { return r.recyclableRender; }), n.d(t, "components", function() { return r.components; }); }, 328: function(e, t, n) { n.r(t), n.d(t, "render", function() { return r; }), n.d(t, "staticRenderFns", function() { return c; }), n.d(t, "recyclableRender", function() { return o; }), n.d(t, "components", function() {}); var r = function() { var e = this; e.$createElement; e._self._c; }, o = !1, c = []; r._withStripped = !0; }, 329: function(e, t, n) { n.r(t); var r = n(330), o = n.n(r); for (var c in r) "default" !== c && function(e) { n.d(t, e, function() { return r[e]; }); }(c); t.default = o.a; }, 330: function(e, t, n) { (function(e) { function r(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter(function(t) { return Object.getOwnPropertyDescriptor(e, t).enumerable; })), n.push.apply(n, r); } return n; } function o(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? r(Object(n), !0).forEach(function(t) { c(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : r(Object(n)).forEach(function(t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function c(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } Object.defineProperty(t, "__esModule", { value: !0 }), t.default = void 0; var a = n(37), i = n(6), u = n(56), l = { computed: o({}, (0, i.mapState)([ "urlFile" ])), onLoad: function(e) { this.loadMp(e); }, methods: o(o({}, (0, i.mapMutations)("user", [ "login", "setUserInfo", "userInfo" ])), {}, { loadMp: function(t) { var n = this, r = n.$api.prePage().userInfo, o = e.getStorageSync("spread") || ""; (0, u.wechatMpAuth)({ code: t.code, iv: r.target.iv, encryptedData: r.target.encryptedData, spread_spid: o }).then(function(e) { var t = e.data; n.wchatAuth(t); }).catch(function(n) { e.showModal({ title: "错误", content: JSON.stringify(n) + t.code, showCancel: !1 }); }); }, wchatAuth: function(t) { var n = this; e.setStorageSync("token", t.token), (0, a.getUserInfo)({}).then(function(t) { console.log("获取用户信息"), console.log(t), n.login(), n.setUserInfo(t.data); var r = e.getStorageSync("present") || "/pages/index/index"; "pages/product/product" == r && (r = "/pages/index/index"), t.data.phone ? e.switchTab({ url: r, fail: function(t) { console.log(t), e.navigateTo({ url: r, fail: function(t) { console.log(t), e.switchTab({ url: "/pages/index/index" }); } }); } }) : e.showModal({ title: "提示", content: "请先绑定手机号", showCancel: !1, success: function(t) { e.navigateTo({ url: "/pages/set/phone" }); }, fail: function(e) { console.log(e); } }); }).catch(function(e) { console.log(e); }); } }) }; t.default = l; }).call(this, n(1).default); } }, [ [ 325, "common/runtime", "common/vendor" ] ] ]);