合同小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
3.2 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const api = require("../../api.js");
  4. const common_assets = require("../../common/assets.js");
  5. const _sfc_main = common_vendor.defineComponent({
  6. data() {
  7. return {
  8. avatar: "",
  9. nickName: "",
  10. aboutUs: "",
  11. popupNoCancelShow: false
  12. };
  13. },
  14. mounted() {
  15. api.isToken();
  16. this.avatar = getApp().usrInfo.avatar;
  17. this.nickName = getApp().usrInfo.nickName;
  18. this.aboutUs = getApp().aboutUs;
  19. },
  20. methods: {
  21. showModal() {
  22. this.popupNoCancelShow = true;
  23. },
  24. getConfirm() {
  25. this.popupNoCancelShow = false;
  26. },
  27. closeModal() {
  28. this.popupNoCancelShow = false;
  29. },
  30. logout() {
  31. common_vendor.index.showModal({
  32. title: "提示",
  33. content: "确定要退出登录吗?",
  34. success: (res) => {
  35. if (res.confirm) {
  36. api.logout().then((res2 = null) => {
  37. if (res2.success) {
  38. common_vendor.index.showToast({
  39. title: "退出登录成功",
  40. icon: "success",
  41. success: () => {
  42. common_vendor.index.clearStorageSync();
  43. setTimeout(() => {
  44. common_vendor.index.navigateTo({ url: "/pages/index/login" });
  45. }, 1500);
  46. }
  47. });
  48. }
  49. });
  50. }
  51. }
  52. });
  53. }
  54. }
  55. });
  56. if (!Array) {
  57. const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
  58. const _easycom_mosowe_confirm_popup2 = common_vendor.resolveComponent("mosowe-confirm-popup");
  59. (_easycom_uni_icons2 + _easycom_mosowe_confirm_popup2)();
  60. }
  61. const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
  62. const _easycom_mosowe_confirm_popup = () => "../../uni_modules/mosowe-confirm-popup/components/mosowe-confirm-popup/mosowe-confirm-popup.js";
  63. if (!Math) {
  64. (_easycom_uni_icons + _easycom_mosowe_confirm_popup)();
  65. }
  66. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  67. return {
  68. a: $data.avatar,
  69. b: common_vendor.t($data.nickName),
  70. c: common_assets._imports_0$2,
  71. d: common_vendor.p({
  72. type: "right"
  73. }),
  74. e: common_vendor.o((...args) => $options.showModal && $options.showModal(...args)),
  75. f: common_assets._imports_1$1,
  76. g: common_vendor.p({
  77. type: "right"
  78. }),
  79. h: common_assets._imports_2$1,
  80. i: common_vendor.p({
  81. type: "right"
  82. }),
  83. j: common_vendor.o((...args) => $options.logout && $options.logout(...args)),
  84. k: $data.aboutUs,
  85. l: common_vendor.o((...args) => $options.closeModal && $options.closeModal(...args)),
  86. m: common_vendor.o((...args) => $options.getConfirm && $options.getConfirm(...args)),
  87. n: common_vendor.o(($event) => $data.popupNoCancelShow = $event),
  88. o: common_vendor.p({
  89. title: "用户协议",
  90. confirmText: true,
  91. cancelText: true,
  92. modelValue: $data.popupNoCancelShow
  93. }),
  94. p: common_vendor.sei(_ctx.virtualHostId, "view")
  95. };
  96. }
  97. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  98. wx.createPage(MiniProgramPage);
  99. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/wode.js.map