41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const _sfc_main = {
|
|
__name: "paysuccess",
|
|
setup(__props) {
|
|
const seconds = common_vendor.ref(6);
|
|
let timer = null;
|
|
common_vendor.onLoad(() => {
|
|
seconds.value = 6;
|
|
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(seconds.value)
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-764f7f43"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/oldmanindex/paysuccess.js.map
|