120 lines
3.6 KiB
JavaScript
120 lines
3.6 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const api_loginApi = require("../../api/loginApi.js");
|
|
const _sfc_main = {
|
|
__name: "threeselectonespec",
|
|
setup(__props) {
|
|
common_vendor.ref(0);
|
|
const jigouhowtojump = () => {
|
|
if (op2.value == `1`) {
|
|
api_loginApi.changePerson(3).then((res) => {
|
|
if (res.success) {
|
|
jumpToindex();
|
|
}
|
|
});
|
|
} else {
|
|
gotoadd();
|
|
}
|
|
};
|
|
const yuangonghowtojump = () => {
|
|
if (op1.value == `1`) {
|
|
api_loginApi.changePerson(2).then((res) => {
|
|
if (res.success) {
|
|
jumpToYuangongindex();
|
|
}
|
|
});
|
|
} else {
|
|
tobestaff();
|
|
}
|
|
};
|
|
const goBack = () => {
|
|
common_vendor.index.navigateBack();
|
|
};
|
|
const ceshi = () => {
|
|
};
|
|
const jumpToindex = () => {
|
|
common_vendor.index.reLaunch({
|
|
url: `/pages/index/index`
|
|
});
|
|
};
|
|
const jumpToYuangongindex = () => {
|
|
common_vendor.index.reLaunch({
|
|
url: `/pages/yuangongindex/index`
|
|
});
|
|
};
|
|
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 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 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 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 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: common_vendor.o(goBack),
|
|
b: `${common_vendor.index.getStorageSync("moveHeight") + 35}px`,
|
|
c: `${common_vendor.index.getStorageSync("moveHeight") + 30}px`,
|
|
d: op0.value == `1`
|
|
}, op0.value == `1` ? {} : {}, {
|
|
e: op0.value != `1`
|
|
}, op0.value != `1` ? {} : {}, {
|
|
f: common_vendor.o(oldmanhowtojump),
|
|
g: op1.value == `1`
|
|
}, op1.value == `1` ? {} : {}, {
|
|
h: op1.value != `1`
|
|
}, op1.value != `1` ? {} : {}, {
|
|
i: common_vendor.o(yuangonghowtojump),
|
|
j: op2.value == `1`
|
|
}, op2.value == `1` ? {} : {}, {
|
|
k: op2.value != `1`
|
|
}, op2.value != `1` ? {} : {}, {
|
|
l: common_vendor.o(ceshi),
|
|
m: common_vendor.o(jigouhowtojump)
|
|
});
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f4bd7fdd"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/login/threeselectonespec.js.map
|