hldy_xcx/unpackage/dist/dev/mp-weixin/pages/oldmanindex/saoyisao.js

52 lines
1.7 KiB
JavaScript
Raw Permalink Normal View History

2025-09-15 17:23:33 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
2025-09-19 17:12:59 +08:00
const pages_oldmanindex_api = require("./api.js");
2025-09-15 17:23:33 +08:00
const _sfc_main = {
__name: "saoyisao",
setup(__props) {
const goBack = () => {
common_vendor.index.navigateBack();
};
2025-09-19 17:12:59 +08:00
function isAtLeastTenChars(str) {
return typeof str === "string" && str.length >= 10;
}
2025-09-15 17:23:33 +08:00
async function onScan() {
const res = await common_vendor.index.scanCode();
2025-09-19 17:12:59 +08:00
if (isAtLeastTenChars(res.result)) {
pages_oldmanindex_api.getOrgNuId(res.result).then((res0) => {
if (res0.result) {
common_vendor.index.navigateTo({
url: `/pages/oldmanindex/saoyisaothen?element=${JSON.stringify(res0.result)}`
});
} else {
common_vendor.index.showToast({
title: "扫描的二维码有误",
icon: "none",
// 不显示对勾图标
duration: 2e3
});
}
});
} else {
common_vendor.index.showToast({
title: "扫描的二维码有误",
icon: "none",
// 不显示对勾图标
duration: 2e3
});
}
2025-09-15 17:23:33 +08:00
}
return (_ctx, _cache) => {
return {
a: common_vendor.o(goBack),
2025-10-20 09:29:15 +08:00
b: `${common_vendor.index.getStorageSync("moveHeight") + 40}px`,
2025-10-13 14:58:45 +08:00
c: `${common_vendor.index.getStorageSync("moveHeight") + 30}px`,
d: common_vendor.o(onScan)
2025-09-15 17:23:33 +08:00
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-8fcb4df2"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/oldmanindex/saoyisao.js.map