5 files modified
1 files added
| | |
| | | # VUE_APP_API_BASE_URL= https://www.prudentcapitals.net/ |
| | | # VUE_APP_API_BASE_URL=https://api.guosen.org/ |
| | | |
| | | VUE_APP_API_BASE_URL=https://dgapi.shengliankeji.top/ |
| | | # VUE_APP_API_BASE_URL=http://192.168.10.5:8091/ |
| | | # VUE_APP_API_BASE_URL=https://dgapi.shengliankeji.top/ |
| | | VUE_APP_API_BASE_URL=http://192.168.10.5:8219/ |
| | |
| | | adminsetSiteStyle: '/api/admin/setSiteStyle.do', // 设置网站风格 |
| | | admingetSiteStyle: '/api/admin/getSiteStyle.do', // 获取网站风格 |
| | | dksp: '/admin/dksp.do', // 通过||拒绝贷款 |
| | | pendingCount: '/admin/notification/pendingCount.do', // 获取待处理数量 |
| | | } |
| | | |
| | | /** |
| | |
| | | }) |
| | | } |
| | | |
| | | export function getPendingCount() { |
| | | return request({ |
| | | url: userApi.pendingCount, |
| | | method: 'post', |
| | | }) |
| | | } |
| | | |
| | | export function userdelete(parameter) { |
| | | return request({ |
| | | url: userApi.userdelete, |
| New file |
| | |
| | | <template> |
| | | <div v-if="totalCount > 0" class="notification-badge"> |
| | | <div class="badge-wrapper" @click="handleClick"> |
| | | <a-badge :count="totalCount" :number-style="{ backgroundColor: '#ff4d4f' }"> |
| | | <a-icon type="bell" :style="{ fontSize: '24px', color: '#1890ff', cursor: 'pointer' }" /> |
| | | </a-badge> |
| | | </div> |
| | | <div class="notification-popover" v-if="showPopover" @click.stop> |
| | | <div class="notification-item" @click="goToRecharge"> |
| | | <span>充值待处理</span> |
| | | <a-badge :count="rechargeCount" :number-style="{ backgroundColor: '#ff4d4f' }" /> |
| | | </div> |
| | | <div class="notification-item" @click="goToWithdraw"> |
| | | <span>提现待处理</span> |
| | | <a-badge :count="withdrawCount" :number-style="{ backgroundColor: '#ff4d4f' }" /> |
| | | </div> |
| | | <div class="notification-item" @click="goToAuth"> |
| | | <span>实名认证待处理</span> |
| | | <a-badge :count="authCount" :number-style="{ backgroundColor: '#ff4d4f' }" /> |
| | | </div> |
| | | </div> |
| | | <div v-if="showPopover" class="popover-mask" @click="closePopover"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getPendingCount } from '@/api/home' |
| | | |
| | | export default { |
| | | name: 'NotificationBadge', |
| | | data() { |
| | | return { |
| | | rechargeCount: 0, |
| | | withdrawCount: 0, |
| | | authCount: 0, |
| | | totalCount: 0, |
| | | showPopover: false, |
| | | timer: null |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.fetchPendingCount() |
| | | this.startPolling() |
| | | document.addEventListener('click', this.handleDocumentClick) |
| | | }, |
| | | beforeDestroy() { |
| | | this.stopPolling() |
| | | document.removeEventListener('click', this.handleDocumentClick) |
| | | }, |
| | | methods: { |
| | | fetchPendingCount() { |
| | | getPendingCount() |
| | | .then((res) => { |
| | | if (res.status === 0 && res.data) { |
| | | this.rechargeCount = res.data.rechargeCount || 0 |
| | | this.withdrawCount = res.data.withdrawCount || 0 |
| | | this.authCount = res.data.authCount || 0 |
| | | this.totalCount = res.data.totalCount || 0 |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error('获取待处理数量失败', error) |
| | | }) |
| | | }, |
| | | startPolling() { |
| | | this.timer = setInterval(() => { |
| | | this.fetchPendingCount() |
| | | }, 30000) // 每30秒轮询一次 |
| | | }, |
| | | stopPolling() { |
| | | if (this.timer) { |
| | | clearInterval(this.timer) |
| | | this.timer = null |
| | | } |
| | | }, |
| | | handleClick(e) { |
| | | e.stopPropagation() |
| | | this.showPopover = !this.showPopover |
| | | }, |
| | | closePopover() { |
| | | this.showPopover = false |
| | | }, |
| | | handleDocumentClick(e) { |
| | | if (this.showPopover && !this.$el.contains(e.target)) { |
| | | this.showPopover = false |
| | | } |
| | | }, |
| | | goToRecharge() { |
| | | this.$router.push('/capital/rechargelist') |
| | | this.showPopover = false |
| | | }, |
| | | goToWithdraw() { |
| | | this.$router.push('/capital/withdrawallist') |
| | | this.showPopover = false |
| | | }, |
| | | goToAuth() { |
| | | this.$router.push('/userlist') |
| | | this.showPopover = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .notification-badge { |
| | | position: fixed; |
| | | right: 30px; |
| | | bottom: 30px; |
| | | z-index: 1000; |
| | | } |
| | | |
| | | .badge-wrapper { |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .popover-mask { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | z-index: 999; |
| | | } |
| | | |
| | | .notification-popover { |
| | | position: absolute; |
| | | bottom: 50px; |
| | | right: 0; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| | | padding: 12px 0; |
| | | min-width: 200px; |
| | | } |
| | | |
| | | .notification-item { |
| | | padding: 12px 16px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | cursor: pointer; |
| | | transition: background-color 0.3s; |
| | | |
| | | &:hover { |
| | | background-color: #f5f5f5; |
| | | } |
| | | |
| | | span { |
| | | font-size: 14px; |
| | | color: #333; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | |
| | | <global-footer /> |
| | | </template> |
| | | <router-view /> |
| | | <notification-badge /> |
| | | </pro-layout> |
| | | </template> |
| | | |
| | |
| | | import RightContent from '@/components/GlobalHeader/RightContent' |
| | | import GlobalFooter from '@/components/GlobalFooter' |
| | | import Ads from '@/components/Other/CarbonAds' |
| | | import NotificationBadge from '@/components/NotificationBadge' |
| | | |
| | | export default { |
| | | name: 'BasicLayout', |
| | |
| | | SettingDrawer, |
| | | RightContent, |
| | | GlobalFooter, |
| | | Ads |
| | | Ads, |
| | | NotificationBadge |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | <div slot="footer" style="display: flex; justify-content: center; align-items: center"> |
| | | <a-button type="primary" style="background-color: " @click="OkeditOrderdialog(3)">驳回</a-button> |
| | | <a-button type="primary" @click="OkeditOrderdialog(2)">通过</a-button> |
| | | <a-button type="primary" @click="OkeditOrderdialog(1)">代付1</a-button> |
| | | <a-button type="primary" @click="OkeditOrderdialog(4)">代付2</a-button> |
| | | <!-- <a-button type="primary" @click="OkeditOrderdialog(1)">代付1</a-button> |
| | | <a-button type="primary" @click="OkeditOrderdialog(4)">代付2</a-button> --> |
| | | </div> |
| | | </a-modal> |
| | | </page-header-wrapper> |
| | |
| | | customRender: 'withStatus' |
| | | }, |
| | | }, |
| | | // { |
| | | // title: '提现银行', |
| | | // dataIndex: 'bankName', |
| | | // align: 'center', |
| | | // }, |
| | | // { |
| | | // title: '提现支行', |
| | | // dataIndex: 'bankAddress', |
| | | // align: 'center', |
| | | // width: 200, |
| | | // }, |
| | | { |
| | | title: '提现银行', |
| | | dataIndex: 'bankName', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: '提现支行', |
| | | dataIndex: 'bankAddress', |
| | | align: 'center', |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: '银行号码', |
| | | title: '银行号码或提现地址', |
| | | dataIndex: 'bankNo', |
| | | align: 'center', |
| | | }, |
| | |
| | | switch (value.accectType) { |
| | | case 'US': |
| | | return `美元(${value.symbol} ${value.availableBalance})` |
| | | case 'JP': |
| | | return `日元(${value.symbol} ${value.availableBalance})` |
| | | case 'MAS': |
| | | return `马来西亚(${value.symbol} ${value.availableBalance})` |
| | | case 'HK': |