poster.js 726 B

1234567891011121314151617181920
  1. define(['jquery', 'bootstrap', 'frontend', 'template', 'form'], function ($, undefined, Frontend, Template, Form) {
  2. var Controller = {
  3. index: function () {
  4. $('.poster').each(function () {
  5. var poster_id = $(this).data('poster_id');
  6. Fast.api.ajax({
  7. url: "poster/getposter/poster_id/" + poster_id,
  8. }, function (data, ret) {
  9. console.log(ret);
  10. $('.poster').html('<img src="' + ret.data + '" style="width: 400px;">');
  11. return false;
  12. }, function (data, ret) {
  13. });
  14. });
  15. return false;
  16. }
  17. };
  18. return Controller;
  19. });