79 lines
2.7 KiB
JavaScript
79 lines
2.7 KiB
JavaScript
|
|
"use strict";
|
||
|
|
const common_vendor = require("../../common/vendor.js");
|
||
|
|
if (!Math) {
|
||
|
|
model();
|
||
|
|
}
|
||
|
|
const model = () => "../../compontent/public/model.js";
|
||
|
|
const _sfc_main = {
|
||
|
|
__name: "jianhurenall",
|
||
|
|
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("");
|
||
|
|
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.guardianName;
|
||
|
|
textArray[1] = data.guardianPhone;
|
||
|
|
textArray[2] = data.guardianIdCard;
|
||
|
|
textArray[3] = data.guardianHomeAddress;
|
||
|
|
textArray[4] = data.guardianWorkUnit;
|
||
|
|
});
|
||
|
|
const changeMessage = () => {
|
||
|
|
common_vendor.index.navigateTo({
|
||
|
|
url: `/pages/addoldman/IDcard`
|
||
|
|
});
|
||
|
|
};
|
||
|
|
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: 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-b2e00674"]]);
|
||
|
|
wx.createPage(MiniProgramPage);
|
||
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/addoldman/jianhurenall.js.map
|