diff --git a/ruoyi-ui/src/api/pay/subInfo.js b/ruoyi-ui/src/api/pay/subInfo.js index 0773675..206f6ce 100644 --- a/ruoyi-ui/src/api/pay/subInfo.js +++ b/ruoyi-ui/src/api/pay/subInfo.js @@ -42,3 +42,13 @@ export function delSubInfo(id) { method: 'delete' }) } + + +// 查询订阅信息结束时间 +export function endTimeSubInfo(query) { + return request({ + url: '/pay/subInfo/endTime', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index bfd63a0..821db3b 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -5,28 +5,13 @@ -
+
@@ -60,6 +45,7 @@ import SizeSelect from '@/components/SizeSelect' import Search from '@/components/HeaderSearch' import RuoYiGit from '@/components/RuoYi/Git' import RuoYiDoc from '@/components/RuoYi/Doc' +import { endTimeSubInfo } from "@/api/pay/subInfo"; export default { components: { @@ -95,7 +81,24 @@ export default { } } }, + data(){ + return { + endTime: null + } + }, + created() { + console.log(this.$store.state.user.tenantId,555); + this.getSubscription() + }, methods: { + getSubscription(){ + if(this.$store.state.user.tenantId){ + endTimeSubInfo({tenantId:this.$store.state.user.tenantId}).then(response => { + console.log(response.rows); + this.endTime=response.rows[0].endTime + }); + } + }, toggleSideBar() { this.$store.dispatch('app/toggleSideBar') },