s-wallet-card.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. "use strict";
  2. const common_vendor = require("../../../common/vendor.js");
  3. const sheep_index = require("../../index.js");
  4. const sheep_hooks_useGoods = require("../../hooks/useGoods.js");
  5. require("../../api/index.js");
  6. require("../../api/distri/score.js");
  7. require("../../request/index.js");
  8. require("../../config/index.js");
  9. require("../../store/index.js");
  10. require("../../store/app.js");
  11. require("../../api/promotion/diy.js");
  12. require("../../platform/index.js");
  13. require("../../platform/provider/wechat/index.js");
  14. require("../../platform/provider/wechat/miniProgram.js");
  15. require("../../api/member/auth.js");
  16. require("../../api/member/social.js");
  17. require("../../api/member/user.js");
  18. require("../../platform/provider/apple/index.js");
  19. require("../../platform/share.js");
  20. require("../../router/index.js");
  21. require("../../hooks/useModal.js");
  22. require("../../helper/index.js");
  23. require("../../helper/test.js");
  24. require("../../helper/digit.js");
  25. require("../../api/member/signin.js");
  26. require("../../helper/throttle.js");
  27. require("../../url/index.js");
  28. require("../../platform/pay.js");
  29. require("../../api/pay/order.js");
  30. require("../../store/user.js");
  31. require("../../store/cart.js");
  32. require("../../api/trade/cart.js");
  33. require("../../api/pay/wallet.js");
  34. require("../../api/trade/order.js");
  35. require("../../api/promotion/coupon.js");
  36. require("../../store/sys.js");
  37. require("../../store/modal.js");
  38. require("../../api/distri/share.js");
  39. require("../../api/distri/team.js");
  40. require("../../api/infra/file.js");
  41. require("../../api/member/address.js");
  42. require("../../api/member/point.js");
  43. require("../../api/migration/app.js");
  44. require("../../api/migration/chat.js");
  45. require("../../api/migration/index.js");
  46. require("../../api/migration/third.js");
  47. require("../../api/pay/channel.js");
  48. require("../../api/product/category.js");
  49. require("../../api/product/comment.js");
  50. require("../../api/product/favorite.js");
  51. require("../../api/product/history.js");
  52. require("../../api/product/spu.js");
  53. require("../../api/promotion/activity.js");
  54. require("../../api/promotion/article.js");
  55. require("../../api/promotion/bargain.js");
  56. require("../../api/promotion/combination.js");
  57. require("../../api/promotion/rewardActivity.js");
  58. require("../../api/promotion/seckill.js");
  59. require("../../api/system/area.js");
  60. require("../../api/system/voice.js");
  61. require("../../api/trade/afterSale.js");
  62. require("../../api/trade/brokerage.js");
  63. require("../../api/trade/config.js");
  64. require("../../api/trade/delivery.js");
  65. require("../../config/zIndex.js");
  66. require("../../util/index.js");
  67. if (!Array) {
  68. const _easycom_su_popup2 = common_vendor.resolveComponent("su-popup");
  69. _easycom_su_popup2();
  70. }
  71. const _easycom_su_popup = () => "../../ui/su-popup/su-popup.js";
  72. if (!Math) {
  73. (Richtext + _easycom_su_popup)();
  74. }
  75. const Richtext = () => "../../../pages/public/richtext2.js";
  76. const _sfc_main = {
  77. __name: "s-wallet-card",
  78. setup(__props) {
  79. const state = common_vendor.reactive({
  80. showProtocol: false,
  81. navIndex: 0
  82. });
  83. const userWallet = common_vendor.computed(() => sheep_index.sheep.$store("user").userWallet);
  84. common_vendor.computed(() => sheep_index.sheep.$store("user").userInfo);
  85. common_vendor.computed(() => sheep_index.sheep.$store("user").numData);
  86. const progressWidth = common_vendor.computed(() => {
  87. if (!userWallet.value.socialStatusPoint && !userWallet.value.socialStatusPoint) {
  88. return "0%";
  89. }
  90. const progress = userWallet.value.socialStatusPoint / (userWallet.value.socialStatusPoint + userWallet.value.socialUpNeed) * 100 + "%";
  91. return progress;
  92. });
  93. const close = () => {
  94. state.showProtocol = false;
  95. };
  96. function checkIndex(index) {
  97. state.navIndex = index;
  98. }
  99. return (_ctx, _cache) => {
  100. return common_vendor.e({
  101. a: progressWidth.value,
  102. b: common_vendor.t(userWallet.value.socialStatusLevel || "无等级"),
  103. c: common_vendor.o(($event) => state.showProtocol = true),
  104. d: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.points2point)(userWallet.value.integralDO.currentQuota)),
  105. e: common_vendor.t(common_vendor.unref(sheep_hooks_useGoods.points2point)(userWallet.value.integralDO.freezeQuota)),
  106. f: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/wallet/score")),
  107. g: common_vendor.t(userWallet.value.descNo),
  108. h: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/user/wallet/team")),
  109. i: common_vendor.n(state.navIndex == 0 ? "activite" : ""),
  110. j: common_vendor.o(($event) => checkIndex(0)),
  111. k: common_vendor.n(state.navIndex == 1 ? "activite" : ""),
  112. l: common_vendor.o(($event) => checkIndex(1)),
  113. m: state.navIndex == 0
  114. }, state.navIndex == 0 ? {
  115. n: common_vendor.p({
  116. title: "身价产生规则",
  117. type: "tab"
  118. })
  119. } : {}, {
  120. o: state.navIndex == 1
  121. }, state.navIndex == 1 ? {
  122. p: common_vendor.p({
  123. title: "身价权益",
  124. type: "tab"
  125. })
  126. } : {}, {
  127. q: common_vendor.o(close),
  128. r: common_vendor.p({
  129. show: state.showProtocol,
  130. type: "center",
  131. round: "10",
  132. isMaskClick: false,
  133. showClose: true
  134. })
  135. });
  136. };
  137. }
  138. };
  139. const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-0aa1f5b2"], ["__file", "D:/zx/mall-front-app/sheep/components/s-wallet-card/s-wallet-card.vue"]]);
  140. wx.createComponent(Component);