index.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const utils_system = require("../../utils/system.js");
  4. require("../../utils/http.js");
  5. if (!Array) {
  6. const _easycom_wd_cell2 = common_vendor.resolveComponent("wd-cell");
  7. _easycom_wd_cell2();
  8. }
  9. const _easycom_wd_cell = () => "../../node-modules/wot-design-uni/components/wd-cell/wd-cell.js";
  10. if (!Math) {
  11. (NearlyStoreBox + _easycom_wd_cell + UserLoginPopup)();
  12. }
  13. const UserLoginPopup = () => "../../components/userLoginPopup.js";
  14. const NearlyStoreBox = () => "./components/nearlyStoreBox.js";
  15. const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  16. __name: "index",
  17. setup(__props) {
  18. const imgObj = {
  19. user: "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/user.png",
  20. gift: "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/gift.png",
  21. page: "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/page.png",
  22. with: "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/with.png"
  23. };
  24. const list = [
  25. {
  26. label: "可用积分",
  27. src: "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/int.png",
  28. num: 0
  29. },
  30. {
  31. label: "优惠券",
  32. src: "https://qiuyu-daodian.oss-cn-beijing.aliyuncs.com/images/coupon.png",
  33. num: 0
  34. }
  35. ];
  36. const navTop = common_vendor.ref(0);
  37. const loginRef = common_vendor.ref(null);
  38. const path = common_vendor.ref("");
  39. const phone = common_vendor.index.getStorageSync("phone");
  40. const toWinner = () => {
  41. path.value = "/pagesOne/record/winnerList";
  42. if (!utils_system.isGetPhone()) {
  43. loginRef.value.show = true;
  44. } else {
  45. common_vendor.index.navigateTo({
  46. url: "/pagesOne/record/winnerList"
  47. });
  48. }
  49. };
  50. const toUpLoad = () => {
  51. path.value = "/pagesOne/record/uploadList";
  52. if (!utils_system.isGetPhone()) {
  53. loginRef.value.show = true;
  54. } else {
  55. common_vendor.index.navigateTo({
  56. url: "/pagesOne/record/uploadList"
  57. });
  58. }
  59. };
  60. const mobile = common_vendor.ref("");
  61. const onLogin = async (e) => {
  62. path.value = "";
  63. if (!utils_system.isGetPhone()) {
  64. loginRef.value.show = true;
  65. }
  66. };
  67. const getPhone = (res) => {
  68. mobile.value = res;
  69. };
  70. common_vendor.onLoad(() => {
  71. navTop.value = utils_system.getNavTop();
  72. });
  73. common_vendor.onShow(() => {
  74. utils_system.getActivityData();
  75. });
  76. return (_ctx, _cache) => {
  77. return common_vendor.e({
  78. a: navTop.value + "rpx",
  79. b: imgObj.user,
  80. c: common_vendor.t(common_vendor.unref(phone) || mobile.value || "用户昵称"),
  81. d: !common_vendor.unref(phone) && !mobile.value
  82. }, !common_vendor.unref(phone) && !mobile.value ? {
  83. e: common_vendor.o(onLogin)
  84. } : {}, {
  85. f: navTop.value + 125 + "rpx",
  86. g: common_vendor.f(list, (item, index, i0) => {
  87. return {
  88. a: common_vendor.t(item.label),
  89. b: item.src,
  90. c: index
  91. };
  92. }),
  93. h: navTop.value + 290 + "rpx",
  94. i: imgObj.gift,
  95. j: imgObj.with,
  96. k: common_vendor.o(toWinner),
  97. l: common_vendor.p({
  98. ["is-link"]: true,
  99. title: "奖励记录"
  100. }),
  101. m: imgObj.page,
  102. n: common_vendor.o(toUpLoad),
  103. o: common_vendor.p({
  104. border: true,
  105. ["is-link"]: true,
  106. title: "上传记录"
  107. }),
  108. p: common_vendor.sr(loginRef, "276ac604-3", {
  109. "k": "loginRef"
  110. }),
  111. q: common_vendor.o(getPhone),
  112. r: common_vendor.p({
  113. path: path.value
  114. })
  115. });
  116. };
  117. }
  118. });
  119. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-276ac604"]]);
  120. wx.createPage(MiniProgramPage);