规范气站与配送点提现渠道

This commit is contained in:
czl231
2026-08-19 23:43:02 +08:00
parent 2f5b934037
commit b93202274d
13 changed files with 148 additions and 12 deletions

View File

@@ -13,6 +13,10 @@ const listPageSource = readFileSync(
resolve(root, 'src/views/shared/CrudListPage.vue'),
'utf8',
);
const fieldFormSource = readFileSync(
resolve(root, 'src/views/resource/ResourceFieldForm.vue'),
'utf8',
);
const contract = JSON.parse(
readFileSync(resolve(root, 'src/contracts/gas-resources.json'), 'utf8'),
);
@@ -54,6 +58,17 @@ if (searchSource.includes('关键字段模糊搜索'))
throw new Error('列表搜索不得使用含义不明确的兜底提示');
if (!listPageSource.includes('<a-form v-if="searchEnabled"'))
throw new Error('不支持搜索的资源必须隐藏完整搜索区域');
if (!source.includes("defaultValue: 'bank'"))
throw new Error('提现申请必须默认选择银行卡提现');
for (const option of [
"{ label: '银行卡提现', value: 'bank' }",
"{ label: '支付宝提现', value: 'alipay', disabled: true }",
"{ label: '微信提现', value: 'wechat', disabled: true }",
]) {
if (!source.includes(option)) throw new Error(`提现渠道配置缺失:${option}`);
}
if (!fieldFormSource.includes(':disabled="option.disabled"'))
throw new Error('未开通的提现渠道必须在下拉框中禁用');
const forbidden = [
'/platform/platform_', '/gas/gas_', '/delivery/delivery_', '/staff/',