diff --git a/src/App.vue b/src/App.vue index 61d4597..77e964a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,7 +6,6 @@ export default { onShow: function () { console.log("App Show"); console.log(window.location.href); - }, onHide: function () { console.log("App Hide"); diff --git a/src/pages/detail/index.vue b/src/pages/detail/index.vue index 327cd32..e21c85d 100644 --- a/src/pages/detail/index.vue +++ b/src/pages/detail/index.vue @@ -78,7 +78,7 @@ import { closeWebview, hasPermission } from "../../../utils/index.js"; import { onLoad } from "@dcloudio/uni-app"; 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 isDetail = ref(false); const loading = ref(false); @@ -100,6 +100,7 @@ onLoad((options) => { state.pid = options.pid; state.boxRelBucketStatus = options.boxRelBucketStatus; paintingDetail(); + getBtngetRules(); }); const paintingDetail = async () => { loading.value = true; @@ -142,6 +143,15 @@ const runTimeEnv = () => { 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 }); + } +};