modal.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const modal = common_vendor.defineStore({
  4. id: "modal",
  5. state: () => ({
  6. auth: "",
  7. // 授权弹框 accountLogin|smsLogin|resetPassword|changeMobile|changePassword|changeUsername
  8. isActive: "",
  9. share: false,
  10. // 分享弹框
  11. shareInfo: {
  12. spuId: 0
  13. },
  14. // 分享弹框信息
  15. signUp: false,
  16. // 签到弹框
  17. signUpInfo: {},
  18. // 签到弹框信息
  19. getWallet: false,
  20. // 获得积分/身价弹窗
  21. getWalletInfo: {
  22. points: 0,
  23. socialStatus: 0
  24. },
  25. // 获得积分/身价弹窗信息
  26. menu: false,
  27. // 快捷菜单弹框
  28. advHistory: [],
  29. // 广告弹框记录
  30. lastTimer: {
  31. // 短信验证码计时器,为了防止刷新请求做了持久化
  32. smsLogin: 0,
  33. // changeMobile: 0,
  34. changeMobileOld: 0,
  35. changeMobileNew: 0,
  36. resetPassword: 0,
  37. changePassword: 0
  38. }
  39. }),
  40. persist: {
  41. enabled: true,
  42. strategies: [
  43. {
  44. key: "modal-store",
  45. paths: ["lastTimer", "advHistory"]
  46. }
  47. ]
  48. }
  49. });
  50. const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  51. __proto__: null,
  52. default: modal
  53. }, Symbol.toStringTag, { value: "Module" }));
  54. exports.__vite_glob_0_2 = __vite_glob_0_2;