feat: add online payment management and checkout
Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
209
frontend/src/views/PaymentsPanel.vue
Normal file
209
frontend/src/views/PaymentsPanel.vue
Normal file
@@ -0,0 +1,209 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
|
||||
import { formatDateTime } from '../date-format'
|
||||
import { getPaymentChannel, savePaymentChannel, listPaymentOrders, type PaymentChannelConfiguration, type PaymentChannelMetadata, type PaymentChannelSecrets, type PaymentOrder } from '../payments-api'
|
||||
import type { PaymentChannel } from '../orders-api'
|
||||
import { ApiError } from '../api'
|
||||
function configurationError(error:unknown, fallback:string) {
|
||||
if (!(error instanceof ApiError)) return fallback
|
||||
if (error.status === 401) return '登录已失效,请重新登录'
|
||||
if (error.status === 403) return '无权限访问支付配置,请联系管理员'
|
||||
if (error.status === 404) return '服务版本不支持该接口,请更新并重启服务'
|
||||
if (error.code === 'payment_schema_unavailable') return '支付配置数据库结构未就绪,请管理员备份数据库并执行最新迁移后重启服务'
|
||||
if (error.code === 'configuration_key_unavailable') return '支付配置无法解密,请检查服务端支付加密主密钥'
|
||||
return fallback
|
||||
}
|
||||
type Field = { key:keyof PaymentChannelMetadata; label:string; help:string }
|
||||
type SecretField = { key:keyof PaymentChannelSecrets; label:string; help:string }
|
||||
const ordinaryFields:Record<PaymentChannel, Field[]> = {
|
||||
alipay:[
|
||||
{key:'app_id',label:'应用 ID',help:'来源:支付宝开放平台 → 我的应用 → 应用详情。'},
|
||||
{key:'seller_id',label:'卖家 ID',help:'来源:支付宝商家/开放平台账户信息中的商户 PID。'},
|
||||
{key:'notify_url',label:'HTTPS 通知地址',help:'来源:本系统部署的公网 HTTPS 域名,加上 /api/v1/payments/alipay/notify 路径;反向代理有前缀时按实际地址填写。'},
|
||||
],
|
||||
wechat:[
|
||||
{key:'app_id',label:'应用 ID',help:'来源:与微信支付商户号绑定的公众号、小程序或开放平台 AppID。'},
|
||||
{key:'mch_id',label:'商户 ID',help:'来源:微信支付商户平台 → 账户中心 → 商户信息。'},
|
||||
{key:'serial_no',label:'商户证书序列号',help:'来源:微信支付商户平台 → 账户中心 → API 安全 → 商户 API 证书详情。'},
|
||||
{key:'public_key_id',label:'微信支付公钥 ID(推荐)',help:'来源:API 安全 → 微信支付公钥 → 申请/下载公钥后的公钥详情。通常以 PUB_KEY_ID_ 开头。'},
|
||||
{key:'platform_serial',label:'平台证书序列号(兼容)',help:'来源:已通过微信支付官方工具或证书接口获取的微信支付平台证书,读取其序列号;兼容方案使用。'},
|
||||
{key:'notify_url',label:'HTTPS 通知地址',help:'来源:本系统部署的公网 HTTPS 域名,加上 /api/v1/payments/wechat/notify 路径;反向代理有前缀时按实际地址填写。'},
|
||||
],
|
||||
}
|
||||
const secretFields:Record<PaymentChannel, SecretField[]> = {
|
||||
alipay:[
|
||||
{key:'private_key',label:'商户私钥',help:'来源:配置应用接口加签时,由支付宝密钥工具或本地工具生成并保存的应用 RSA 私钥;与上传的应用公钥配对。'},
|
||||
{key:'public_key',label:'支付宝验签公钥',help:'来源:支付宝开放平台应用 → 开发设置 → 接口加签;使用支付宝公钥。'},
|
||||
],
|
||||
wechat:[
|
||||
{key:'private_key',label:'商户私钥',help:'来源:申请商户 API 证书时由证书工具生成并保存的 apiclient_key.pem。填写完整 PEM 私钥,与商户证书配对。'},
|
||||
{key:'public_key',label:'微信支付公钥(推荐)',help:'来源:API 安全 → 微信支付公钥 → 下载的 PEM 公钥文件,必须与上方公钥 ID 配对。'},
|
||||
{key:'platform_public_key',label:'平台证书 / 验签公钥(兼容)',help:'来源:从已获取的微信支付平台证书中提取的 RSA 公钥,或完整 PEM 平台证书;必须与上方平台证书序列号配对。'},
|
||||
{key:'api_v3_key',label:'APIv3 密钥',help:'来源:API 安全 → APIv3 密钥;必须是当前设置的 32 字节密钥。'},
|
||||
],
|
||||
}
|
||||
type ChannelForm = { channel:PaymentChannel; config:PaymentChannelConfiguration|null; enabled:boolean; fields:PaymentChannelMetadata; secrets:PaymentChannelSecrets; loading:boolean; saving:boolean; error:string; success:string }
|
||||
const channels = ref<ChannelForm[]>(['alipay','wechat'].map(channel => ({channel:channel as PaymentChannel,config:null,enabled:false,fields:{app_id:'',notify_url:''},secrets:{},loading:true,saving:false,error:'',success:''})))
|
||||
const expandedChannels = ref<Record<PaymentChannel, boolean>>({alipay:false,wechat:false})
|
||||
const saving = computed(() => channels.value.some(form => form.saving))
|
||||
const sourceName = (source:string) => ({environment:'服务端环境变量',database:'后台配置',none:'未配置'} as Record<string,string>)[source] || '未知来源'
|
||||
// Allowlist ordinary fields and boolean flags; never assign returned secret material.
|
||||
function applyConfiguration(form:ChannelForm, value:PaymentChannelConfiguration) {
|
||||
form.config = {channel:form.channel,enabled:value.enabled,configuration_source:value.configuration_source,required_settings:[],version:value.version,effective:value.effective,can_save:value.can_save,fields:{app_id:'',notify_url:''},secret_fields:[]}
|
||||
form.enabled = value.enabled === true; form.fields = {app_id:'',notify_url:''}; form.secrets = {}
|
||||
for (const field of ordinaryFields[form.channel]) form.fields[field.key] = value.fields[field.key] || ''
|
||||
for (const field of secretFields[form.channel]) form.config.secret_fields.push({name:field.key,configured:value.secret_fields.some(flag => flag.name === field.key && flag.configured === true)})
|
||||
}
|
||||
function configured(form:ChannelForm, key:keyof PaymentChannelSecrets) { return form.config?.secret_fields.some(field => field.name === key && field.configured) === true }
|
||||
async function loadChannel(form:ChannelForm, current:number) {
|
||||
form.loading = true; form.config = null; form.secrets = {}; form.error = ''; form.success = ''
|
||||
try {
|
||||
const response = await getPaymentChannel(form.channel)
|
||||
if (current === request) applyConfiguration(form,response.data.data)
|
||||
} catch (error) { if (current === request) form.error = configurationError(error, '渠道配置加载失败,请刷新重试') }
|
||||
finally { if (current === request) form.loading = false }
|
||||
}
|
||||
function validate(form:ChannelForm) {
|
||||
if (!form.enabled) return ''
|
||||
for (const field of ordinaryFields[form.channel]) {
|
||||
if (form.channel === 'wechat' && ['public_key_id','platform_serial'].includes(field.key)) continue
|
||||
if (!form.fields[field.key]?.trim()) return `请填写${field.label}`
|
||||
}
|
||||
try {
|
||||
const url = new URL(form.fields.notify_url)
|
||||
if (url.protocol !== 'https:' || url.username || url.password) return '通知地址必须为不含账号密码的 HTTPS 地址'
|
||||
} catch { return '请填写有效的 HTTPS 通知地址' }
|
||||
const hasSecret = (key:keyof PaymentChannelSecrets) => !!form.secrets[key]?.trim() || configured(form,key)
|
||||
for (const field of secretFields[form.channel]) {
|
||||
if (form.channel === 'wechat' && ['public_key','platform_public_key'].includes(field.key)) continue
|
||||
if (!hasSecret(field.key)) return `请填写${field.label}`
|
||||
}
|
||||
if (form.channel === 'wechat') {
|
||||
const publicID = form.fields.public_key_id?.trim() || ''
|
||||
const platformID = form.fields.platform_serial?.trim() || ''
|
||||
if (publicID && (!/^PUB_KEY_ID_.+/.test(publicID) || !hasSecret('public_key'))) return '请完整填写微信支付公钥 ID 和微信支付公钥'
|
||||
if (platformID && !hasSecret('platform_public_key')) return '请完整填写平台证书序列号和平台验签公钥'
|
||||
if (hasSecret('public_key') && !publicID) return '请填写微信支付公钥 ID'
|
||||
if (hasSecret('platform_public_key') && !platformID) return '请填写平台证书序列号'
|
||||
if (!publicID && !platformID) return '请至少配置一组微信支付公钥或平台证书验签方案'
|
||||
}
|
||||
if (form.channel === 'wechat' && form.secrets.api_v3_key && new TextEncoder().encode(form.secrets.api_v3_key).length !== 32) return 'APIv3 密钥必须为 32 字节'
|
||||
return ''
|
||||
}
|
||||
async function saveChannel(form:ChannelForm) {
|
||||
if (form.saving || form.loading || loading.value || !form.config || form.config.can_save === false) return
|
||||
form.success = ''; form.error = validate(form)
|
||||
if (form.error) return
|
||||
const current = request
|
||||
const secrets:PaymentChannelSecrets = {}
|
||||
for (const field of secretFields[form.channel]) if (form.secrets[field.key]?.trim()) secrets[field.key] = form.secrets[field.key]
|
||||
const fields:PaymentChannelMetadata = {app_id:'',notify_url:''}
|
||||
for (const field of ordinaryFields[form.channel]) fields[field.key] = form.fields[field.key]?.trim() || ''
|
||||
form.saving = true; form.secrets = {}
|
||||
try {
|
||||
const response = await savePaymentChannel(form.channel,{enabled:form.enabled,fields,secrets})
|
||||
if (current !== request) return
|
||||
applyConfiguration(form,response.data.data)
|
||||
form.success = '配置保存成功;配置校验不代表真实交易联调通过'
|
||||
} catch (error) {
|
||||
// Use only fixed allowlisted messages, never server messages or credential values.
|
||||
if (current === request) form.error = configurationError(error, '保存失败:服务端校验未通过或暂不可用,请核对配置与密钥格式后重试')
|
||||
} finally { if (current === request) form.saving = false }
|
||||
}
|
||||
|
||||
const orders = ref<PaymentOrder[]>([])
|
||||
const loading = ref(false), ordersError = ref('')
|
||||
const channelFilter = ref(''), statusFilter = ref(''), query = ref(''), page = ref(1)
|
||||
const channelName = (channel:string) => ({alipay:'支付宝',wechat:'微信支付'} as Record<string,string>)[channel] || '未知渠道'
|
||||
const statusName = (status:string) => ({created:'待支付',pending:'待支付',paid:'已支付',failed:'失败',expired:'已失效',cancelled:'已取消',closed:'已关闭',pending_payment:'待支付',issued:'授权已开通',authorization_removed:'授权已移除'} as Record<string,string>)[status] || '未知状态'
|
||||
const stateClass = (status:string) => ['paid','issued'].includes(status) ? 'is-success' : ['created','pending','pending_payment'].includes(status) ? 'is-pending' : 'is-inactive'
|
||||
const statuses = computed(() => [...new Set(orders.value.map(row => row.status))])
|
||||
const filtered = computed(() => orders.value.filter(row => (!channelFilter.value || row.channel === channelFilter.value) && (!statusFilter.value || row.status === statusFilter.value) && (!query.value.trim() || [row.order_id,row.merchant_order_no,row.channel_trade_no || ''].some(value => String(value).toLowerCase().includes(query.value.trim().toLowerCase())))))
|
||||
const pagedOrders = computed(() => filtered.value.slice((page.value - 1) * 20, page.value * 20))
|
||||
watch([channelFilter, statusFilter, query], () => { page.value = 1 })
|
||||
const amount = (row:PaymentOrder) => `${(row.amount_cents / 100).toFixed(2)} ${row.currency}`
|
||||
const dateColumns = [{key:'paid_at',label:'支付时间'},{key:'created_at',label:'创建时间'},{key:'expires_at',label:'二维码展示期限'}] as const
|
||||
let request = 0
|
||||
async function refresh() {
|
||||
if (saving.value) return
|
||||
const current = ++request
|
||||
page.value = 1; loading.value = true; ordersError.value = ''; orders.value = []
|
||||
const [orderResult] = await Promise.all([
|
||||
Promise.allSettled([listPaymentOrders()]).then(results => results[0]!),
|
||||
Promise.all(channels.value.map(form => loadChannel(form,current))),
|
||||
])
|
||||
if (current !== request) return
|
||||
if (orderResult.status === 'fulfilled') orders.value = orderResult.value.data.data
|
||||
else ordersError.value = '支付流水加载失败,请刷新重试'
|
||||
loading.value = false
|
||||
}
|
||||
function reset() { channelFilter.value = ''; statusFilter.value = ''; query.value = ''; page.value = 1 }
|
||||
onMounted(refresh)
|
||||
onUnmounted(() => { request++; channels.value.forEach(form => { form.secrets = {} }) })
|
||||
</script>
|
||||
<template>
|
||||
<section class="payment-workspace" aria-labelledby="payment-title">
|
||||
<header class="payment-heading"><div><p class="payment-eyebrow">支付管理</p><h2 id="payment-title">支付渠道与流水</h2><p class="payment-description">管理员为已有客户创建订单后,在订单页面生成付款链接。</p></div><el-button :loading="loading" :disabled="loading || saving" @click="refresh"><span aria-hidden="true">↻</span> 刷新支付数据</el-button></header>
|
||||
<section class="payment-config" aria-labelledby="channel-title">
|
||||
<div class="payment-subheading"><h3 id="channel-title">渠道配置</h3><span class="payment-muted">管理员配置 · 密钥不回显</span></div>
|
||||
<p class="payment-description">普通字段可编辑;密钥留空保留现值,填写新值表示替换。配置校验不代表真实交易联调通过。</p>
|
||||
<p v-if="loading" role="status">正在加载支付数据…</p>
|
||||
<div class="channel-grid"><article v-for="form in channels" :key="form.channel" class="channel-card" :data-channel="form.channel">
|
||||
<button type="button" class="channel-toggle" :aria-label="`${channelName(form.channel)}渠道配置`" :aria-expanded="expandedChannels[form.channel]" :aria-controls="`channel-details-${form.channel}`" @click="expandedChannels[form.channel] = !expandedChannels[form.channel]">
|
||||
<span class="channel-toggle-title">{{ channelName(form.channel) }}<span v-if="form.config?.enabled !== undefined" class="payment-state" :class="form.config?.enabled ? 'is-success' : 'is-inactive'"><i aria-hidden="true"></i>{{ form.config?.enabled ? '已启用' : '未启用' }}</span></span>
|
||||
<span class="channel-toggle-action">{{ expandedChannels[form.channel] ? '收起' : '展开配置' }} <span aria-hidden="true">{{ expandedChannels[form.channel] ? '⌃' : '⌄' }}</span></span>
|
||||
</button>
|
||||
<p v-if="form.loading" role="status">正在加载渠道配置…</p>
|
||||
<div v-show="expandedChannels[form.channel]" :id="`channel-details-${form.channel}`" class="channel-details">
|
||||
<template v-if="form.config">
|
||||
<p>配置来源:{{ sourceName(form.config.configuration_source || '') }}</p>
|
||||
<p v-if="form.config.version != null">配置版本:{{ form.config.version }}</p>
|
||||
<p v-if="form.config.effective !== undefined">{{ form.config.effective ? '已生效' : '未生效' }}</p>
|
||||
<p v-if="form.config.can_save === false" class="payment-error" role="alert">当前不能保存配置,请联系管理员检查服务端支付配置加密主密钥及配置服务。</p>
|
||||
<form autocomplete="off" @submit.prevent="saveChannel(form)"><fieldset :disabled="form.saving || loading || form.config.can_save === false">
|
||||
<label class="channel-enabled"><input v-model="form.enabled" type="checkbox" :aria-label="`${channelName(form.channel)}启用渠道`">启用渠道</label>
|
||||
<label v-for="field in ordinaryFields[form.channel]" :key="field.key" class="channel-field"><span>{{ field.label }}</span><small class="channel-help">{{ field.help }}</small><el-input v-model="form.fields[field.key]" :disabled="form.saving || loading || form.config.can_save === false" :aria-label="`${channelName(form.channel)}${field.label}`" autocomplete="off"/></label>
|
||||
<label v-for="field in secretFields[form.channel]" :key="field.key" class="channel-field"><span>{{ field.label }} <small>{{ configured(form,field.key) ? '已配置' : '未配置' }}</small></span><small class="channel-help">{{ field.help }}</small><el-input v-model="form.secrets[field.key]" :disabled="form.saving || loading || form.config.can_save === false" type="password" :aria-label="`${channelName(form.channel)}${field.label}`" autocomplete="new-password" placeholder="留空保留现值;填写新值替换"/></label>
|
||||
<el-button native-type="submit" type="primary" :loading="form.saving" :disabled="form.saving || loading || form.config.can_save === false">{{ form.saving ? '正在保存…' : '保存配置' }}</el-button>
|
||||
</fieldset></form>
|
||||
</template>
|
||||
</div>
|
||||
<p v-if="form.error" class="payment-error" role="alert">{{ form.error }}</p>
|
||||
<p v-if="form.success" class="payment-success" role="status">{{ form.success }}</p>
|
||||
</article></div>
|
||||
</section>
|
||||
<section class="payment-list" aria-label="支付流水列表">
|
||||
<div class="payment-list-toolbar"><div class="payment-list-title"><h3>支付流水</h3><span class="payment-count">{{ filtered.length }} / {{ orders.length }} 条</span></div><router-link class="payment-order-link" to="/orders">去订单创建付款链接 →</router-link></div>
|
||||
<p class="payment-description">最近 100 条支付流水,筛选与分页仅作用于本次加载的数据,数量不代表服务端全部记录。日期为本地时间。</p>
|
||||
<div class="payment-filters"><el-input v-model="query" clearable aria-label="搜索支付流水" placeholder="订单 ID / 商户单号 / 渠道单号"/><label class="payment-filter"><span>渠道</span><el-select v-model="channelFilter" aria-label="支付渠道筛选"><el-option value="" label="全部渠道"/><el-option value="alipay" label="支付宝"/><el-option value="wechat" label="微信支付"/></el-select></label><label class="payment-filter"><span>状态</span><el-select v-model="statusFilter" aria-label="支付状态筛选"><el-option value="" label="全部状态"/><el-option v-for="status in statuses" :key="status" :value="status" :label="statusName(status)"/></el-select></label><el-button @click="reset">重置筛选</el-button></div>
|
||||
<p v-if="ordersError" class="payment-error" role="alert">{{ ordersError }}</p>
|
||||
<div class="payment-table-wrap"><el-table :data="pagedOrders" row-key="id" v-loading="loading" :empty-text="loading ? '正在加载支付数据…' : ordersError ? '支付流水加载失败,请刷新重试' : '暂无符合条件的支付流水'">
|
||||
<el-table-column prop="id" label="支付 ID" width="90"/><el-table-column prop="order_id" label="订单 ID" width="90"/>
|
||||
<el-table-column label="商户单号" min-width="200"><template #default="{ row }"><code class="payment-trade" :title="row.merchant_order_no">{{ row.merchant_order_no }}</code></template></el-table-column>
|
||||
<el-table-column label="渠道" width="100"><template #default="{ row }">{{ channelName(row.channel) }}</template></el-table-column>
|
||||
<el-table-column label="渠道交易号" min-width="200"><template #default="{ row }"><code class="payment-trade" :title="row.channel_trade_no || ''">{{ row.channel_trade_no || '—' }}</code></template></el-table-column>
|
||||
<el-table-column label="金额" width="140"><template #default="{ row }">{{ amount(row) }}</template></el-table-column>
|
||||
<el-table-column label="支付状态" width="130"><template #default="{ row }"><span class="payment-state" :class="stateClass(row.status)"><i aria-hidden="true"></i>{{ statusName(row.status) }}</span></template></el-table-column>
|
||||
<el-table-column label="订单状态" width="150"><template #default="{ row }"><span class="payment-state" :class="stateClass(row.order_status)"><i aria-hidden="true"></i>{{ statusName(row.order_status) }}</span></template></el-table-column>
|
||||
<el-table-column label="授权 ID" width="90"><template #default="{ row }">{{ row.license_id ?? '—' }}</template></el-table-column>
|
||||
<el-table-column v-for="column in dateColumns" :key="column.key" :label="column.label" width="190"><template #default="{ row }">{{ formatDateTime(row[column.key]) }}</template></el-table-column>
|
||||
<el-table-column label="异常" min-width="260"><template #default="{ row }">{{ row.last_error ? '存在支付异常,请核查服务端记录' : '—' }}</template></el-table-column>
|
||||
</el-table></div>
|
||||
<div class="payment-pagination"><span>本次加载 {{ orders.length }} 条 · 筛选后 {{ filtered.length }} 条 · 每页 20 条</span><el-pagination v-model:current-page="page" :total="filtered.length" :page-size="20" layout="prev, pager, next"/></div>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
<style scoped>
|
||||
.payment-workspace{--payment-line:#e5eaf0;--payment-muted:#687586;color:#17202b}
|
||||
.payment-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;padding-bottom:21px;border-bottom:1px solid var(--payment-line)}.payment-heading h2{margin:0;font-size:20px;line-height:1.35}.payment-eyebrow{margin:0 0 5px;color:#1769e0;font-size:11px;font-weight:700}
|
||||
.payment-description{margin:5px 0 0;color:var(--payment-muted);font-size:13px;line-height:1.6}.payment-config{margin-top:20px;padding:18px 20px;background:#f7f9fc;border:1px solid var(--payment-line);border-radius:7px}
|
||||
.payment-subheading,.payment-list-toolbar,.payment-list-title,.payment-pagination{display:flex;align-items:center;gap:12px}.payment-subheading,.payment-list-toolbar,.payment-pagination{justify-content:space-between}.payment-subheading h3,.payment-subheading h4,.payment-list-title h3{margin:0;font-size:14px;font-weight:650}.payment-muted,.payment-count{color:var(--payment-muted);font-size:12px}
|
||||
.channel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:17px}.channel-card{border:1px solid var(--payment-line);border-radius:6px;padding:16px;background:#fff;min-width:0;overflow-wrap:anywhere}.channel-card p,.channel-card li{color:#526173;font-size:12px}.channel-card ul{margin:8px 0 0;padding-left:18px}.channel-card li{margin:6px 0}
|
||||
.channel-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.channel-toggle-title{display:flex;align-items:center;gap:12px;font-size:14px;font-weight:650}.channel-toggle-action{flex-shrink:0;color:#1769e0;font-size:12px}.channel-toggle:focus-visible{outline:2px solid #1769e0;outline-offset:5px;border-radius:3px}.channel-details{margin-top:14px;padding-top:2px;border-top:1px solid var(--payment-line)}
|
||||
.channel-card fieldset{border:0;padding:0;margin:14px 0 0;min-width:0}.channel-enabled{display:flex;align-items:center;gap:8px;font-size:13px}.channel-field{display:flex;flex-direction:column;gap:6px;margin:13px 0;color:#526173;font-size:12px}.channel-field>span small{margin-left:8px;color:var(--payment-muted)}.channel-help{display:block;margin:0;color:#7a8797;font-size:11px;line-height:1.5}.payment-success{color:#16845b;font-size:13px;line-height:1.6}
|
||||
.payment-list{margin-top:24px}.payment-list-toolbar{min-height:36px;margin-bottom:12px}.payment-count{padding:3px 7px;border-radius:4px;background:#f0f3f7}.payment-order-link{color:#1769e0;font-size:12px;text-decoration:none}.payment-filters{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0 12px}.payment-filters>.el-input{flex:1;min-width:230px}.payment-filter{display:flex;align-items:center;gap:9px;color:#526173;font-size:12px}.payment-filter :deep(.el-select){width:150px}
|
||||
.payment-table-wrap{width:100%;overflow-x:auto;border:1px solid var(--payment-line);border-radius:6px}.payment-table-wrap :deep(.el-table){min-width:850px}.payment-table-wrap :deep(.el-table th.el-table__cell){height:42px;background:#f7f9fc;color:#657387;font-size:12px;font-weight:600}.payment-table-wrap :deep(.el-table td.el-table__cell){height:57px;color:#354255;font-size:13px}
|
||||
.payment-trade,.channel-card code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px}.payment-trade{display:block;overflow:hidden;color:#526173;text-overflow:ellipsis;white-space:nowrap}.payment-state{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;white-space:nowrap}.payment-state i{width:7px;height:7px;border-radius:50%;background:#98a3b2}.payment-state.is-success{color:#16845b}.payment-state.is-success i{background:#20a36a}.payment-state.is-pending{color:#8b640e}.payment-state.is-pending i{background:#d69a28}.payment-state.is-inactive{color:#687586}
|
||||
.payment-error{margin:12px 0;color:#b44830;font-size:13px}.payment-pagination{margin-top:12px;color:var(--payment-muted);font-size:12px}.payment-pagination :deep(.el-pagination){margin-top:0}
|
||||
@media(max-width:900px){.payment-filters>.el-input{flex-basis:100%}}@media(max-width:620px){.payment-heading{align-items:flex-start;flex-wrap:wrap}.payment-config{padding:15px}.payment-subheading{align-items:flex-start;flex-wrap:wrap}.channel-grid{grid-template-columns:minmax(0,1fr)}.payment-list-toolbar,.payment-pagination{align-items:flex-start;flex-direction:column}.payment-filter{justify-content:space-between;width:100%}.payment-filter :deep(.el-select){width:min(72%,280px)}.payment-pagination :deep(.el-pagination){padding-left:0}}
|
||||
</style>
|
||||
Reference in New Issue
Block a user