121 lines
4.1 KiB
JavaScript
121 lines
4.1 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_assets = require("../../common/assets.js");
|
|
if (!Math) {
|
|
ZyUpdate();
|
|
}
|
|
const ZyUpdate = () => "../../component/zy-upgrade/zy-upgrade.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 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) => showPopup.value = true),
|
|
p: common_vendor.o(($event) => showPopup.value = true),
|
|
q: showPopup.value
|
|
}, showPopup.value ? {
|
|
r: common_vendor.o(closePopup),
|
|
s: common_vendor.o(closeapp)
|
|
} : {}, {
|
|
t: openbottom.value
|
|
}, openbottom.value ? {
|
|
v: common_vendor.o(($event) => openbottom.value = false),
|
|
w: common_vendor.o(closebottom)
|
|
} : {}, {
|
|
x: openchange.value
|
|
}, openchange.value ? {
|
|
y: changeform.oldpassword,
|
|
z: common_vendor.o(($event) => changeform.oldpassword = $event.detail.value),
|
|
A: changeform.newpassword,
|
|
B: common_vendor.o(($event) => changeform.newpassword = $event.detail.value),
|
|
C: common_vendor.o(($event) => openchange.value = false)
|
|
} : {}, {
|
|
D: common_vendor.sr(zyupgrade, "e4e4508d-0", {
|
|
"k": "zyupgrade"
|
|
}),
|
|
E: 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
|