feat: 店铺账号密码页显示真实绑定手机号

- 「绑定手机号」字段取消 secret 遮蔽,页面与导出均显示镜像中的真实手机号
- 更新 StoreAccountMirrorRepositoryTest 与 PrototypePageTest 覆盖新行为
- 密码配置状态列已由 #116 完成,本提交不重复改动
This commit is contained in:
WuYongJie 2026-09-08 11:41:59 +08:00
parent 0b988a4b99
commit 8dc9f3bc6f
3 changed files with 9 additions and 4 deletions

View File

@ -254,7 +254,7 @@ return [
['name' => 'account_type', 'label' => '账号类型'],
['name' => 'account', 'label' => '账号'],
['name' => 'password_configured', 'label' => '密码', 'kind' => 'secret_status'],
['name' => 'bound_phone', 'label' => '绑定手机号', 'kind' => 'secret'],
['name' => 'bound_phone', 'label' => '绑定手机号'],
['name' => 'verification_contact', 'label' => '手机号验证码对接人'],
['name' => 'account_group_name', 'label' => '账号分组名称'],
['name' => 'created_at', 'label' => '店铺创建时间', 'kind' => 'date'],

View File

@ -21,7 +21,7 @@ class PrototypePageTest extends FeatureTestCase
'profit_center' => '测试利润中心',
'account_type' => '主账号',
'account' => 'test-account',
'password_configured' => null,
'password_configured' => true,
'bound_phone' => '13800000000',
'verification_contact' => '测试对接人',
'account_group_name' => '测试分组',
@ -44,7 +44,8 @@ class PrototypePageTest extends FeatureTestCase
->assertSeeText('共 958 条')
->assertSeeText('已从共享业务镜像读取 958 条数据')
->assertSeeText('主账号')
->assertSeeText('状态未同步')
->assertSeeText('已设置')
->assertSeeText('13800000000')
->assertDontSeeText('MAIN')
->assertDontSeeText('共享镜像中暂未读取到店铺账号数据');
}

View File

@ -46,6 +46,7 @@ class StoreAccountMirrorRepositoryTest extends TestCase
foreach (['storeName', 'operationOwner', 'operationDepartmentHead', 'operationDirector', 'profitCenter', 'accountType', 'account', 'boundPhone', 'verificationContact', 'accountGroupName', 'createdAt', 'updatedAt'] as $column) {
$table->string($column)->nullable();
}
$table->boolean('passwordConfigured')->nullable();
});
DB::connection('business_mirror')->table('business_mirror_table_states')->insert([
'dataset_key' => StoreAccountMirrorRepository::DATASET,
@ -66,6 +67,7 @@ class StoreAccountMirrorRepositoryTest extends TestCase
'storeName' => '测试店铺',
'accountType' => $type,
'account' => 'test-account',
'passwordConfigured' => $type === 'MAIN' ? true : ($type === 'SUB' ? false : null),
]);
}
@ -74,6 +76,8 @@ class StoreAccountMirrorRepositoryTest extends TestCase
$this->assertSame('主账号', $rows['account-' . md5('MAIN')]['account_type']);
$this->assertSame('子账号', $rows['account-' . md5('SUB')]['account_type']);
$this->assertNull($rows['account-' . md5('/')]['account_type']);
$this->assertNull($rows['account-' . md5('MAIN')]['password_configured']);
$this->assertTrue($rows['account-' . md5('MAIN')]['password_configured']);
$this->assertFalse($rows['account-' . md5('SUB')]['password_configured']);
$this->assertNull($rows['account-' . md5('/')]['password_configured']);
}
}