bindPhone.js 2.7 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/class/bindPhone"],{1881:function(e,t,n){},2461:function(e,t,n){"use strict";var o=n("1881"),r=n.n(o);r.a},"2bff":function(e,t,n){"use strict";(function(e){n("6cdc");o(n("66fd"));var t=o(n("74f9"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},"74f9":function(e,t,n){"use strict";n.r(t);var o=n("98fb"),r=n("fa5b");for(var c in r)"default"!==c&&function(e){n.d(t,e,(function(){return r[e]}))}(c);n("2461");var i,a=n("f0c5"),s=Object(a["a"])(r["default"],o["b"],o["c"],!1,null,"11bcfe80",null,!1,o["a"],i);t["default"]=s.exports},"98fb":function(e,t,n){"use strict";var o,r=function(){var e=this,t=e.$createElement;e._self._c},c=[];n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return o}))},aa9c:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("3786"),r=n("2f62");function c(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s={data:function(){return{key:"绑定手机号"}},computed:i({},(0,r.mapGetters)(["token","session"])),methods:{goto:function(e){this.globalNavigateTo("agreement",{type:e})},getPhoneNumber:function(t){var n=t.detail;if(!n.iv)return!1;var r=this,c={iv:n.iv,encryptedData:n.encryptedData,token:this.token,code:this.globalApp.code};e.checkSession({success:function(){c.session=r.session,r.bindPhone(c)},fail:function(){e.login({success:function(e){(0,o._login)({code:e.code}).then((function(e){c.session=e.data.session_key,r.$store.dispatch("setSession",e.data.session_key),r.bindPhone(c)}))}})}})},bindPhone:function(t){var n=this;(0,o._bindPhone)(t).then((function(t){e.showToast({title:t.msg,icon:"none"});var o=t.data.token;n.$store.dispatch("setToken",o),setTimeout((function(){e.navigateBack()}),800)}))}}};t.default=s}).call(this,n("543d")["default"])},fa5b:function(e,t,n){"use strict";n.r(t);var o=n("aa9c"),r=n.n(o);for(var c in o)"default"!==c&&function(e){n.d(t,e,(function(){return o[e]}))}(c);t["default"]=r.a}},[["2bff","common/runtime","common/vendor"]]]);