index.js 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const utils_file = require("../../utils/file.js");
  4. const store_user = require("../../store/user.js");
  5. const utils_utils = require("../../utils/utils.js");
  6. if (!Math) {
  7. (LoginModal + TabBar)();
  8. }
  9. const TabBar = () => "../../components/TabBar.js";
  10. const LoginModal = () => "../components/LoginModal.js";
  11. const _sfc_main = {
  12. __name: "index",
  13. setup(__props) {
  14. const userStore = store_user.useUserStore();
  15. const showLoginModal = common_vendor.ref(false);
  16. const handleLoginClick = () => {
  17. if (!userStore.getToken) {
  18. showLoginModal.value = true;
  19. }
  20. };
  21. const handleLoginSuccess = (res) => {
  22. common_vendor.index.__f__("log", "at pages/personal/index.vue:103", "登录成功:", res);
  23. };
  24. const handleLoginCancel = () => {
  25. common_vendor.index.__f__("log", "at pages/personal/index.vue:109", "用户取消登录");
  26. };
  27. return (_ctx, _cache) => {
  28. var _a;
  29. return {
  30. a: common_vendor.unref(utils_file.getFileUrl)("img/personal/bg.png"),
  31. b: common_vendor.unref(utils_file.getFileUrl)("img/personal/uBg.png"),
  32. c: common_vendor.unref(utils_file.getFileUrl)("img/personal/userDemo.png"),
  33. d: common_vendor.t(common_vendor.unref(userStore).getToken ? ((_a = common_vendor.unref(userStore).getUserInfo) == null ? void 0 : _a.nickname) || "用户" : "立即登录"),
  34. e: common_vendor.o(handleLoginClick),
  35. f: common_vendor.unref(utils_file.getFileUrl)("img/personal/wszl.png"),
  36. g: common_vendor.unref(utils_file.getFileUrl)("img/personal/right.png"),
  37. h: common_vendor.o(($event) => common_vendor.unref(utils_utils.go)("/pages/personal/userInfo")),
  38. i: common_vendor.unref(utils_file.getFileUrl)("img/personal/wddd.png"),
  39. j: common_vendor.unref(utils_file.getFileUrl)("img/personal/right.png"),
  40. k: common_vendor.o(($event) => common_vendor.unref(utils_utils.go)("/pages/orderInfo/index")),
  41. l: common_vendor.unref(utils_file.getFileUrl)("img/personal/wdqb.png"),
  42. m: common_vendor.unref(utils_file.getFileUrl)("img/personal/right.png"),
  43. n: common_vendor.unref(utils_file.getFileUrl)("img/personal/yhxy.png"),
  44. o: common_vendor.unref(utils_file.getFileUrl)("img/personal/right.png"),
  45. p: common_vendor.unref(utils_file.getFileUrl)("img/personal/ysxy.png"),
  46. q: common_vendor.unref(utils_file.getFileUrl)("img/personal/right.png"),
  47. r: common_vendor.o(handleLoginSuccess),
  48. s: common_vendor.o(handleLoginCancel),
  49. t: common_vendor.o(($event) => showLoginModal.value = $event),
  50. v: common_vendor.p({
  51. open: showLoginModal.value
  52. })
  53. };
  54. };
  55. }
  56. };
  57. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-3327436b"]]);
  58. wx.createPage(MiniProgramPage);
  59. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/personal/index.js.map