(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/redirect/redirect"],{"7a7b":function(e,t,n){"use strict";(function(e,t){var r=n("4ea4");n("2e1c");r(n("66fd"));var a=r(n("d294"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},ba63:function(e,t,n){"use strict";(function(e){var r=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("9523")),o=n("0c0e"),c=n("26cb"),u=n("9411");function i(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f={computed:s({},(0,c.mapState)(["urlFile"])),onLoad:function(e){this.loadMp(e)},methods:s(s({},(0,c.mapMutations)("user",["login","setUserInfo"])),{},{loadMp:function(t){var n=this,r=n.$api.prePage().userInfo,a=e.getStorageSync("spread_code")||"";(0,u.wechatMpAuth)({code:t.code,iv:r.target.iv,encryptedData:r.target.encryptedData,spread_code:a}).then((function(e){var t=e.data;n.wchatAuth(t),history.replaceState({name:"我的"},"我的",n.urlFile+"/#/pages/user/user")})).catch((function(t){e.showModal({title:"错误",content:JSON.stringify(t),showCancel:!1})}))},wchatAuth:function(t){console.log(t);var n=this;e.setStorageSync("token",t.token),(0,o.getUserInfo)({}).then((function(t){n.login(),n.setUserInfo(t.data.user);var r=e.getStorageSync("present")||"/pages/user/user";"pages/product/product"==r&&(r="/pages/user/user"),e.switchTab({url:r,fail:function(t){e.navigateTo({url:r,fail:function(t){e.navigateTo({url:"/pages/user/user"})}})}})})).catch((function(t){e.showModal({title:"错误",content:JSON.stringify(t),showCancel:!1})}))}})};t.default=f}).call(this,n("543d")["default"])},d294:function(e,t,n){"use strict";n.r(t);var r=n("f6bd"),a=n("fb58");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);var c=n("f0c5"),u=Object(c["a"])(a["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);t["default"]=u.exports},f6bd:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var r=function(){var e=this.$createElement;this._self._c},a=[]},fb58:function(e,t,n){"use strict";n.r(t);var r=n("ba63"),a=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);t["default"]=a.a}},[["7a7b","common/runtime","common/vendor"]]]);