(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/redirect/redirect"],{"3d2c":function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("12d5");o(n("66fd"));var r=o(n("4359"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"406d":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},r=[]},4359:function(e,t,n){"use strict";n.r(t);var o=n("406d"),r=n("8847");for(var c in r)["default"].indexOf(c)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(c);var a=n("f0c5"),i=Object(a["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);t["default"]=i.exports},8847:function(e,t,n){"use strict";n.r(t);var o=n("e531"),r=n.n(o);for(var c in o)["default"].indexOf(c)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(c);t["default"]=r.a},e531:function(e,t,n){"use strict";(function(e){var o=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("9523")),c=(n("c46b"),n("36af")),a=n("26cb"),i=n("8116");function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f={computed:s({},(0,a.mapState)(["urlFile"])),onLoad:function(e){this.loadMp(e)},methods:s(s({},(0,a.mapMutations)("user",["login","setUserInfo"])),{},{loadMp:function(t){var n=this,o=n.$api.prePage().userInfo,r=e.getStorageSync("spread_code")||"";(0,i.wechatMpAuth)({code:t.code,iv:o.target.iv,encryptedData:o.target.encryptedData,spread_code:r}).then((function(e){var t=e.data;n.wchatAuth(t)})).catch((function(t){e.showModal({title:"错误",content:JSON.stringify(t),showCancel:!1})}))},wchatAuth:function(t){var n=this;e.setStorageSync("token",t.token),(0,c.getUserInfo)({}).then((function(t){n.login(),n.setUserInfo(t.data);var o=e.getStorageSync("puid");console.log(e.getStorageSync("puid"),"00000000000"),o&&(console.log(o,"00000000000"),(0,c.spread)({puid:o}).then((function(e){console.log(e)})));var r=e.getStorageSync("present")||"/pages/index/index";"pages/product/product"==r&&(r="/pages/index/index"),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"})}})}})})).catch((function(t){e.showModal({title:"错误",content:JSON.stringify(t),showCancel:!1})}))}})};t.default=f}).call(this,n("543d")["default"])}},[["3d2c","common/runtime","common/vendor"]]]);