The barcode comes up in a later provision which says those who've undergone real-name validation on the app can pass through the automatic gates using a QR code generated by the app.
在12306.cn网站注册用户且通过铁路12306手机APP完成人脸身份核验,可凭铁路12306手机 APP生成的动态二维码,通过自动检票闸机办理进、出站检票手续。
No need for showing ID, just the phone? Does this apply to foreigners, too? Time will tell.
It's not real-name validation but facial recognition validation. So if foreigners can pass facial recognition on their 12306 phone app then it should work.