Compare commits
No commits in common. "474caa56e06c6b3db695ef8f79ef7e802d1d59fe" and "ce5d10be47047b6d7c0ff23b03e99938654c2e57" have entirely different histories.
474caa56e0
...
ce5d10be47
@ -45,15 +45,6 @@ export async function resetResidentRegisterRewardConfig(sysOrigin: string) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function pageResidentRegisterRewardDailyRecords(
|
|
||||||
params: Record<string, any>,
|
|
||||||
) {
|
|
||||||
return requestClient.get<Record<string, any>>(
|
|
||||||
'/go/resident-activity/register-reward/daily-record/page',
|
|
||||||
{ params },
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function pageSpecifiedGiftWeeklyRankConfigs(params: Record<string, any>) {
|
export async function pageSpecifiedGiftWeeklyRankConfigs(params: Record<string, any>) {
|
||||||
return requestClient.get<LegacyPageResult<Record<string, any>>>(
|
return requestClient.get<LegacyPageResult<Record<string, any>>>(
|
||||||
`${SPECIFIED_GIFT_WEEKLY_RANK_BASE}/config/page`,
|
`${SPECIFIED_GIFT_WEEKLY_RANK_BASE}/config/page`,
|
||||||
|
|||||||
@ -6,26 +6,21 @@ import { useAccessStore } from '@vben/stores';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
getResidentRegisterRewardConfig,
|
getResidentRegisterRewardConfig,
|
||||||
pageResidentRegisterRewardDailyRecords,
|
|
||||||
resetResidentRegisterRewardConfig,
|
resetResidentRegisterRewardConfig,
|
||||||
saveResidentRegisterRewardConfig,
|
saveResidentRegisterRewardConfig,
|
||||||
} from '#/api/legacy/resident-activity';
|
} from '#/api/legacy/resident-activity';
|
||||||
import ActivityResourceGroupSelectDrawer from '#/views/props/components/activity-resource-group-select-drawer.vue';
|
import ActivityResourceGroupSelectDrawer from '#/views/props/components/activity-resource-group-select-drawer.vue';
|
||||||
import UserProfileLink from '#/views/operate/components/user-profile-link.vue';
|
|
||||||
import { getAllowedSysOrigins } from '#/views/system/shared';
|
import { getAllowedSysOrigins } from '#/views/system/shared';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Card,
|
Card,
|
||||||
DatePicker,
|
|
||||||
InputNumber,
|
InputNumber,
|
||||||
Modal,
|
Modal,
|
||||||
Pagination,
|
|
||||||
Select,
|
Select,
|
||||||
Space,
|
Space,
|
||||||
Spin,
|
Spin,
|
||||||
Switch,
|
Switch,
|
||||||
Table,
|
|
||||||
Tag,
|
Tag,
|
||||||
message,
|
message,
|
||||||
} from 'antdv-next';
|
} from 'antdv-next';
|
||||||
@ -40,14 +35,10 @@ const sysOriginOptions = computed(() => {
|
|||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const saving = ref(false);
|
const saving = ref(false);
|
||||||
const recordLoading = ref(false);
|
|
||||||
const recordTotal = ref(0);
|
|
||||||
const groupPickerOpen = ref(false);
|
const groupPickerOpen = ref(false);
|
||||||
const recordList = ref<Array<Record<string, any>>>([]);
|
|
||||||
|
|
||||||
const form = reactive<Record<string, any>>({
|
const form = reactive<Record<string, any>>({
|
||||||
configured: false,
|
configured: false,
|
||||||
dailyLimit: 0,
|
|
||||||
enabled: false,
|
enabled: false,
|
||||||
goldAmount: 0,
|
goldAmount: 0,
|
||||||
rewardGroupId: null,
|
rewardGroupId: null,
|
||||||
@ -55,22 +46,6 @@ const form = reactive<Record<string, any>>({
|
|||||||
sysOrigin: '',
|
sysOrigin: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
const recordQuery = reactive<Record<string, any>>({
|
|
||||||
claimDate: '',
|
|
||||||
cursor: 1,
|
|
||||||
limit: 20,
|
|
||||||
});
|
|
||||||
|
|
||||||
const recordSummary = reactive<Record<string, any>>({
|
|
||||||
dailyLimit: 0,
|
|
||||||
date: '',
|
|
||||||
issuedCount: 0,
|
|
||||||
limitEnabled: false,
|
|
||||||
occupiedCount: 0,
|
|
||||||
remainingCount: 0,
|
|
||||||
successCount: 0,
|
|
||||||
});
|
|
||||||
|
|
||||||
const statusMeta = computed(() => {
|
const statusMeta = computed(() => {
|
||||||
if (!form.configured) {
|
if (!form.configured) {
|
||||||
return {
|
return {
|
||||||
@ -82,10 +57,7 @@ const statusMeta = computed(() => {
|
|||||||
if (form.enabled) {
|
if (form.enabled) {
|
||||||
return {
|
return {
|
||||||
color: 'success',
|
color: 'success',
|
||||||
description:
|
description: '当前已启用,注册后会按下面配置发金币和/或奖励组。',
|
||||||
form.dailyLimit > 0
|
|
||||||
? `当前已启用,每日最多发放 ${form.dailyLimit} 份注册奖励。`
|
|
||||||
: '当前已启用,注册后会按下面配置发金币和/或奖励组。',
|
|
||||||
text: '已启用',
|
text: '已启用',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -96,20 +68,9 @@ const statusMeta = computed(() => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const recordColumns = [
|
|
||||||
{ dataIndex: 'user', key: 'user', title: '领取用户', width: 280 },
|
|
||||||
{ dataIndex: 'claimResult', key: 'claimResult', title: '领取结果', width: 220 },
|
|
||||||
{ dataIndex: 'status', key: 'status', title: '处理状态', width: 120 },
|
|
||||||
{ dataIndex: 'rewardPayload', key: 'rewardPayload', title: '奖励内容', width: 220 },
|
|
||||||
{ dataIndex: 'claimDate', key: 'claimDate', title: '领取日期', width: 120 },
|
|
||||||
{ dataIndex: 'createTime', key: 'createTime', title: '触发时间', width: 180 },
|
|
||||||
{ dataIndex: 'errorMessage', key: 'errorMessage', title: '备注 / 失败原因', width: 260 },
|
|
||||||
];
|
|
||||||
|
|
||||||
function normalizeConfig(result: Record<string, any> | null | undefined) {
|
function normalizeConfig(result: Record<string, any> | null | undefined) {
|
||||||
const value = result ?? {};
|
const value = result ?? {};
|
||||||
form.configured = Boolean(value.configured);
|
form.configured = Boolean(value.configured);
|
||||||
form.dailyLimit = Number(value.dailyLimit || 0);
|
|
||||||
form.enabled = Boolean(value.enabled);
|
form.enabled = Boolean(value.enabled);
|
||||||
form.goldAmount = Number(value.goldAmount || 0);
|
form.goldAmount = Number(value.goldAmount || 0);
|
||||||
form.rewardGroupId = value.rewardGroupId ?? null;
|
form.rewardGroupId = value.rewardGroupId ?? null;
|
||||||
@ -117,46 +78,7 @@ function normalizeConfig(result: Record<string, any> | null | undefined) {
|
|||||||
form.sysOrigin = String(value.sysOrigin || form.sysOrigin || sysOriginOptions.value[0]?.value || '');
|
form.sysOrigin = String(value.sysOrigin || form.sysOrigin || sysOriginOptions.value[0]?.value || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function syncRecordSummary(result: Record<string, any> | null | undefined) {
|
async function loadData() {
|
||||||
const value = result ?? {};
|
|
||||||
recordSummary.date = String(value.date || recordSummary.date || '');
|
|
||||||
recordSummary.dailyLimit = Number(value.dailyLimit || 0);
|
|
||||||
recordSummary.limitEnabled = Boolean(value.limitEnabled);
|
|
||||||
recordSummary.occupiedCount = Number(value.occupiedCount || 0);
|
|
||||||
recordSummary.issuedCount = Number(value.issuedCount || 0);
|
|
||||||
recordSummary.successCount = Number(value.successCount || 0);
|
|
||||||
recordSummary.remainingCount = Number(value.remainingCount || 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
function claimResultColor(result: string) {
|
|
||||||
switch (String(result || '').toUpperCase()) {
|
|
||||||
case 'REWARDED':
|
|
||||||
return 'success';
|
|
||||||
case 'QUOTA_EXHAUSTED':
|
|
||||||
return 'warning';
|
|
||||||
case 'FAILED':
|
|
||||||
return 'error';
|
|
||||||
case 'SKIPPED':
|
|
||||||
return 'default';
|
|
||||||
default:
|
|
||||||
return 'processing';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function processStatusColor(status: string) {
|
|
||||||
switch (String(status || '').toUpperCase()) {
|
|
||||||
case 'SUCCESS':
|
|
||||||
return 'success';
|
|
||||||
case 'FAILED':
|
|
||||||
return 'error';
|
|
||||||
case 'SKIPPED':
|
|
||||||
return 'default';
|
|
||||||
default:
|
|
||||||
return 'processing';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function loadConfig() {
|
|
||||||
if (!form.sysOrigin) {
|
if (!form.sysOrigin) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -169,36 +91,6 @@ async function loadConfig() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadDailyRecords(reset = false) {
|
|
||||||
if (!form.sysOrigin) {
|
|
||||||
recordList.value = [];
|
|
||||||
recordTotal.value = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (reset) {
|
|
||||||
recordQuery.cursor = 1;
|
|
||||||
}
|
|
||||||
recordLoading.value = true;
|
|
||||||
try {
|
|
||||||
const result = await pageResidentRegisterRewardDailyRecords({
|
|
||||||
...recordQuery,
|
|
||||||
sysOrigin: form.sysOrigin,
|
|
||||||
});
|
|
||||||
recordList.value = Array.isArray(result.records) ? result.records : [];
|
|
||||||
recordTotal.value = Number(result.total || 0);
|
|
||||||
syncRecordSummary(result);
|
|
||||||
if (!recordQuery.claimDate && result.date) {
|
|
||||||
recordQuery.claimDate = String(result.date);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
recordLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function loadData() {
|
|
||||||
await Promise.all([loadConfig(), loadDailyRecords(true)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
sysOriginOptions,
|
sysOriginOptions,
|
||||||
(options) => {
|
(options) => {
|
||||||
@ -238,7 +130,6 @@ async function submitForm() {
|
|||||||
saving.value = true;
|
saving.value = true;
|
||||||
try {
|
try {
|
||||||
await saveResidentRegisterRewardConfig({
|
await saveResidentRegisterRewardConfig({
|
||||||
dailyLimit: Number(form.dailyLimit || 0),
|
|
||||||
enabled: Boolean(form.enabled),
|
enabled: Boolean(form.enabled),
|
||||||
goldAmount: Number(form.goldAmount || 0),
|
goldAmount: Number(form.goldAmount || 0),
|
||||||
rewardGroupId: form.rewardGroupId ?? null,
|
rewardGroupId: form.rewardGroupId ?? null,
|
||||||
@ -276,16 +167,6 @@ function handleReset() {
|
|||||||
content: '清空后会删除当前系统的后台配置,普通注册成功后不再发放注册奖励。',
|
content: '清空后会删除当前系统的后台配置,普通注册成功后不再发放注册奖励。',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleRecordSearch() {
|
|
||||||
void loadDailyRecords(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleRecordPageChange(page: number, pageSize: number) {
|
|
||||||
recordQuery.cursor = page;
|
|
||||||
recordQuery.limit = pageSize;
|
|
||||||
void loadDailyRecords();
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -325,19 +206,6 @@ function handleRecordPageChange(page: number, pageSize: number) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="section">
|
|
||||||
<div class="field-label">每日限制份数</div>
|
|
||||||
<InputNumber
|
|
||||||
v-model:value="form.dailyLimit"
|
|
||||||
:disabled="!form.enabled"
|
|
||||||
:min="0"
|
|
||||||
:precision="0"
|
|
||||||
placeholder="0 表示不限"
|
|
||||||
style="width: 240px"
|
|
||||||
/>
|
|
||||||
<span class="field-desc">0 表示不限,超过当天限额后新用户会视为领取成功但不再真实发奖。</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="field-label">赠送奖励组</div>
|
<div class="field-label">赠送奖励组</div>
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
@ -365,7 +233,7 @@ function handleRecordPageChange(page: number, pageSize: number) {
|
|||||||
<div class="tips">
|
<div class="tips">
|
||||||
<div>未配置:注册成功后不发奖励。</div>
|
<div>未配置:注册成功后不发奖励。</div>
|
||||||
<div>已启用:可以同时送金币和奖励组,两者至少配置一个。</div>
|
<div>已启用:可以同时送金币和奖励组,两者至少配置一个。</div>
|
||||||
<div>每日限制份数:达到上限后,后续用户会直接记为领取成功,不再真实发奖。</div>
|
<div>已关闭:注册成功后不发奖励。</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Space class="actions" wrap>
|
<Space class="actions" wrap>
|
||||||
@ -378,95 +246,6 @@ function handleRecordPageChange(page: number, pageSize: number) {
|
|||||||
</Space>
|
</Space>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card :bordered="false" class="record-card" title="每日领取记录">
|
|
||||||
<div class="toolbar">
|
|
||||||
<Space wrap>
|
|
||||||
<DatePicker
|
|
||||||
v-model:value="recordQuery.claimDate"
|
|
||||||
placeholder="领取日期"
|
|
||||||
style="width: 160px"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
/>
|
|
||||||
<Button :loading="recordLoading" type="primary" @click="handleRecordSearch">
|
|
||||||
查询
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="summary">
|
|
||||||
<Tag color="processing">
|
|
||||||
统计日期:{{ recordSummary.date || '-' }}
|
|
||||||
</Tag>
|
|
||||||
<Tag color="purple">
|
|
||||||
每日限额:{{ recordSummary.limitEnabled ? `${recordSummary.dailyLimit} 份` : '不限' }}
|
|
||||||
</Tag>
|
|
||||||
<Tag color="orange">
|
|
||||||
已占用名额:{{ recordSummary.occupiedCount }}
|
|
||||||
</Tag>
|
|
||||||
<Tag color="success">
|
|
||||||
已发放成功:{{ recordSummary.issuedCount }}
|
|
||||||
</Tag>
|
|
||||||
<Tag color="cyan">
|
|
||||||
领取成功人数:{{ recordSummary.successCount }}
|
|
||||||
</Tag>
|
|
||||||
<Tag color="default">
|
|
||||||
剩余名额:{{ recordSummary.limitEnabled ? `${recordSummary.remainingCount} 份` : '不限' }}
|
|
||||||
</Tag>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Table
|
|
||||||
:columns="recordColumns"
|
|
||||||
:data-source="recordList"
|
|
||||||
:loading="recordLoading"
|
|
||||||
:pagination="false"
|
|
||||||
row-key="id"
|
|
||||||
:scroll="{ x: 1280 }"
|
|
||||||
>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.key === 'user'">
|
|
||||||
<UserProfileLink
|
|
||||||
:profile="{
|
|
||||||
account: record.account,
|
|
||||||
countryCode: record.countryCode,
|
|
||||||
countryName: record.countryName,
|
|
||||||
id: record.userId,
|
|
||||||
userAvatar: record.userAvatar,
|
|
||||||
userNickname: record.userNickname,
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.key === 'claimResult'">
|
|
||||||
<Tag :color="claimResultColor(record.claimResult)">
|
|
||||||
{{ record.claimResultText || '-' }}
|
|
||||||
</Tag>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.key === 'status'">
|
|
||||||
<Tag :color="processStatusColor(record.status)">
|
|
||||||
{{ record.status || '-' }}
|
|
||||||
</Tag>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.key === 'rewardPayload'">
|
|
||||||
<div>金币:{{ record.goldAmount || 0 }}</div>
|
|
||||||
<div>奖励组:{{ record.rewardGroupId || '-' }}</div>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.key === 'errorMessage'">
|
|
||||||
{{ record.errorMessage || '-' }}
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</Table>
|
|
||||||
|
|
||||||
<div v-if="recordTotal > 0" class="pager">
|
|
||||||
<Pagination
|
|
||||||
:current="recordQuery.cursor"
|
|
||||||
:page-size="recordQuery.limit"
|
|
||||||
:total="recordTotal"
|
|
||||||
show-size-changer
|
|
||||||
@change="handleRecordPageChange"
|
|
||||||
@showSizeChange="handleRecordPageChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<ActivityResourceGroupSelectDrawer
|
<ActivityResourceGroupSelectDrawer
|
||||||
:open="groupPickerOpen"
|
:open="groupPickerOpen"
|
||||||
:sys-origin="form.sysOrigin"
|
:sys-origin="form.sysOrigin"
|
||||||
@ -479,7 +258,7 @@ function handleRecordPageChange(page: number, pageSize: number) {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.toolbar {
|
.toolbar {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-desc {
|
.status-desc {
|
||||||
@ -499,10 +278,6 @@ function handleRecordPageChange(page: number, pageSize: number) {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.field-desc {
|
|
||||||
color: rgb(100 116 139);
|
|
||||||
}
|
|
||||||
|
|
||||||
.reward-group {
|
.reward-group {
|
||||||
color: rgb(15 23 42);
|
color: rgb(15 23 42);
|
||||||
}
|
}
|
||||||
@ -523,21 +298,4 @@ function handleRecordPageChange(page: number, pageSize: number) {
|
|||||||
.actions {
|
.actions {
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.record-card {
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summary {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 12px;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pager {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -40,6 +40,7 @@ import {
|
|||||||
RadioGroup,
|
RadioGroup,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
|
SelectOption,
|
||||||
Space,
|
Space,
|
||||||
Table,
|
Table,
|
||||||
TabPane,
|
TabPane,
|
||||||
@ -319,16 +320,6 @@ const withdrawalWaysSelectOptions = BANK_CARD_TYPES.map((item) => ({
|
|||||||
label: item.name,
|
label: item.name,
|
||||||
value: item.value,
|
value: item.value,
|
||||||
}));
|
}));
|
||||||
const assistTypeOptions = REGION_ASSIST_TYPES.map((item) => ({
|
|
||||||
label: item.name,
|
|
||||||
value: item.value,
|
|
||||||
}));
|
|
||||||
const assistRegionOptions = computed(() =>
|
|
||||||
regionOptions.value.map((item) => ({
|
|
||||||
label: item.regionName || item.regionCode || item.id,
|
|
||||||
value: item.id,
|
|
||||||
})),
|
|
||||||
);
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
sysOriginOptions,
|
sysOriginOptions,
|
||||||
@ -705,19 +696,35 @@ loadCountryOptions();
|
|||||||
<Select
|
<Select
|
||||||
v-model:value="assistQuery.regionId"
|
v-model:value="assistQuery.regionId"
|
||||||
allow-clear
|
allow-clear
|
||||||
:options="assistRegionOptions"
|
option-label-prop="children"
|
||||||
placeholder="请选择区域"
|
placeholder="请选择区域"
|
||||||
style="width: 180px"
|
style="width: 180px"
|
||||||
/>
|
>
|
||||||
|
<SelectOption
|
||||||
|
v-for="item in regionOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
{{ item.regionName }}
|
||||||
|
</SelectOption>
|
||||||
|
</Select>
|
||||||
</InlineFilterField>
|
</InlineFilterField>
|
||||||
<InlineFilterField label="业务类型" :label-width="84">
|
<InlineFilterField label="业务类型" :label-width="84">
|
||||||
<Select
|
<Select
|
||||||
v-model:value="assistQuery.type"
|
v-model:value="assistQuery.type"
|
||||||
allow-clear
|
allow-clear
|
||||||
:options="assistTypeOptions"
|
option-label-prop="children"
|
||||||
placeholder="业务类型"
|
placeholder="业务类型"
|
||||||
style="width: 280px"
|
style="width: 280px"
|
||||||
/>
|
>
|
||||||
|
<SelectOption
|
||||||
|
v-for="item in REGION_ASSIST_TYPES"
|
||||||
|
:key="item.value"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</SelectOption>
|
||||||
|
</Select>
|
||||||
</InlineFilterField>
|
</InlineFilterField>
|
||||||
<Button type="primary" @click="loadAssistList">搜索</Button>
|
<Button type="primary" @click="loadAssistList">搜索</Button>
|
||||||
<Button @click="openAssistCreate">新增</Button>
|
<Button @click="openAssistCreate">新增</Button>
|
||||||
@ -904,20 +911,34 @@ loadCountryOptions();
|
|||||||
>
|
>
|
||||||
<Form :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" layout="horizontal">
|
<Form :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" layout="horizontal">
|
||||||
<FormItem label="业务类型">
|
<FormItem label="业务类型">
|
||||||
<Select
|
<Select option-label-prop="children"
|
||||||
v-model:value="assistForm.type"
|
v-model:value="assistForm.type"
|
||||||
:options="assistTypeOptions"
|
|
||||||
:disabled="savingAssist || Boolean(assistForm.id)"
|
:disabled="savingAssist || Boolean(assistForm.id)"
|
||||||
placeholder="请选择业务类型"
|
placeholder="请选择业务类型"
|
||||||
/>
|
>
|
||||||
|
<SelectOption
|
||||||
|
v-for="item in REGION_ASSIST_TYPES"
|
||||||
|
:key="item.value"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</SelectOption>
|
||||||
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="区域">
|
<FormItem label="区域">
|
||||||
<Select
|
<Select option-label-prop="children"
|
||||||
v-model:value="assistForm.regionId"
|
v-model:value="assistForm.regionId"
|
||||||
:options="assistRegionOptions"
|
|
||||||
:disabled="savingAssist || Boolean(assistForm.id)"
|
:disabled="savingAssist || Boolean(assistForm.id)"
|
||||||
placeholder="请选择区域"
|
placeholder="请选择区域"
|
||||||
/>
|
>
|
||||||
|
<SelectOption
|
||||||
|
v-for="item in regionOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
{{ item.regionName }}
|
||||||
|
</SelectOption>
|
||||||
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<template v-if="assistForm.type === 'DIAMOND_EXCHANGE_GOLD'">
|
<template v-if="assistForm.type === 'DIAMOND_EXCHANGE_GOLD'">
|
||||||
<FormItem label="值">
|
<FormItem label="值">
|
||||||
|
|||||||
@ -5,7 +5,6 @@ const DEV_API_INTERNAL_PREFIX = '/__dev_api_internal__';
|
|||||||
const DEV_API_PROD_PREFIX = '/__dev_api_prod__';
|
const DEV_API_PROD_PREFIX = '/__dev_api_prod__';
|
||||||
const DEV_INTERNAL_CONSOLE_TARGET = 'http://127.0.0.1:2700';
|
const DEV_INTERNAL_CONSOLE_TARGET = 'http://127.0.0.1:2700';
|
||||||
const DEV_INTERNAL_GOLANG_TARGET = 'http://127.0.0.1:2900';
|
const DEV_INTERNAL_GOLANG_TARGET = 'http://127.0.0.1:2900';
|
||||||
const DEV_PROD_GOLANG_TARGET = 'https://jvapi.haiyihy.com';
|
|
||||||
const DEV_PROD_TARGET = 'https://yumi-admin.haiyihy.com';
|
const DEV_PROD_TARGET = 'https://yumi-admin.haiyihy.com';
|
||||||
|
|
||||||
function createPrefixRegExp(prefix: string) {
|
function createPrefixRegExp(prefix: string) {
|
||||||
@ -32,13 +31,6 @@ export default defineConfig(async () => {
|
|||||||
target: DEV_INTERNAL_CONSOLE_TARGET,
|
target: DEV_INTERNAL_CONSOLE_TARGET,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
[`${DEV_API_PROD_PREFIX}/go`]: {
|
|
||||||
changeOrigin: true,
|
|
||||||
rewrite: (path) =>
|
|
||||||
path.replace(createPrefixRegExp(DEV_API_PROD_PREFIX), ''),
|
|
||||||
target: DEV_PROD_GOLANG_TARGET,
|
|
||||||
ws: true,
|
|
||||||
},
|
|
||||||
[DEV_API_PROD_PREFIX]: {
|
[DEV_API_PROD_PREFIX]: {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) =>
|
rewrite: (path) =>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user