| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- "use strict";
- const common_vendor = require("../../../common/vendor.js");
- const ErpNavBar = () => "../../../components/erp-nav-bar.js";
- const _sfc_main = {
- components: { ErpNavBar },
- data() {
- return {
- myInfo: {
- avatarUrl: "https://img.icons8.com/clouds/200/manager.png",
- nickName: "张经理",
- phoneNum: "138-8888-8888",
- orgName: "广东粤铝材实业有限公司"
- }
- };
- },
- 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);
- }
- }
- };
- if (!Array) {
- const _component_erp_nav_bar = common_vendor.resolveComponent("erp-nav-bar");
- _component_erp_nav_bar();
- }
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return {
- a: common_vendor.p({
- title: "个人资料设置"
- }),
- b: $data.myInfo.avatarUrl,
- c: common_vendor.o((...args) => $options.doChooseImage && $options.doChooseImage(...args), "3d"),
- d: common_vendor.t($data.myInfo.nickName),
- e: common_vendor.o((...args) => $options.doEditName && $options.doEditName(...args), "24"),
- f: common_vendor.t($data.myInfo.phoneNum),
- g: common_vendor.t($data.myInfo.orgName),
- h: common_vendor.o((...args) => $options.saveProfile && $options.saveProfile(...args), "cb")
- };
- }
- const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2f058983"]]);
- wx.createPage(MiniProgramPage);
- //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/settings/index.js.map
|