mine.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. "use strict";
  2. const common_vendor = require("../common/vendor.js");
  3. require("../utils/storage.js");
  4. const store_index = require("../store/index.js");
  5. require("../utils/constant.js");
  6. require("../store/modules/user.js");
  7. require("../config.js");
  8. require("../api/login.js");
  9. require("../utils/request.js");
  10. require("../utils/auth.js");
  11. require("../utils/errorCode.js");
  12. require("../utils/common.js");
  13. require("../store/getters.js");
  14. if (!Array) {
  15. const _easycom_up_grid_item2 = common_vendor.resolveComponent("up-grid-item");
  16. const _easycom_up_grid2 = common_vendor.resolveComponent("up-grid");
  17. const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
  18. (_easycom_up_grid_item2 + _easycom_up_grid2 + _easycom_up_toast2)();
  19. }
  20. const _easycom_up_grid_item = () => "../node-modules/uview-plus/components/u-grid-item/u-grid-item.js";
  21. const _easycom_up_grid = () => "../node-modules/uview-plus/components/u-grid/u-grid.js";
  22. const _easycom_up_toast = () => "../node-modules/uview-plus/components/u-toast/u-toast.js";
  23. if (!Math) {
  24. (_easycom_up_grid_item + _easycom_up_grid + _easycom_up_toast)();
  25. }
  26. const _sfc_main = {
  27. __name: "mine",
  28. setup(__props) {
  29. const name = store_index.store.state.user.name;
  30. const avatar = common_vendor.ref(store_index.store.state.user.avatar);
  31. const windowHeight = common_vendor.ref(common_vendor.index.getSystemInfoSync().windowHeight - 50);
  32. common_vendor.ref(null);
  33. const imagePath = "/static/设置.png";
  34. common_vendor.index.$on("refresh", () => {
  35. avatar.value = store_index.store.state.user.avatar;
  36. });
  37. const serviceList = common_vendor.ref([
  38. {
  39. icon: "/static/my/待付款.png",
  40. name: "待付款"
  41. },
  42. {
  43. icon: "/static/my/待服务.png",
  44. name: "待服务"
  45. },
  46. {
  47. icon: "/static/my/已完成.png",
  48. name: "已完成"
  49. },
  50. {
  51. icon: "/static/my/评论.png",
  52. name: "评论"
  53. },
  54. {
  55. icon: "/static/my/钱包.png",
  56. name: "钱包"
  57. },
  58. {
  59. icon: "/static/my/浏览记录.png",
  60. name: "浏览记录"
  61. },
  62. {
  63. icon: "/static/my/收藏.png",
  64. name: "收藏"
  65. },
  66. {
  67. icon: "/static/my/客服.png",
  68. name: "帮助与客服"
  69. }
  70. ]);
  71. function handleToInfo() {
  72. common_vendor.index.navigateTo({
  73. url: "/pages_mine/pages/info/index"
  74. });
  75. }
  76. function handleToAvatar() {
  77. common_vendor.index.navigateTo({
  78. url: "/pages_mine/pages/avatar/index"
  79. });
  80. }
  81. return (_ctx, _cache) => {
  82. return common_vendor.e({
  83. a: !avatar.value
  84. }, !avatar.value ? {} : {}, {
  85. b: avatar.value
  86. }, avatar.value ? {
  87. c: common_vendor.o(handleToAvatar),
  88. d: avatar.value
  89. } : {}, {
  90. e: !common_vendor.unref(name)
  91. }, !common_vendor.unref(name) ? {
  92. f: common_vendor.o((...args) => _ctx.handleToLogin && _ctx.handleToLogin(...args))
  93. } : {}, {
  94. g: common_vendor.unref(name)
  95. }, common_vendor.unref(name) ? {
  96. h: common_vendor.t(common_vendor.unref(name)),
  97. i: common_vendor.o(handleToInfo)
  98. } : {}, {
  99. j: imagePath,
  100. k: common_vendor.o(handleToInfo),
  101. l: common_vendor.f(serviceList.value, (item, index, i0) => {
  102. return {
  103. a: item.icon,
  104. b: common_vendor.t(item.name),
  105. c: index,
  106. d: "645199aa-1-" + i0 + ",645199aa-0"
  107. };
  108. }),
  109. m: common_vendor.p({
  110. ["custom-style"]: {
  111. padding: "20rpx"
  112. }
  113. }),
  114. n: common_vendor.o(_ctx.handleGridClick),
  115. o: common_vendor.p({
  116. border: false,
  117. col: "4"
  118. }),
  119. p: common_vendor.sr("uToastRef", "645199aa-2"),
  120. q: `${windowHeight.value}px`
  121. });
  122. };
  123. }
  124. };
  125. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "C:/Users/Administrator/Desktop/srcaaa/pages/mine.vue"]]);
  126. wx.createPage(MiniProgramPage);