52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const _sfc_main = {
|
|
__name: "oldmansuccess",
|
|
setup(__props) {
|
|
const seconds = common_vendor.ref(6);
|
|
let timer = null;
|
|
const ischange = common_vendor.ref(false);
|
|
const isjianhu = common_vendor.ref(false);
|
|
common_vendor.onLoad((element) => {
|
|
seconds.value = 6;
|
|
if (element.type) {
|
|
ischange.value = true;
|
|
}
|
|
if (element.jianhu) {
|
|
isjianhu.value = true;
|
|
}
|
|
timer = setInterval(() => {
|
|
if (seconds.value > 0) {
|
|
seconds.value -= 1;
|
|
} else {
|
|
clearInterval(timer);
|
|
timer = null;
|
|
goToBack();
|
|
}
|
|
}, 1e3);
|
|
});
|
|
common_vendor.onUnload(() => {
|
|
if (timer) {
|
|
clearInterval(timer);
|
|
timer = null;
|
|
}
|
|
});
|
|
const goToBack = () => {
|
|
common_vendor.index.reLaunch({
|
|
url: "/pages/oldmanindex/index"
|
|
});
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.t(ischange.value ? "修改" : "添加"),
|
|
b: common_vendor.t(isjianhu.value ? `监护人` : `长者`),
|
|
c: common_vendor.t(ischange.value ? "请等待机构审核" : ""),
|
|
d: common_vendor.t(seconds.value)
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9c50db75"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/oldmanindex/oldmansuccess.js.map
|