text: require("../../common/manifest.js")
  require("../../common/vendor.js")
  global.webpackJsonpMpvue([5],{
  
  /***/ 152:
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1);
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__);
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index__ = __webpack_require__(153);
  
  
  
  var app = new __WEBPACK_IMPORTED_MODULE_0_vue___default.a(__WEBPACK_IMPORTED_MODULE_1__index__["a" /* default */]);
  app.$mount();
  
  /***/ }),
  
  /***/ 153:
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue__ = __webpack_require__(155);
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_1aa2f8d4_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_fileExt_template_wxml_script_js_style_wxss_platform_wx_node_modules_mpvue_loader_lib_selector_type_template_index_0_index_vue__ = __webpack_require__(156);
  var disposed = false
  function injectStyle (ssrContext) {
    if (disposed) return
    __webpack_require__(154)
  }
  var normalizeComponent = __webpack_require__(0)
  /* script */
  
  /* template */
  
  /* styles */
  var __vue_styles__ = injectStyle
  /* scopeId */
  var __vue_scopeId__ = "data-v-1aa2f8d4"
  /* moduleIdentifier (server only) */
  var __vue_module_identifier__ = null
  var Component = normalizeComponent(
    __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue__["a" /* default */],
    __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_1aa2f8d4_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_fileExt_template_wxml_script_js_style_wxss_platform_wx_node_modules_mpvue_loader_lib_selector_type_template_index_0_index_vue__["a" /* default */],
    __vue_styles__,
    __vue_scopeId__,
    __vue_module_identifier__
  )
  Component.options.__file = "src\\pages\\phone-login\\index.vue"
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
  if (Component.options.functional) {console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions.")}
  
  /* hot reload */
  if (false) {(function () {
    var hotAPI = require("vue-hot-reload-api")
    hotAPI.install(require("vue"), false)
    if (!hotAPI.compatible) return
    module.hot.accept()
    if (!module.hot.data) {
      hotAPI.createRecord("data-v-1aa2f8d4", Component.options)
    } else {
      hotAPI.reload("data-v-1aa2f8d4", Component.options)
    }
    module.hot.dispose(function (data) {
      disposed = true
    })
  })()}
  
  /* harmony default export */ __webpack_exports__["a"] = (Component.exports);
  
  
  /***/ }),
  
  /***/ 154:
  /***/ (function(module, exports) {
  
  // removed by extract-text-webpack-plugin
  
  /***/ }),
  
  /***/ 155:
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__(5);
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__);
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator__ = __webpack_require__(6);
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator__);
  
  
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  //
  
  /* harmony default export */ __webpack_exports__["a"] = ({
    data: function data() {
      return {
        phone: '17704051019', // 手机号
        vcode: '' // 验证码
      };
    },
  
    methods: {
      // 获取验证码
      getVcode: function getVcode() {
        var _this = this;
  
        return __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator___default()( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee() {
          var res;
          return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context) {
            while (1) {
              switch (_context.prev = _context.next) {
                case 0:
                  if (!(_this.phone.trim().length === 0)) {
                    _context.next = 3;
                    break;
                  }
  
                  wx.showToast({
                    title: '手机号不能为空', //提示的内容,
                    icon: 'none' //图标
                  });
                  return _context.abrupt('return');
  
                case 3:
                  _context.next = 5;
                  return _this.$axios.get('user/vcode?phone=' + _this.phone);
  
                case 5:
                  res = _context.sent;
  
  
                  wx.showToast({
                    title: '' + res.data.vcode, //提示的内容,
                    icon: 'none' //图标
                  });
  
                case 7:
                case 'end':
                  return _context.stop();
              }
            }
          }, _callee, _this);
        }))();
      },
  
      // 手机号登录
      phoneLogin: function phoneLogin() {
        var _this2 = this;
  
        return __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_asyncToGenerator___default()( /*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee2() {
          var res;
          return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee2$(_context2) {
            while (1) {
              switch (_context2.prev = _context2.next) {
                case 0:
                  _context2.next = 2;
                  return _this2.$axios.post('user/login', {
                    phone: _this2.phone,
                    vcode: _this2.vcode
                  });
  
                case 2:
                  res = _context2.sent;
  
  
                  if (res.data.status === 0) {
                    // 登录成功
                    // 保存token
                    wx.setStorageSync('token', res.data.token);
  
                    // 跳转到首页
                    wx.reLaunch({ url: '/pages/home/main' });
                  } else {
                    wx.showModal({
                      content: res.data.message, //提示的内容,
                      showCancel: false, //是否显示取消按钮,
                      confirmText: '确定', //确定按钮的文字，默认为取消，最多 4 个字符,
                      confirmColor: '#ff8d44' //确定按钮的文字颜色
                    });
                  }
  
                case 4:
                case 'end':
                  return _context2.stop();
              }
            }
          }, _callee2, _this2);
        }))();
      }
    }
  });
  
  /***/ }),
  
  /***/ 156:
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  
  "use strict";
  var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
    return _c('div', {
      staticClass: "phone-login-container"
    }, [_c('p', {
      staticClass: "phone-validate"
    }, [_vm._v("手机号验证")]), _vm._v(" "), _c('p', {
      staticClass: "subtitle"
    }, [_vm._v("用于即使获取课程最新信息")]), _vm._v(" "), _c('div', {
      staticClass: "content"
    }, [_c('input', {
      directives: [{
        name: "model",
        rawName: "v-model",
        value: (_vm.phone),
        expression: "phone"
      }],
      staticClass: "phone",
      attrs: {
        "placeholder": "请输入您的手机号",
        "type": "number",
        "eventid": '0'
      },
      domProps: {
        "value": (_vm.phone)
      },
      on: {
        "input": function($event) {
          if ($event.target.composing) { return; }
          _vm.phone = $event.target.value
        }
      }
    }), _vm._v(" "), _c('div', {
      staticClass: "get_vcode",
      attrs: {
        "eventid": '1'
      },
      on: {
        "click": _vm.getVcode
      }
    }, [_vm._v("获取验证码")]), _vm._v(" "), _c('input', {
      directives: [{
        name: "model",
        rawName: "v-model",
        value: (_vm.vcode),
        expression: "vcode"
      }],
      staticClass: "vcode",
      attrs: {
        "placeholder": "请输入验证码",
        "type": "number",
        "eventid": '2'
      },
      domProps: {
        "value": (_vm.vcode)
      },
      on: {
        "input": function($event) {
          if ($event.target.composing) { return; }
          _vm.vcode = $event.target.value
        }
      }
    })]), _vm._v(" "), _c('div', {
      staticClass: "phone-login"
    }, [_c('img', {
      attrs: {
        "src": "/static/images/phone_login@2x.png",
        "alt": "",
        "eventid": '3'
      },
      on: {
        "click": _vm.phoneLogin
      }
    })])], 1)
  }
  var staticRenderFns = []
  render._withStripped = true
  var esExports = { render: render, staticRenderFns: staticRenderFns }
  /* harmony default export */ __webpack_exports__["a"] = (esExports);
  if (false) {
    module.hot.accept()
    if (module.hot.data) {
       require("vue-hot-reload-api").rerender("data-v-1aa2f8d4", esExports)
    }
  }
  
  /***/ })
  
  },[152]);