(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/redirect/redirect"],{"075c":function(t,e,n){"use strict";n.r(e);var r=n("4214"),a=n.n(r);for(var c in r)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(c);e["default"]=a.a},"0dfa":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var r=function(){var t=this.$createElement;this._self._c},a=[]},4214:function(t,e,n){"use strict";(function(t){var r=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(n("9523")),c=n("5635"),o=n("26cb"),i=n("679b");function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d={computed:f({},(0,o.mapState)(["urlFile"])),onLoad:function(t){this.loadMp(t)},methods:f(f({},(0,o.mapMutations)("user",["login","setUserInfo"])),{},{loadMp:function(e){var n=this,r=n.$api.prePage().userInfo,a=t.getStorageSync("spread_code")||"";(0,i.wechatMpAuth)({code:e.code,iv:r.target.iv,encryptedData:r.target.encryptedData,spread_code:a}).then((function(t){var e=t.data;n.wchatAuth(e)})).catch((function(e){t.showModal({title:"错误",content:JSON.stringify(e),showCancel:!1})}))},wchatAuth:function(e){var n=this;t.setStorageSync("token",e.token),(0,c.getUserInfo)({}).then((function(e){n.login(),n.setUserInfo(e.data);var r=t.getStorageSync("present")||"/pages/index/index";"pages/product/product"==r&&(r="/pages/index/index"),t.switchTab({url:r,fail:function(e){t.navigateTo({url:r,fail:function(e){t.navigateTo({url:"/pages/index/index"})}})}})})).catch((function(e){t.showModal({title:"错误",content:JSON.stringify(e),showCancel:!1})}))}})};e.default=d}).call(this,n("543d")["default"])},c04d:function(t,e,n){"use strict";(function(t,e){var r=n("4ea4");n("3e39");r(n("66fd"));var a=r(n("da2e"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},da2e:function(t,e,n){"use strict";n.r(e);var r=n("0dfa"),a=n("075c");for(var c in a)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(c);var o=n("f0c5"),i=Object(o["a"])(a["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);e["default"]=i.exports}},[["c04d","common/runtime","common/vendor"]]]);