Mike hace 3 años
padre
commit
1fc71ea531
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      api/main.py

+ 2 - 3
api/main.py

@@ -54,14 +54,13 @@ async def checkCellphone(cellphone: str = '0975-516-501'):
     temp_list = cellphone.split("\n")
     temp_list = cellphone.split("\n")
     cellphone_list = []
     cellphone_list = []
 
 
+    # 避免換行空白問題
     for t in temp_list:
     for t in temp_list:
         if t:
         if t:
-            cellphone_list.append(t)
+            cellphone_list.append(t.strip())
 
 
     cellphone_list = "','".join(cellphone_list)
     cellphone_list = "','".join(cellphone_list)
 
 
-    # cellphone_list = cellphone.replace("\n", ",")
-    # cellphone_list = cellphone_list
     print ('cellphone_list = ' + cellphone_list)
     print ('cellphone_list = ' + cellphone_list)
     
     
     # 取得資料庫連線
     # 取得資料庫連線