Files
frontend-app/unpackage/dist/dev/mp-weixin/pages/mine_settings/mine_settings.js
T
2025-05-10 18:17:24 +08:00

122 lines
3.7 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_auth = require("../../utils/auth.js");
const Header = () => "../../components/header.js";
const _sfc_main = {
components: { Header },
data() {
return {
userData: {}
// 当前登录对象
};
},
onShow() {
this.userData = utils_auth.getStorageFun(utils_auth.USER_DATA);
},
methods: {
// 退出登录
loginOutFun() {
utils_auth.clear();
common_vendor.index.navigateTo({
url: "/pages/login/login"
});
},
cancelAccount() {
utils_auth.clear();
common_vendor.index.navigateTo({
url: "/pages/login/login"
});
},
jumpInfo(type) {
if (type === "address") {
common_vendor.index.navigateTo({
url: "/pages/mine_address/mine_address"
});
} else if (type === "aboutUs") {
common_vendor.index.navigateTo({
url: "/pages/mine_about_us/mine_about_us"
});
} else if (type === "userAgreement") {
common_vendor.index.navigateTo({
url: "/pages/mine_user_agreement/mine_user_agreement"
});
} else if (type === "privacyAgreement") {
common_vendor.index.navigateTo({
url: "/pages/mine_privacy_agreement/mine_privacy_agreement"
});
} else if (type === "productAgreement") {
common_vendor.index.navigateTo({
url: "/pages/mine_product_agreement/mine_product_agreement"
});
}
}
}
};
if (!Array) {
const _component_Header = common_vendor.resolveComponent("Header");
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
(_component_Header + _easycom_up_image2)();
}
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
if (!Math) {
_easycom_up_image();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.p({
leftTitle: _ctx.$t("mine.settings.title"),
["left-path-type"]: "switchTab",
leftPath: "/pages/mine/mine"
}),
b: common_vendor.p({
src: "/static/logo_y.png",
shape: "circle",
width: "60",
height: "60",
bgColor: "#f1f6ff00"
}),
c: common_vendor.t($data.userData.name || "德商汇用户"),
d: common_vendor.t($data.userData.mobile),
e: common_vendor.p({
src: "/static/common/right.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
}),
f: common_vendor.o(($event) => $options.jumpInfo("address")),
g: common_vendor.t($data.userData.inviteCode),
h: common_vendor.p({
src: "/static/common/right.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
}),
i: common_vendor.o(($event) => $options.jumpInfo("userAgreement")),
j: common_vendor.p({
src: "/static/common/right.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
}),
k: common_vendor.o(($event) => $options.jumpInfo("privacyAgreement")),
l: common_vendor.p({
src: "/static/common/right_x.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
}),
m: common_vendor.o(($event) => $options.jumpInfo("productAgreement")),
n: common_vendor.p({
src: "/static/common/right.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
}),
o: common_vendor.o(($event) => $options.jumpInfo("aboutUs")),
p: common_vendor.o((...args) => $options.loginOutFun && $options.loginOutFun(...args))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2a00f8ac"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine_settings/mine_settings.js.map