"use strict"; const common_vendor = require("../../common/vendor.js"); const request_index = require("../../request/index.js"); const compontent_public_long = require("../../compontent/public/long.js"); if (!Math) { model(); } const model = () => "../../compontent/public/model.js"; const _sfc_main = { __name: "oldmanall", setup(__props) { const show = common_vendor.ref(false); const content = common_vendor.ref(""); const statusarray = ["loading", "success", "fail"]; const nameArray = ["姓名", "性别", "身份证号码", "民族", "出生日期", "住址", "签发机关", "有效期限"]; const textArray = common_vendor.reactive(["", "", "", "", "", "", "", ""]); common_vendor.ref(""); common_vendor.ref(""); common_vendor.ref(""); common_vendor.ref(""); common_vendor.ref(["", "", "", ""]); common_vendor.reactive(["", ""]); common_vendor.reactive(["", "", "", "", "", "", "", "", "", ""]); common_vendor.ref(""); const fontphoto = common_vendor.ref(""); const endphoto = common_vendor.ref(""); common_vendor.ref(0); common_vendor.ref(""); function getMessage(url) { if (!url) { return; } common_vendor.index.previewImage({ current: url, // 当前显示图片的链接 urls: [url], // 可以预览的图片列表 indicator: "default", // 显示面板指示点,'default'|'number'|'none' loop: true, // 是否可循环预览 longPressActions: { itemList: ["保存图片"], success: (data) => { common_vendor.index.__f__("log", "at pages/addoldman/oldmanall.vue:144", "长按操作成功", data); }, fail: (err) => { common_vendor.index.__f__("error", "at pages/addoldman/oldmanall.vue:147", "长按操作失败", err); } } }); } function isAtLeastEightChars(str) { return typeof str === "string" && str.length >= 12; } const openLook = (res) => { if (isAtLeastEightChars(res)) { content.value = res; show.value = true; } }; const goBack = () => { common_vendor.index.navigateBack(); }; const alldata = common_vendor.ref(""); const contentred = common_vendor.ref(""); const applyStatus = common_vendor.ref(false); common_vendor.onLoad((options) => { if (options.applyStatus) { applyStatus.value = options.applyStatus; } alldata.value = JSON.parse(options.element); let data = alldata.value; if (data.content) { contentred.value = data.content; } textArray[0] = data.name; textArray[1] = data.sex; textArray[2] = data.idCard; textArray[3] = data.national; textArray[4] = data.birthDate; textArray[5] = data.idCardAddress; textArray[6] = data.issuingAuthority; textArray[7] = `${data.startTime}-${compontent_public_long.swapLongTerm(data.endTime)}`; fontphoto.value = data.idCardNegative; endphoto.value = data.idCardPositive; }); const changeMessage = () => { if (alldata.value.elderModifyStatus == "1") { openLook("该长者信息正在审核中,请等待"); } else { let item = alldata.value; common_vendor.index.setStorageSync("baddata", item); common_vendor.index.setStorageSync("specicalid", item.id); common_vendor.index.setStorageSync("backhuancun", {}); let data = { nuId: item.nuId, orgCode: item.orgCode }; common_vendor.index.setStorageSync("oldman", data); common_vendor.index.navigateTo({ url: "/pages/addoldman/oldIDcard" }); } }; return (_ctx, _cache) => { return common_vendor.e({ a: common_vendor.o(($event) => show.value = false), b: common_vendor.p({ show: show.value, content: content.value }), c: common_vendor.o(goBack), d: applyStatus.value ? `https://www.focusnu.com/media/directive/index/${statusarray[applyStatus.value - 1]}.png` : ``, e: !applyStatus.value }, !applyStatus.value ? { f: common_vendor.o(changeMessage) } : {}, { g: fontphoto.value ? `${common_vendor.unref(request_index.base_url)}/sys/common/static/${fontphoto.value}` : `https://www.focusnu.com/media/directive/index/IDcard.png`, h: !fontphoto.value }, !fontphoto.value ? {} : {}, { i: common_vendor.o(($event) => getMessage(`${common_vendor.unref(request_index.base_url)}/sys/common/static/${fontphoto.value}`)), j: endphoto.value ? `${common_vendor.unref(request_index.base_url)}/sys/common/static/${endphoto.value}` : `https://www.focusnu.com/media/directive/index/backIDcard.png`, k: !endphoto.value }, !endphoto.value ? {} : {}, { l: common_vendor.o(($event) => getMessage(`${common_vendor.unref(request_index.base_url)}/sys/common/static/${endphoto.value}`)), m: common_vendor.f(nameArray, (item, index, i0) => { return { a: common_vendor.t(item), b: common_vendor.t(textArray[index] ? textArray[index] : "自动获取"), c: index, d: common_vendor.o(($event) => openLook(textArray[index]), index) }; }) }); }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-dccb1626"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/addoldman/oldmanall.js.map