hldy_app/unpackage/dist/dev/mp-weixin/pages/login/login.js

129 lines
4.4 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
if (!Math) {
(twoseven + ZyUpdate)();
}
const ZyUpdate = () => "../../component/zy-upgrade/zy-upgrade.js";
const twoseven = () => "./twoseven.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "login",
setup(__props) {
const zyupgrade = common_vendor.ref(null);
const isTarget = common_vendor.ref(false);
const form = common_vendor.reactive({
phone: "",
password: "",
imgcode: ""
});
const changeform = common_vendor.reactive({
oldpassword: "",
newpassword: ""
});
const fullName = common_vendor.computed(() => {
return form.password && isLength11(form.phone) && form.imgcode;
});
const showPopup = common_vendor.ref(false);
function closebottom() {
openbottom.value = false;
isTarget.value = true;
}
function closePopup() {
showPopup.value = false;
common_vendor.index.setStorageSync("appWgtVersion", common_vendor.index.getSystemInfoSync().appWgtVersion);
}
function closeapp() {
plus.runtime.quit();
}
function isLength11(str) {
return typeof str === "string" && str.length === 11;
}
const jumpTo = (url) => {
common_vendor.index.navigateTo({
url
});
};
const openbottom = common_vendor.ref(false);
const openchange = common_vendor.ref(false);
const openany = common_vendor.ref(false);
const login = () => {
if (isTarget.value) {
if (form.password == "123456") {
openchange.value = true;
} else {
jumpTo(`/pages/index/index`);
}
} else {
openbottom.value = true;
}
};
common_vendor.onLoad(() => {
if (common_vendor.index.getStorageSync("appWgtVersion") != common_vendor.index.getSystemInfoSync().appWgtVersion) {
showPopup.value = true;
}
});
common_vendor.onShow(() => {
var _a;
(_a = zyupgrade.value) == null ? void 0 : _a.check_update();
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_assets._imports_0,
b: form.phone,
c: common_vendor.o(($event) => form.phone = $event.detail.value),
d: form.password,
e: common_vendor.o(($event) => form.password = $event.detail.value),
f: form.imgcode,
g: common_vendor.o(($event) => form.imgcode = $event.detail.value),
h: common_assets._imports_1,
i: !fullName.value,
j: fullName.value,
k: common_vendor.o(($event) => login()),
l: common_vendor.n(isTarget.value ? "radio-circle-target" : "radio-circle"),
m: common_vendor.o(($event) => isTarget.value = !isTarget.value),
n: common_vendor.o(($event) => isTarget.value = !isTarget.value),
o: common_vendor.o(($event) => openany.value = true),
p: common_vendor.o(($event) => openany.value = true),
q: showPopup.value
}, showPopup.value ? {
r: common_vendor.o(closePopup),
s: common_vendor.o(closeapp)
} : {}, {
t: openany.value
}, openany.value ? {
v: common_vendor.o(($event) => openany.value = false),
w: common_assets._imports_2,
x: common_vendor.o(($event) => openany.value = false)
} : {}, {
y: openbottom.value
}, openbottom.value ? {
z: common_vendor.o(($event) => openbottom.value = false),
A: common_vendor.o(closebottom)
} : {}, {
B: openchange.value
}, openchange.value ? {
C: changeform.oldpassword,
D: common_vendor.o(($event) => changeform.oldpassword = $event.detail.value),
E: changeform.newpassword,
F: common_vendor.o(($event) => changeform.newpassword = $event.detail.value),
G: common_vendor.o(($event) => openchange.value = false)
} : {}, {
H: common_vendor.sr(zyupgrade, "e4e4508d-1", {
"k": "zyupgrade"
}),
I: common_vendor.p({
noticeflag: true,
theme: "blue",
h5preview: false,
oldversion: "1.0.0",
appstoreflag: true,
autocheckupdate: true
})
});
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e4e4508d"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/login/login.js.map