123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const _sfc_main = {
- data() {
- return {
- settingList: [
- { title: "账号安全", icon: "/static/logo.png" },
- { title: "隐私设置", icon: "/static/2.png" },
- { title: "清除缓存", icon: "/static/login.png" },
- { title: "关于我们", icon: "/static/logo.png" }
- ]
- };
- },
- methods: {
- onItem(item) {
- if (item.title === "清除缓存") {
- common_vendor.index.clearStorageSync();
- common_vendor.index.showToast({ title: "缓存已清除", icon: "success" });
- } else {
- common_vendor.index.showToast({ title: item.title, icon: "none" });
- }
- },
- logout() {
- common_vendor.index.showModal({
- title: "提示",
- content: "确定要退出登录吗?",
- success: (res) => {
- if (res.confirm) {
- common_vendor.index.clearStorageSync();
- common_vendor.index.reLaunch({ url: "/pages/login/index" });
- }
- }
- });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: common_vendor.f($data.settingList, (item, k0, i0) => {
- return {
- a: item.icon,
- b: common_vendor.t(item.title),
- c: item.title,
- d: common_vendor.o(($event) => $options.onItem(item), item.title)
- };
- }),
- b: _ctx.idx !== $data.settingList.length - 1
- }, _ctx.idx !== $data.settingList.length - 1 ? {
- c: common_vendor.f($data.settingList, (item, idx, i0) => {
- return {
- a: "d" + idx
- };
- })
- } : {}, {
- d: common_vendor.o((...args) => $options.logout && $options.logout(...args))
- });
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/setting.js.map
|