1
This commit is contained in:
@@ -92,6 +92,54 @@
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<!-- 授权信息卡片 -->
|
||||
<Card class="config-card" title="授权信息" :bordered="false" style="margin-bottom: 16px;">
|
||||
<Row :gutter="16">
|
||||
<Col span="8">
|
||||
<div class="detail-item">
|
||||
<span class="label">授权日期:</span>
|
||||
<span class="value">{{ formatDateTime(accountInfo.authorization_date) || '未授权' }}</span>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span="8">
|
||||
<div class="detail-item">
|
||||
<span class="label">授权天数:</span>
|
||||
<span class="value">{{ accountInfo.authorization_days || 0 }} 天</span>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span="8">
|
||||
<div class="detail-item">
|
||||
<span class="label">剩余天数:</span>
|
||||
<span class="value">
|
||||
<Tag :color="getRemainingDaysColor(accountInfo.remaining_days)">
|
||||
{{ accountInfo.remaining_days || 0 }} 天
|
||||
</Tag>
|
||||
</span>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row :gutter="16" style="margin-top: 12px;">
|
||||
<Col span="8">
|
||||
<div class="detail-item">
|
||||
<span class="label">过期时间:</span>
|
||||
<span class="value" :class="{'text-danger': isExpired(accountInfo)}">
|
||||
{{ getExpireDate(accountInfo) }}
|
||||
</span>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span="8">
|
||||
<div class="detail-item">
|
||||
<span class="label">授权状态:</span>
|
||||
<span class="value">
|
||||
<Tag :color="getAuthorizationStatusColor(accountInfo)">
|
||||
{{ getAuthorizationStatus(accountInfo) }}
|
||||
</Tag>
|
||||
</span>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<!-- 配置信息卡片 -->
|
||||
<Card class="config-card" title="基础配置" :bordered="false" style="margin-bottom: 16px;">
|
||||
<Row :gutter="16">
|
||||
@@ -177,13 +225,13 @@
|
||||
<span class="value">{{ deliverConfig.max_deliver || '-' }}</span>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span="12">
|
||||
<Col span="8">
|
||||
<div class="detail-item">
|
||||
<span class="label">过滤关键词:</span>
|
||||
<span class="value">{{ deliverConfig.filter_keywords || '-' }}</span>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span="12">
|
||||
<Col span="8">
|
||||
<div class="detail-item">
|
||||
<span class="label">排除关键词:</span>
|
||||
<span class="value">{{ deliverConfig.exclude_keywords || '-' }}</span>
|
||||
@@ -1371,6 +1419,63 @@ export default {
|
||||
this.$Message.warning('二维码图片加载失败,请刷新重试')
|
||||
},
|
||||
|
||||
// 获取剩余天数颜色
|
||||
getRemainingDaysColor(remainingDays) {
|
||||
if (!remainingDays || remainingDays <= 0) {
|
||||
return 'error'
|
||||
} else if (remainingDays <= 7) {
|
||||
return 'warning'
|
||||
} else {
|
||||
return 'success'
|
||||
}
|
||||
},
|
||||
|
||||
// 获取过期时间
|
||||
getExpireDate(accountInfo) {
|
||||
if (!accountInfo.authorization_date || !accountInfo.authorization_days) {
|
||||
return '未授权'
|
||||
}
|
||||
const authDate = new Date(accountInfo.authorization_date)
|
||||
const expireDate = new Date(authDate.getTime() + accountInfo.authorization_days * 24 * 60 * 60 * 1000)
|
||||
return this.formatDateTime(expireDate)
|
||||
},
|
||||
|
||||
// 判断是否过期
|
||||
isExpired(accountInfo) {
|
||||
const remainingDays = accountInfo.remaining_days || 0
|
||||
return remainingDays <= 0
|
||||
},
|
||||
|
||||
// 获取授权状态
|
||||
getAuthorizationStatus(accountInfo) {
|
||||
if (!accountInfo.authorization_date || !accountInfo.authorization_days) {
|
||||
return '未授权'
|
||||
}
|
||||
const remainingDays = accountInfo.remaining_days || 0
|
||||
if (remainingDays <= 0) {
|
||||
return '已过期'
|
||||
} else if (remainingDays <= 7) {
|
||||
return '即将过期'
|
||||
} else {
|
||||
return '正常'
|
||||
}
|
||||
},
|
||||
|
||||
// 获取授权状态颜色
|
||||
getAuthorizationStatusColor(accountInfo) {
|
||||
if (!accountInfo.authorization_date || !accountInfo.authorization_days) {
|
||||
return 'default'
|
||||
}
|
||||
const remainingDays = accountInfo.remaining_days || 0
|
||||
if (remainingDays <= 0) {
|
||||
return 'error'
|
||||
} else if (remainingDays <= 7) {
|
||||
return 'warning'
|
||||
} else {
|
||||
return 'success'
|
||||
}
|
||||
},
|
||||
|
||||
// 格式化日期时间
|
||||
formatDateTime(datetime) {
|
||||
if (!datetime) return '-'
|
||||
|
||||
Reference in New Issue
Block a user