123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- "use strict";
- const common_vendor = require("../../../common/vendor.js");
- const sheep_index = require("../../index.js");
- const sheep_hooks_useGoods = require("../../hooks/useGoods.js");
- require("../../url/index.js");
- require("../../store/index.js");
- require("../../store/app.js");
- require("../../api/promotion/diy.js");
- require("../../request/index.js");
- require("../../config/index.js");
- require("../../platform/index.js");
- require("../../platform/provider/wechat/index.js");
- require("../../platform/provider/wechat/miniProgram.js");
- require("../../api/member/auth.js");
- require("../../api/member/social.js");
- require("../../api/member/user.js");
- require("../../platform/provider/apple/index.js");
- require("../../platform/share.js");
- require("../../router/index.js");
- require("../../hooks/useModal.js");
- require("../../helper/index.js");
- require("../../helper/test.js");
- require("../../helper/digit.js");
- require("../../helper/throttle.js");
- require("../../platform/pay.js");
- require("../../api/pay/order.js");
- require("../../store/user.js");
- require("../../store/cart.js");
- require("../../api/trade/cart.js");
- require("../../api/pay/wallet.js");
- require("../../api/trade/order.js");
- require("../../api/promotion/coupon.js");
- require("../../store/sys.js");
- require("../../store/modal.js");
- require("../../config/zIndex.js");
- require("../../util/index.js");
- const _sfc_main = {
- __name: "s-goods-item",
- props: {
- img: {
- type: String,
- default: "https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto"
- },
- title: {
- type: String,
- default: ""
- },
- titleWidth: {
- type: Number,
- default: 0
- },
- skuText: {
- type: [String, Array],
- default: ""
- },
- price: {
- type: [String, Number],
- default: ""
- },
- priceColor: {
- type: [String],
- default: ""
- },
- num: {
- type: [String, Number],
- default: 0
- },
- score: {
- type: [String, Number],
- default: ""
- },
- radius: {
- type: [String],
- default: ""
- },
- marginBottom: {
- type: [String],
- default: ""
- }
- },
- setup(__props) {
- const props = __props;
- const skuString = common_vendor.computed(() => {
- if (!props.skuText) {
- return "";
- }
- if (typeof props.skuText === "object") {
- return props.skuText.join(",");
- }
- return props.skuText;
- });
- return (_ctx, _cache) => {
- return common_vendor.e({
- a: common_vendor.unref(sheep_index.sheep).$url.cdn(__props.img),
- b: __props.title
- }, __props.title ? {
- c: common_vendor.t(__props.title)
- } : {}, {
- d: common_vendor.unref(skuString)
- }, common_vendor.unref(skuString) ? {
- e: common_vendor.t(common_vendor.unref(skuString))
- } : {}, {
- f: __props.price && Number(__props.price) > 0
- }, __props.price && Number(__props.price) > 0 ? {
- g: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.fen2yuan)(__props.price)),
- h: common_vendor.s({
- color: __props.priceColor
- })
- } : {}, {
- i: __props.num
- }, __props.num ? {
- j: common_vendor.t(__props.num)
- } : {}, {
- k: common_vendor.s({
- width: __props.titleWidth ? __props.titleWidth + "rpx" : ""
- }),
- l: common_vendor.s({
- borderRadius: __props.radius + "rpx",
- marginBottom: __props.marginBottom + "rpx"
- })
- });
- };
- }
- };
- const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-8a2df41e"], ["__file", "/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-app/sheep/components/s-goods-item/s-goods-item.vue"]]);
- wx.createComponent(Component);
|