"use strict";
const common_vendor = require("../../../common/vendor.js");
const sheep_index = require("../../index.js");
const sheep_hooks_useModal = require("../../hooks/useModal.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("../../helper/throttle.js");
require("../../platform/pay.js");
require("../../helper/index.js");
require("../../helper/test.js");
require("../../helper/digit.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");
const _sfc_main = {
  __name: "s-user-card",
  props: {
    background: {
      type: String,
      default: ""
    },
    // 头像
    avatar: {
      type: String,
      default: ""
    },
    nickname: {
      type: String,
      default: "请先登录"
    },
    vip: {
      type: [String, Number],
      default: "1"
    },
    collectNum: {
      type: [String, Number],
      default: "1"
    },
    likeNum: {
      type: [String, Number],
      default: "1"
    }
  },
  setup(__props) {
    const userInfo = common_vendor.computed(() => sheep_index.sheep.$store("user").userInfo);
    console.log("用户信息", userInfo);
    const isLogin = common_vendor.computed(() => sheep_index.sheep.$store("user").isLogin);
    function onBind() {
      sheep_hooks_useModal.showAuthModal("changeMobile");
    }
    return (_ctx, _cache) => {
      var _a;
      return common_vendor.e({
        a: common_vendor.unref(isLogin) ? common_vendor.unref(sheep_index.sheep).$url.cdn(common_vendor.unref(userInfo).avatar) : common_vendor.unref(sheep_index.sheep).$url.static("/static/img/shop/default_avatar.png"),
        b: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/info")),
        c: common_vendor.t(((_a = common_vendor.unref(userInfo)) == null ? void 0 : _a.nickname) || __props.nickname),
        d: common_vendor.o((...args) => common_vendor.unref(sheep_hooks_useModal.showShareModal) && common_vendor.unref(sheep_hooks_useModal.showShareModal)(...args)),
        e: common_vendor.unref(isLogin) && !common_vendor.unref(userInfo).mobile
      }, common_vendor.unref(isLogin) && !common_vendor.unref(userInfo).mobile ? {
        f: common_vendor.o(onBind)
      } : {});
    };
  }
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e8581682"], ["__file", "/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-app/sheep/components/s-user-card/s-user-card.vue"]]);
wx.createComponent(Component);
