myplate.js 1.2 KB

12345678910111213141516171819202122232425
  1. (function () {
  2. var page = {
  3. isScroll: true,
  4. init: function ($page) {
  5. var userinfo = renlian.storage.get('userinfo');
  6. var postdata = {
  7. token: userinfo.baseinfo.token,
  8. loginMark: renlian.deviceId(),
  9. userid: userinfo.baseinfo.userId
  10. };
  11. renlian.http.post(config.webapi + "/?s=api/get_vehicle_ElectronicPlateUrl", postdata, function(res) {
  12. if (res.data.BackElectronicPlateUrl != '' && res.data.BackElectronicPlateUrl != null && res.data.FrontElectronicPlateUrl != '' && res.data.FrontElectronicPlateUrl != null) {
  13. $('.ElectronicPlate').css('display','block');
  14. $('#FrontElectronicPlateUrl').attr('src',res.data.FrontElectronicPlateUrl);
  15. $('#BackElectronicPlateUrl').attr('src',res.data.BackElectronicPlateUrl);
  16. }
  17. else{
  18. $('.isnull').css('display','block');
  19. $('.f-scroll').css('height','100%');
  20. }
  21. });
  22. }
  23. };
  24. return page;
  25. })();