12345678910111213141516171819202122232425262728293031323334353637383940 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const _sfc_main = {
- methods: {
- submit() {
- common_vendor.index.showModal({
- title: "确认注销",
- content: "注销后所有数据将无法恢复,是否继续?",
- success: (res) => {
- if (res.confirm) {
- common_vendor.index.request({
- url: "http://localhost:9527/api/cancelAccount",
- method: "POST",
- data: { uid: common_vendor.index.getStorageSync("uid") },
- success: (res2) => {
- if (res2.statusCode === 200 && res2.data.code === 200) {
- common_vendor.index.showToast({ title: "注销成功", icon: "success" });
- setTimeout(() => {
- common_vendor.index.clearStorageSync();
- common_vendor.index.reLaunch({ url: "/pages/index/index" });
- }, 1e3);
- } else {
- common_vendor.index.showToast({ title: res2.data.message || "注销失败", icon: "none" });
- }
- }
- });
- }
- }
- });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return {
- a: common_vendor.o((...args) => $options.submit && $options.submit(...args))
- };
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4c3b2932"]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/cancelAccount.js.map
|