(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-058b7d37"],{

/***/ "0c99":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.search.js
var es6_regexp_search = __webpack_require__("386d");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"fa800d10-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/register/register.vue?vue&type=template&id=227446a0&scoped=true

var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c('div', {
    staticClass: "login"
  }, [_c('div', {
    staticClass: "login_mb"
  }), _c('div', {
    staticClass: "login_con"
  }, [_c('div', {
    staticClass: "login_tit"
  }, [_vm._v(_vm._s(_vm.$t('content.registerCreate')))]), _c('div', {
    staticClass: "registerlist"
  }, [_c('div', {
    staticClass: "registerlist_item"
  }, [_c('div', {
    staticClass: "registerlist_itemtop"
  }, [_vm._v(_vm._s(_vm.$t('content.registerselect')))]), _c('div', {
    staticClass: "registerlist_itembot",
    on: {
      "click": _vm.openregion
    }
  }, [_c('span', [_vm._v(_vm._s(_vm.country1))]), _c('van-icon', {
    attrs: {
      "name": "arrow-down",
      "color": "#bbb"
    }
  })], 1)]), _c('van-popup', {
    attrs: {
      "round": "",
      "position": "bottom"
    },
    model: {
      value: _vm.showPicker,
      callback: function callback($$v) {
        _vm.showPicker = $$v;
      },
      expression: "showPicker"
    }
  }, [_c('van-picker', {
    attrs: {
      "swipe-duration": "100",
      "value-key": "name",
      "show-toolbar": "",
      "columns": _vm.columns
    },
    on: {
      "cancel": function cancel($event) {
        _vm.showPicker = false;
      },
      "confirm": _vm.onConfirm
    },
    scopedSlots: _vm._u([{
      key: "columns-top",
      fn: function fn() {
        return [_c('div', {
          staticClass: "sslist_head"
        }, [_c('van-field', {
          attrs: {
            "placeholder": _vm.$t('content.registercountry'),
            "clearable": ""
          },
          on: {
            "keyup": function keyup($event) {
              if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
              return _vm.onSearch.apply(null, arguments);
            }
          },
          model: {
            value: _vm.search,
            callback: function callback($$v) {
              _vm.search = $$v;
            },
            expression: "search"
          }
        }), _c('span', {
          on: {
            "click": _vm.onSearch
          }
        }, [_vm._v(" " + _vm._s(_vm.$t('content.registerSearch')) + " ")])], 1)];
      },
      proxy: true
    }, {
      key: "option",
      fn: function fn(option) {
        return [_c('div', {
          staticStyle: {
            "display": "flex",
            "align-items": "center"
          }
        }, [_c('img', {
          staticStyle: {
            "width": "30px",
            "margin-right": "10px"
          },
          attrs: {
            "src": option.flag_small,
            "alt": ""
          }
        }), _c('span', [_vm._v(_vm._s(option.name_cu))])])];
      }
    }])
  })], 1), _c('div', {
    staticClass: "registerlist_itemtop"
  }, [_vm._v(_vm._s(_vm.$t('content.registerEmail')))]), _c('van-field', {
    staticClass: "res_item",
    attrs: {
      "placeholder": _vm.$t('content.registeraddressil')
    },
    model: {
      value: _vm.email,
      callback: function callback($$v) {
        _vm.email = $$v;
      },
      expression: "email"
    }
  }), _c('div', {
    staticClass: "registerlist_itemtop"
  }, [_vm._v(_vm._s(_vm.$t('content.LoginPassword')))]), _c('van-field', {
    staticClass: "res_item",
    attrs: {
      "type": _vm.passwordeye == 1 ? 'password' : 'text',
      "placeholder": _vm.$t('content.LoginenterPassword')
    },
    scopedSlots: _vm._u([{
      key: "right-icon",
      fn: function fn() {
        return [_vm.passwordeye == 1 ? _c('van-icon', {
          attrs: {
            "name": "closed-eye"
          },
          on: {
            "click": function click($event) {
              _vm.passwordeye = 2;
            }
          }
        }) : _c('van-icon', {
          attrs: {
            "name": "eye-o"
          },
          on: {
            "click": function click($event) {
              _vm.passwordeye = 1;
            }
          }
        })];
      },
      proxy: true
    }]),
    model: {
      value: _vm.password,
      callback: function callback($$v) {
        _vm.password = $$v;
      },
      expression: "password"
    }
  }), _c('div', {
    staticClass: "registerlist_itemtop"
  }, [_vm._v(" " + _vm._s(_vm.$t('content.registerConfirmPassword')))]), _c('van-field', {
    staticClass: "res_item",
    attrs: {
      "type": _vm.confirmpasswordeye == 1 ? 'password' : 'text',
      "placeholder": _vm.$t('content.registerpasswordagain')
    },
    scopedSlots: _vm._u([{
      key: "right-icon",
      fn: function fn() {
        return [_vm.confirmpasswordeye == 1 ? _c('van-icon', {
          attrs: {
            "name": "closed-eye"
          },
          on: {
            "click": function click($event) {
              _vm.confirmpasswordeye = 2;
            }
          }
        }) : _c('van-icon', {
          attrs: {
            "name": "eye-o"
          },
          on: {
            "click": function click($event) {
              _vm.confirmpasswordeye = 1;
            }
          }
        })];
      },
      proxy: true
    }]),
    model: {
      value: _vm.confirmpassword,
      callback: function callback($$v) {
        _vm.confirmpassword = $$v;
      },
      expression: "confirmpassword"
    }
  }), _c('div', {
    staticClass: "registerlist_itemtop"
  }, [_vm._v(" " + _vm._s(_vm.$t('content.LoginCode')))]), _c('div', {
    staticClass: "code"
  }, [_c('van-field', {
    staticClass: "res_item",
    attrs: {
      "type": "number",
      "placeholder": _vm.$t('content.registercode6')
    },
    model: {
      value: _vm.code,
      callback: function callback($$v) {
        _vm.code = $$v;
      },
      expression: "code"
    }
  }), _c('div', {
    staticClass: "getcode"
  }, [_vm.time == 0 ? _c('span', {
    on: {
      "click": _vm.getcode
    }
  }, [_vm._v(" " + _vm._s(_vm.$t('content.LoginGet')))]) : _c('span', [_vm._v(_vm._s(_vm.time) + "s")])])], 1)], 1), _c('div', {
    staticClass: "loginGo",
    style: {
      background: _vm.email != '' && _vm.password != '' && _vm.confirmpassword != '' && _vm.code != '' ? '#222222' : '#ccc'
    },
    on: {
      "click": _vm.loginGo
    }
  }, [_vm._v("\n      " + _vm._s(_vm.$t('content.registerSignUP')) + "\n    ")]), _c('div', {
    staticClass: "dl",
    on: {
      "click": _vm.dl
    }
  }, [_vm._v(_vm._s(_vm.$t('content.registerSwitch')))])]), _vm.loadingbox ? _c('div', {
    staticClass: "loadingbox"
  }, [_c('van-loading', {
    attrs: {
      "color": "rgb(34,34,34)"
    }
  })], 1) : _vm._e()]);
};
var staticRenderFns = [];

