直接引用本仓库的 i18n-land.js,不依赖于 wo.i18n.landSet
This commit is contained in:
		
							parent
							
								
									3a785fec79
								
							
						
					
					
						commit
						7eed36ac56
					
				| @ -1,3 +1,5 @@ | |||||||
|  | const landSet = require('./i18n-lands.js') | ||||||
|  | 
 | ||||||
| module.exports = { | module.exports = { | ||||||
|   validate_phone ({ phone, format } = {}) { |   validate_phone ({ phone, format } = {}) { | ||||||
|     try { |     try { | ||||||
| @ -10,7 +12,6 @@ module.exports = { | |||||||
| 
 | 
 | ||||||
|     try { |     try { | ||||||
|       let [fullphone, itc, callnumber] = /^\+(\d{1,4})-(\d{7,12})$/.exec(phone) |       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)) { |       for (let land of Object.values(landSet)) { | ||||||
|         if (land.itc === itc) { |         if (land.itc === itc) { | ||||||
|           if (land.phoneRegex) { |           if (land.phoneRegex) { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user