s-user-card.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. require("../../store/index.js");
  6. require("../../helper/index.js");
  7. require("../../request/index.js");
  8. require("../../api/index.js");
  9. require("../../api/distri/score.js");
  10. require("../../api/distri/share.js");
  11. require("../../api/distri/team.js");
  12. require("../../api/infra/file.js");
  13. require("../../config/index.js");
  14. require("../../api/member/address.js");
  15. require("../../api/member/auth.js");
  16. require("../../api/member/point.js");
  17. require("../../api/member/signin.js");
  18. require("../../api/member/social.js");
  19. require("../../api/member/user.js");
  20. require("../../api/migration/app.js");
  21. require("../../api/migration/chat.js");
  22. require("../../api/migration/index.js");
  23. require("../../api/migration/third.js");
  24. require("../../api/pay/channel.js");
  25. require("../../api/pay/order.js");
  26. require("../../api/pay/wallet.js");
  27. require("../../api/product/category.js");
  28. require("../../api/product/comment.js");
  29. require("../../api/product/favorite.js");
  30. require("../../api/product/history.js");
  31. require("../../api/product/spu.js");
  32. require("../../api/promotion/activity.js");
  33. require("../../api/promotion/article.js");
  34. require("../../api/promotion/bargain.js");
  35. require("../../api/promotion/combination.js");
  36. require("../../api/promotion/coupon.js");
  37. require("../../api/promotion/diy.js");
  38. require("../../api/promotion/rewardActivity.js");
  39. require("../../api/promotion/seckill.js");
  40. require("../../api/system/area.js");
  41. require("../../api/system/voice.js");
  42. require("../../api/trade/afterSale.js");
  43. require("../../api/trade/brokerage.js");
  44. require("../../api/trade/cart.js");
  45. require("../../api/trade/config.js");
  46. require("../../api/trade/delivery.js");
  47. require("../../api/trade/order.js");
  48. require("../../url/index.js");
  49. require("../../router/index.js");
  50. require("../../hooks/useModal.js");
  51. require("../../helper/test.js");
  52. require("../../helper/throttle.js");
  53. require("../../platform/index.js");
  54. require("../../platform/provider/wechat/index.js");
  55. require("../../platform/provider/wechat/miniProgram.js");
  56. require("../../platform/provider/apple/index.js");
  57. require("../../platform/share.js");
  58. require("../../platform/pay.js");
  59. require("../../config/zIndex.js");
  60. require("../../store/app.js");
  61. require("../../store/user.js");
  62. require("../../store/cart.js");
  63. require("../../store/sys.js");
  64. require("../../store/modal.js");
  65. require("../../helper/digit.js");
  66. const _sfc_main = {
  67. __name: "s-user-card",
  68. props: {
  69. background: {
  70. type: String,
  71. default: ""
  72. },
  73. // 头像
  74. avatar: {
  75. type: String,
  76. default: ""
  77. },
  78. nickname: {
  79. type: String,
  80. default: "请登录"
  81. },
  82. username: {
  83. type: String,
  84. default: "无"
  85. },
  86. vip: {
  87. type: [String, Number],
  88. default: "1"
  89. },
  90. collectNum: {
  91. type: [String, Number],
  92. default: "1"
  93. },
  94. likeNum: {
  95. type: [String, Number],
  96. default: "1"
  97. }
  98. },
  99. setup(__props) {
  100. const userInfo = common_vendor.computed(() => sheep_index.sheep.$store("user").userInfo);
  101. const isLogin = common_vendor.computed(() => sheep_index.sheep.$store("user").isLogin);
  102. return (_ctx, _cache) => {
  103. var _a, _b;
  104. return {
  105. a: isLogin.value ? common_vendor.unref(sheep_index.sheep).$url.cdn(userInfo.value.avatar) : common_vendor.unref(sheep_index.sheep).$url.static("/static/images/default_avatar.png"),
  106. b: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/info")),
  107. c: common_vendor.t(((_a = userInfo.value) == null ? void 0 : _a.nickname) || __props.nickname),
  108. d: common_vendor.t(((_b = userInfo.value) == null ? void 0 : _b.username) || __props.username),
  109. e: common_assets._imports_0$5,
  110. f: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/setting"))
  111. };
  112. };
  113. }
  114. };
  115. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e8581682"], ["__file", "D:/zx/mall-front-app/sheep/components/s-user-card/s-user-card.vue"]]);
  116. wx.createComponent(Component);