直接引用本仓库的 i18n-land.js,不依赖于 wo.i18n.landSet

This commit is contained in:
Luk 2024-10-13 20:49:35 +08:00
parent 3a785fec79
commit 7eed36ac56

View File

@ -1,3 +1,5 @@
const landSet = require('./i18n-lands.js')
module.exports = {
validate_phone ({ phone, format } = {}) {
try {
@ -10,7 +12,6 @@ module.exports = {
try {
let [fullphone, itc, callnumber] = /^\+(\d{1,4})-(\d{7,12})$/.exec(phone)
let landSet = wo?.i18n?.landSet || wo?.ss?.i18n?.landSet || {}
for (let land of Object.values(landSet)) {
if (land.itc === itc) {
if (land.phoneRegex) {