s-live-card.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. "use strict";
  2. const common_vendor = require("../../../common/vendor.js");
  3. const sheep_index = require("../../index.js");
  4. require("../../api/index.js");
  5. require("../../api/distri/score.js");
  6. require("../../request/index.js");
  7. require("../../config/index.js");
  8. require("../../store/index.js");
  9. require("../../store/app.js");
  10. require("../../api/promotion/diy.js");
  11. require("../../platform/index.js");
  12. require("../../platform/provider/wechat/index.js");
  13. require("../../platform/provider/wechat/miniProgram.js");
  14. require("../../api/member/auth.js");
  15. require("../../api/member/social.js");
  16. require("../../api/member/user.js");
  17. require("../../platform/provider/apple/index.js");
  18. require("../../platform/share.js");
  19. require("../../router/index.js");
  20. require("../../hooks/useModal.js");
  21. require("../../helper/index.js");
  22. require("../../helper/test.js");
  23. require("../../helper/digit.js");
  24. require("../../api/member/signin.js");
  25. require("../../helper/throttle.js");
  26. require("../../url/index.js");
  27. require("../../platform/pay.js");
  28. require("../../api/pay/order.js");
  29. require("../../store/user.js");
  30. require("../../store/cart.js");
  31. require("../../api/trade/cart.js");
  32. require("../../api/pay/wallet.js");
  33. require("../../api/trade/order.js");
  34. require("../../api/promotion/coupon.js");
  35. require("../../store/sys.js");
  36. require("../../store/modal.js");
  37. require("../../api/distri/share.js");
  38. require("../../api/distri/team.js");
  39. require("../../api/infra/file.js");
  40. require("../../api/member/address.js");
  41. require("../../api/member/point.js");
  42. require("../../api/migration/app.js");
  43. require("../../api/migration/chat.js");
  44. require("../../api/migration/index.js");
  45. require("../../api/migration/third.js");
  46. require("../../api/pay/channel.js");
  47. require("../../api/product/category.js");
  48. require("../../api/product/comment.js");
  49. require("../../api/product/favorite.js");
  50. require("../../api/product/history.js");
  51. require("../../api/product/spu.js");
  52. require("../../api/promotion/activity.js");
  53. require("../../api/promotion/article.js");
  54. require("../../api/promotion/bargain.js");
  55. require("../../api/promotion/combination.js");
  56. require("../../api/promotion/rewardActivity.js");
  57. require("../../api/promotion/seckill.js");
  58. require("../../api/system/area.js");
  59. require("../../api/system/voice.js");
  60. require("../../api/trade/afterSale.js");
  61. require("../../api/trade/brokerage.js");
  62. require("../../api/trade/config.js");
  63. require("../../api/trade/delivery.js");
  64. require("../../config/zIndex.js");
  65. const _sfc_main = {
  66. __name: "s-live-card",
  67. props: {
  68. goodsFields: {
  69. type: [Array, Object],
  70. default() {
  71. return {};
  72. }
  73. },
  74. tagStyle: {
  75. type: Object,
  76. default: {}
  77. },
  78. data: {
  79. type: Object,
  80. default: {}
  81. },
  82. size: {
  83. type: String,
  84. default: "sl"
  85. },
  86. background: {
  87. type: String,
  88. default: ""
  89. },
  90. topRadius: {
  91. type: Number,
  92. default: 0
  93. },
  94. bottomRadius: {
  95. type: Number,
  96. default: 0
  97. },
  98. titleColor: {
  99. type: String,
  100. default: "#333"
  101. },
  102. subTitleColor: {
  103. type: String,
  104. default: "#999999"
  105. }
  106. },
  107. emits: ["click", "getHeight"],
  108. setup(__props, { emit: __emit }) {
  109. const props = __props;
  110. const elStyles = common_vendor.computed(() => {
  111. return {
  112. background: props.background,
  113. "border-top-left-radius": props.topRadius + "px",
  114. "border-top-right-radius": props.topRadius + "px",
  115. "border-bottom-left-radius": props.bottomRadius + "px",
  116. "border-bottom-right-radius": props.bottomRadius + "px"
  117. };
  118. });
  119. const state = common_vendor.reactive({
  120. liveStatus: {
  121. 101: {
  122. img: sheep_index.sheep.$url.static("/static/images/living.png"),
  123. title: "直播中"
  124. },
  125. 102: {
  126. img: sheep_index.sheep.$url.static("/static/images/start.png"),
  127. title: "未开始"
  128. },
  129. 103: {
  130. img: sheep_index.sheep.$url.static("/static/images/ended.png"),
  131. title: "已结束"
  132. }
  133. }
  134. });
  135. const emits = __emit;
  136. const onClick = () => {
  137. emits("click");
  138. };
  139. return (_ctx, _cache) => {
  140. return common_vendor.e({
  141. a: __props.size === "md"
  142. }, __props.size === "md" ? {
  143. b: state.liveStatus[__props.data.status].img,
  144. c: common_vendor.t(state.liveStatus[__props.data.status].title),
  145. d: common_vendor.unref(sheep_index.sheep).$url.cdn(__props.data.feeds_img),
  146. e: common_vendor.t(__props.data.name),
  147. f: common_vendor.s({
  148. color: __props.titleColor
  149. }),
  150. g: common_vendor.t(__props.data.anchor_name),
  151. h: common_vendor.s({
  152. color: __props.subTitleColor
  153. }),
  154. i: common_vendor.s(elStyles.value),
  155. j: common_vendor.o(onClick)
  156. } : {}, {
  157. k: __props.size === "sl"
  158. }, __props.size === "sl" ? {
  159. l: state.liveStatus[__props.data.status].img,
  160. m: common_vendor.t(state.liveStatus[__props.data.status].title),
  161. n: common_vendor.unref(sheep_index.sheep).$url.cdn(__props.data.feeds_img),
  162. o: common_vendor.t(__props.data.name),
  163. p: common_vendor.s({
  164. color: __props.titleColor
  165. }),
  166. q: common_vendor.t(__props.data.anchor_name),
  167. r: common_vendor.s({
  168. color: __props.subTitleColor
  169. }),
  170. s: common_vendor.s(elStyles.value),
  171. t: common_vendor.o(onClick)
  172. } : {});
  173. };
  174. }
  175. };
  176. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e059c327"], ["__file", "D:/zx/mall-front-app/sheep/components/s-live-card/s-live-card.vue"]]);
  177. wx.createComponent(Component);