"use strict"; const common_vendor = require("../../common/vendor.js"); const api_loginApi = require("../../api/loginApi.js"); if (!Math) { huakuai(); } const huakuai = () => "../../compontent/public/huakuai.js"; const _sfc_main = { __name: "phonebumber", setup(__props) { const huakuaiOpen = common_vendor.ref(false); const jumpto = () => { huakuaiOpen.value = true; }; const codeIsOk = () => { huakuaiOpen.value = false; api_loginApi.getHkCode({ mobile: phonenumber.value }).then((res) => { if (res.success) { common_vendor.index.navigateTo({ url: `/pages/login/code?mobile=${phonenumber.value}&hkcode=${res.message}` }); } else { common_vendor.index.showToast({ title: res.message, icon: "none", // 不显示图标(提示信息) duration: 2e3 // 显示时长(毫秒) }); } }); }; function is11DigitNumber(value) { return /^\d{11}$/.test(value.toString()); } const phonenumber = common_vendor.ref(""); const canClick = common_vendor.ref(false); const isRight = (res) => { common_vendor.index.__f__("log", "at pages/login/phonebumber.vue:69", "????", res.detail.value); if (is11DigitNumber(res.detail.value)) { phonenumber.value = res.detail.value; canClick.value = true; } else { canClick.value = false; } }; const goback = () => { common_vendor.index.navigateBack(); }; return (_ctx, _cache) => { return common_vendor.e({ a: common_vendor.o(goback), b: common_vendor.o(isRight), c: canClick.value }, canClick.value ? { d: common_vendor.o(jumpto) } : {}, { e: !canClick.value }, !canClick.value ? {} : {}, { f: huakuaiOpen.value }, huakuaiOpen.value ? { g: common_vendor.o(() => { }), h: common_vendor.o(codeIsOk), i: common_vendor.o(($event) => huakuaiOpen.value = false) } : {}); }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-94511ff7"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/login/phonebumber.js.map