You already added a collide() function when you added the goal. You can re-use that function if you make one small change to how you've implemented platforms.
The collide() function expects each object being checked to have an origin_x and origin_y. You don't want to change the origin for the platforms, so these values can both be set to 0.
With that change in place, you can now add your platform collision checks.
RUN your code in a browser and verify that it loads without errors.