feat(ui): 封面形象余额不足时不弹 toast;声音复刻弹窗增加积分消耗提示
This commit is contained in:
@@ -104,8 +104,7 @@ export default function CoverAvatarLibrary() {
|
||||
} catch (err) {
|
||||
const msg = err instanceof Error ? err.message : '上传失败';
|
||||
if (msg.includes('积分不足')) {
|
||||
progress.error('积分不足');
|
||||
toast.error('积分不足,每次上传封面形象消耗 10 积分,请先充值');
|
||||
progress.error('积分不足,请先充值');
|
||||
} else {
|
||||
progress.error(msg);
|
||||
toast.error(msg);
|
||||
|
||||
@@ -392,15 +392,20 @@ export default function VoiceMaterialLibrary() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', gap: 12, justifyContent: 'flex-end' }}>
|
||||
<button className="btn btn-secondary" onClick={() => setUploadModalOpen(false)}>取消</button>
|
||||
<button
|
||||
className="btn btn-primary"
|
||||
onClick={handleUpload}
|
||||
disabled={!uploadName.trim() || !selectedFile}
|
||||
>
|
||||
开始复刻
|
||||
</button>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||
<span style={{ fontSize: 'var(--font-xs)', color: 'var(--text-tertiary)' }}>
|
||||
每次复刻消耗 <strong style={{ color: 'var(--primary)' }}>200</strong> 积分
|
||||
</span>
|
||||
<div style={{ display: 'flex', gap: 12 }}>
|
||||
<button className="btn btn-secondary" onClick={() => setUploadModalOpen(false)}>取消</button>
|
||||
<button
|
||||
className="btn btn-primary"
|
||||
onClick={handleUpload}
|
||||
disabled={!uploadName.trim() || !selectedFile}
|
||||
>
|
||||
开始复刻
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user