// CONCATENATED MODULE: ./src/views/register/register.vue?vue&type=template&id=227446a0&scoped=true

// EXTERNAL MODULE: ./node_modules/core-js/modules/es6.regexp.replace.js
var es6_regexp_replace = __webpack_require__("a481");

// EXTERNAL MODULE: ./node_modules/regenerator-runtime/runtime.js
var runtime = __webpack_require__("96cf");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("1da1");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js + 2 modules
var defineProperty = __webpack_require__("ade3");

// EXTERNAL MODULE: ./node_modules/vant/es/loading/index.js
var loading = __webpack_require__("543e");

// EXTERNAL MODULE: ./node_modules/vant/es/field/index.js
var field = __webpack_require__("565f");

// EXTERNAL MODULE: ./node_modules/vant/es/popup/index.js
var popup = __webpack_require__("e41f");

// EXTERNAL MODULE: ./node_modules/vant/es/picker/index.js + 2 modules
var picker = __webpack_require__("f253");

// EXTERNAL MODULE: ./node_modules/vant/es/icon/index.js
var icon = __webpack_require__("ad06");

// EXTERNAL MODULE: ./src/api/index.js
var api = __webpack_require__("365c");

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/register/register.vue?vue&type=script&lang=js











/* harmony default export */ var registervue_type_script_lang_js = ({
  name: "register",
  components: Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])({}, icon["a" /* default */].name, icon["a" /* default */]), picker["a" /* default */].name, picker["a" /* default */]), popup["a" /* default */].name, popup["a" /* default */]), field["a" /* default */].name, field["a" /* default */]), loading["a" /* default */].name, loading["a" /* default */]),
  data: function data() {
    return {
      search: "",
      time: 0,
      password: "",
      timerss: null,
      confirmpassword: "",
      email: "",
      code: "",
      country: this.$t('content.registernationality'),
      country1: "",
      showPicker: false,
      loadingbox: false,
      columns: [{
        name: 1,
        id: 1
      }, {
        name: 2,
        id: 2
      }, {
        name: 3,
        id: 3
      }],
      passwordeye: 1,
      confirmpasswordeye: 1
    };
  },
  created: function created() {
    var _this = this;
    this.loadingbox = true;
    Object(api["s" /* getCountry */])({
      type: 1
    }).then(function (data) {
      _this.loadingbox = false;
      _this.country = data.info.default[0].name_cu;
      _this.country1 = data.info.default[0].name;
      _this.columns = data.info.assemble;
      //console.log(this.columns, "isjvks");
    }).catch(function (error) {
      _this.loadingbox = false;
    });
    this.analysislogin();
  },
  methods: {
    analysislogin: function analysislogin() {
      // let registerbrowseKey= localStorage.getItem("registerbrowseKey")
      // if(registerbrowseKey==null){
      var name = localStorage.getItem('type');
      Object(api["h" /* analysislogin */])({
        name: name,
        type: 'register'
      }).then(function (res) {
        // if(res.code==1){
        //   localStorage.setItem('registerbrowseKey', true);
        // }
      });
      // }
    },
    onSearch: function onSearch() {
      var _this2 = this;
      //console.log(123);
      Object(api["r" /* getCountriesname */])({
        name_cu: this.search
      }).then(function (res) {
        //console.log(res);
        _this2.columns = res.info[0];
      }).catch(function (error) {
        // this.loadingbox = false;
      });
    },
    getcode: function () {
      var _getcode = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
        var _this3 = this;
        return regeneratorRuntime.wrap(function _callee2$(_context2) {
          while (1) switch (_context2.prev = _context2.next) {
            case 0:
              if (!(this.email.trim() === "")) {
                _context2.next = 3;
                break;
              }
              this.$toast(this.$t('content.Loginenteremail'));
              return _context2.abrupt("return");
            case 3:
              if (this.timerss) {
                clearTimeout(this.timerss);
              }
              this.timerss = setTimeout( /*#__PURE__*/Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
                var data, timernum;
                return regeneratorRuntime.wrap(function _callee$(_context) {
                  while (1) switch (_context.prev = _context.next) {
                    case 0:
                      _context.prev = 0;
                      _this3.loadingbox = true;
                      _context.next = 4;
                      return Object(api["G" /* getsendEmailCode */])({
                        email: _this3.email,
                        // disabled: true,
                        type: 2
                      });
                    case 4:
                      data = _context.sent;
                      //console.log(data, "结果");
                      if (data.code === 1) {
                        _this3.$toast(_this3.$t('content.Loginsendsuccessfully'));
                        _this3.time = 60;
                        timernum = setInterval(function () {
                          if (_this3.time === 0) {
                            clearTimeout(timernum);
                            return;
                          } else {
                            _this3.time--;
                          }
                        }, 1000);
                      } else {
                        _this3.time = 0;
                        _this3.$toast(data.msg);
                      }
                      _context.next = 10;
                      break;
                    case 8:
                      _context.prev = 8;
                      _context.t0 = _context["catch"](0);
                    case 10:
                      _context.prev = 10;
                      _this3.loadingbox = false;
                      return _context.finish(10);
                    case 13:
                    case "end":
                      return _context.stop();
                  }
                }, _callee, null, [[0, 8, 10, 13]]);
              })), 500);
            case 5:
            case "end":
              return _context2.stop();
          }
        }, _callee2, this);
      }));
      function getcode() {
        return _getcode.apply(this, arguments);
      }
      return getcode;
    }(),
    // 登录
    loginGo: function () {
      var _loginGo = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
        var data, priceAll, allprice, lang, type, allpricevalue, priceAllvalue, typeValue, langValue;
        return regeneratorRuntime.wrap(function _callee3$(_context3) {
          while (1) switch (_context3.prev = _context3.next) {
            case 0:
              if (!(this.email == "")) {
                _context3.next = 3;
                break;
              }
              this.$toast(this.$t('content.registermailbox'));
              return _context3.abrupt("return");
            case 3:
              if (!(this.password == "")) {
                _context3.next = 6;
                break;
              }
              this.$toast(this.$t('content.registeryourpassword'));
              return _context3.abrupt("return");
            case 6:
              if (!(this.confirmpassword != this.password)) {
                _context3.next = 9;
                break;
              }
              this.$toast(this.$t('content.registerconfirmyourpassword'));
              return _context3.abrupt("return");
            case 9:
              if (!(this.code == "")) {
                _context3.next = 12;
                break;
              }
              // this.$toast("Please enter the verification code");
              this.$toast(this.$t('content.registerverificationcode'));
              return _context3.abrupt("return");
            case 12:
              _context3.prev = 12;
              this.loadingbox = true;
              priceAll = localStorage.getItem("priceAll");
              allprice = localStorage.getItem("allprice");
              lang = localStorage.getItem("user-lang");
              type = localStorage.getItem("type");
              if (lang == 'es-ES') {
                langValue = 'es';
              } else if (lang == 'pt-PT') {
                langValue = "pt";
              } else if (lang == 'fr-FR') {
                langValue = "fr";
              } else if (lang == 'zh-CN') {
                langValue = "cn";
              } else {
                langValue = "en";
              }
              if (allprice != undefined && allprice != "" && allprice != "null") {
                allpricevalue = allprice;
              } else {
                allpricevalue = 200;
              }
              if (priceAll != undefined && priceAll != "" && priceAll != "null") {
                priceAllvalue = priceAll;
              } else {
                priceAllvalue = "";
              }
              if (type != undefined && type != "" && type != "null") {
                typeValue = type;
              } else {
                typeValue = "default";
              }
              //console.log(typeValue, "对呀");
              _context3.next = 24;
              return Object(api["v" /* getRegister */])({
                email: this.email,
                password: this.password,
                confirmpassword: this.confirmpassword,
                country: this.country1,
                code: this.code,
                u_price: allpricevalue,
                u_product: priceAllvalue,
                user_source: typeValue,
                lang: langValue
              });
            case 24:
              data = _context3.sent;
              if (data.code === 1) {
                this.$toast(data.msg);
                this.$router.replace({
                  name: "login",
                  query: {
                    redirect: this.$route.query.redirect
                  }
                });
              } else {
                this.$toast(data.msg);
              }
              _context3.next = 31;
              break;
            case 28:
              _context3.prev = 28;
              _context3.t0 = _context3["catch"](12);
              console.error(_context3.t0);
            case 31:
              _context3.prev = 31;
              this.loadingbox = false;
              //console.log(data); // 在 finally 块中访问 data
              return _context3.finish(31);
            case 34:
            case "end":
              return _context3.stop();
          }
        }, _callee3, this, [[12, 28, 31, 34]]);
      }));
      function loginGo() {
        return _loginGo.apply(this, arguments);
      }
      return loginGo;
    }(),
    onConfirm: function onConfirm(value) {
      if (value == undefined) {
        this.$toast(this.$t('content.registerPleaseselectcountry'));
        return;
      }
      this.country1 = value.name;
      this.country = value.name_cu;
      this.showPicker = false;
    },
    openregion: function openregion() {
      this.search = "";
      this.onSearch();
      this.showPicker = true;
    },
    dl: function dl() {
      this.$router.replace({
        name: "login"
      });
    }
  }
});
// CONCATENATED MODULE: ./src/views/register/register.vue?vue&type=script&lang=js
 /* harmony default export */ var register_registervue_type_script_lang_js = (registervue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/views/register/register.vue?vue&type=style&index=0&id=227446a0&prod&scoped=true&lang=css
var registervue_type_style_index_0_id_227446a0_prod_scoped_true_lang_css = __webpack_require__("e54d");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/views/register/register.vue






/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  register_registervue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  "227446a0",
  null
  
)

/* harmony default export */ var register = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ "7855":
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin

/***/ }),

/***/ "e54d":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_register_vue_vue_type_style_index_0_id_227446a0_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("7855");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_register_vue_vue_type_style_index_0_id_227446a0_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_register_vue_vue_type_style_index_0_id_227446a0_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ })

}]);