|
@@ -41,15 +41,15 @@
|
|
|
<a-col :span="8">
|
|
|
<p class="t1">账户余额</p>
|
|
|
<p class="t3">
|
|
|
- <span class="value">{{ customerStats.balance.value }}</span>
|
|
|
- <span class="unit">{{ customerStats.balance.unit }}</span>
|
|
|
+ <span class="value">{{ customerStats.balance }}</span>
|
|
|
+ <span class="currency">{{ customerStats.currency }}</span>
|
|
|
</p>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
<p class="t1">总花费</p>
|
|
|
<p class="t3">
|
|
|
- <span class="value">{{ customerStats.cost.value }}</span>
|
|
|
- <span class="unit">{{ customerStats.cost.unit }}</span>
|
|
|
+ <span class="value">{{ customerStats.cost }}</span>
|
|
|
+ <span class="currency">{{ customerStats.currency }}</span>
|
|
|
</p>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
@@ -61,9 +61,9 @@
|
|
|
<a-col :span="8">
|
|
|
<a-row class="r2" style="height: 195px">
|
|
|
<a-col :span="24">
|
|
|
- <p class="t1">账户优化分数</p>
|
|
|
+ <p class="t1">优化得分</p>
|
|
|
<div class="score-circle" style="padding-bottom: 10px;">
|
|
|
- <a-progress type="circle" :percent="customerStats.optiScore" :width="80" :stroke-color="{
|
|
|
+ <a-progress type="circle" :percent="customerStats.optiScore.toFixed(2)" :width="80" :stroke-color="{
|
|
|
'0%': '#FFB800',
|
|
|
'100%': '#FFC53D'
|
|
|
}" />
|
|
@@ -211,7 +211,7 @@ const chartDetailDataCol = ref([
|
|
|
key: 'countryName'
|
|
|
},
|
|
|
{
|
|
|
- title: '点击数|展示数',
|
|
|
+ title: '点击数 | 展示数',
|
|
|
key: 'numSlot',
|
|
|
align: 'right'
|
|
|
}
|
|
@@ -426,6 +426,11 @@ const positionColumns = ref([
|
|
|
key: 'placement',
|
|
|
},
|
|
|
{
|
|
|
+ title: '类型',
|
|
|
+ dataIndex: 'type',
|
|
|
+ key: 'type',
|
|
|
+ },
|
|
|
+ {
|
|
|
title: '展示次数',
|
|
|
dataIndex: 'impressions',
|
|
|
key: 'impressions',
|
|
@@ -447,16 +452,11 @@ const positionData = ref([]);
|
|
|
|
|
|
// 修改响应式数据的类型定义
|
|
|
const customerStats = ref({
|
|
|
- descriptiveName: '-',
|
|
|
customerId: '-',
|
|
|
- balance: {
|
|
|
- value: '-',
|
|
|
- unit: ''
|
|
|
- },
|
|
|
- cost: {
|
|
|
- value: '-',
|
|
|
- unit: ''
|
|
|
- },
|
|
|
+ descriptiveName: '-',
|
|
|
+ currency: '',
|
|
|
+ balance: '-',
|
|
|
+ cost: '-',
|
|
|
conversions: '-',
|
|
|
optiScore: 0
|
|
|
});
|
|
@@ -481,21 +481,16 @@ const getCustomerStats = async () => {
|
|
|
const res = await getGoogleAdsCustomerStats(queryParam);
|
|
|
const stats = res;
|
|
|
|
|
|
- // 处理余额和花费的分割
|
|
|
- const balanceParts = (stats.balance ?? '-').toString().match(/^([\d,.]+)\s*(.*)$/);
|
|
|
- const costParts = (stats.cost ?? '-').toString().match(/^([\d,.]+)\s*(.*)$/);
|
|
|
+ // // 处理余额和花费的分割
|
|
|
+ // const balanceParts = (stats.balance ?? '-').toString().match(/^([\d,.]+)\s*(.*)$/);
|
|
|
+ // const costParts = (stats.cost ?? '-').toString().match(/^([\d,.]+)\s*(.*)$/);
|
|
|
|
|
|
customerStats.value = {
|
|
|
- descriptiveName: stats.descriptiveName ?? '-',
|
|
|
customerId: stats.customerId ?? '-',
|
|
|
- balance: {
|
|
|
- value: balanceParts ? formatNumber(balanceParts[1]) : '-',
|
|
|
- unit: balanceParts ? balanceParts[2] : ''
|
|
|
- },
|
|
|
- cost: {
|
|
|
- value: costParts ? formatNumber(costParts[1]) : '-',
|
|
|
- unit: costParts ? costParts[2] : ''
|
|
|
- },
|
|
|
+ descriptiveName: stats.descriptiveName ?? '-',
|
|
|
+ currency: stats.currencyCode ?? '',
|
|
|
+ balance: stats.balance ? formatNumber(stats.balance) : '-',
|
|
|
+ cost: stats.cost ? formatNumber(stats.cost) : '-',
|
|
|
conversions: stats.conversions ? formatNumber(stats.conversions) : '-',
|
|
|
optiScore: stats.optiScore ? stats.optiScore * 100 : 0
|
|
|
};
|
|
@@ -565,6 +560,7 @@ const getPlacementStats = async () => {
|
|
|
if (res) {
|
|
|
positionData.value = res.map(item => ({
|
|
|
placement: item.placement,
|
|
|
+ type: item.type,
|
|
|
impressions: item.impressions,
|
|
|
clicks: item.clicks,
|
|
|
ctr: item.ctr,
|
|
@@ -743,7 +739,7 @@ onMounted(() => {
|
|
|
font-size: 32px;
|
|
|
}
|
|
|
|
|
|
- .unit {
|
|
|
+ .currency {
|
|
|
font-size: 16px;
|
|
|
margin-left: 4px;
|
|
|
}
|