Welcome
language
Welcome
Aggregate Mall
The poor and middle class work for money, while the rich let money work for them.
Welcome
Register Account
sessionStorage.setItem('login_flag', '1'); const input = document.querySelector("#phone"); const iti = window.intlTelInput(input, { separateDialCode: false, nationalMode: false, autoHideDialCode: false, autoPlaceholder: "polite", formatOnDisplay: true, utilsScript: "/statics/vender/intl-tel-input-master/js/utils.js", initialCountry: "auto", geoIpLookup: function (success, failure) { const country = $.cookie('use_country'); success(country ? country : 'us'); } }); // 自动检测手机号所属国家 let lastCountry = null; input.addEventListener('input', function () { const inputVal = input.value.trim().replace(/\D/g, ''); if (inputVal.length < 5) return; const number = "+" + inputVal; try { const numberInfo = iti.getNumberType ? iti.getNumber() : number; const countryData = window.intlTelInputGlobals.getInstance(input).getCountryData(); const found = countryData.find(c => { return c.dialCode && number.startsWith("+" + c.dialCode); }); if (found && found.iso2 !== lastCountry) { iti.setCountry(found.iso2); lastCountry = found.iso2; } } catch (e) { // do nothing } }); function check() { if ($("input[name=tel]").val() === '' || $("input[name=pwd]").val() === '') { $(document).dialog({ infoText: 'Please enter account / password' }); return false; } return true; } $(".login").on('click', function () { if (!check()) return; const fullTel = $("input[name=tel]").val(); const pwd = $("input[name=pwd]").val(); const jizhu = $("input[name=jizhu]").val(); const _csrf_ = "csrf689730cc76e84"; let loading; $.ajax({ url: "/index/user/do_login.html", data: { tel: fullTel, pwd: pwd, jizhu: jizhu, '_csrf_': _csrf_, 'reCAPTCHA': '' }, type: 'POST', beforeSend: function (request) { request.setRequestHeader('User-Token-Csrf', _csrf_); loading = $(document).dialog({ type: 'notice', infoIcon: '/static_new/img/loading.gif', infoText: 'loading...', autoClose: 0 }); }, success: function (data) { loading.close(); if (data.code === 0) { $(document).dialog({ infoText: data.info }); setTimeout(() => { location.href = "/index/index/home.html"; }, 2000); } else { $(document).dialog({ infoText: data.info || "Network unstable, please try again!" }); } }, error: function () { loading.close(); } }); });