"use strict"; const common_vendor = require("../../common/vendor.js"); const _sfc_main = { data() { return { statusBarHeight: 20, myInfo: { avatarUrl: "https://img.icons8.com/clouds/200/manager.png", nickName: "张经理", phoneNum: "138-8888-8888", orgName: "广东粤铝材实业有限公司" } }; }, onLoad() { const info = common_vendor.index.getSystemInfoSync(); this.statusBarHeight = info.statusBarHeight; }, methods: { goBack() { common_vendor.index.navigateBack(); }, doChooseImage() { common_vendor.index.chooseImage({ count: 1, success: (res) => { this.myInfo.avatarUrl = res.tempFilePaths[0]; common_vendor.index.showToast({ title: "头像已选好", icon: "none" }); } }); }, doEditName() { common_vendor.index.showModal({ title: "设置昵称", content: this.myInfo.nickName, editable: true, confirmColor: "#C1001C", // 重点修复点:弹窗确认按钮强制采用主题红 success: (res) => { if (res.confirm) { this.myInfo.nickName = res.content || "未命名"; } } }); }, saveProfile() { common_vendor.index.showLoading({ title: "保存中" }); setTimeout(() => { common_vendor.index.hideLoading(); common_vendor.index.showToast({ title: "保存成功" }); setTimeout(() => { common_vendor.index.navigateBack(); }, 1200); }, 600); } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: common_vendor.o((...args) => $options.goBack && $options.goBack(...args)), b: $data.statusBarHeight + "px", c: $data.myInfo.avatarUrl, d: common_vendor.o((...args) => $options.doChooseImage && $options.doChooseImage(...args)), e: common_vendor.t($data.myInfo.nickName), f: common_vendor.o((...args) => $options.doEditName && $options.doEditName(...args)), g: common_vendor.t($data.myInfo.phoneNum), h: common_vendor.t($data.myInfo.orgName), i: common_vendor.o((...args) => $options.saveProfile && $options.saveProfile(...args)) }; } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8e46f4e9"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/settings.js.map