s-goods-item.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. "use strict";
  2. const common_vendor = require("../../../common/vendor.js");
  3. const common_assets = require("../../../common/assets.js");
  4. const sheep_index = require("../../index.js");
  5. const sheep_hooks_useGoods = require("../../hooks/useGoods.js");
  6. require("../../api/index.js");
  7. require("../../api/distri/score.js");
  8. require("../../request/index.js");
  9. require("../../config/index.js");
  10. require("../../store/index.js");
  11. require("../../store/app.js");
  12. require("../../api/promotion/diy.js");
  13. require("../../platform/index.js");
  14. require("../../platform/provider/wechat/index.js");
  15. require("../../platform/provider/wechat/miniProgram.js");
  16. require("../../api/member/auth.js");
  17. require("../../api/member/social.js");
  18. require("../../api/member/user.js");
  19. require("../../platform/provider/apple/index.js");
  20. require("../../platform/share.js");
  21. require("../../router/index.js");
  22. require("../../hooks/useModal.js");
  23. require("../../helper/index.js");
  24. require("../../helper/test.js");
  25. require("../../helper/digit.js");
  26. require("../../api/member/signin.js");
  27. require("../../helper/throttle.js");
  28. require("../../url/index.js");
  29. require("../../platform/pay.js");
  30. require("../../api/pay/order.js");
  31. require("../../store/user.js");
  32. require("../../store/cart.js");
  33. require("../../api/trade/cart.js");
  34. require("../../api/pay/wallet.js");
  35. require("../../api/trade/order.js");
  36. require("../../api/promotion/coupon.js");
  37. require("../../store/sys.js");
  38. require("../../store/modal.js");
  39. require("../../api/distri/share.js");
  40. require("../../api/distri/team.js");
  41. require("../../api/infra/file.js");
  42. require("../../api/member/address.js");
  43. require("../../api/member/point.js");
  44. require("../../api/migration/app.js");
  45. require("../../api/migration/chat.js");
  46. require("../../api/migration/index.js");
  47. require("../../api/migration/third.js");
  48. require("../../api/pay/channel.js");
  49. require("../../api/product/category.js");
  50. require("../../api/product/comment.js");
  51. require("../../api/product/favorite.js");
  52. require("../../api/product/history.js");
  53. require("../../api/product/spu.js");
  54. require("../../api/promotion/activity.js");
  55. require("../../api/promotion/article.js");
  56. require("../../api/promotion/bargain.js");
  57. require("../../api/promotion/combination.js");
  58. require("../../api/promotion/rewardActivity.js");
  59. require("../../api/promotion/seckill.js");
  60. require("../../api/system/area.js");
  61. require("../../api/system/voice.js");
  62. require("../../api/trade/afterSale.js");
  63. require("../../api/trade/brokerage.js");
  64. require("../../api/trade/config.js");
  65. require("../../api/trade/delivery.js");
  66. require("../../config/zIndex.js");
  67. require("../../util/index.js");
  68. const _sfc_main = {
  69. __name: "s-goods-item",
  70. props: {
  71. img: {
  72. type: String,
  73. default: "https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto"
  74. },
  75. title: {
  76. type: String,
  77. default: ""
  78. },
  79. titleWidth: {
  80. type: Number,
  81. default: 0
  82. },
  83. skuText: {
  84. type: [String, Array],
  85. default: ""
  86. },
  87. price: {
  88. type: [String, Number],
  89. default: ""
  90. },
  91. priceColor: {
  92. type: [String],
  93. default: ""
  94. },
  95. num: {
  96. type: [String, Number],
  97. default: 0
  98. },
  99. score: {
  100. type: [String, Number],
  101. default: ""
  102. },
  103. radius: {
  104. type: [String],
  105. default: ""
  106. },
  107. marginBottom: {
  108. type: [String],
  109. default: ""
  110. },
  111. virtualPirce: {
  112. type: [Boolean],
  113. default: false
  114. }
  115. },
  116. setup(__props) {
  117. const props = __props;
  118. const skuString = common_vendor.computed(() => {
  119. if (!props.skuText) {
  120. return "";
  121. }
  122. if (typeof props.skuText === "object") {
  123. return props.skuText.join(",");
  124. }
  125. return props.skuText;
  126. });
  127. return (_ctx, _cache) => {
  128. return common_vendor.e({
  129. a: common_vendor.unref(sheep_index.sheep).$url.cdn(__props.img),
  130. b: __props.title
  131. }, __props.title ? {
  132. c: common_vendor.t(__props.title)
  133. } : {}, {
  134. d: skuString.value
  135. }, skuString.value ? {
  136. e: common_vendor.t(skuString.value)
  137. } : {}, {
  138. f: __props.virtualPirce
  139. }, __props.virtualPirce ? {
  140. g: common_assets._imports_0,
  141. h: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.fen2yuan6)(__props.price))
  142. } : {
  143. i: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.fen2yuan)(__props.price))
  144. }, {
  145. j: common_vendor.s({
  146. color: __props.priceColor
  147. }),
  148. k: __props.num
  149. }, __props.num ? {
  150. l: common_vendor.t(__props.num)
  151. } : {}, {
  152. m: common_vendor.s({
  153. width: __props.titleWidth ? __props.titleWidth + "rpx" : ""
  154. }),
  155. n: common_vendor.s({
  156. borderRadius: __props.radius + "rpx",
  157. marginBottom: __props.marginBottom + "rpx"
  158. })
  159. });
  160. };
  161. }
  162. };
  163. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-8a2df41e"], ["__file", "D:/zx/mall-front-app/sheep/components/s-goods-item/s-goods-item.vue"]]);
  164. wx.createComponent(Component);