The present invention provides a platform device and method capable of compensating non-coaxiality of a rotary encoder. The platform device comprises a supporting frame, a horizontal arm, a vertical arm, a floating table and an encoder, a vertical sliding sleeve of the horizontal arm is in sliding fit with a supporting rod of the supporting frame, horizontal sliding sleeves at the two ends of the vertical arm are in sliding fit with the horizontal arm, and the floating table is in sliding fit with the vertical arm. The encoder is connected with the floating table, the floating table synchronously acts along with the encoder when the encoder slightly moves, and the encoder is connected with a transmission shaft of bridge portal crane driving equipment through a rotating shaft of the encoder. The device overcomes the problem that the opening degree of the bridge door cannot be accurately fed back to main control equipment to influence the normal operation of the equipment when the original bridge door machine and the encoder are slightly non-coaxial, and has the advantages of simple structure, compensation of the tiny non-coaxial condition of the rotating shaft of the encoder and the transmission shaft of the driving equipment, synchronous operation of the encoder and the monitored equipment, high reliability and the like. Stable and accurate code value output of the encoder is ensured, safe operation of equipment is ensured, and operation is simple and convenient.