(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/redirect/redirect"],{"00fa":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n("b19f");var r=n("7eca"),o=n("26cb"),c=n("8639");function a(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f={computed:i({},(0,o.mapState)(["urlFile"])),onLoad:function(e){this.loadMp(e)},methods:i(i({},(0,o.mapMutations)("user",["login","setUserInfo"])),{},{loadMp:function(t){var n=this,r=n.$api.prePage().userInfo,o=e.getStorageSync("spread_code")||"";(0,c.wechatMpAuth)({code:t.code,iv:r.target.iv,encryptedData:r.target.encryptedData,spread_code:o}).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,r.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,r.spread)({puid:o}).then((function(e){console.log(e)})));var c=e.getStorageSync("present")||"/pages/index/index";"pages/product/product"==c&&(c="/pages/index/index"),e.switchTab({url:c,fail:function(t){console.log(t),e.navigateTo({url:c,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"])},"3c20":function(e,t,n){"use strict";n.r(t);var r=n("00fa"),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},ac02:function(e,t,n){"use strict";n.r(t);var r=n("d242"),o=n("3c20");for(var c in o)"default"!==c&&function(e){n.d(t,e,(function(){return o[e]}))}(c);var a,i=n("f0c5"),u=Object(i["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],a);t["default"]=u.exports},d242:function(e,t,n){"use strict";var r;n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return r}));var o=function(){var e=this,t=e.$createElement;e._self._c},c=[]},d806:function(e,t,n){"use strict";(function(e){n("856e");r(n("66fd"));var t=r(n("ac02"));function r(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n("543d")["createPage"])}},[["d806","common/runtime","common/vendor"]]]);