phone.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/set/phone" ], {
  2. 133: function(n, t, e) {
  3. (function(n) {
  4. function t(n) {
  5. return n && n.__esModule ? n : {
  6. default: n
  7. };
  8. }
  9. e(4), t(e(2)), n(t(e(134)).default);
  10. }).call(this, e(1).createPage);
  11. },
  12. 134: function(n, t, e) {
  13. e.r(t);
  14. var o = e(135), r = e(137);
  15. for (var c in r) "default" !== c && function(n) {
  16. e.d(t, n, function() {
  17. return r[n];
  18. });
  19. }(c);
  20. e(139);
  21. var i = e(13), u = Object(i.default)(r.default, o.render, o.staticRenderFns, !1, null, null, null, !1, o.components, void 0);
  22. u.options.__file = "pages/set/phone.vue", t.default = u.exports;
  23. },
  24. 135: function(n, t, e) {
  25. e.r(t);
  26. var o = e(136);
  27. e.d(t, "render", function() {
  28. return o.render;
  29. }), e.d(t, "staticRenderFns", function() {
  30. return o.staticRenderFns;
  31. }), e.d(t, "recyclableRender", function() {
  32. return o.recyclableRender;
  33. }), e.d(t, "components", function() {
  34. return o.components;
  35. });
  36. },
  37. 136: function(n, t, e) {
  38. e.r(t), e.d(t, "render", function() {
  39. return o;
  40. }), e.d(t, "staticRenderFns", function() {
  41. return c;
  42. }), e.d(t, "recyclableRender", function() {
  43. return r;
  44. }), e.d(t, "components", function() {});
  45. var o = function() {
  46. var n = this;
  47. n.$createElement;
  48. n._self._c, n._isMounted || (n.e0 = function(t) {
  49. !n.loding && n.confirm();
  50. });
  51. }, r = !1, c = [];
  52. o._withStripped = !0;
  53. },
  54. 137: function(n, t, e) {
  55. e.r(t);
  56. var o = e(138), r = e.n(o);
  57. for (var c in o) "default" !== c && function(n) {
  58. e.d(t, n, function() {
  59. return o[n];
  60. });
  61. }(c);
  62. t.default = r.a;
  63. },
  64. 138: function(n, t, e) {
  65. (function(n) {
  66. function o(n, t) {
  67. var e = Object.keys(n);
  68. if (Object.getOwnPropertySymbols) {
  69. var o = Object.getOwnPropertySymbols(n);
  70. t && (o = o.filter(function(t) {
  71. return Object.getOwnPropertyDescriptor(n, t).enumerable;
  72. })), e.push.apply(e, o);
  73. }
  74. return e;
  75. }
  76. function r(n, t, e) {
  77. return t in n ? Object.defineProperty(n, t, {
  78. value: e,
  79. enumerable: !0,
  80. configurable: !0,
  81. writable: !0
  82. }) : n[t] = e, n;
  83. }
  84. Object.defineProperty(t, "__esModule", {
  85. value: !0
  86. }), t.default = void 0;
  87. var c = e(37), i = e(6), u = e(46), a = {
  88. data: function() {
  89. return {
  90. time: "",
  91. countDown: 0,
  92. account: "",
  93. captcha: "",
  94. password: "",
  95. loding: !1,
  96. show: !0
  97. };
  98. },
  99. watch: {
  100. countDown: function(n) {
  101. 0 == n && clearInterval(this.time);
  102. }
  103. },
  104. computed: function(n) {
  105. for (var t = 1; t < arguments.length; t++) {
  106. var e = null != arguments[t] ? arguments[t] : {};
  107. t % 2 ? o(Object(e), !0).forEach(function(t) {
  108. r(n, t, e[t]);
  109. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(e)) : o(Object(e)).forEach(function(t) {
  110. Object.defineProperty(n, t, Object.getOwnPropertyDescriptor(e, t));
  111. });
  112. }
  113. return n;
  114. }({}, (0, i.mapState)("user", [ "userInfo" ])),
  115. onLoad: function() {
  116. null == this.userInfo.phone ? this.account = "" : (this.account = this.userInfo.phone,
  117. this.show = !1);
  118. },
  119. methods: {
  120. verification: function() {
  121. var n = this;
  122. if ("" != this.account) {
  123. if (/(^1[1|2|3|4|5|6|7|8|9][0-9]{9}$)/.test(this.account)) return !(n.countDown > 0) && (n.countDown = 60,
  124. n.time = setInterval(function() {
  125. n.countDown--;
  126. }, 1e3), void (0, c.verify)({
  127. phone: n.account,
  128. type: "BDING_CODE"
  129. }).then(function(n) {
  130. n.data;
  131. }).catch(function(n) {
  132. console.log(n);
  133. }));
  134. this.$api.msg("请输入正确的手机号");
  135. } else this.$api.msg("请输入电话号码");
  136. },
  137. confirm: function(t) {
  138. var e = this;
  139. this.loding = !0, (0, u.binding)({
  140. phone: this.account,
  141. captcha: this.captcha
  142. }).then(function(t) {
  143. t.data, e.loding = !1, e.$api.msg("绑定成功!"), setTimeout(function() {
  144. n.switchTab({
  145. url: "/pages/user/user"
  146. });
  147. }, 1e3);
  148. }).catch(function(n) {
  149. e.loding = !1, console.log(n);
  150. });
  151. }
  152. }
  153. };
  154. t.default = a;
  155. }).call(this, e(1).default);
  156. },
  157. 139: function(n, t, e) {
  158. e.r(t);
  159. var o = e(140), r = e.n(o);
  160. for (var c in o) "default" !== c && function(n) {
  161. e.d(t, n, function() {
  162. return o[n];
  163. });
  164. }(c);
  165. t.default = r.a;
  166. },
  167. 140: function(n, t, e) {}
  168. }, [ [ 133, "common/runtime", "common/vendor" ] ] ]);