"use strict"; const common_vendor = require("../../common/vendor.js"); const common_assets = require("../../common/assets.js"); const sheep_index = require("../../sheep/index.js"); const sheep_api_member_auth = require("../../sheep/api/member/auth.js"); require("../../sheep/url/index.js"); require("../../sheep/store/index.js"); require("../../sheep/store/app.js"); require("../../sheep/api/promotion/diy.js"); require("../../sheep/request/index.js"); require("../../sheep/config/index.js"); require("../../sheep/platform/index.js"); require("../../sheep/platform/provider/wechat/index.js"); require("../../sheep/platform/provider/wechat/miniProgram.js"); require("../../sheep/api/member/social.js"); require("../../sheep/api/member/user.js"); require("../../sheep/platform/provider/apple/index.js"); require("../../sheep/platform/share.js"); require("../../sheep/router/index.js"); require("../../sheep/hooks/useModal.js"); require("../../sheep/helper/index.js"); require("../../sheep/helper/test.js"); require("../../sheep/helper/digit.js"); require("../../sheep/helper/throttle.js"); require("../../sheep/platform/pay.js"); require("../../sheep/api/pay/order.js"); require("../../sheep/store/user.js"); require("../../sheep/store/cart.js"); require("../../sheep/api/trade/cart.js"); require("../../sheep/api/pay/wallet.js"); require("../../sheep/api/trade/order.js"); require("../../sheep/api/promotion/coupon.js"); require("../../sheep/store/sys.js"); require("../../sheep/store/modal.js"); require("../../sheep/config/zIndex.js"); if (!Array) { const _easycom_uni_list_item2 = common_vendor.resolveComponent("uni-list-item"); const _easycom_uni_list2 = common_vendor.resolveComponent("uni-list"); const _easycom_su_fixed2 = common_vendor.resolveComponent("su-fixed"); const _easycom_s_layout2 = common_vendor.resolveComponent("s-layout"); (_easycom_uni_list_item2 + _easycom_uni_list2 + _easycom_su_fixed2 + _easycom_s_layout2)(); } const _easycom_uni_list_item = () => "../../uni_modules/uni-list/components/uni-list-item/uni-list-item.js"; const _easycom_uni_list = () => "../../uni_modules/uni-list/components/uni-list/uni-list.js"; const _easycom_su_fixed = () => "../../sheep/ui/su-fixed/su-fixed.js"; const _easycom_s_layout = () => "../../sheep/components/s-layout/s-layout.js"; if (!Math) { (_easycom_uni_list_item + _easycom_uni_list + _easycom_su_fixed + _easycom_s_layout)(); } const _sfc_main = { __name: "setting", setup(__props) { const appInfo = common_vendor.computed(() => sheep_index.sheep.$store("app").info); const isLogin = common_vendor.computed(() => sheep_index.sheep.$store("user").isLogin); const storageSize = common_vendor.index.getStorageInfoSync().currentSize + "Kb"; common_vendor.reactive({ showModal: false }); function onCheckUpdate() { sheep_index.sheep.$platform.checkUpdate(); } function onLogoff() { common_vendor.index.showModal({ title: "提示", content: "确认注销账号?", success: async function(res) { if (!res.confirm) { return; } const { code } = await sheep_api_member_auth.AuthUtil.logout(); if (code !== 0) { return; } sheep_index.sheep.$store("user").logout(); sheep_index.sheep.$router.go("/pages/index/user"); } }); } function onLogout() { common_vendor.index.showModal({ title: "提示", content: "确认退出账号?", success: async function(res) { if (!res.confirm) { return; } const { code } = await sheep_api_member_auth.AuthUtil.logout(); if (code !== 0) { return; } sheep_index.sheep.$store("user").logout(); sheep_index.sheep.$router.go("/pages/index/user"); } }); } return (_ctx, _cache) => { return common_vendor.e({ a: common_assets._imports_0, b: common_vendor.t(common_vendor.unref(appInfo).name), c: common_vendor.o(onCheckUpdate), d: common_vendor.p({ title: "当前版本", rightText: common_vendor.unref(appInfo).version, showArrow: true, clickable: true, border: false }), e: common_vendor.p({ title: "本地缓存", rightText: storageSize, showArrow: true, border: false }), f: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/public/richtext", { title: "关于我们" })), g: common_vendor.p({ title: "关于我们", showArrow: true, clickable: true, border: false }), h: common_vendor.unref(isLogin) && common_vendor.unref(sheep_index.sheep).$platform.os === "ios" && common_vendor.unref(sheep_index.sheep).$platform.name === "App" }, common_vendor.unref(isLogin) && common_vendor.unref(sheep_index.sheep).$platform.os === "ios" && common_vendor.unref(sheep_index.sheep).$platform.name === "App" ? { i: common_vendor.o(onLogoff), j: common_vendor.p({ title: "注销账号", rightText: "", showArrow: true, clickable: true, border: false }) } : {}, { k: common_vendor.p({ border: false }), l: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/public/richtext", { title: "用户协议" })), m: common_vendor.o(($event) => common_vendor.unref(sheep_index.sheep).$router.go("/pages/public/richtext", { title: "隐私协议" })), n: common_vendor.unref(isLogin) }, common_vendor.unref(isLogin) ? { o: common_vendor.o(onLogout) } : {}, { p: common_vendor.p({ bottom: true, placeholder: true }), q: common_vendor.p({ title: "系统设置", bgStyle: { color: "#fff" } }) }); }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5fed78fb"], ["__file", "/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-app/pages/public/setting.vue"]]); wx.createPage(MiniProgramPage);