hldy_xcx/unpackage/dist/dev/mp-weixin/pages/login/threeselectone.js

118 lines
3.5 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const api_loginApi = require("../../api/loginApi.js");
const _sfc_main = {
__name: "threeselectone",
setup(__props) {
common_vendor.ref(0);
const ceshi = () => {
};
const tobestaff = () => {
common_vendor.index.setStorageSync("specicalid", "");
common_vendor.index.setStorageSync("baddata", "");
common_vendor.index.setStorageSync("backhuancun", {});
common_vendor.index.navigateTo({
url: `/pages/addstaff/information`
});
};
const oldmanhowtojump = () => {
if (op0.value == `1`) {
api_loginApi.changePerson(1).then((res) => {
if (res.success) {
common_vendor.index.reLaunch({
url: `/pages/oldmanindex/index`
});
}
});
} else {
tobeold();
}
};
const tobeold = () => {
common_vendor.index.setStorageSync("specicalid", "");
common_vendor.index.setStorageSync("baddata", "");
common_vendor.index.setStorageSync("backhuancun", {});
common_vendor.index.navigateTo({
url: `/pages/addoldman/IDcard`
});
};
const yuangonghowtojump = () => {
if (op1.value == `1`) {
api_loginApi.changePerson(2).then((res) => {
if (res.success) {
jumpToYuangongindex();
}
});
} else {
tobestaff();
}
};
const jumpToYuangongindex = () => {
common_vendor.index.reLaunch({
url: `/pages/yuangongindex/index`
});
};
const jigouhowtojump = () => {
if (op2.value == `1`) {
api_loginApi.changePerson(3).then((res) => {
if (res.success) {
jumpToindex();
}
});
} else {
gotoadd();
}
};
const jumpToindex = () => {
common_vendor.index.navigateTo({
url: `/pages/index/index`
});
};
const gotoadd = () => {
common_vendor.index.setStorageSync("specicalid", "");
common_vendor.index.setStorageSync("baddata", "");
common_vendor.index.setStorageSync("backhuancun", {});
common_vendor.index.navigateTo({
url: `/pages/addjigou/name`
});
};
const close = () => {
common_vendor.index.exitMiniProgram({});
};
const phone = common_vendor.ref("");
const op0 = common_vendor.ref(0);
const op1 = common_vendor.ref(0);
const op2 = common_vendor.ref(0);
common_vendor.onLoad(() => {
phone.value = common_vendor.index.getStorageSync("tel");
op0.value = 1;
op1.value = 1;
op2.value = 1;
});
return (_ctx, _cache) => {
return common_vendor.e({
a: op0.value == `1`
}, op0.value == `1` ? {} : {}, {
b: op0.value != `1`
}, op0.value != `1` ? {} : {}, {
c: common_vendor.o(oldmanhowtojump),
d: op1.value == `1`
}, op1.value == `1` ? {} : {}, {
e: op1.value != `1`
}, op1.value != `1` ? {} : {}, {
f: common_vendor.o(yuangonghowtojump),
g: op2.value == `1`
}, op2.value == `1` ? {} : {}, {
h: op2.value != `1`
}, op2.value != `1` ? {} : {}, {
i: common_vendor.o(ceshi),
j: common_vendor.o(jigouhowtojump),
k: common_vendor.o(close)
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-83beea56"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/login/threeselectone.js.map