fix
This commit is contained in:
parent
68f9034042
commit
09bfce6ef5
@ -6,7 +6,6 @@ export default {
|
|||||||
onShow: function () {
|
onShow: function () {
|
||||||
console.log("App Show");
|
console.log("App Show");
|
||||||
console.log(window.location.href);
|
console.log(window.location.href);
|
||||||
|
|
||||||
},
|
},
|
||||||
onHide: function () {
|
onHide: function () {
|
||||||
console.log("App Hide");
|
console.log("App Hide");
|
||||||
|
@ -78,7 +78,7 @@ import { closeWebview, hasPermission } from "../../../utils/index.js";
|
|||||||
|
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import useToast from "@/hooks/toast/useToast.js";
|
import useToast from "@/hooks/toast/useToast.js";
|
||||||
import { pbDetail, outbound } from "@/api/login.js";
|
import { pbDetail, outbound, getRules } from "@/api/login.js";
|
||||||
const { showMessage } = useToast();
|
const { showMessage } = useToast();
|
||||||
const isDetail = ref(false);
|
const isDetail = ref(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@ -100,6 +100,7 @@ onLoad((options) => {
|
|||||||
state.pid = options.pid;
|
state.pid = options.pid;
|
||||||
state.boxRelBucketStatus = options.boxRelBucketStatus;
|
state.boxRelBucketStatus = options.boxRelBucketStatus;
|
||||||
paintingDetail();
|
paintingDetail();
|
||||||
|
getBtngetRules();
|
||||||
});
|
});
|
||||||
const paintingDetail = async () => {
|
const paintingDetail = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@ -142,6 +143,15 @@ const runTimeEnv = () => {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const getBtngetRules = async () => {
|
||||||
|
const res = await getRules({});
|
||||||
|
if (res.status === 0) {
|
||||||
|
const ruleBtn = res.data.MyButtonAuths?.map((button) => button.Url) || [];
|
||||||
|
uni.setStorageSync("ruleBtn", ruleBtn);
|
||||||
|
} else {
|
||||||
|
showMessage({ type: "error", message: res.msg });
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
import { ref, reactive, onBeforeMount } from "vue";
|
import { ref, reactive, onBeforeMount } from "vue";
|
||||||
import useToast from "@/hooks/toast/useToast.js";
|
import useToast from "@/hooks/toast/useToast.js";
|
||||||
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
import { onLoad, onReachBottom } from "@dcloudio/uni-app";
|
||||||
import { creChangepainting, add } from "@/api/login.js";
|
import { creChangepainting, add, getRules } from "@/api/login.js";
|
||||||
import { closeWebview, hasPermission } from "../../../utils/index";
|
import { closeWebview, hasPermission } from "../../../utils/index";
|
||||||
|
|
||||||
const { showMessage } = useToast();
|
const { showMessage } = useToast();
|
||||||
@ -118,6 +118,7 @@ onLoad((options) => {
|
|||||||
state.id = options.id;
|
state.id = options.id;
|
||||||
state.pid = options.pid;
|
state.pid = options.pid;
|
||||||
paintingList();
|
paintingList();
|
||||||
|
getBtngetRules();
|
||||||
});
|
});
|
||||||
const groupChange = (e) => {
|
const groupChange = (e) => {
|
||||||
state.tableData.forEach((item) => {
|
state.tableData.forEach((item) => {
|
||||||
@ -246,6 +247,15 @@ const runTimeEnv = () => {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const getBtngetRules = async () => {
|
||||||
|
const res = await getRules({});
|
||||||
|
if (res.status === 0) {
|
||||||
|
const ruleBtn = res.data.MyButtonAuths?.map((button) => button.Url) || [];
|
||||||
|
uni.setStorageSync("ruleBtn", ruleBtn);
|
||||||
|
} else {
|
||||||
|
showMessage({ type: "error", message: res.msg });
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -248,7 +248,6 @@ const getBtngetRules = async () => {
|
|||||||
const res = await getRules({});
|
const res = await getRules({});
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
const ruleBtn = res.data.MyButtonAuths?.map((button) => button.Url) || [];
|
const ruleBtn = res.data.MyButtonAuths?.map((button) => button.Url) || [];
|
||||||
console.log(123, ruleBtn);
|
|
||||||
uni.setStorageSync("ruleBtn", ruleBtn);
|
uni.setStorageSync("ruleBtn", ruleBtn);
|
||||||
} else {
|
} else {
|
||||||
showMessage({ type: "error", message: res.msg });
|
showMessage({ type: "error", message: res.msg });
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
import { ref, reactive, onBeforeMount } from "vue";
|
import { ref, reactive, onBeforeMount } from "vue";
|
||||||
import useToast from "@/hooks/toast/useToast.js";
|
import useToast from "@/hooks/toast/useToast.js";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
import { freebox, bind, check_freebox, cancel } from "@/api/login.js";
|
import { freebox, bind, check_freebox, cancel, getRules } from "@/api/login.js";
|
||||||
import { closeWebview, hasPermission } from "../../../utils/index";
|
import { closeWebview, hasPermission } from "../../../utils/index";
|
||||||
const { showMessage } = useToast();
|
const { showMessage } = useToast();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@ -72,6 +72,7 @@ onLoad((options) => {
|
|||||||
state.id = options.id;
|
state.id = options.id;
|
||||||
state.pid = options.pid;
|
state.pid = options.pid;
|
||||||
bindShelfHole();
|
bindShelfHole();
|
||||||
|
getBtngetRules();
|
||||||
});
|
});
|
||||||
|
|
||||||
const bindShelfHole = async () => {
|
const bindShelfHole = async () => {
|
||||||
@ -150,6 +151,15 @@ const runTimeEnv = () => {
|
|||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
};
|
};
|
||||||
|
const getBtngetRules = async () => {
|
||||||
|
const res = await getRules({});
|
||||||
|
if (res.status === 0) {
|
||||||
|
const ruleBtn = res.data.MyButtonAuths?.map((button) => button.Url) || [];
|
||||||
|
uni.setStorageSync("ruleBtn", ruleBtn);
|
||||||
|
} else {
|
||||||
|
showMessage({ type: "error", message: res.msg });
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
Loading…
Reference in New Issue
Block a user