mine.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. common_vendor.index.$on("refresh", () => {
  34. avatar.value = store_index.store.state.user.avatar;
  35. });
  36. const serviceList = common_vendor.ref([
  37. {
  38. icon: "/static/my/待付款.png",
  39. name: "待付款"
  40. },
  41. {
  42. icon: "/static/my/待服务.png",
  43. name: "待服务"
  44. },
  45. {
  46. icon: "/static/my/已完成.png",
  47. name: "已完成"
  48. },
  49. {
  50. icon: "/static/my/评论.png",
  51. name: "评论"
  52. },
  53. {
  54. icon: "/static/my/钱包.png",
  55. name: "钱包"
  56. },
  57. {
  58. icon: "/static/my/浏览记录.png",
  59. name: "浏览记录"
  60. },
  61. {
  62. icon: "/static/my/收藏.png",
  63. name: "收藏"
  64. },
  65. {
  66. icon: "/static/my/客服.png",
  67. name: "帮助与客服"
  68. }
  69. ]);
  70. function handleToInfo() {
  71. common_vendor.index.navigateTo({
  72. url: "/pages_mine/pages/info/index"
  73. });
  74. }
  75. function handleToAvatar() {
  76. common_vendor.index.navigateTo({
  77. url: "/pages_mine/pages/avatar/index"
  78. });
  79. }
  80. return (_ctx, _cache) => {
  81. return common_vendor.e({
  82. a: !avatar.value
  83. }, !avatar.value ? {} : {}, {
  84. b: avatar.value
  85. }, avatar.value ? {
  86. c: common_vendor.o(handleToAvatar),
  87. d: avatar.value
  88. } : {}, {
  89. e: !common_vendor.unref(name)
  90. }, !common_vendor.unref(name) ? {
  91. f: common_vendor.o((...args) => _ctx.handleToLogin && _ctx.handleToLogin(...args))
  92. } : {}, {
  93. g: common_vendor.unref(name)
  94. }, common_vendor.unref(name) ? {
  95. h: common_vendor.t(common_vendor.unref(name)),
  96. i: common_vendor.o(handleToInfo)
  97. } : {}, {
  98. j: common_vendor.o(handleToInfo),
  99. k: common_vendor.f(serviceList.value, (item, index, i0) => {
  100. return {
  101. a: item.icon,
  102. b: common_vendor.t(item.name),
  103. c: index,
  104. d: "645199aa-1-" + i0 + ",645199aa-0"
  105. };
  106. }),
  107. l: common_vendor.p({
  108. ["custom-style"]: {
  109. padding: "20rpx"
  110. }
  111. }),
  112. m: common_vendor.o(_ctx.handleGridClick),
  113. n: common_vendor.p({
  114. border: false,
  115. col: "4"
  116. }),
  117. o: common_vendor.sr("uToastRef", "645199aa-2"),
  118. p: `${windowHeight.value}px`
  119. });
  120. };
  121. }
  122. };
  123. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "C:/Users/Administrator/Desktop/srcaaa/pages/mine.vue"]]);
  124. wx.createPage(MiniProgramPage);