index.js 3.7 KB

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