card.js 917 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. var card = {
  2. actRs: {
  3. "otherInfo": {
  4. "compId": 0,
  5. "pubState": "",
  6. "playNum": 0,
  7. "signupState": false,
  8. "createTime": 0
  9. },
  10. "config": {
  11. "tplInfo": {
  12. "styleId": 0,
  13. "matchLogo": "",
  14. "matchBanner": "",
  15. },
  16. "matchInfo": {
  17. "compName": "",
  18. "description": "",
  19. "rules": "",
  20. "maxNum": 0,
  21. "contactName": "",
  22. "phone": "",
  23. "regBeginSecond": 0,
  24. "regEndSecond": 0,
  25. "compBeginSecond": 0,
  26. "compEndSecond": 0,
  27. }
  28. }
  29. },
  30. getBannerStyle(actRs) {
  31. const bannerUrl = actRs.config.tplInfo.matchBanner;
  32. // console.log("[getBannerStyle] bannerUrl", bannerUrl);
  33. let style = "";
  34. if (bannerUrl.length > 0) {
  35. style = `background-image: url("${bannerUrl}");`;
  36. } else {
  37. style = `background-image: url("${getApp().globalData.defaultMatchBanner}");`;
  38. }
  39. // console.log("[getBannerStyle] style", style);
  40. return style;
  41. },
  42. }
  43. export default card;