|
|
@@ -1,6 +1,7 @@
|
|
|
"use strict";
|
|
|
const common_vendor = require("../../common/vendor.js");
|
|
|
const utils_api = require("../../utils/api.js");
|
|
|
+const utils_des = require("../../utils/des.js");
|
|
|
if (!Array) {
|
|
|
const _easycom_uv_qrcode2 = common_vendor.resolveComponent("uv-qrcode");
|
|
|
_easycom_uv_qrcode2();
|
|
|
@@ -100,7 +101,8 @@ const _sfc_main = {
|
|
|
userId: common_vendor.index.getStorageSync("userInfo").id
|
|
|
}
|
|
|
});
|
|
|
- QRCodeUrl.value = res.data.qrcode;
|
|
|
+ const result = JSON.parse(utils_des.decryptDes(res.data));
|
|
|
+ QRCodeUrl.value = result.qrcode;
|
|
|
};
|
|
|
const getChildMsg = async () => {
|
|
|
const res = await utils_api.myRequest({
|
|
|
@@ -109,7 +111,8 @@ const _sfc_main = {
|
|
|
id: common_vendor.index.getStorageSync("userInfo").id
|
|
|
}
|
|
|
});
|
|
|
- childMsgList.value = res.data;
|
|
|
+ const result = JSON.parse(utils_des.decryptDes(res.data));
|
|
|
+ childMsgList.value = result;
|
|
|
if (childMsgList.value.length) {
|
|
|
currentChild.value = childMsgList.value[0];
|
|
|
}
|
|
|
@@ -121,7 +124,8 @@ const _sfc_main = {
|
|
|
id: common_vendor.index.getStorageSync("userInfo").identityId
|
|
|
}
|
|
|
});
|
|
|
- useAppList.value = res.data;
|
|
|
+ const result = JSON.parse(utils_des.decryptDes(res.data));
|
|
|
+ useAppList.value = result;
|
|
|
};
|
|
|
const goPage = (url, item) => {
|
|
|
if (item && item.category == "其他小程序") {
|
|
|
@@ -139,6 +143,14 @@ const _sfc_main = {
|
|
|
}
|
|
|
if (url === "/pages/track/track") {
|
|
|
if (userInfo.value.identityId == 1) {
|
|
|
+ if (!currentChild.value.id) {
|
|
|
+ common_vendor.index.showToast({
|
|
|
+ title: "请关联孩子后再查看轨迹",
|
|
|
+ icon: "none",
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
common_vendor.index.navigateTo({
|
|
|
url: `/pages/track/track?id=${currentChild.value.id}`
|
|
|
});
|
|
|
@@ -151,6 +163,14 @@ const _sfc_main = {
|
|
|
}
|
|
|
}
|
|
|
if (url === "/pagesReservation/reservation/reservation") {
|
|
|
+ if (userInfo.value.identityId == 1 && !currentChild.value.id) {
|
|
|
+ common_vendor.index.showToast({
|
|
|
+ title: "请关联孩子后再开始预约",
|
|
|
+ icon: "none",
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
common_vendor.index.setStorageSync("Tab-activeIndex", 0);
|
|
|
}
|
|
|
common_vendor.index.navigateTo({
|
|
|
@@ -208,12 +228,14 @@ const _sfc_main = {
|
|
|
}, childMsgList.value.length > 1 ? {
|
|
|
x: common_vendor.o(($event) => goPage(`/pages/change/change?list=${JSON.stringify(childMsgList.value)}&id=${currentChild.value.id}`))
|
|
|
} : {}, {
|
|
|
- y: common_vendor.o(($event) => goPage("/pages/bind/bind")),
|
|
|
- z: common_vendor.o(($event) => goPage("/pages/bind/bind"))
|
|
|
+ y: !childMsgList.value.length
|
|
|
+ }, !childMsgList.value.length ? {} : {}, {
|
|
|
+ z: common_vendor.o(($event) => goPage("/pages/bind/bind")),
|
|
|
+ A: common_vendor.o(($event) => goPage("/pages/bind/bind"))
|
|
|
}) : {}, {
|
|
|
- A: useAppList.value.length
|
|
|
+ B: useAppList.value.length
|
|
|
}, useAppList.value.length ? {
|
|
|
- B: common_vendor.f(useAppList.value, (item, k0, i0) => {
|
|
|
+ C: common_vendor.f(useAppList.value, (item, k0, i0) => {
|
|
|
return {
|
|
|
a: item.url,
|
|
|
b: common_vendor.t(item.title),
|
|
|
@@ -222,9 +244,9 @@ const _sfc_main = {
|
|
|
};
|
|
|
})
|
|
|
} : {}, {
|
|
|
- C: !useAppList.value.length
|
|
|
+ D: !useAppList.value.length
|
|
|
}, !useAppList.value.length ? {} : {}, {
|
|
|
- D: common_vendor.s(_ctx.__cssVars())
|
|
|
+ E: common_vendor.s(_ctx.__cssVars())
|
|
|
});
|
|
|
};
|
|
|
}
|