vod.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // LocalAddress = "http://192.168.29.156:8099"
  2. import * as Utils from "./utils.js";
  3. export class VodShort {
  4. constructor() {
  5. this.vod_id = "" //id
  6. this.vod_name = "" //名称
  7. this.vod_pic = Utils.RESOURCEURL + "/resources/ali.jpg" //图片
  8. this.vod_remarks = "" //备注
  9. }
  10. to_dict() {
  11. return JSON.stringify(this);
  12. }
  13. load_dic(json_str) {
  14. let obj = JSON.parse(json_str)
  15. for (let propName in obj) {
  16. this[propName] = obj[propName];
  17. }
  18. }
  19. }
  20. export class VodDetail extends VodShort {
  21. constructor() {
  22. super();
  23. this.type_name = "" // 类别
  24. this.vod_year = "" // 年份
  25. this.vod_area = "" // 地区
  26. this.vod_actor = "" // 导演
  27. this.vod_director = "" // 演员
  28. this.vod_content = "" // 剧情
  29. this.vod_play_from = "" // 播放格式
  30. this.vod_play_url = "" // 播放连接
  31. }
  32. to_short() {
  33. let vodShort = new VodShort()
  34. vodShort.load_dic(this.to_dict())
  35. return vodShort
  36. }
  37. load_dic(json_str) {
  38. let obj = JSON.parse(json_str)
  39. for (let propName in JSON.parse(this.to_dict())) {
  40. this[propName] = obj[propName];
  41. }
  42. }
  43. }