officialAccount/unpackage/dist/dev/mp-weixin/pages/login/phonebumber.js

70 lines
2.3 KiB
JavaScript
Raw Normal View History

2025-05-28 17:36:42 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
2025-06-03 17:29:22 +08:00
const api_loginApi = require("../../api/loginApi.js");
2025-05-28 17:36:42 +08:00
if (!Math) {
huakuai();
}
const huakuai = () => "../../compontent/public/huakuai.js";
const _sfc_main = {
__name: "phonebumber",
setup(__props) {
const huakuaiOpen = common_vendor.ref(false);
const jumpto = () => {
2025-06-03 17:29:22 +08:00
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
// 显示时长(毫秒)
});
}
2025-05-28 17:36:42 +08:00
});
};
function is11DigitNumber(value) {
return /^\d{11}$/.test(value.toString());
}
const phonenumber = common_vendor.ref("");
const canClick = common_vendor.ref(false);
const isRight = (res) => {
2025-06-03 17:29:22 +08:00
common_vendor.index.__f__("log", "at pages/login/phonebumber.vue:73", "????", res.detail.value);
2025-05-28 17:36:42 +08:00
if (is11DigitNumber(res.detail.value)) {
phonenumber.value = res.detail.value;
canClick.value = true;
} else {
canClick.value = false;
}
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_assets._imports_0,
b: common_assets._imports_1,
c: common_assets._imports_2,
d: common_vendor.o(isRight),
2025-06-03 17:29:22 +08:00
e: canClick.value,
f: common_vendor.o(jumpto),
g: !canClick.value,
h: huakuaiOpen.value
2025-05-28 17:36:42 +08:00
}, huakuaiOpen.value ? {
2025-06-03 17:29:22 +08:00
i: common_vendor.o(() => {
2025-05-28 17:36:42 +08:00
}),
2025-06-03 17:29:22 +08:00
j: common_vendor.o(codeIsOk),
2025-05-28 17:36:42 +08:00
k: 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